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

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

/**
 * Check if a given object implements the MicrosoftEntraProviderGroup interface.
 */
export function instanceOfMicrosoftEntraProviderGroup(value: object): value is MicrosoftEntraProviderGroup {
    if (!('id' in value) || value['id'] === undefined) return false;
    if (!('microsoftId' in value) || value['microsoftId'] === 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 MicrosoftEntraProviderGroupFromJSON(json: any): MicrosoftEntraProviderGroup {
    return MicrosoftEntraProviderGroupFromJSONTyped(json, false);
}

export function MicrosoftEntraProviderGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): MicrosoftEntraProviderGroup {
    if (json == null) {
        return json;
    }
    return {
        
        'id': json['id'],
        'microsoftId': json['microsoft_id'],
        'group': json['group'],
        'groupObj': UserGroupFromJSON(json['group_obj']),
        'provider': json['provider'],
        'attributes': json['attributes'],
    };
}

export function MicrosoftEntraProviderGroupToJSON(json: any): MicrosoftEntraProviderGroup {
    return MicrosoftEntraProviderGroupToJSONTyped(json, false);
}

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

    return {
        
        'microsoft_id': value['microsoftId'],
        'group': value['group'],
        'provider': value['provider'],
    };
}

