"use strict";
/* 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.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfUserSourceAuthenticationSchema = instanceOfUserSourceAuthenticationSchema;
exports.UserSourceAuthenticationSchemaFromJSON = UserSourceAuthenticationSchemaFromJSON;
exports.UserSourceAuthenticationSchemaFromJSONTyped = UserSourceAuthenticationSchemaFromJSONTyped;
exports.UserSourceAuthenticationSchemaToJSON = UserSourceAuthenticationSchemaToJSON;
exports.UserSourceAuthenticationSchemaToJSONTyped = UserSourceAuthenticationSchemaToJSONTyped;
const AuthenticationConfigSchema_1 = require("./AuthenticationConfigSchema");
const UserSourceStatus_1 = require("./UserSourceStatus");
/**
 * Check if a given object implements the UserSourceAuthenticationSchema interface.
 */
function instanceOfUserSourceAuthenticationSchema(value) {
    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;
}
function UserSourceAuthenticationSchemaFromJSON(json) {
    return UserSourceAuthenticationSchemaFromJSONTyped(json, false);
}
function UserSourceAuthenticationSchemaFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'userId': json['userId'],
        'sourceKey': json['sourceKey'],
        'authenticationConfig': (0, AuthenticationConfigSchema_1.AuthenticationConfigSchemaFromJSON)(json['authenticationConfig']),
        'dateModified': (new Date(json['dateModified'])),
        'status': (0, UserSourceStatus_1.UserSourceStatusFromJSON)(json['status']),
    };
}
function UserSourceAuthenticationSchemaToJSON(json) {
    return UserSourceAuthenticationSchemaToJSONTyped(json, false);
}
function UserSourceAuthenticationSchemaToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'userId': value['userId'],
        'sourceKey': value['sourceKey'],
        'authenticationConfig': (0, AuthenticationConfigSchema_1.AuthenticationConfigSchemaToJSON)(value['authenticationConfig']),
        'dateModified': value['dateModified'].toISOString(),
        'status': (0, UserSourceStatus_1.UserSourceStatusToJSON)(value['status']),
    };
}
