/* 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 DtoCreateDomainRequest
 */
export interface DtoCreateDomainRequest {
  /**
   *
   * @type {string}
   * @memberof DtoCreateDomainRequest
   */
  credential_id: string;
  /**
   *
   * @type {string}
   * @memberof DtoCreateDomainRequest
   */
  domain_name: string;
  /**
   *
   * @type {string}
   * @memberof DtoCreateDomainRequest
   */
  zone_id?: string;
}

/**
 * Check if a given object implements the DtoCreateDomainRequest interface.
 */
export function instanceOfDtoCreateDomainRequest(
  value: object,
): value is DtoCreateDomainRequest {
  if (!("credential_id" in value) || value["credential_id"] === undefined)
    return false;
  if (!("domain_name" in value) || value["domain_name"] === undefined)
    return false;
  return true;
}

export function DtoCreateDomainRequestFromJSON(
  json: any,
): DtoCreateDomainRequest {
  return DtoCreateDomainRequestFromJSONTyped(json, false);
}

export function DtoCreateDomainRequestFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean,
): DtoCreateDomainRequest {
  if (json == null) {
    return json;
  }
  return {
    credential_id: json["credential_id"],
    domain_name: json["domain_name"],
    zone_id: json["zone_id"] == null ? undefined : json["zone_id"],
  };
}

export function DtoCreateDomainRequestToJSON(
  json: any,
): DtoCreateDomainRequest {
  return DtoCreateDomainRequestToJSONTyped(json, false);
}

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

  return {
    credential_id: value["credential_id"],
    domain_name: value["domain_name"],
    zone_id: value["zone_id"],
  };
}
