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

com.influxdb.client.domain.TemplateSummarySummaryBuckets Maven / Gradle / Ivy

/*
 * InfluxDB OSS API Service
 * The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. 
 *
 * OpenAPI spec version: 2.0.0
 * 
 *
 * 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.influxdb.client.domain;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.influxdb.client.domain.TemplateKind;
import com.influxdb.client.domain.TemplateSummaryLabel;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * TemplateSummarySummaryBuckets
 */

public class TemplateSummarySummaryBuckets {
  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private String id;

  public static final String SERIALIZED_NAME_ORG_I_D = "orgID";
  @SerializedName(SERIALIZED_NAME_ORG_I_D)
  private String orgID;

  public static final String SERIALIZED_NAME_KIND = "kind";
  @SerializedName(SERIALIZED_NAME_KIND)
  private TemplateKind kind = null;

  public static final String SERIALIZED_NAME_TEMPLATE_META_NAME = "templateMetaName";
  @SerializedName(SERIALIZED_NAME_TEMPLATE_META_NAME)
  private String templateMetaName;

  public static final String SERIALIZED_NAME_NAME = "name";
  @SerializedName(SERIALIZED_NAME_NAME)
  private String name;

  public static final String SERIALIZED_NAME_DESCRIPTION = "description";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION)
  private String description;

  public static final String SERIALIZED_NAME_RETENTION_PERIOD = "retentionPeriod";
  @SerializedName(SERIALIZED_NAME_RETENTION_PERIOD)
  private Integer retentionPeriod;

  public static final String SERIALIZED_NAME_LABEL_ASSOCIATIONS = "labelAssociations";
  @SerializedName(SERIALIZED_NAME_LABEL_ASSOCIATIONS)
  private List labelAssociations = new ArrayList<>();

  public static final String SERIALIZED_NAME_ENV_REFERENCES = "envReferences";
  @SerializedName(SERIALIZED_NAME_ENV_REFERENCES)
  private List envReferences = new ArrayList<>();

  public TemplateSummarySummaryBuckets id(String id) {
    this.id = id;
    return this;
  }

   /**
   * Get id
   * @return id
  **/
  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public TemplateSummarySummaryBuckets orgID(String orgID) {
    this.orgID = orgID;
    return this;
  }

   /**
   * Get orgID
   * @return orgID
  **/
  public String getOrgID() {
    return orgID;
  }

  public void setOrgID(String orgID) {
    this.orgID = orgID;
  }

  public TemplateSummarySummaryBuckets kind(TemplateKind kind) {
    this.kind = kind;
    return this;
  }

   /**
   * Get kind
   * @return kind
  **/
  public TemplateKind getKind() {
    return kind;
  }

  public void setKind(TemplateKind kind) {
    this.kind = kind;
  }

  public TemplateSummarySummaryBuckets templateMetaName(String templateMetaName) {
    this.templateMetaName = templateMetaName;
    return this;
  }

   /**
   * Get templateMetaName
   * @return templateMetaName
  **/
  public String getTemplateMetaName() {
    return templateMetaName;
  }

  public void setTemplateMetaName(String templateMetaName) {
    this.templateMetaName = templateMetaName;
  }

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

   /**
   * Get name
   * @return name
  **/
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public TemplateSummarySummaryBuckets description(String description) {
    this.description = description;
    return this;
  }

   /**
   * Get description
   * @return description
  **/
  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public TemplateSummarySummaryBuckets retentionPeriod(Integer retentionPeriod) {
    this.retentionPeriod = retentionPeriod;
    return this;
  }

   /**
   * Get retentionPeriod
   * @return retentionPeriod
  **/
  public Integer getRetentionPeriod() {
    return retentionPeriod;
  }

  public void setRetentionPeriod(Integer retentionPeriod) {
    this.retentionPeriod = retentionPeriod;
  }

  public TemplateSummarySummaryBuckets labelAssociations(List labelAssociations) {
    this.labelAssociations = labelAssociations;
    return this;
  }

  public TemplateSummarySummaryBuckets addLabelAssociationsItem(TemplateSummaryLabel labelAssociationsItem) {
    if (this.labelAssociations == null) {
      this.labelAssociations = new ArrayList<>();
    }
    this.labelAssociations.add(labelAssociationsItem);
    return this;
  }

   /**
   * Get labelAssociations
   * @return labelAssociations
  **/
  public List getLabelAssociations() {
    return labelAssociations;
  }

  public void setLabelAssociations(List labelAssociations) {
    this.labelAssociations = labelAssociations;
  }

  public TemplateSummarySummaryBuckets envReferences(List envReferences) {
    this.envReferences = envReferences;
    return this;
  }

  public TemplateSummarySummaryBuckets addEnvReferencesItem(Object envReferencesItem) {
    if (this.envReferences == null) {
      this.envReferences = new ArrayList<>();
    }
    this.envReferences.add(envReferencesItem);
    return this;
  }

   /**
   * Get envReferences
   * @return envReferences
  **/
  public List getEnvReferences() {
    return envReferences;
  }

  public void setEnvReferences(List envReferences) {
    this.envReferences = envReferences;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    TemplateSummarySummaryBuckets templateSummarySummaryBuckets = (TemplateSummarySummaryBuckets) o;
    return Objects.equals(this.id, templateSummarySummaryBuckets.id) &&
        Objects.equals(this.orgID, templateSummarySummaryBuckets.orgID) &&
        Objects.equals(this.kind, templateSummarySummaryBuckets.kind) &&
        Objects.equals(this.templateMetaName, templateSummarySummaryBuckets.templateMetaName) &&
        Objects.equals(this.name, templateSummarySummaryBuckets.name) &&
        Objects.equals(this.description, templateSummarySummaryBuckets.description) &&
        Objects.equals(this.retentionPeriod, templateSummarySummaryBuckets.retentionPeriod) &&
        Objects.equals(this.labelAssociations, templateSummarySummaryBuckets.labelAssociations) &&
        Objects.equals(this.envReferences, templateSummarySummaryBuckets.envReferences);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, orgID, kind, templateMetaName, name, description, retentionPeriod, labelAssociations, envReferences);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class TemplateSummarySummaryBuckets {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    orgID: ").append(toIndentedString(orgID)).append("\n");
    sb.append("    kind: ").append(toIndentedString(kind)).append("\n");
    sb.append("    templateMetaName: ").append(toIndentedString(templateMetaName)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    retentionPeriod: ").append(toIndentedString(retentionPeriod)).append("\n");
    sb.append("    labelAssociations: ").append(toIndentedString(labelAssociations)).append("\n");
    sb.append("    envReferences: ").append(toIndentedString(envReferences)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}