/* 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';
import type { UserSourceStatus } from './UserSourceStatus';
import {
    UserSourceStatusFromJSON,
    UserSourceStatusFromJSONTyped,
    UserSourceStatusToJSON,
    UserSourceStatusToJSONTyped,
} from './UserSourceStatus';

/**
 * 
 * @export
 * @interface UserSourceAuthenticationSchema
 */
export interface UserSourceAuthenticationSchema {
    /**
     * 
     * @type {string}
     * @memberof UserSourceAuthenticationSchema
     */
    userId: string;
    /**
     * 
     * @type {string}
     * @memberof UserSourceAuthenticationSchema
     */
    sourceKey: string;
    /**
     * 
     * @type {AuthenticationConfigSchema}
     * @memberof UserSourceAuthenticationSchema
     */
    authenticationConfig: AuthenticationConfigSchema;
    /**
     * 
     * @type {Date}
     * @memberof UserSourceAuthenticationSchema
     */
    dateModified: Date;
    /**
     * 
     * @type {UserSourceStatus}
     * @memberof UserSourceAuthenticationSchema
     */
    status: UserSourceStatus;
}



/**
 * Check if a given object implements the UserSourceAuthenticationSchema interface.
 */
export function instanceOfUserSourceAuthenticationSchema(value: object): value is UserSourceAuthenticationSchema {
    if (!('userId' in value) || value['userId'] === undefined) return false;
    if (!('sourceKey' in value) || value['sourceKey'] === undefined) return false;
    if (!('authenticationConfig' in value) || value['authenticationConfig'] === undefined) return false;
    if (!('dateModified' in value) || value['dateModified'] === undefined) return false;
    if (!('status' in value) || value['status'] === undefined) return false;
    return true;
}

export function UserSourceAuthenticationSchemaFromJSON(json: any): UserSourceAuthenticationSchema {
    return UserSourceAuthenticationSchemaFromJSONTyped(json, false);
}

export function UserSourceAuthenticationSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserSourceAuthenticationSchema {
    if (json == null) {
        return json;
    }
    return {
        
        'userId': json['userId'],
        'sourceKey': json['sourceKey'],
        'authenticationConfig': AuthenticationConfigSchemaFromJSON(json['authenticationConfig']),
        'dateModified': (new Date(json['dateModified'])),
        'status': UserSourceStatusFromJSON(json['status']),
    };
}

export function UserSourceAuthenticationSchemaToJSON(json: any): UserSourceAuthenticationSchema {
    return UserSourceAuthenticationSchemaToJSONTyped(json, false);
}

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

    return {
        
        'userId': value['userId'],
        'sourceKey': value['sourceKey'],
        'authenticationConfig': AuthenticationConfigSchemaToJSON(value['authenticationConfig']),
        'dateModified': value['dateModified'].toISOString(),
        'status': UserSourceStatusToJSON(value['status']),
    };
}

