/*
 * 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 java.util.ArrayList;
import java.util.List;
import org.wso2.am.integration.clients.internal.api.dto.ConditionDTO;
import org.wso2.am.integration.clients.internal.api.dto.ThrottleLimitDTO;

/**
 * ApiPolicyConditionGroupDTO
 */

public class ApiPolicyConditionGroupDTO {
  @SerializedName("policyId")
  private Integer policyId = null;

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

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

  @SerializedName("condition")
  private List<ConditionDTO> condition = null;

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

  public ApiPolicyConditionGroupDTO policyId(Integer policyId) {
    this.policyId = policyId;
    return this;
  }

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

  public void setPolicyId(Integer policyId) {
    this.policyId = policyId;
  }

  public ApiPolicyConditionGroupDTO 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 ApiPolicyConditionGroupDTO conditionGroupId(Integer conditionGroupId) {
    this.conditionGroupId = conditionGroupId;
    return this;
  }

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

  public void setConditionGroupId(Integer conditionGroupId) {
    this.conditionGroupId = conditionGroupId;
  }

  public ApiPolicyConditionGroupDTO condition(List<ConditionDTO> condition) {
    this.condition = condition;
    return this;
  }

  public ApiPolicyConditionGroupDTO addConditionItem(ConditionDTO conditionItem) {
    if (this.condition == null) {
      this.condition = new ArrayList<>();
    }
    this.condition.add(conditionItem);
    return this;
  }

   /**
   * Get condition
   * @return condition
  **/
  @ApiModelProperty(value = "")
  public List<ConditionDTO> getCondition() {
    return condition;
  }

  public void setCondition(List<ConditionDTO> condition) {
    this.condition = condition;
  }

  public ApiPolicyConditionGroupDTO 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;
    }
    ApiPolicyConditionGroupDTO apiPolicyConditionGroup = (ApiPolicyConditionGroupDTO) o;
    return Objects.equals(this.policyId, apiPolicyConditionGroup.policyId) &&
        Objects.equals(this.quotaType, apiPolicyConditionGroup.quotaType) &&
        Objects.equals(this.conditionGroupId, apiPolicyConditionGroup.conditionGroupId) &&
        Objects.equals(this.condition, apiPolicyConditionGroup.condition) &&
        Objects.equals(this.defaultLimit, apiPolicyConditionGroup.defaultLimit);
  }

  @Override
  public int hashCode() {
    return Objects.hash(policyId, quotaType, conditionGroupId, condition, defaultLimit);
  }


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

}

