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

com.influxdb.client.domain.TemplateSummarySummaryNotificationRules 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 com.influxdb.client.domain.TemplateSummarySummaryStatusRules;
import com.influxdb.client.domain.TemplateSummarySummaryTagRules;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * TemplateSummarySummaryNotificationRules
 */

public class TemplateSummarySummaryNotificationRules {
  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_ENDPOINT_TEMPLATE_META_NAME = "endpointTemplateMetaName";
  @SerializedName(SERIALIZED_NAME_ENDPOINT_TEMPLATE_META_NAME)
  private String endpointTemplateMetaName;

  public static final String SERIALIZED_NAME_ENDPOINT_I_D = "endpointID";
  @SerializedName(SERIALIZED_NAME_ENDPOINT_I_D)
  private String endpointID;

  public static final String SERIALIZED_NAME_ENDPOINT_TYPE = "endpointType";
  @SerializedName(SERIALIZED_NAME_ENDPOINT_TYPE)
  private String endpointType;

  public static final String SERIALIZED_NAME_EVERY = "every";
  @SerializedName(SERIALIZED_NAME_EVERY)
  private String every;

  public static final String SERIALIZED_NAME_OFFSET = "offset";
  @SerializedName(SERIALIZED_NAME_OFFSET)
  private String offset;

  public static final String SERIALIZED_NAME_MESSAGE_TEMPLATE = "messageTemplate";
  @SerializedName(SERIALIZED_NAME_MESSAGE_TEMPLATE)
  private String messageTemplate;

  public static final String SERIALIZED_NAME_STATUS = "status";
  @SerializedName(SERIALIZED_NAME_STATUS)
  private String status;

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

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

  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 TemplateSummarySummaryNotificationRules 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 TemplateSummarySummaryNotificationRules 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 TemplateSummarySummaryNotificationRules 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 TemplateSummarySummaryNotificationRules 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 TemplateSummarySummaryNotificationRules endpointTemplateMetaName(String endpointTemplateMetaName) {
    this.endpointTemplateMetaName = endpointTemplateMetaName;
    return this;
  }

   /**
   * Get endpointTemplateMetaName
   * @return endpointTemplateMetaName
  **/
  public String getEndpointTemplateMetaName() {
    return endpointTemplateMetaName;
  }

  public void setEndpointTemplateMetaName(String endpointTemplateMetaName) {
    this.endpointTemplateMetaName = endpointTemplateMetaName;
  }

  public TemplateSummarySummaryNotificationRules endpointID(String endpointID) {
    this.endpointID = endpointID;
    return this;
  }

   /**
   * Get endpointID
   * @return endpointID
  **/
  public String getEndpointID() {
    return endpointID;
  }

  public void setEndpointID(String endpointID) {
    this.endpointID = endpointID;
  }

  public TemplateSummarySummaryNotificationRules endpointType(String endpointType) {
    this.endpointType = endpointType;
    return this;
  }

   /**
   * Get endpointType
   * @return endpointType
  **/
  public String getEndpointType() {
    return endpointType;
  }

  public void setEndpointType(String endpointType) {
    this.endpointType = endpointType;
  }

  public TemplateSummarySummaryNotificationRules every(String every) {
    this.every = every;
    return this;
  }

   /**
   * Get every
   * @return every
  **/
  public String getEvery() {
    return every;
  }

  public void setEvery(String every) {
    this.every = every;
  }

  public TemplateSummarySummaryNotificationRules offset(String offset) {
    this.offset = offset;
    return this;
  }

   /**
   * Get offset
   * @return offset
  **/
  public String getOffset() {
    return offset;
  }

  public void setOffset(String offset) {
    this.offset = offset;
  }

  public TemplateSummarySummaryNotificationRules messageTemplate(String messageTemplate) {
    this.messageTemplate = messageTemplate;
    return this;
  }

   /**
   * Get messageTemplate
   * @return messageTemplate
  **/
  public String getMessageTemplate() {
    return messageTemplate;
  }

  public void setMessageTemplate(String messageTemplate) {
    this.messageTemplate = messageTemplate;
  }

  public TemplateSummarySummaryNotificationRules status(String status) {
    this.status = status;
    return this;
  }

