/* 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'; import type { PolicyBehaviorEnum } from './PolicyBehaviorEnum'; import { PolicyBehaviorEnumFromJSON, PolicyBehaviorEnumFromJSONTyped, PolicyBehaviorEnumToJSON, PolicyBehaviorEnumToJSONTyped, } from './PolicyBehaviorEnum'; /** * Base serializer class which doesn't implement create/update methods * @export * @interface AgentCreateRequest */ export interface AgentCreateRequest { /** * * @type {number} * @memberof AgentCreateRequest */ parent?: number; /** * * @type {string} * @memberof AgentCreateRequest */ label?: string; /** * * @type {boolean} * @memberof AgentCreateRequest */ expiring?: boolean; /** * * @type {Date} * @memberof AgentCreateRequest */ expires?: Date | null; /** * * @type {PolicyBehaviorEnum} * @memberof AgentCreateRequest */ policyBehavior?: PolicyBehaviorEnum; } /** * Check if a given object implements the AgentCreateRequest interface. */ export function instanceOfAgentCreateRequest(value: object): value is AgentCreateRequest { return true; } export function AgentCreateRequestFromJSON(json: any): AgentCreateRequest { return AgentCreateRequestFromJSONTyped(json, false); } export function AgentCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentCreateRequest { if (json == null) { return json; } return { 'parent': json['parent'] == null ? undefined : json['parent'], 'label': json['label'] == null ? undefined : json['label'], 'expiring': json['expiring'] == null ? undefined : json['expiring'], 'expires': json['expires'] == null ? undefined : (new Date(json['expires'])), 'policyBehavior': json['policy_behavior'] == null ? undefined : PolicyBehaviorEnumFromJSON(json['policy_behavior']), }; } export function AgentCreateRequestToJSON(json: any): AgentCreateRequest { return AgentCreateRequestToJSONTyped(json, false); } export function AgentCreateRequestToJSONTyped(value?: AgentCreateRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'parent': value['parent'], 'label': value['label'], 'expiring': value['expiring'], 'expires': value['expires'] == null ? value['expires'] : value['expires'].toISOString(), 'policy_behavior': PolicyBehaviorEnumToJSON(value['policyBehavior']), }; }