/* 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 DtoCreateRecordSetRequest
 */
export interface DtoCreateRecordSetRequest {
  /**
   * Name relative to domain ("endpoint") OR FQDN ("endpoint.example.com").
   * Server normalizes to relative.
   * @type {string}
   * @memberof DtoCreateRecordSetRequest
   */
  name: string;
  /**
   *
   * @type {number}
   * @memberof DtoCreateRecordSetRequest
   */
  ttl?: number;
  /**
   *
   * @type {string}
   * @memberof DtoCreateRecordSetRequest
   */
  type: string;
  /**
   *
   * @type {Array<string>}
   * @memberof DtoCreateRecordSetRequest
   */
  values?: Array<string>;
}

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

export function DtoCreateRecordSetRequestFromJSON(
  json: any,
): DtoCreateRecordSetRequest {
  return DtoCreateRecordSetRequestFromJSONTyped(json, false);
}

export function DtoCreateRecordSetRequestFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean,
): DtoCreateRecordSetRequest {
  if (json == null) {
    return json;
  }
  return {
    name: json["name"],
    ttl: json["ttl"] == null ? undefined : json["ttl"],
    type: json["type"],
    values: json["values"] == null ? undefined : json["values"],
  };
}

export function DtoCreateRecordSetRequestToJSON(
  json: any,
): DtoCreateRecordSetRequest {
  return DtoCreateRecordSetRequestToJSONTyped(json, false);
}

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

  return {
    name: value["name"],
    ttl: value["ttl"],
    type: value["type"],
    values: value["values"],
  };
}