   /**
   * Get status
   * @return status
  **/
  public String getStatus() {
    return status;
  }

  public void setStatus(String status) {
    this.status = status;
  }

  public TemplateSummarySummaryNotificationRules statusRules(List statusRules) {
    this.statusRules = statusRules;
    return this;
  }

  public TemplateSummarySummaryNotificationRules addStatusRulesItem(TemplateSummarySummaryStatusRules statusRulesItem) {
    if (this.statusRules == null) {
      this.statusRules = new ArrayList<>();
    }
    this.statusRules.add(statusRulesItem);
    return this;
  }

   /**
   * Get statusRules
   * @return statusRules
  **/
  public List getStatusRules() {
    return statusRules;
  }

  public void setStatusRules(List statusRules) {
    this.statusRules = statusRules;
  }

  public TemplateSummarySummaryNotificationRules tagRules(List tagRules) {
    this.tagRules = tagRules;
    return this;
  }

  public TemplateSummarySummaryNotificationRules addTagRulesItem(TemplateSummarySummaryTagRules tagRulesItem) {
    if (this.tagRules == null) {
      this.tagRules = new ArrayList<>();
    }
    this.tagRules.add(tagRulesItem);
    return this;
  }

   /**
   * Get tagRules
   * @return tagRules
  **/
  public List getTagRules() {
    return tagRules;
  }

  public void setTagRules(List tagRules) {
    this.tagRules = tagRules;
  }

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

  public TemplateSummarySummaryNotificationRules 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 TemplateSummarySummaryNotificationRules envReferences(List envReferences) {
    this.envReferences = envReferences;
    return this;
  }

  public TemplateSummarySummaryNotificationRules 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;
    }
    TemplateSummarySummaryNotificationRules templateSummarySummaryNotificationRules = (TemplateSummarySummaryNotificationRules) o;
    return Objects.equals(this.kind, templateSummarySummaryNotificationRules.kind) &&
        Objects.equals(this.templateMetaName, templateSummarySummaryNotificationRules.templateMetaName) &&
        Objects.equals(this.name, templateSummarySummaryNotificationRules.name) &&
        Objects.equals(this.description, templateSummarySummaryNotificationRules.description) &&
        Objects.equals(this.endpointTemplateMetaName, templateSummarySummaryNotificationRules.endpointTemplateMetaName) &&
        Objects.equals(this.endpointID, templateSummarySummaryNotificationRules.endpointID) &&
        Objects.equals(this.endpointType, templateSummarySummaryNotificationRules.endpointType) &&
        Objects.equals(this.every, templateSummarySummaryNotificationRules.every) &&
        Objects.equals(this.offset, templateSummarySummaryNotificationRules.offset) &&
        Objects.equals(this.messageTemplate, templateSummarySummaryNotificationRules.messageTemplate) &&
        Objects.equals(this.status, templateSummarySummaryNotificationRules.status) &&
        Objects.equals(this.statusRules, templateSummarySummaryNotificationRules.statusRules) &&
        Objects.equals(this.tagRules, templateSummarySummaryNotificationRules.tagRules) &&
        Objects.equals(this.labelAssociations, templateSummarySummaryNotificationRules.labelAssociations) &&
        Objects.equals(this.envReferences, templateSummarySummaryNotificationRules.envReferences);
  }

  @Override
  public int hashCode() {
    return Objects.hash(kind, templateMetaName, name, description, endpointTemplateMetaName, endpointID, endpointType, every, offset, messageTemplate, status, statusRules, tagRules, labelAssociations, envReferences);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class TemplateSummarySummaryNotificationRules {\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("    endpointTemplateMetaName: ").append(toIndentedString(endpointTemplateMetaName)).append("\n");
    sb.append("    endpointID: ").append(toIndentedString(endpointID)).append("\n");
    sb.append("    endpointType: ").append(toIndentedString(endpointType)).append("\n");
    sb.append("    every: ").append(toIndentedString(every)).append("\n");
    sb.append("    offset: ").append(toIndentedString(offset)).append("\n");
    sb.append("    messageTemplate: ").append(toIndentedString(messageTemplate)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    statusRules: ").append(toIndentedString(statusRules)).append("\n");
    sb.append("    tagRules: ").append(toIndentedString(tagRules)).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    ");
  }

}