/* 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 PatchedAgentRequest */ export interface PatchedAgentRequest { /** * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. * @type {string} * @memberof PatchedAgentRequest */ username?: string; /** * User's display name. * @type {string} * @memberof PatchedAgentRequest */ name?: string; /** * Designates whether this user should be treated as active. Unselect this instead of deleting accounts. * @type {boolean} * @memberof PatchedAgentRequest */ isActive?: boolean; /** * * @type {Date} * @memberof PatchedAgentRequest */ lastLogin?: Date | null; /** * * @type {string} * @memberof PatchedAgentRequest */ email?: string; /** * * @type {{ [key: string]: any; }} * @memberof PatchedAgentRequest */ attributes?: { [key: string]: any; }; /** * * @type {boolean} * @memberof PatchedAgentRequest */ expiring?: boolean; /** * * @type {Date} * @memberof PatchedAgentRequest */ expires?: Date | null; } /** * Check if a given object implements the PatchedAgentRequest interface. */ export function instanceOfPatchedAgentRequest(value: object): value is PatchedAgentRequest { return true; } export function PatchedAgentRequestFromJSON(json: any): PatchedAgentRequest { return PatchedAgentRequestFromJSONTyped(json, false); } export function PatchedAgentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedAgentRequest { if (json == null) { return json; } return { 'username': json['username'] == null ? undefined : json['username'], 'name': json['name'] == null ? undefined : 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 PatchedAgentRequestToJSON(json: any): PatchedAgentRequest { return PatchedAgentRequestToJSONTyped(json, false); } export function PatchedAgentRequestToJSONTyped(value?: PatchedAgentRequest | 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(), }; }