/* 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 { UserGroup } from './UserGroup';
import {
    UserGroupFromJSON,
    UserGroupFromJSONTyped,
    UserGroupToJSON,
    UserGroupToJSONTyped,
} from './UserGroup';

/**
 * GoogleWorkspaceProviderGroup Serializer
 * @export
 * @interface GoogleWorkspaceProviderGroup
 */
export interface GoogleWorkspaceProviderGroup {
    /**
     * 
     * @type {string}
     * @memberof GoogleWorkspaceProviderGroup
     */
    readonly id: string;
    /**
     * 
     * @type {string}
     * @memberof GoogleWorkspaceProviderGroup
     */
    googleId: string;
    /**
     * 
     * @type {string}
     * @memberof GoogleWorkspaceProviderGroup
     */
    group: string;
    /**
     * 
     * @type {UserGroup}
     * @memberof GoogleWorkspaceProviderGroup
     */
    readonly groupObj: UserGroup;
    /**
     * 
     * @type {number}
     * @memberof GoogleWorkspaceProviderGroup
     */
    provider: number;
    /**
     * 
     * @type {{ [key: string]: any; }}
     * @memberof GoogleWorkspaceProviderGroup
     */
    readonly attributes: { [key: string]: any; };
}

/**
 * Check if a given object implements the GoogleWorkspaceProviderGroup interface.
 */
export function instanceOfGoogleWorkspaceProviderGroup(value: object): value is GoogleWorkspaceProviderGroup {
    if (!('id' in value) || value['id'] === undefined) return false;
    if (!('googleId' in value) || value['googleId'] === undefined) return false;
    if (!('group' in value) || value['group'] === undefined) return false;
    if (!('groupObj' in value) || value['groupObj'] === undefined) return false;
    if (!('provider' in value) || value['provider'] === undefined) return false;
    if (!('attributes' in value) || value['attributes'] === undefined) return false;
    return true;
}

export function GoogleWorkspaceProviderGroupFromJSON(json: any): GoogleWorkspaceProviderGroup {
    return GoogleWorkspaceProviderGroupFromJSONTyped(json, false);
}

export function GoogleWorkspaceProviderGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleWorkspaceProviderGroup {
    if (json == null) {
        return json;
    }
    return {
        
        'id': json['id'],
        'googleId': json['google_id'],
        'group': json['group'],
        'groupObj': UserGroupFromJSON(json['group_obj']),
        'provider': json['provider'],
        'attributes': json['attributes'],
    };
}

export function GoogleWorkspaceProviderGroupToJSON(json: any): GoogleWorkspaceProviderGroup {
    return GoogleWorkspaceProviderGroupToJSONTyped(json, false);
}

export function GoogleWorkspaceProviderGroupToJSONTyped(value?: Omit<GoogleWorkspaceProviderGroup, 'id'|'group_obj'|'attributes'> | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'google_id': value['googleId'],
        'group': value['group'],
        'provider': value['provider'],
    };
}

