/* tslint:disable */ /* eslint-disable */ /** * authentik * Making authentication simple. * * The version of the OpenAPI document: 2026.8.0-rc7 * Contact: hello@goauthentik.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; /** * Mixin to validate that a valid enterprise license * exists before allowing to save the object * @export * @interface AgentRequest */ export interface AgentRequest { /** * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. * @type {string} * @memberof AgentRequest */ username: string; /** * User's display name. * @type {string} * @memberof AgentRequest */ name: string; /** * Designates whether this user should be treated as active. Unselect this instead of deleting accounts. * @type {boolean} * @memberof AgentRequest */ isActive?: boolean; /** * * @type {Date} * @memberof AgentRequest */ lastLogin?: Date | null; /** * * @type {string} * @memberof AgentRequest */ email?: string; /** * * @type {{ [key: string]: any; }} * @memberof AgentRequest */ attributes?: { [key: string]: any; }; /** * * @type {boolean} * @memberof AgentRequest */ expiring?: boolean; /** * * @type {Date} * @memberof AgentRequest */ expires?: Date | null; } /** * Check if a given object implements the AgentRequest interface. */ export function instanceOfAgentRequest(value: object): value is AgentRequest { if (!('username' in value) || value['username'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; return true; } export function AgentRequestFromJSON(json: any): AgentRequest { return AgentRequestFromJSONTyped(json, false); } export function AgentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentRequest { if (json == null) { return json; } return { 'username': json['username'], 'name': json['name'], 'isActive': json['is_active'] == null ? undefined : json['is_active'], 'lastLogin': json['last_login'] == null ? undefined : (new Date(json['last_login'])), 'email': json['email'] == null ? undefined : json['email'], 'attributes': json['attributes'] == null ? undefined : json['attributes'], 'expiring': json['expiring'] == null ? undefined : json['expiring'], 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), }; } export function AgentRequestToJSON(json: any): AgentRequest { return AgentRequestToJSONTyped(json, false); } export function AgentRequestToJSONTyped(value?: AgentRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'username': value['username'], 'name': value['name'], 'is_active': value['isActive'], 'last_login': value['lastLogin'] == null ? value['lastLogin'] : value['lastLogin'].toISOString(), 'email': value['email'], 'attributes': value['attributes'], 'expiring': value['expiring'], 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), }; }