/* tslint:disable */
/* eslint-disable */
/**
 * AutoGlue API
 * API for managing K3s clusters across cloud providers
 *
 * The version of the OpenAPI document: dev
 *
 *
 * 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";
/**
 *
 * @export
 * @interface DtoCredentialOut
 */
export interface DtoCredentialOut {
  /**
   *
   * @type {string}
   * @memberof DtoCredentialOut
   */
  account_id?: string;
  /**
   *
   * @type {string}
   * @memberof DtoCredentialOut
   */
  created_at?: string;
  /**
   *
   * @type {string}
   * @memberof DtoCredentialOut
   */
  credential_provider?: string;
  /**
   *
   * @type {string}
   * @memberof DtoCredentialOut
   */
  id?: string;
  /**
   *
   * @type {string}
   * @memberof DtoCredentialOut
   */
  kind?: string;
  /**
   *
   * @type {string}
   * @memberof DtoCredentialOut
   */
  name?: string;
  /**
   *
   * @type {string}
   * @memberof DtoCredentialOut
   */
  region?: string;
  /**
   *
   * @type {number}
   * @memberof DtoCredentialOut
   */
  schema_version?: number;
  /**
   *
   * @type {object}
   * @memberof DtoCredentialOut
   */
  scope?: object;
  /**
   *
   * @type {string}
   * @memberof DtoCredentialOut
   */
  scope_kind?: string;
  /**
   *
   * @type {number}
   * @memberof DtoCredentialOut
   */
  scope_version?: number;
  /**
   *
   * @type {string}
   * @memberof DtoCredentialOut
   */
  updated_at?: string;
}

/**
 * Check if a given object implements the DtoCredentialOut interface.
 */
export function instanceOfDtoCredentialOut(
  value: object,
): value is DtoCredentialOut {
  return true;
}

export function DtoCredentialOutFromJSON(json: any): DtoCredentialOut {
  return DtoCredentialOutFromJSONTyped(json, false);
}

export function DtoCredentialOutFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean,
): DtoCredentialOut {
  if (json == null) {
    return json;
  }
  return {
    account_id: json["account_id"] == null ? undefined : json["account_id"],
    created_at: json["created_at"] == null ? undefined : json["created_at"],
    credential_provider:
      json["credential_provider"] == null
        ? undefined
        : json["credential_provider"],
    id: json["id"] == null ? undefined : json["id"],
    kind: json["kind"] == null ? undefined : json["kind"],
    name: json["name"] == null ? undefined : json["name"],
    region: json["region"] == null ? undefined : json["region"],
    schema_version:
      json["schema_version"] == null ? undefined : json["schema_version"],
    scope: json["scope"] == null ? undefined : json["scope"],
    scope_kind: json["scope_kind"] == null ? undefined : json["scope_kind"],
    scope_version:
      json["scope_version"] == null ? undefined : json["scope_version"],
    updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
  };
}

export function DtoCredentialOutToJSON(json: any): DtoCredentialOut {
  return DtoCredentialOutToJSONTyped(json, false);
}

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

  return {
    account_id: value["account_id"],
    created_at: value["created_at"],
    credential_provider: value["credential_provider"],
    id: value["id"],
    kind: value["kind"],
    name: value["name"],
    region: value["region"],
    schema_version: value["schema_version"],
    scope: value["scope"],
    scope_kind: value["scope_kind"],
    scope_version: value["scope_version"],
    updated_at: value["updated_at"],
  };
}
