/*
 * WSO2 API Manager - Publisher API
 * This specifies a **RESTful API** for WSO2 **API Manager** - Publisher.  Please see [full swagger definition](https://raw.githubusercontent.com/wso2/carbon-apimgt/v6.0.4/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/main/resources/publisher-api.yaml) of the API which is written using [swagger 2.0](http://swagger.io/) specification. 
 *
 * OpenAPI spec version: v1.1
 * Contact: architecture@wso2.com
 *
 * 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.publisher.api.v1.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.publisher.api.v1.dto.SharedScopeUsedAPIResourceInfoDTO;

/**
 * SharedScopeUsedAPIInfoDTO
 */

public class SharedScopeUsedAPIInfoDTO {
  @SerializedName("name")
  private String name = null;

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

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

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

  @SerializedName("usedResourceList")
  private List<SharedScopeUsedAPIResourceInfoDTO> usedResourceList = null;

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

   /**
   * Get name
   * @return name
  **/
  @ApiModelProperty(example = "CalculatorAPI", required = true, value = "")
  public String getName() {
    return name;
  }

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

  public SharedScopeUsedAPIInfoDTO context(String context) {
    this.context = context;
    return this;
  }

   /**
   * Get context
   * @return context
  **/
  @ApiModelProperty(example = "CalculatorAPI", required = true, value = "")
  public String getContext() {
    return context;
  }

  public void setContext(String context) {
    this.context = context;
  }

  public SharedScopeUsedAPIInfoDTO version(String version) {
    this.version = version;
    return this;
  }

   /**
   * Get version
   * @return version
  **/
  @ApiModelProperty(example = "1.0.0", required = true, value = "")
  public String getVersion() {
    return version;
  }

  public void setVersion(String version) {
    this.version = version;
  }

  public SharedScopeUsedAPIInfoDTO provider(String provider) {
    this.provider = provider;
    return this;
  }

   /**
   * If the provider value is not given user invoking the api will be used as the provider. 
   * @return provider
  **/
  @ApiModelProperty(example = "admin", value = "If the provider value is not given user invoking the api will be used as the provider. ")
  public String getProvider() {
    return provider;
  }

  public void setProvider(String provider) {
    this.provider = provider;
  }

  public SharedScopeUsedAPIInfoDTO usedResourceList(List<SharedScopeUsedAPIResourceInfoDTO> usedResourceList) {
    this.usedResourceList = usedResourceList;
    return this;
  }

  public SharedScopeUsedAPIInfoDTO addUsedResourceListItem(SharedScopeUsedAPIResourceInfoDTO usedResourceListItem) {
    if (this.usedResourceList == null) {
      this.usedResourceList = new ArrayList<>();
    }
    this.usedResourceList.add(usedResourceListItem);
    return this;
  }

   /**
   * Resource list which have used the shared scope within this API 
   * @return usedResourceList
  **/
  @ApiModelProperty(value = "Resource list which have used the shared scope within this API ")
  public List<SharedScopeUsedAPIResourceInfoDTO> getUsedResourceList() {
    return usedResourceList;
  }

  public void setUsedResourceList(List<SharedScopeUsedAPIResourceInfoDTO> usedResourceList) {
    this.usedResourceList = usedResourceList;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SharedScopeUsedAPIInfoDTO sharedScopeUsedAPIInfo = (SharedScopeUsedAPIInfoDTO) o;
    return Objects.equals(this.name, sharedScopeUsedAPIInfo.name) &&
        Objects.equals(this.context, sharedScopeUsedAPIInfo.context) &&
        Objects.equals(this.version, sharedScopeUsedAPIInfo.version) &&
        Objects.equals(this.provider, sharedScopeUsedAPIInfo.provider) &&
        Objects.equals(this.usedResourceList, sharedScopeUsedAPIInfo.usedResourceList);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, context, version, provider, usedResourceList);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SharedScopeUsedAPIInfoDTO {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    context: ").append(toIndentedString(context)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).append("\n");
    sb.append("    provider: ").append(toIndentedString(provider)).append("\n");
    sb.append("    usedResourceList: ").append(toIndentedString(usedResourceList)).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    ");
  }

}

