/*
 * 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.IPLevelDTO;

/**
 * BlockConditionsDTO
 */

public class BlockConditionsDTO {
  @SerializedName("api")
  private List<String> api = null;

  @SerializedName("application")
  private List<String> application = null;

  @SerializedName("ip")
  private List<IPLevelDTO> ip = null;

  @SerializedName("user")
  private List<String> user = null;

  @SerializedName("custom")
  private List<String> custom = null;

  @SerializedName("subscription")
  private List<String> subscription = null;

  public BlockConditionsDTO api(List<String> api) {
    this.api = api;
    return this;
  }

  public BlockConditionsDTO addApiItem(String apiItem) {
    if (this.api == null) {
      this.api = new ArrayList<>();
    }
    this.api.add(apiItem);
    return this;
  }

   /**
   * Get api
   * @return api
  **/
  @ApiModelProperty(value = "")
  public List<String> getApi() {
    return api;
  }

  public void setApi(List<String> api) {
    this.api = api;
  }

  public BlockConditionsDTO application(List<String> application) {
    this.application = application;
    return this;
  }

  public BlockConditionsDTO addApplicationItem(String applicationItem) {
    if (this.application == null) {
      this.application = new ArrayList<>();
    }
    this.application.add(applicationItem);
    return this;
  }

   /**
   * Get application
   * @return application
  **/
  @ApiModelProperty(value = "")
  public List<String> getApplication() {
    return application;
  }

  public void setApplication(List<String> application) {
    this.application = application;
  }

  public BlockConditionsDTO ip(List<IPLevelDTO> ip) {
    this.ip = ip;
    return this;
  }

  public BlockConditionsDTO addIpItem(IPLevelDTO ipItem) {
    if (this.ip == null) {
      this.ip = new ArrayList<>();
    }
    this.ip.add(ipItem);
    return this;
  }

   /**
   * Get ip
   * @return ip
  **/
  @ApiModelProperty(value = "")
  public List<IPLevelDTO> getIp() {
    return ip;
  }

  public void setIp(List<IPLevelDTO> ip) {
    this.ip = ip;
  }

  public BlockConditionsDTO user(List<String> user) {
    this.user = user;
    return this;
  }

  public BlockConditionsDTO addUserItem(String userItem) {
    if (this.user == null) {
      this.user = new ArrayList<>();
    }
    this.user.add(userItem);
    return this;
  }

   /**
   * Get user
   * @return user
  **/
  @ApiModelProperty(value = "")
  public List<String> getUser() {
    return user;
  }

  public void setUser(List<String> user) {
    this.user = user;
  }

  public BlockConditionsDTO custom(List<String> custom) {
    this.custom = custom;
    return this;
  }

  public BlockConditionsDTO addCustomItem(String customItem) {
    if (this.custom == null) {
      this.custom = new ArrayList<>();
    }
    this.custom.add(customItem);
    return this;
  }

   /**
   * Get custom
   * @return custom
  **/
  @ApiModelProperty(value = "")
  public List<String> getCustom() {
    return custom;
  }

  public void setCustom(List<String> custom) {
    this.custom = custom;
  }

  public BlockConditionsDTO subscription(List<String> subscription) {
    this.subscription = subscription;
    return this;
  }

  public BlockConditionsDTO addSubscriptionItem(String subscriptionItem) {
    if (this.subscription == null) {
      this.subscription = new ArrayList<>();
    }
    this.subscription.add(subscriptionItem);
    return this;
  }

   /**
   * Get subscription
   * @return subscription
  **/
  @ApiModelProperty(value = "")
  public List<String> getSubscription() {
    return subscription;
  }

  public void setSubscription(List<String> subscription) {
    this.subscription = subscription;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BlockConditionsDTO blockConditions = (BlockConditionsDTO) o;
    return Objects.equals(this.api, blockConditions.api) &&
        Objects.equals(this.application, blockConditions.application) &&
        Objects.equals(this.ip, blockConditions.ip) &&
        Objects.equals(this.user, blockConditions.user) &&
        Objects.equals(this.custom, blockConditions.custom) &&
        Objects.equals(this.subscription, blockConditions.subscription);
  }

  @Override
  public int hashCode() {
    return Objects.hash(api, application, ip, user, custom, subscription);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class BlockConditionsDTO {\n");
    
    sb.append("    api: ").append(toIndentedString(api)).append("\n");
    sb.append("    application: ").append(toIndentedString(application)).append("\n");
    sb.append("    ip: ").append(toIndentedString(ip)).append("\n");
    sb.append("    user: ").append(toIndentedString(user)).append("\n");
    sb.append("    custom: ").append(toIndentedString(custom)).append("\n");
    sb.append("    subscription: ").append(toIndentedString(subscription)).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    ");
  }

}

