/* 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 DtoUpdateRecordSetRequest
 */
export interface DtoUpdateRecordSetRequest {
  /**
   * Any change flips status back to pending (worker will UPSERT)
   * @type {string}
   * @memberof DtoUpdateRecordSetRequest
   */
  name?: string;
  /**
   *
   * @type {string}
   * @memberof DtoUpdateRecordSetRequest
   */
  status?: DtoUpdateRecordSetRequestStatusEnum;
  /**
   *
   * @type {number}
   * @memberof DtoUpdateRecordSetRequest
   */
  ttl?: number;
  /**
   *
   * @type {string}
   * @memberof DtoUpdateRecordSetRequest
   */
  type?: string;
  /**
   *
   * @type {Array<string>}
   * @memberof DtoUpdateRecordSetRequest
   */
  values?: Array<string>;
}

/**
 * @export
 */
export const DtoUpdateRecordSetRequestStatusEnum = {
  pending: "pending",
  provisioning: "provisioning",
  ready: "ready",
  failed: "failed",
} as const;
export type DtoUpdateRecordSetRequestStatusEnum =
  (typeof DtoUpdateRecordSetRequestStatusEnum)[keyof typeof DtoUpdateRecordSetRequestStatusEnum];

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

export function DtoUpdateRecordSetRequestFromJSON(
  json: any,
): DtoUpdateRecordSetRequest {
  return DtoUpdateRecordSetRequestFromJSONTyped(json, false);
}

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

export function DtoUpdateRecordSetRequestToJSON(
  json: any,
): DtoUpdateRecordSetRequest {
  return DtoUpdateRecordSetRequestToJSONTyped(json, false);
}

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

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