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

/**
 * ApplicationDTO
 */

public class ApplicationDTO {
  @SerializedName("uuid")
  private String uuid = null;

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

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

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

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

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

  @SerializedName("groupIds")
  private List<GroupIdDTO> groupIds = null;

  @SerializedName("attributes")
  private Map<String, String> attributes = null;

  public ApplicationDTO uuid(String uuid) {
    this.uuid = uuid;
    return this;
  }

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

  public void setUuid(String uuid) {
    this.uuid = uuid;
  }

  public ApplicationDTO 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 ApplicationDTO 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 ApplicationDTO subName(String subName) {
    this.subName = subName;
    return this;
  }

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

  public void setSubName(String subName) {
    this.subName = subName;
  }

  public ApplicationDTO policy(String policy) {
    this.policy = policy;
    return this;
  }

   /**
   * Application level throtting policy.
   * @return policy
  **/
  @ApiModelProperty(value = "Application level throtting policy.")
  public String getPolicy() {
    return policy;
  }

  public void setPolicy(String policy) {
    this.policy = policy;
  }

  public ApplicationDTO tokenType(String tokenType) {
    this.tokenType = tokenType;
    return this;
  }

   /**
   * type of the token.
   * @return tokenType
  **/
  @ApiModelProperty(example = "JWT", value = "type of the token.")
  public String getTokenType() {
    return tokenType;
  }

  public void setTokenType(String tokenType) {
    this.tokenType = tokenType;
  }

  public ApplicationDTO groupIds(List<GroupIdDTO> groupIds) {
    this.groupIds = groupIds;
    return this;
  }

  public ApplicationDTO addGroupIdsItem(GroupIdDTO groupIdsItem) {
    if (this.groupIds == null) {
      this.groupIds = new ArrayList<>();
    }
    this.groupIds.add(groupIdsItem);
    return this;
  }

   /**
   * group ids associated with the application.
   * @return groupIds
  **/
  @ApiModelProperty(example = "\"wso2\"", value = "group ids associated with the application.")
  public List<GroupIdDTO> getGroupIds() {
    return groupIds;
  }

  public void setGroupIds(List<GroupIdDTO> groupIds) {
    this.groupIds = groupIds;
  }

  public ApplicationDTO attributes(Map<String, String> attributes) {
    this.attributes = attributes;
    return this;
  }

  public ApplicationDTO putAttributesItem(String key, String attributesItem) {
    if (this.attributes == null) {
      this.attributes = new HashMap<>();
    }
    this.attributes.put(key, attributesItem);
    return this;
  }

   /**
   * Get attributes
   * @return attributes
  **/
  @ApiModelProperty(value = "")
  public Map<String, String> getAttributes() {
    return attributes;
  }

  public void setAttributes(Map<String, String> attributes) {
    this.attributes = attributes;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApplicationDTO application = (ApplicationDTO) o;
    return Objects.equals(this.uuid, application.uuid) &&
        Objects.equals(this.id, application.id) &&
        Objects.equals(this.name, application.name) &&
        Objects.equals(this.subName, application.subName) &&
        Objects.equals(this.policy, application.policy) &&
        Objects.equals(this.tokenType, application.tokenType) &&
        Objects.equals(this.groupIds, application.groupIds) &&
        Objects.equals(this.attributes, application.attributes);
  }

  @Override
  public int hashCode() {
    return Objects.hash(uuid, id, name, subName, policy, tokenType, groupIds, attributes);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApplicationDTO {\n");
    
    sb.append("    uuid: ").append(toIndentedString(uuid)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    subName: ").append(toIndentedString(subName)).append("\n");
    sb.append("    policy: ").append(toIndentedString(policy)).append("\n");
    sb.append("    tokenType: ").append(toIndentedString(tokenType)).append("\n");
    sb.append("    groupIds: ").append(toIndentedString(groupIds)).append("\n");
    sb.append("    attributes: ").append(toIndentedString(attributes)).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    ");
  }

}

