/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.10.0-rc1
 * 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 { OutgoingSyncDeleteAction } from './OutgoingSyncDeleteAction';
import {
    OutgoingSyncDeleteActionFromJSON,
    OutgoingSyncDeleteActionFromJSONTyped,
    OutgoingSyncDeleteActionToJSON,
    OutgoingSyncDeleteActionToJSONTyped,
} from './OutgoingSyncDeleteAction';

/**
 * MicrosoftEntraProvider Serializer
 * @export
 * @interface PatchedMicrosoftEntraProviderRequest
 */
export interface PatchedMicrosoftEntraProviderRequest {
    /**
     * 
     * @type {string}
     * @memberof PatchedMicrosoftEntraProviderRequest
     */
    name?: string;
    /**
     * 
     * @type {Array<string>}
     * @memberof PatchedMicrosoftEntraProviderRequest
     */
    propertyMappings?: Array<string>;
    /**
     * Property mappings used for group creation/updating.
     * @type {Array<string>}
     * @memberof PatchedMicrosoftEntraProviderRequest
     */
    propertyMappingsGroup?: Array<string>;
    /**
     * 
     * @type {string}
     * @memberof PatchedMicrosoftEntraProviderRequest
     */
    clientId?: string;
    /**
     * 
     * @type {string}
     * @memberof PatchedMicrosoftEntraProviderRequest
     */
    clientSecret?: string;
    /**
     * 
     * @type {string}
     * @memberof PatchedMicrosoftEntraProviderRequest
     */
    tenantId?: string;
    /**
     * 
     * @type {boolean}
     * @memberof PatchedMicrosoftEntraProviderRequest
     */
    excludeUsersServiceAccount?: boolean;
    /**
     * 
     * @type {string}
     * @memberof PatchedMicrosoftEntraProviderRequest
     */
    filterGroup?: string | null;
    /**
     * 
     * @type {OutgoingSyncDeleteAction}
     * @memberof PatchedMicrosoftEntraProviderRequest
     */
    userDeleteAction?: OutgoingSyncDeleteAction;
    /**
     * 
     * @type {OutgoingSyncDeleteAction}
     * @memberof PatchedMicrosoftEntraProviderRequest
     */
    groupDeleteAction?: OutgoingSyncDeleteAction;
    /**
     * When enabled, provider will not modify or create objects in the remote system.
     * @type {boolean}
     * @memberof PatchedMicrosoftEntraProviderRequest
     */
    dryRun?: boolean;
}



/**
 * Check if a given object implements the PatchedMicrosoftEntraProviderRequest interface.
 */
export function instanceOfPatchedMicrosoftEntraProviderRequest(value: object): value is PatchedMicrosoftEntraProviderRequest {
    return true;
}

export function PatchedMicrosoftEntraProviderRequestFromJSON(json: any): PatchedMicrosoftEntraProviderRequest {
    return PatchedMicrosoftEntraProviderRequestFromJSONTyped(json, false);
}

export function PatchedMicrosoftEntraProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedMicrosoftEntraProviderRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'name': json['name'] == null ? undefined : json['name'],
        'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'],
        'propertyMappingsGroup': json['property_mappings_group'] == null ? undefined : json['property_mappings_group'],
        'clientId': json['client_id'] == null ? undefined : json['client_id'],
        'clientSecret': json['client_secret'] == null ? undefined : json['client_secret'],
        'tenantId': json['tenant_id'] == null ? undefined : json['tenant_id'],
        'excludeUsersServiceAccount': json['exclude_users_service_account'] == null ? undefined : json['exclude_users_service_account'],
        'filterGroup': json['filter_group'] == null ? undefined : json['filter_group'],
        'userDeleteAction': json['user_delete_action'] == null ? undefined : OutgoingSyncDeleteActionFromJSON(json['user_delete_action']),
        'groupDeleteAction': json['group_delete_action'] == null ? undefined : OutgoingSyncDeleteActionFromJSON(json['group_delete_action']),
        'dryRun': json['dry_run'] == null ? undefined : json['dry_run'],
    };
}

export function PatchedMicrosoftEntraProviderRequestToJSON(json: any): PatchedMicrosoftEntraProviderRequest {
    return PatchedMicrosoftEntraProviderRequestToJSONTyped(json, false);
}

export function PatchedMicrosoftEntraProviderRequestToJSONTyped(value?: PatchedMicrosoftEntraProviderRequest | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'name': value['name'],
        'property_mappings': value['propertyMappings'],
        'property_mappings_group': value['propertyMappingsGroup'],
        'client_id': value['clientId'],
        'client_secret': value['clientSecret'],
        'tenant_id': value['tenantId'],
        'exclude_users_service_account': value['excludeUsersServiceAccount'],
        'filter_group': value['filterGroup'],
        'user_delete_action': OutgoingSyncDeleteActionToJSON(value['userDeleteAction']),
        'group_delete_action': OutgoingSyncDeleteActionToJSON(value['groupDeleteAction']),
        'dry_run': value['dryRun'],
    };
}

