/* tslint:disable */ /* eslint-disable */ /** * authentik * Making authentication simple. * * The version of the OpenAPI document: 2025.6.3 * 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 { ConsentStageModeEnum } from './ConsentStageModeEnum'; import { ConsentStageModeEnumFromJSON, ConsentStageModeEnumFromJSONTyped, ConsentStageModeEnumToJSON, ConsentStageModeEnumToJSONTyped, } from './ConsentStageModeEnum'; import type { FlowSetRequest } from './FlowSetRequest'; import { FlowSetRequestFromJSON, FlowSetRequestFromJSONTyped, FlowSetRequestToJSON, FlowSetRequestToJSONTyped, } from './FlowSetRequest'; /** * ConsentStage Serializer * @export * @interface ConsentStageRequest */ export interface ConsentStageRequest { /** * * @type {string} * @memberof ConsentStageRequest */ name: string; /** * * @type {Array} * @memberof ConsentStageRequest */ flowSet?: Array; /** * * @type {ConsentStageModeEnum} * @memberof ConsentStageRequest */ mode?: ConsentStageModeEnum; /** * Offset after which consent expires. (Format: hours=1;minutes=2;seconds=3). * @type {string} * @memberof ConsentStageRequest */ consentExpireIn?: string; } /** * Check if a given object implements the ConsentStageRequest interface. */ export function instanceOfConsentStageRequest(value: object): value is ConsentStageRequest { if (!('name' in value) || value['name'] === undefined) return false; return true; } export function ConsentStageRequestFromJSON(json: any): ConsentStageRequest { return ConsentStageRequestFromJSONTyped(json, false); } export function ConsentStageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsentStageRequest { if (json == null) { return json; } return { 'name': json['name'], 'flowSet': json['flow_set'] == null ? undefined : ((json['flow_set'] as Array).map(FlowSetRequestFromJSON)), 'mode': json['mode'] == null ? undefined : ConsentStageModeEnumFromJSON(json['mode']), 'consentExpireIn': json['consent_expire_in'] == null ? undefined : json['consent_expire_in'], }; } export function ConsentStageRequestToJSON(json: any): ConsentStageRequest { return ConsentStageRequestToJSONTyped(json, false); } export function ConsentStageRequestToJSONTyped(value?: ConsentStageRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'flow_set': value['flowSet'] == null ? undefined : ((value['flowSet'] as Array).map(FlowSetRequestToJSON)), 'mode': ConsentStageModeEnumToJSON(value['mode']), 'consent_expire_in': value['consentExpireIn'], }; }