/* 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 { Status } from './Status';
import {
    StatusFromJSON,
    StatusFromJSONTyped,
    StatusToJSON,
    StatusToJSONTyped,
} from './Status';
import type { UserSourceAuthenticationSchema } from './UserSourceAuthenticationSchema';
import {
    UserSourceAuthenticationSchemaFromJSON,
    UserSourceAuthenticationSchemaFromJSONTyped,
    UserSourceAuthenticationSchemaToJSON,
    UserSourceAuthenticationSchemaToJSONTyped,
} from './UserSourceAuthenticationSchema';
import type { ErrorResponse } from './ErrorResponse';
import {
    ErrorResponseFromJSON,
    ErrorResponseFromJSONTyped,
    ErrorResponseToJSON,
    ErrorResponseToJSONTyped,
} from './ErrorResponse';

/**
 * 
 * @export
 * @interface UserSourceAuthenticationResultSchema
 */
export interface UserSourceAuthenticationResultSchema {
    /**
     * 
     * @type {Status}
     * @memberof UserSourceAuthenticationResultSchema
     */
    status: Status;
    /**
     * 
     * @type {ErrorResponse}
     * @memberof UserSourceAuthenticationResultSchema
     */
    errorResponse?: ErrorResponse | null;
    /**
     * 
     * @type {UserSourceAuthenticationSchema}
     * @memberof UserSourceAuthenticationResultSchema
     */
    sourceAuthentication?: UserSourceAuthenticationSchema | null;
}



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

export function UserSourceAuthenticationResultSchemaFromJSON(json: any): UserSourceAuthenticationResultSchema {
    return UserSourceAuthenticationResultSchemaFromJSONTyped(json, false);
}

export function UserSourceAuthenticationResultSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserSourceAuthenticationResultSchema {
    if (json == null) {
        return json;
    }
    return {
        
        'status': StatusFromJSON(json['status']),
        'errorResponse': json['errorResponse'] == null ? undefined : ErrorResponseFromJSON(json['errorResponse']),
        'sourceAuthentication': json['sourceAuthentication'] == null ? undefined : UserSourceAuthenticationSchemaFromJSON(json['sourceAuthentication']),
    };
}

export function UserSourceAuthenticationResultSchemaToJSON(json: any): UserSourceAuthenticationResultSchema {
    return UserSourceAuthenticationResultSchemaToJSONTyped(json, false);
}

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

    return {
        
        'status': StatusToJSON(value['status']),
        'errorResponse': ErrorResponseToJSON(value['errorResponse']),
        'sourceAuthentication': UserSourceAuthenticationSchemaToJSON(value['sourceAuthentication']),
    };
}

