/*
 * Internal Utility API
 * This API allows you to access internal data.
 *
 * OpenAPI spec version: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package org.wso2.am.integration.clients.internal.api.dto;

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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.wso2.am.integration.clients.internal.api.dto.GraphQLQueryDTO;
import org.wso2.am.integration.clients.internal.api.dto.PolicyDTO;
import org.wso2.am.integration.clients.internal.api.dto.ThrottleLimitDTO;

/**
 * SubscriptionPolicyDTO
 */

public class SubscriptionPolicyDTO {
  @SerializedName("id")
  private Integer id = null;

  @SerializedName("tenantId")
  private Integer tenantId = null;

  @SerializedName("tenantDomain")
  private String tenantDomain = null;

  @SerializedName("name")
  private String name = null;

  @SerializedName("quotaType")
  private String quotaType = null;

  @SerializedName("graphQLMaxComplexity")
  private Integer graphQLMaxComplexity = null;

  @SerializedName("graphQLMaxDepth")
  private Integer graphQLMaxDepth = null;

  @SerializedName("rateLimitCount")
  private Integer rateLimitCount = null;

  @SerializedName("rateLimitTimeUnit")
  private String rateLimitTimeUnit = null;

  @SerializedName("stopOnQuotaReach")
  private Boolean stopOnQuotaReach = null;

  @SerializedName("defaultLimit")
  private ThrottleLimitDTO defaultLimit = null;

  public SubscriptionPolicyDTO id(Integer id) {
    this.id = id;
    return this;
  }

   /**
   * Get id
   * @return id
  **/
  @ApiModelProperty(value = "")
  public Integer getId() {
    return id;
  }

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

  public SubscriptionPolicyDTO tenantId(Integer tenantId) {
    this.tenantId = tenantId;
    return this;
  }

   /**
   * Get tenantId
   * @return tenantId
  **/
  @ApiModelProperty(value = "")
  public Integer getTenantId() {
    return tenantId;
  }

  public void setTenantId(Integer tenantId) {
    this.tenantId = tenantId;
  }

  public SubscriptionPolicyDTO tenantDomain(String tenantDomain) {
    this.tenantDomain = tenantDomain;
    return this;
  }

   /**
   * Get tenantDomain
   * @return tenantDomain
  **/
  @ApiModelProperty(value = "")
  public String getTenantDomain() {
    return tenantDomain;
  }

  public void setTenantDomain(String tenantDomain) {
    this.tenantDomain = tenantDomain;
  }

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

   /**
   * Get name
   * @return name
  **/
  @ApiModelProperty(value = "")
  public String getName() {
    return name;
  }

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

  public SubscriptionPolicyDTO quotaType(String quotaType) {
    this.quotaType = quotaType;
    return this;
  }

   /**
   * Get quotaType
   * @return quotaType
  **/
  @ApiModelProperty(value = "")
  public String getQuotaType() {
    return quotaType;
  }

  public void setQuotaType(String quotaType) {
    this.quotaType = quotaType;
  }

  public SubscriptionPolicyDTO graphQLMaxComplexity(Integer graphQLMaxComplexity) {
    this.graphQLMaxComplexity = graphQLMaxComplexity;
    return this;
  }

   /**
   * Maximum Complexity of the GraphQL query
   * @return graphQLMaxComplexity
  **/
  @ApiModelProperty(example = "400", value = "Maximum Complexity of the GraphQL query")
  public Integer getGraphQLMaxComplexity() {
    return graphQLMaxComplexity;
  }

  public void setGraphQLMaxComplexity(Integer graphQLMaxComplexity) {
    this.graphQLMaxComplexity = graphQLMaxComplexity;
  }

  public SubscriptionPolicyDTO graphQLMaxDepth(Integer graphQLMaxDepth) {
    this.graphQLMaxDepth = graphQLMaxDepth;
    return this;
  }

   /**
   * Maximum Depth of the GraphQL query
   * @return graphQLMaxDepth
  **/
  @ApiModelProperty(example = "10", value = "Maximum Depth of the GraphQL query")
  public Integer getGraphQLMaxDepth() {
    return graphQLMaxDepth;
  }

  public void setGraphQLMaxDepth(Integer graphQLMaxDepth) {
    this.graphQLMaxDepth = graphQLMaxDepth;
  }

  public SubscriptionPolicyDTO rateLimitCount(Integer rateLimitCount) {
    this.rateLimitCount = rateLimitCount;
    return this;
  }

