/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.12.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 GoogleWorkspaceProviderRequest
 */
export interface GoogleWorkspaceProviderRequest {
    /**
     * 
     * @type {string}
     * @memberof GoogleWorkspaceProviderRequest
     */
    name: string;
    /**
     * 
     * @type {Array<string>}
     * @memberof GoogleWorkspaceProviderRequest
     */
    propertyMappings?: Array<string>;
    /**
     * Property mappings used for group creation/updating.
     * @type {Array<string>}
     * @memberof GoogleWorkspaceProviderRequest
     */
    propertyMappingsGroup?: Array<string>;
    /**
     * 
     * @type {string}
     * @memberof GoogleWorkspaceProviderRequest
     */
    delegatedSubject: string;
    /**
     * 
     * @type {{ [key: string]: any; }}
     * @memberof GoogleWorkspaceProviderRequest
     */
    credentials: { [key: string]: any; };
    /**
     * 
     * @type {string}
     * @memberof GoogleWorkspaceProviderRequest
     */
    scopes?: string;
    /**
     * 
     * @type {boolean}
     * @memberof GoogleWorkspaceProviderRequest
     */
    excludeUsersServiceAccount?: boolean;
    /**
     * 
     * @type {string}
     * @memberof GoogleWorkspaceProviderRequest
     */
    filterGroup?: string | null;
    /**
     * 
     * @type {OutgoingSyncDeleteAction}
     * @memberof GoogleWorkspaceProviderRequest
     */
    userDeleteAction?: OutgoingSyncDeleteAction;
    /**
     * 
     * @type {OutgoingSyncDeleteAction}
     * @memberof GoogleWorkspaceProviderRequest
     */
    groupDeleteAction?: OutgoingSyncDeleteAction;
    /**
     * 
     * @type {string}
     * @memberof GoogleWorkspaceProviderRequest
     */
    defaultGroupEmailDomain: string;
    /**
     * When enabled, provider will not modify or create objects in the remote system.
     * @type {boolean}
     * @memberof GoogleWorkspaceProviderRequest
     */
    dryRun?: boolean;
}



/**
 * Check if a given object implements the GoogleWorkspaceProviderRequest interface.
 */
export function instanceOfGoogleWorkspaceProviderRequest(value: object): value is GoogleWorkspaceProviderRequest {
    if (!('name' in value) || value['name'] === undefined) return false;
    if (!('delegatedSubject' in value) || value['delegatedSubject'] === undefined) return false;
    if (!('credentials' in value) || value['credentials'] === undefined) return false;
    if (!('defaultGroupEmailDomain' in value) || value['defaultGroupEmailDomain'] === undefined) return false;
    return true;
}

export function GoogleWorkspaceProviderRequestFromJSON(json: any): GoogleWorkspaceProviderRequest {
    return GoogleWorkspaceProviderRequestFromJSONTyped(json, false);
}

export function GoogleWorkspaceProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleWorkspaceProviderRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'name': 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'],
        'credentials': 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'],
        'dryRun': json['dry_run'] == null ? undefined : json['dry_run'],
    };
}

export function GoogleWorkspaceProviderRequestToJSON(json: any): GoogleWorkspaceProviderRequest {
    return GoogleWorkspaceProviderRequestToJSONTyped(json, false);
}

export function GoogleWorkspaceProviderRequestToJSONTyped(value?: GoogleWorkspaceProviderRequest | 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'],
    };
}

