All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dominodatalab.pub.model.CostAllocationV1 Maven / Gradle / Ivy

/*
 * Domino Public API
 * Domino Public API Endpoints
 *
 * The version of the OpenAPI document: 5.9.1
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.dominodatalab.pub.model;

import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.dominodatalab.pub.model.CostAllocationV1Labels;
import com.dominodatalab.pub.model.CostAllocationV1Pv;
import com.dominodatalab.pub.model.CostAllocationV1Window;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


/**
 * CostAllocationV1
 */
@JsonPropertyOrder({
  CostAllocationV1.JSON_PROPERTY_CPU_CORE_HOURS,
  CostAllocationV1.JSON_PROPERTY_CPU_CORE_REQUEST_AVERAGE,
  CostAllocationV1.JSON_PROPERTY_CPU_CORE_USAGE_AVERAGE,
  CostAllocationV1.JSON_PROPERTY_CPU_CORES,
  CostAllocationV1.JSON_PROPERTY_CPU_COST,
  CostAllocationV1.JSON_PROPERTY_CPU_COST_ADJUSTMENT,
  CostAllocationV1.JSON_PROPERTY_CPU_EFFICINCY,
  CostAllocationV1.JSON_PROPERTY_DISCOUNT,
  CostAllocationV1.JSON_PROPERTY_GPU_COUNT,
  CostAllocationV1.JSON_PROPERTY_GPU_HOURS,
  CostAllocationV1.JSON_PROPERTY_GPUCOST,
  CostAllocationV1.JSON_PROPERTY_GPUCOST_ADJUSTMENT,
  CostAllocationV1.JSON_PROPERTY_LABELS,
  CostAllocationV1.JSON_PROPERTY_LOAD_BALANCER_COST,
  CostAllocationV1.JSON_PROPERTY_LOAD_BALANCER_COST_ADJUSTMENT,
  CostAllocationV1.JSON_PROPERTY_NAME,
  CostAllocationV1.JSON_PROPERTY_NODE_TYPE,
  CostAllocationV1.JSON_PROPERTY_PV,
  CostAllocationV1.JSON_PROPERTY_RAM_COST,
  CostAllocationV1.JSON_PROPERTY_RAM_COST_ADJUSTMENT,
  CostAllocationV1.JSON_PROPERTY_TOTAL_COST,
  CostAllocationV1.JSON_PROPERTY_WINDOW
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-03T07:34:09.642933400-05:00[America/New_York]")
public class CostAllocationV1 {
  public static final String JSON_PROPERTY_CPU_CORE_HOURS = "cpuCoreHours";
  private Integer cpuCoreHours;

  public static final String JSON_PROPERTY_CPU_CORE_REQUEST_AVERAGE = "cpuCoreRequestAverage";
  private Integer cpuCoreRequestAverage;

  public static final String JSON_PROPERTY_CPU_CORE_USAGE_AVERAGE = "cpuCoreUsageAverage";
  private Integer cpuCoreUsageAverage;

  public static final String JSON_PROPERTY_CPU_CORES = "cpuCores";
  private Integer cpuCores;

  public static final String JSON_PROPERTY_CPU_COST = "cpuCost";
  private Integer cpuCost;

  public static final String JSON_PROPERTY_CPU_COST_ADJUSTMENT = "cpuCostAdjustment";
  private Integer cpuCostAdjustment;

  public static final String JSON_PROPERTY_CPU_EFFICINCY = "cpuEfficincy";
  private Integer cpuEfficincy;

  public static final String JSON_PROPERTY_DISCOUNT = "discount";
  private Integer discount;

  public static final String JSON_PROPERTY_GPU_COUNT = "gpuCount";
  private Integer gpuCount;

  public static final String JSON_PROPERTY_GPU_HOURS = "gpuHours";
  private Integer gpuHours;

  public static final String JSON_PROPERTY_GPUCOST = "gpucost";
  private Integer gpucost;

  public static final String JSON_PROPERTY_GPUCOST_ADJUSTMENT = "gpucostAdjustment";
  private Integer gpucostAdjustment;

  public static final String JSON_PROPERTY_LABELS = "labels";
  private CostAllocationV1Labels labels;

  public static final String JSON_PROPERTY_LOAD_BALANCER_COST = "loadBalancerCost";
  private Integer loadBalancerCost;

  public static final String JSON_PROPERTY_LOAD_BALANCER_COST_ADJUSTMENT = "loadBalancerCostAdjustment";
  private Integer loadBalancerCostAdjustment;

  public static final String JSON_PROPERTY_NAME = "name";
  private String name;

  public static final String JSON_PROPERTY_NODE_TYPE = "nodeType";
  private String nodeType;

  public static final String JSON_PROPERTY_PV = "pv";
  private CostAllocationV1Pv pv;

  public static final String JSON_PROPERTY_RAM_COST = "ramCost";
  private Integer ramCost;

  public static final String JSON_PROPERTY_RAM_COST_ADJUSTMENT = "ramCostAdjustment";
  private Integer ramCostAdjustment;

  public static final String JSON_PROPERTY_TOTAL_COST = "totalCost";
  private Integer totalCost;

  public static final String JSON_PROPERTY_WINDOW = "window";
  private CostAllocationV1Window window;

  public CostAllocationV1() { 
  }

  public CostAllocationV1 cpuCoreHours(Integer cpuCoreHours) {
    this.cpuCoreHours = cpuCoreHours;
    return this;
  }

   /**
   * Get cpuCoreHours
   * @return cpuCoreHours
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_CPU_CORE_HOURS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getCpuCoreHours() {
    return cpuCoreHours;
  }


  @JsonProperty(JSON_PROPERTY_CPU_CORE_HOURS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCpuCoreHours(Integer cpuCoreHours) {
    this.cpuCoreHours = cpuCoreHours;
  }


  public CostAllocationV1 cpuCoreRequestAverage(Integer cpuCoreRequestAverage) {
    this.cpuCoreRequestAverage = cpuCoreRequestAverage;
    return this;
  }

   /**
   * Get cpuCoreRequestAverage
   * @return cpuCoreRequestAverage
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_CPU_CORE_REQUEST_AVERAGE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getCpuCoreRequestAverage() {
    return cpuCoreRequestAverage;
  }


  @JsonProperty(JSON_PROPERTY_CPU_CORE_REQUEST_AVERAGE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCpuCoreRequestAverage(Integer cpuCoreRequestAverage) {
    this.cpuCoreRequestAverage = cpuCoreRequestAverage;
  }


  public CostAllocationV1 cpuCoreUsageAverage(Integer cpuCoreUsageAverage) {
    this.cpuCoreUsageAverage = cpuCoreUsageAverage;
    return this;
  }

   /**
   * Get cpuCoreUsageAverage
   * @return cpuCoreUsageAverage
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_CPU_CORE_USAGE_AVERAGE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getCpuCoreUsageAverage() {
    return cpuCoreUsageAverage;
  }


  @JsonProperty(JSON_PROPERTY_CPU_CORE_USAGE_AVERAGE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCpuCoreUsageAverage(Integer cpuCoreUsageAverage) {
    this.cpuCoreUsageAverage = cpuCoreUsageAverage;
  }


  public CostAllocationV1 cpuCores(Integer cpuCores) {
    this.cpuCores = cpuCores;
    return this;
  }

   /**
   * Get cpuCores
   * @return cpuCores
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_CPU_CORES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getCpuCores() {
    return cpuCores;
  }


  @JsonProperty(JSON_PROPERTY_CPU_CORES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCpuCores(Integer cpuCores) {
    this.cpuCores = cpuCores;
  }


  public CostAllocationV1 cpuCost(Integer cpuCost) {
    this.cpuCost = cpuCost;
    return this;
  }

   /**
   * Get cpuCost
   * @return cpuCost
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_CPU_COST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getCpuCost() {
    return cpuCost;
  }


  @JsonProperty(JSON_PROPERTY_CPU_COST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCpuCost(Integer cpuCost) {
    this.cpuCost = cpuCost;
  }


  public CostAllocationV1 cpuCostAdjustment(Integer cpuCostAdjustment) {
    this.cpuCostAdjustment = cpuCostAdjustment;
    return this;
  }

   /**
   * Get cpuCostAdjustment
   * @return cpuCostAdjustment
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_CPU_COST_ADJUSTMENT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getCpuCostAdjustment() {
    return cpuCostAdjustment;
  }


  @JsonProperty(JSON_PROPERTY_CPU_COST_ADJUSTMENT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCpuCostAdjustment(Integer cpuCostAdjustment) {
    this.cpuCostAdjustment = cpuCostAdjustment;
  }


  public CostAllocationV1 cpuEfficincy(Integer cpuEfficincy) {
    this.cpuEfficincy = cpuEfficincy;
    return this;
  }

   /**
   * Get cpuEfficincy
   * @return cpuEfficincy
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_CPU_EFFICINCY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getCpuEfficincy() {
    return cpuEfficincy;
  }


  @JsonProperty(JSON_PROPERTY_CPU_EFFICINCY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCpuEfficincy(Integer cpuEfficincy) {
    this.cpuEfficincy = cpuEfficincy;
  }


  public CostAllocationV1 discount(Integer discount) {
    this.discount = discount;
    return this;
  }

   /**
   * Get discount
   * @return discount
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_DISCOUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getDiscount() {
    return discount;
  }


  @JsonProperty(JSON_PROPERTY_DISCOUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDiscount(Integer discount) {
    this.discount = discount;
  }


  public CostAllocationV1 gpuCount(Integer gpuCount) {
    this.gpuCount = gpuCount;
    return this;
  }

   /**
   * Get gpuCount
   * @return gpuCount
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_GPU_COUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getGpuCount() {
    return gpuCount;
  }


  @JsonProperty(JSON_PROPERTY_GPU_COUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setGpuCount(Integer gpuCount) {
    this.gpuCount = gpuCount;
  }


  public CostAllocationV1 gpuHours(Integer gpuHours) {
    this.gpuHours = gpuHours;
    return this;
  }

   /**
   * Get gpuHours
   * @return gpuHours
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_GPU_HOURS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getGpuHours() {
    return gpuHours;
  }


  @JsonProperty(JSON_PROPERTY_GPU_HOURS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setGpuHours(Integer gpuHours) {
    this.gpuHours = gpuHours;
  }


  public CostAllocationV1 gpucost(Integer gpucost) {
    this.gpucost = gpucost;
    return this;
  }

   /**
   * Get gpucost
   * @return gpucost
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_GPUCOST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getGpucost() {
    return gpucost;
  }


  @JsonProperty(JSON_PROPERTY_GPUCOST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setGpucost(Integer gpucost) {
    this.gpucost = gpucost;
  }


  public CostAllocationV1 gpucostAdjustment(Integer gpucostAdjustment) {
    this.gpucostAdjustment = gpucostAdjustment;
    return this;
  }

   /**
   * Get gpucostAdjustment
   * @return gpucostAdjustment
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_GPUCOST_ADJUSTMENT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getGpucostAdjustment() {
    return gpucostAdjustment;
  }


  @JsonProperty(JSON_PROPERTY_GPUCOST_ADJUSTMENT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setGpucostAdjustment(Integer gpucostAdjustment) {
    this.gpucostAdjustment = gpucostAdjustment;
  }


  public CostAllocationV1 labels(CostAllocationV1Labels labels) {
    this.labels = labels;
    return this;
  }

   /**
   * Get labels
   * @return labels
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_LABELS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public CostAllocationV1Labels getLabels() {
    return labels;
  }


  @JsonProperty(JSON_PROPERTY_LABELS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setLabels(CostAllocationV1Labels labels) {
    this.labels = labels;
  }


  public CostAllocationV1 loadBalancerCost(Integer loadBalancerCost) {
    this.loadBalancerCost = loadBalancerCost;
    return this;
  }

   /**
   * Get loadBalancerCost
   * @return loadBalancerCost
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_LOAD_BALANCER_COST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getLoadBalancerCost() {
    return loadBalancerCost;
  }


  @JsonProperty(JSON_PROPERTY_LOAD_BALANCER_COST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setLoadBalancerCost(Integer loadBalancerCost) {
    this.loadBalancerCost = loadBalancerCost;
  }


  public CostAllocationV1 loadBalancerCostAdjustment(Integer loadBalancerCostAdjustment) {
    this.loadBalancerCostAdjustment = loadBalancerCostAdjustment;
    return this;
  }

   /**
   * Get loadBalancerCostAdjustment
   * @return loadBalancerCostAdjustment
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_LOAD_BALANCER_COST_ADJUSTMENT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getLoadBalancerCostAdjustment() {
    return loadBalancerCostAdjustment;
  }


  @JsonProperty(JSON_PROPERTY_LOAD_BALANCER_COST_ADJUSTMENT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setLoadBalancerCostAdjustment(Integer loadBalancerCostAdjustment) {
    this.loadBalancerCostAdjustment = loadBalancerCostAdjustment;
  }


  public CostAllocationV1 name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Get name
   * @return name
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getName() {
    return name;
  }


  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setName(String name) {
    this.name = name;
  }


  public CostAllocationV1 nodeType(String nodeType) {
    this.nodeType = nodeType;
    return this;
  }

   /**
   * Get nodeType
   * @return nodeType
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_NODE_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getNodeType() {
    return nodeType;
  }


  @JsonProperty(JSON_PROPERTY_NODE_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setNodeType(String nodeType) {
    this.nodeType = nodeType;
  }


  public CostAllocationV1 pv(CostAllocationV1Pv pv) {
    this.pv = pv;
    return this;
  }

   /**
   * Get pv
   * @return pv
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_PV)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public CostAllocationV1Pv getPv() {
    return pv;
  }


  @JsonProperty(JSON_PROPERTY_PV)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setPv(CostAllocationV1Pv pv) {
    this.pv = pv;
  }


  public CostAllocationV1 ramCost(Integer ramCost) {
    this.ramCost = ramCost;
    return this;
  }

   /**
   * Get ramCost
   * @return ramCost
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_RAM_COST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getRamCost() {
    return ramCost;
  }


  @JsonProperty(JSON_PROPERTY_RAM_COST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRamCost(Integer ramCost) {
    this.ramCost = ramCost;
  }


  public CostAllocationV1 ramCostAdjustment(Integer ramCostAdjustment) {
    this.ramCostAdjustment = ramCostAdjustment;
    return this;
  }

   /**
   * Get ramCostAdjustment
   * @return ramCostAdjustment
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_RAM_COST_ADJUSTMENT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getRamCostAdjustment() {
    return ramCostAdjustment;
  }


  @JsonProperty(JSON_PROPERTY_RAM_COST_ADJUSTMENT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRamCostAdjustment(Integer ramCostAdjustment) {
    this.ramCostAdjustment = ramCostAdjustment;
  }


  public CostAllocationV1 totalCost(Integer totalCost) {
    this.totalCost = totalCost;
    return this;
  }

   /**
   * Get totalCost
   * @return totalCost
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_TOTAL_COST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getTotalCost() {
    return totalCost;
  }


  @JsonProperty(JSON_PROPERTY_TOTAL_COST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTotalCost(Integer totalCost) {
    this.totalCost = totalCost;
  }


  public CostAllocationV1 window(CostAllocationV1Window window) {
    this.window = window;
    return this;
  }

   /**
   * Get window
   * @return window
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_WINDOW)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public CostAllocationV1Window getWindow() {
    return window;
  }


  @JsonProperty(JSON_PROPERTY_WINDOW)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setWindow(CostAllocationV1Window window) {
    this.window = window;
  }


  /**
   * Return true if this CostAllocationV1 object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CostAllocationV1 costAllocationV1 = (CostAllocationV1) o;
    return Objects.equals(this.cpuCoreHours, costAllocationV1.cpuCoreHours) &&
        Objects.equals(this.cpuCoreRequestAverage, costAllocationV1.cpuCoreRequestAverage) &&
        Objects.equals(this.cpuCoreUsageAverage, costAllocationV1.cpuCoreUsageAverage) &&
        Objects.equals(this.cpuCores, costAllocationV1.cpuCores) &&
        Objects.equals(this.cpuCost, costAllocationV1.cpuCost) &&
        Objects.equals(this.cpuCostAdjustment, costAllocationV1.cpuCostAdjustment) &&
        Objects.equals(this.cpuEfficincy, costAllocationV1.cpuEfficincy) &&
        Objects.equals(this.discount, costAllocationV1.discount) &&
        Objects.equals(this.gpuCount, costAllocationV1.gpuCount) &&
        Objects.equals(this.gpuHours, costAllocationV1.gpuHours) &&
        Objects.equals(this.gpucost, costAllocationV1.gpucost) &&
        Objects.equals(this.gpucostAdjustment, costAllocationV1.gpucostAdjustment) &&
        Objects.equals(this.labels, costAllocationV1.labels) &&
        Objects.equals(this.loadBalancerCost, costAllocationV1.loadBalancerCost) &&
        Objects.equals(this.loadBalancerCostAdjustment, costAllocationV1.loadBalancerCostAdjustment) &&
        Objects.equals(this.name, costAllocationV1.name) &&
        Objects.equals(this.nodeType, costAllocationV1.nodeType) &&
        Objects.equals(this.pv, costAllocationV1.pv) &&
        Objects.equals(this.ramCost, costAllocationV1.ramCost) &&
        Objects.equals(this.ramCostAdjustment, costAllocationV1.ramCostAdjustment) &&
        Objects.equals(this.totalCost, costAllocationV1.totalCost) &&
        Objects.equals(this.window, costAllocationV1.window);
  }

  @Override
  public int hashCode() {
    return Objects.hash(cpuCoreHours, cpuCoreRequestAverage, cpuCoreUsageAverage, cpuCores, cpuCost, cpuCostAdjustment, cpuEfficincy, discount, gpuCount, gpuHours, gpucost, gpucostAdjustment, labels, loadBalancerCost, loadBalancerCostAdjustment, name, nodeType, pv, ramCost, ramCostAdjustment, totalCost, window);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CostAllocationV1 {\n");
    sb.append("    cpuCoreHours: ").append(toIndentedString(cpuCoreHours)).append("\n");
    sb.append("    cpuCoreRequestAverage: ").append(toIndentedString(cpuCoreRequestAverage)).append("\n");
    sb.append("    cpuCoreUsageAverage: ").append(toIndentedString(cpuCoreUsageAverage)).append("\n");
    sb.append("    cpuCores: ").append(toIndentedString(cpuCores)).append("\n");
    sb.append("    cpuCost: ").append(toIndentedString(cpuCost)).append("\n");
    sb.append("    cpuCostAdjustment: ").append(toIndentedString(cpuCostAdjustment)).append("\n");
    sb.append("    cpuEfficincy: ").append(toIndentedString(cpuEfficincy)).append("\n");
    sb.append("    discount: ").append(toIndentedString(discount)).append("\n");
    sb.append("    gpuCount: ").append(toIndentedString(gpuCount)).append("\n");
    sb.append("    gpuHours: ").append(toIndentedString(gpuHours)).append("\n");
    sb.append("    gpucost: ").append(toIndentedString(gpucost)).append("\n");
    sb.append("    gpucostAdjustment: ").append(toIndentedString(gpucostAdjustment)).append("\n");
    sb.append("    labels: ").append(toIndentedString(labels)).append("\n");
    sb.append("    loadBalancerCost: ").append(toIndentedString(loadBalancerCost)).append("\n");
    sb.append("    loadBalancerCostAdjustment: ").append(toIndentedString(loadBalancerCostAdjustment)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    nodeType: ").append(toIndentedString(nodeType)).append("\n");
    sb.append("    pv: ").append(toIndentedString(pv)).append("\n");
    sb.append("    ramCost: ").append(toIndentedString(ramCost)).append("\n");
    sb.append("    ramCostAdjustment: ").append(toIndentedString(ramCostAdjustment)).append("\n");
    sb.append("    totalCost: ").append(toIndentedString(totalCost)).append("\n");
    sb.append("    window: ").append(toIndentedString(window)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

  /**
   * Convert the instance into URL query string.
   *
   * @return URL query string
   */
  public String toUrlQueryString() {
    return toUrlQueryString(null);
  }

  /**
   * Convert the instance into URL query string.
   *
   * @param prefix prefix of the query string
   * @return URL query string
   */
  public String toUrlQueryString(String prefix) {
    String suffix = "";
    String containerSuffix = "";
    String containerPrefix = "";
    if (prefix == null) {
      // style=form, explode=true, e.g. /pet?name=cat&type=manx
      prefix = "";
    } else {
      // deepObject style e.g. /pet?id[name]=cat&id[type]=manx
      prefix = prefix + "[";
      suffix = "]";
      containerSuffix = "]";
      containerPrefix = "[";
    }

    StringJoiner joiner = new StringJoiner("&");

    // add `cpuCoreHours` to the URL query string
    if (getCpuCoreHours() != null) {
      joiner.add(String.format("%scpuCoreHours%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCpuCoreHours()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `cpuCoreRequestAverage` to the URL query string
    if (getCpuCoreRequestAverage() != null) {
      joiner.add(String.format("%scpuCoreRequestAverage%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCpuCoreRequestAverage()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `cpuCoreUsageAverage` to the URL query string
    if (getCpuCoreUsageAverage() != null) {
      joiner.add(String.format("%scpuCoreUsageAverage%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCpuCoreUsageAverage()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `cpuCores` to the URL query string
    if (getCpuCores() != null) {
      joiner.add(String.format("%scpuCores%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCpuCores()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `cpuCost` to the URL query string
    if (getCpuCost() != null) {
      joiner.add(String.format("%scpuCost%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCpuCost()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `cpuCostAdjustment` to the URL query string
    if (getCpuCostAdjustment() != null) {
      joiner.add(String.format("%scpuCostAdjustment%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCpuCostAdjustment()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `cpuEfficincy` to the URL query string
    if (getCpuEfficincy() != null) {
      joiner.add(String.format("%scpuEfficincy%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCpuEfficincy()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `discount` to the URL query string
    if (getDiscount() != null) {
      joiner.add(String.format("%sdiscount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDiscount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `gpuCount` to the URL query string
    if (getGpuCount() != null) {
      joiner.add(String.format("%sgpuCount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getGpuCount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `gpuHours` to the URL query string
    if (getGpuHours() != null) {
      joiner.add(String.format("%sgpuHours%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getGpuHours()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `gpucost` to the URL query string
    if (getGpucost() != null) {
      joiner.add(String.format("%sgpucost%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getGpucost()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `gpucostAdjustment` to the URL query string
    if (getGpucostAdjustment() != null) {
      joiner.add(String.format("%sgpucostAdjustment%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getGpucostAdjustment()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `labels` to the URL query string
    if (getLabels() != null) {
      joiner.add(getLabels().toUrlQueryString(prefix + "labels" + suffix));
    }

    // add `loadBalancerCost` to the URL query string
    if (getLoadBalancerCost() != null) {
      joiner.add(String.format("%sloadBalancerCost%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLoadBalancerCost()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `loadBalancerCostAdjustment` to the URL query string
    if (getLoadBalancerCostAdjustment() != null) {
      joiner.add(String.format("%sloadBalancerCostAdjustment%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLoadBalancerCostAdjustment()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `name` to the URL query string
    if (getName() != null) {
      joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `nodeType` to the URL query string
    if (getNodeType() != null) {
      joiner.add(String.format("%snodeType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNodeType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `pv` to the URL query string
    if (getPv() != null) {
      joiner.add(getPv().toUrlQueryString(prefix + "pv" + suffix));
    }

    // add `ramCost` to the URL query string
    if (getRamCost() != null) {
      joiner.add(String.format("%sramCost%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRamCost()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `ramCostAdjustment` to the URL query string
    if (getRamCostAdjustment() != null) {
      joiner.add(String.format("%sramCostAdjustment%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRamCostAdjustment()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `totalCost` to the URL query string
    if (getTotalCost() != null) {
      joiner.add(String.format("%stotalCost%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTotalCost()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `window` to the URL query string
    if (getWindow() != null) {
      joiner.add(getWindow().toUrlQueryString(prefix + "window" + suffix));
    }

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy