/*
 * ThingPark things management Devices API
 * REST interface for Devices management. 
 *
 * The version of the OpenAPI document: 7.3
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package lora.ns.actility.api.model.device;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * DeviceCellularHistoryMicroflowDaily
 */
@JsonPropertyOrder({ DeviceCellularHistoryMicroflowDaily.JSON_PROPERTY_VAL })
@JsonTypeName("DeviceCellular_historyMicroflowDaily")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-05-29T01:47:08.521515962+02:00[Europe/Paris]", comments = "Generator version: 7.6.0")
public class DeviceCellularHistoryMicroflowDaily {
  public static final String JSON_PROPERTY_VAL = "val";
  private List<Integer> val = new ArrayList<>();

  public DeviceCellularHistoryMicroflowDaily() {
  }

  public DeviceCellularHistoryMicroflowDaily val(List<Integer> val) {

    this.val = val;
    return this;
  }

  public DeviceCellularHistoryMicroflowDaily addValItem(Integer valItem) {
    if (this.val == null) {
      this.val = new ArrayList<>();
    }
    this.val.add(valItem);
    return this;
  }

  /**
   * List of last cumulated microflow events per 2h period for a 24h duration
   * before the lastMicroflowTimestamp.
   * 
   * @return val
   **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_VAL)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public List<Integer> getVal() {
    return val;
  }

  @JsonProperty(JSON_PROPERTY_VAL)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setVal(List<Integer> val) {
    this.val = val;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DeviceCellularHistoryMicroflowDaily deviceCellularHistoryMicroflowDaily = (DeviceCellularHistoryMicroflowDaily) o;
    return Objects.equals(this.val, deviceCellularHistoryMicroflowDaily.val);
  }

  @Override
  public int hashCode() {
    return Objects.hash(val);
  }

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

}
