/* 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 { ObjectAttributeTypeEnum } from './ObjectAttributeTypeEnum'; import { ObjectAttributeTypeEnumFromJSON, ObjectAttributeTypeEnumFromJSONTyped, ObjectAttributeTypeEnumToJSON, ObjectAttributeTypeEnumToJSONTyped, } from './ObjectAttributeTypeEnum'; /** * * @export * @interface ObjectAttributeRequest */ export interface ObjectAttributeRequest { /** * * @type {string} * @memberof ObjectAttributeRequest */ objectType: string; /** * * @type {boolean} * @memberof ObjectAttributeRequest */ enabled?: boolean; /** * * @type {string} * @memberof ObjectAttributeRequest */ key: string; /** * * @type {string} * @memberof ObjectAttributeRequest */ label: string; /** * * @type {string} * @memberof ObjectAttributeRequest */ regex?: string; /** * * @type {ObjectAttributeTypeEnum} * @memberof ObjectAttributeRequest */ type: ObjectAttributeTypeEnum; /** * * @type {string} * @memberof ObjectAttributeRequest */ group?: string; /** * Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update. * @type {string} * @memberof ObjectAttributeRequest */ managed?: string | null; /** * * @type {boolean} * @memberof ObjectAttributeRequest */ isUnique?: boolean; /** * * @type {boolean} * @memberof ObjectAttributeRequest */ isRequired?: boolean; } /** * Check if a given object implements the ObjectAttributeRequest interface. */ export function instanceOfObjectAttributeRequest(value: object): value is ObjectAttributeRequest { if (!('objectType' in value) || value['objectType'] === undefined) return false; if (!('key' in value) || value['key'] === undefined) return false; if (!('label' in value) || value['label'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; return true; } export function ObjectAttributeRequestFromJSON(json: any): ObjectAttributeRequest { return ObjectAttributeRequestFromJSONTyped(json, false); } export function ObjectAttributeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectAttributeRequest { if (json == null) { return json; } return { 'objectType': json['object_type'], 'enabled': json['enabled'] == null ? undefined : json['enabled'], 'key': json['key'], 'label': json['label'], 'regex': json['regex'] == null ? undefined : json['regex'], 'type': ObjectAttributeTypeEnumFromJSON(json['type']), 'group': json['group'] == null ? undefined : json['group'], 'managed': json['managed'] == null ? undefined : json['managed'], 'isUnique': json['is_unique'] == null ? undefined : json['is_unique'], 'isRequired': json['is_required'] == null ? undefined : json['is_required'], }; } export function ObjectAttributeRequestToJSON(json: any): ObjectAttributeRequest { return ObjectAttributeRequestToJSONTyped(json, false); } export function ObjectAttributeRequestToJSONTyped(value?: ObjectAttributeRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'object_type': value['objectType'], 'enabled': value['enabled'], 'key': value['key'], 'label': value['label'], 'regex': value['regex'], 'type': ObjectAttributeTypeEnumToJSON(value['type']), 'group': value['group'], 'managed': value['managed'], 'is_unique': value['isUnique'], 'is_required': value['isRequired'], }; }