/* tslint:disable */
/* eslint-disable */
/**
 * UCX Proxy
 * A single use API for the UCX Proxy.
 *
 * The version of the OpenAPI document: 0.0.12
 * Contact: customersuccess@equisoft.com
 *
 * 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 { AuthenticationConfigSchema } from './AuthenticationConfigSchema';
import {
    AuthenticationConfigSchemaFromJSON,
    AuthenticationConfigSchemaFromJSONTyped,
    AuthenticationConfigSchemaToJSON,
    AuthenticationConfigSchemaToJSONTyped,
} from './AuthenticationConfigSchema';

/**
 * 
 * @export
 * @interface OrganizationSourceAuthenticationSchema
 */
export interface OrganizationSourceAuthenticationSchema {
    /**
     * 
     * @type {string}
     * @memberof OrganizationSourceAuthenticationSchema
     */
    organizationId: string;
    /**
     * 
     * @type {string}
     * @memberof OrganizationSourceAuthenticationSchema
     */
    sourceKey: string;
    /**
     * 
     * @type {AuthenticationConfigSchema}
     * @memberof OrganizationSourceAuthenticationSchema
     */
    authenticationConfig: AuthenticationConfigSchema;
    /**
     * 
     * @type {boolean}
     * @memberof OrganizationSourceAuthenticationSchema
     */
    isEnabled: boolean;
    /**
     * 
     * @type {Date}
     * @memberof OrganizationSourceAuthenticationSchema
     */
    dateCreated: Date;
    /**
     * 
     * @type {Date}
     * @memberof OrganizationSourceAuthenticationSchema
     */
    dateModified: Date;
    /**
     * 
     * @type {string}
     * @memberof OrganizationSourceAuthenticationSchema
     */
    modifiedBy: string;
}

/**
 * Check if a given object implements the OrganizationSourceAuthenticationSchema interface.
 */
export function instanceOfOrganizationSourceAuthenticationSchema(value: object): value is OrganizationSourceAuthenticationSchema {
    if (!('organizationId' in value) || value['organizationId'] === undefined) return false;
    if (!('sourceKey' in value) || value['sourceKey'] === undefined) return false;
    if (!('authenticationConfig' in value) || value['authenticationConfig'] === undefined) return false;
    if (!('isEnabled' in value) || value['isEnabled'] === undefined) return false;
    if (!('dateCreated' in value) || value['dateCreated'] === undefined) return false;
    if (!('dateModified' in value) || value['dateModified'] === undefined) return false;
    if (!('modifiedBy' in value) || value['modifiedBy'] === undefined) return false;
    return true;
}

export function OrganizationSourceAuthenticationSchemaFromJSON(json: any): OrganizationSourceAuthenticationSchema {
    return OrganizationSourceAuthenticationSchemaFromJSONTyped(json, false);
}

export function OrganizationSourceAuthenticationSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationSourceAuthenticationSchema {
    if (json == null) {
        return json;
    }
    return {
        
        'organizationId': json['organizationId'],
        'sourceKey': json['sourceKey'],
        'authenticationConfig': AuthenticationConfigSchemaFromJSON(json['authenticationConfig']),
        'isEnabled': json['isEnabled'],
        'dateCreated': (new Date(json['dateCreated'])),
        'dateModified': (new Date(json['dateModified'])),
        'modifiedBy': json['modifiedBy'],
    };
}

export function OrganizationSourceAuthenticationSchemaToJSON(json: any): OrganizationSourceAuthenticationSchema {
    return OrganizationSourceAuthenticationSchemaToJSONTyped(json, false);
}

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

    return {
        
        'organizationId': value['organizationId'],
        'sourceKey': value['sourceKey'],
        'authenticationConfig': AuthenticationConfigSchemaToJSON(value['authenticationConfig']),
        'isEnabled': value['isEnabled'],
        'dateCreated': value['dateCreated'].toISOString(),
        'dateModified': value['dateModified'].toISOString(),
        'modifiedBy': value['modifiedBy'],
    };
}