   /**
   * Get rateLimitCount
   * @return rateLimitCount
  **/
  @ApiModelProperty(value = "")
  public Integer getRateLimitCount() {
    return rateLimitCount;
  }

  public void setRateLimitCount(Integer rateLimitCount) {
    this.rateLimitCount = rateLimitCount;
  }

  public SubscriptionPolicyDTO rateLimitTimeUnit(String rateLimitTimeUnit) {
    this.rateLimitTimeUnit = rateLimitTimeUnit;
    return this;
  }

   /**
   * Get rateLimitTimeUnit
   * @return rateLimitTimeUnit
  **/
  @ApiModelProperty(value = "")
  public String getRateLimitTimeUnit() {
    return rateLimitTimeUnit;
  }

  public void setRateLimitTimeUnit(String rateLimitTimeUnit) {
    this.rateLimitTimeUnit = rateLimitTimeUnit;
  }

  public SubscriptionPolicyDTO stopOnQuotaReach(Boolean stopOnQuotaReach) {
    this.stopOnQuotaReach = stopOnQuotaReach;
    return this;
  }

   /**
   * Get stopOnQuotaReach
   * @return stopOnQuotaReach
  **/
  @ApiModelProperty(value = "")
  public Boolean isStopOnQuotaReach() {
    return stopOnQuotaReach;
  }

  public void setStopOnQuotaReach(Boolean stopOnQuotaReach) {
    this.stopOnQuotaReach = stopOnQuotaReach;
  }

  public SubscriptionPolicyDTO defaultLimit(ThrottleLimitDTO defaultLimit) {
    this.defaultLimit = defaultLimit;
    return this;
  }

   /**
   * Get defaultLimit
   * @return defaultLimit
  **/
  @ApiModelProperty(value = "")
  public ThrottleLimitDTO getDefaultLimit() {
    return defaultLimit;
  }

  public void setDefaultLimit(ThrottleLimitDTO defaultLimit) {
    this.defaultLimit = defaultLimit;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SubscriptionPolicyDTO subscriptionPolicy = (SubscriptionPolicyDTO) o;
    return Objects.equals(this.id, subscriptionPolicy.id) &&
        Objects.equals(this.tenantId, subscriptionPolicy.tenantId) &&
        Objects.equals(this.tenantDomain, subscriptionPolicy.tenantDomain) &&
        Objects.equals(this.name, subscriptionPolicy.name) &&
        Objects.equals(this.quotaType, subscriptionPolicy.quotaType) &&
        Objects.equals(this.graphQLMaxComplexity, subscriptionPolicy.graphQLMaxComplexity) &&
        Objects.equals(this.graphQLMaxDepth, subscriptionPolicy.graphQLMaxDepth) &&
        Objects.equals(this.rateLimitCount, subscriptionPolicy.rateLimitCount) &&
        Objects.equals(this.rateLimitTimeUnit, subscriptionPolicy.rateLimitTimeUnit) &&
        Objects.equals(this.stopOnQuotaReach, subscriptionPolicy.stopOnQuotaReach) &&
        Objects.equals(this.defaultLimit, subscriptionPolicy.defaultLimit);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, tenantId, tenantDomain, name, quotaType, graphQLMaxComplexity, graphQLMaxDepth, rateLimitCount, rateLimitTimeUnit, stopOnQuotaReach, defaultLimit);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SubscriptionPolicyDTO {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    tenantId: ").append(toIndentedString(tenantId)).append("\n");
    sb.append("    tenantDomain: ").append(toIndentedString(tenantDomain)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    quotaType: ").append(toIndentedString(quotaType)).append("\n");
    sb.append("    graphQLMaxComplexity: ").append(toIndentedString(graphQLMaxComplexity)).append("\n");
    sb.append("    graphQLMaxDepth: ").append(toIndentedString(graphQLMaxDepth)).append("\n");
    sb.append("    rateLimitCount: ").append(toIndentedString(rateLimitCount)).append("\n");
    sb.append("    rateLimitTimeUnit: ").append(toIndentedString(rateLimitTimeUnit)).append("\n");
    sb.append("    stopOnQuotaReach: ").append(toIndentedString(stopOnQuotaReach)).append("\n");
    sb.append("    defaultLimit: ").append(toIndentedString(defaultLimit)).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    ");
  }

}

