/* 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';

/**
 * GoogleWorkspaceProvider Serializer
 * @export
 * @interface PatchedGoogleWorkspaceProviderRequest
 */
export interface PatchedGoogleWorkspaceProviderRequest {
    /**
     * 
     * @type {string}
     * @memberof PatchedGoogleWorkspaceProviderRequest
     */
    name?: string;
    /**
     * 
     * @type {Array<string>}
     * @memberof PatchedGoogleWorkspaceProviderRequest
     */
    propertyMappings?: Array<string>;
    /**
     * Property mappings used for group creation/updating.
     * @type {Array<string>}
     * @memberof PatchedGoogleWorkspaceProviderRequest
     */
    propertyMappingsGroup?: Array<string>;
    /**
     * 
     * @type {string}
     * @memberof PatchedGoogleWorkspaceProviderRequest
     */
    delegatedSubject?: string;
    /**
     * 
     * @type {{ [key: string]: any; }}
     * @memberof PatchedGoogleWorkspaceProviderRequest
     */
    credentials?: { [key: string]: any; };
    /**
     * 
     * @type {string}
     * @memberof PatchedGoogleWorkspaceProviderRequest
     */
    scopes?: string;
    /**
     * 
     * @type {boolean}
     * @memberof PatchedGoogleWorkspaceProviderRequest
     */
    excludeUsersServiceAccount?: boolean;
    /**
     * 
     * @type {string}
     * @memberof PatchedGoogleWorkspaceProviderRequest
     */
    filterGroup?: string | null;
    /**
     * 
     * @type {OutgoingSyncDeleteAction}
     * @memberof PatchedGoogleWorkspaceProviderRequest
     */
    userDeleteAction?: OutgoingSyncDeleteAction;
    /**
     * 
     * @type {OutgoingSyncDeleteAction}
     * @memberof PatchedGoogleWorkspaceProviderRequest
     */
    groupDeleteAction?: OutgoingSyncDeleteAction;
    /**
     * 
     * @type {string}
     * @memberof PatchedGoogleWorkspaceProviderRequest
     */
    defaultGroupEmailDomain?: string;
    /**
     * When enabled, provider will not modify or create objects in the remote system.
     * @type {boolean}
     * @memberof PatchedGoogleWorkspaceProviderRequest
     */
    dryRun?: boolean;
}



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

export function PatchedGoogleWorkspaceProviderRequestFromJSON(json: any): PatchedGoogleWorkspaceProviderRequest {
    return PatchedGoogleWorkspaceProviderRequestFromJSONTyped(json, false);
}

export function PatchedGoogleWorkspaceProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedGoogleWorkspaceProviderRequest {
    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'],
        'delegatedSubject': json['delegated_subject'] == null ? undefined : json['delegated_subject'],
        'credentials': json['credentials'] == null ? undefined : json['credentials'],
        'scopes': json['scopes'] == null ? undefined : json['scopes'],
        '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']),
        'defaultGroupEmailDomain': json['default_group_email_domain'] == null ? undefined : json['default_group_email_domain'],
        'dryRun': json['dry_run'] == null ? undefined : json['dry_run'],
    };
}

export function PatchedGoogleWorkspaceProviderRequestToJSON(json: any): PatchedGoogleWorkspaceProviderRequest {
    return PatchedGoogleWorkspaceProviderRequestToJSONTyped(json, false);
}

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

    return {
        
        'name': value['name'],
        'property_mappings': value['propertyMappings'],
        'property_mappings_group': value['propertyMappingsGroup'],
        'delegated_subject': value['delegatedSubject'],
        'credentials': value['credentials'],
        'scopes': value['scopes'],
        'exclude_users_service_account': value['excludeUsersServiceAccount'],
        'filter_group': value['filterGroup'],
        'user_delete_action': OutgoingSyncDeleteActionToJSON(value['userDeleteAction']),
        'group_delete_action': OutgoingSyncDeleteActionToJSON(value['groupDeleteAction']),
        'default_group_email_domain': value['defaultGroupEmailDomain'],
        'dry_run': value['dryRun'],
    };
}

