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

com.influxdb.client.domain.StatusRule 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.RuleStatusLevel;
import java.io.IOException;

/**
 * StatusRule
 */

public class StatusRule {
  public static final String SERIALIZED_NAME_CURRENT_LEVEL = "currentLevel";
  @SerializedName(SERIALIZED_NAME_CURRENT_LEVEL)
  private RuleStatusLevel currentLevel = null;

  public static final String SERIALIZED_NAME_PREVIOUS_LEVEL = "previousLevel";
  @SerializedName(SERIALIZED_NAME_PREVIOUS_LEVEL)
  private RuleStatusLevel previousLevel = null;

  public static final String SERIALIZED_NAME_COUNT = "count";
  @SerializedName(SERIALIZED_NAME_COUNT)
  private Integer count;

  public static final String SERIALIZED_NAME_PERIOD = "period";
  @SerializedName(SERIALIZED_NAME_PERIOD)
  private String period;

  public StatusRule currentLevel(RuleStatusLevel currentLevel) {
    this.currentLevel = currentLevel;
    return this;
  }

   /**
   * Get currentLevel
   * @return currentLevel
  **/
  public RuleStatusLevel getCurrentLevel() {
    return currentLevel;
  }

  public void setCurrentLevel(RuleStatusLevel currentLevel) {
    this.currentLevel = currentLevel;
  }

  public StatusRule previousLevel(RuleStatusLevel previousLevel) {
    this.previousLevel = previousLevel;
    return this;
  }

   /**
   * Get previousLevel
   * @return previousLevel
  **/
  public RuleStatusLevel getPreviousLevel() {
    return previousLevel;
  }

  public void setPreviousLevel(RuleStatusLevel previousLevel) {
    this.previousLevel = previousLevel;
  }

  public StatusRule count(Integer count) {
    this.count = count;
    return this;
  }

   /**
   * Get count
   * @return count
  **/
  public Integer getCount() {
    return count;
  }

  public void setCount(Integer count) {
    this.count = count;
  }

  public StatusRule period(String period) {
    this.period = period;
    return this;
  }

   /**
   * Get period
   * @return period
  **/
  public String getPeriod() {
    return period;
  }

  public void setPeriod(String period) {
    this.period = period;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    StatusRule statusRule = (StatusRule) o;
    return Objects.equals(this.currentLevel, statusRule.currentLevel) &&
        Objects.equals(this.previousLevel, statusRule.previousLevel) &&
        Objects.equals(this.count, statusRule.count) &&
        Objects.equals(this.period, statusRule.period);
  }

  @Override
  public int hashCode() {
    return Objects.hash(currentLevel, previousLevel, count, period);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class StatusRule {\n");
    sb.append("    currentLevel: ").append(toIndentedString(currentLevel)).append("\n");
    sb.append("    previousLevel: ").append(toIndentedString(previousLevel)).append("\n");
    sb.append("    count: ").append(toIndentedString(count)).append("\n");
    sb.append("    period: ").append(toIndentedString(period)).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    ");
  }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy