/*
 * Cloudera Manager API
 * <h1>Cloudera Manager API v50</h1>       <p>Introduced in Cloudera Manager 7.8.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>
 *
 * OpenAPI spec version: 7.8.1
 * 
 *
 * 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 com.cloudera.api.swagger.model;

import java.util.Objects;
import com.cloudera.api.swagger.model.ApiAuthRoleAuthority;
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;

/**
 * This is the model for auth role metadata
 */
@ApiModel(description = "This is the model for auth role metadata")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-11-17T16:38:34.097Z")
public class ApiAuthRoleMetadata {
  @SerializedName("displayName")
  private String displayName = null;

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

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

  @SerializedName("authorities")
  private List<ApiAuthRoleAuthority> authorities = null;

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

  public ApiAuthRoleMetadata displayName(String displayName) {
    this.displayName = displayName;
    return this;
  }

   /**
   * 
   * @return displayName
  **/
  @ApiModelProperty(value = "")
  public String getDisplayName() {
    return displayName;
  }

  public void setDisplayName(String displayName) {
    this.displayName = displayName;
  }

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

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

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

  public ApiAuthRoleMetadata role(String role) {
    this.role = role;
    return this;
  }

   /**
   * 
   * @return role
  **/
  @ApiModelProperty(value = "")
  public String getRole() {
    return role;
  }

  public void setRole(String role) {
    this.role = role;
  }

  public ApiAuthRoleMetadata authorities(List<ApiAuthRoleAuthority> authorities) {
    this.authorities = authorities;
    return this;
  }

  public ApiAuthRoleMetadata addAuthoritiesItem(ApiAuthRoleAuthority authoritiesItem) {
    if (this.authorities == null) {
      this.authorities = new ArrayList<ApiAuthRoleAuthority>();
    }
    this.authorities.add(authoritiesItem);
    return this;
  }

   /**
   * 
   * @return authorities
  **/
  @ApiModelProperty(value = "")
  public List<ApiAuthRoleAuthority> getAuthorities() {
    return authorities;
  }

  public void setAuthorities(List<ApiAuthRoleAuthority> authorities) {
    this.authorities = authorities;
  }

  public ApiAuthRoleMetadata allowedScopes(List<String> allowedScopes) {
    this.allowedScopes = allowedScopes;
    return this;
  }

  public ApiAuthRoleMetadata addAllowedScopesItem(String allowedScopesItem) {
    if (this.allowedScopes == null) {
      this.allowedScopes = new ArrayList<String>();
    }
    this.allowedScopes.add(allowedScopesItem);
    return this;
  }

   /**
   * 
   * @return allowedScopes
  **/
  @ApiModelProperty(value = "")
  public List<String> getAllowedScopes() {
    return allowedScopes;
  }

  public void setAllowedScopes(List<String> allowedScopes) {
    this.allowedScopes = allowedScopes;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiAuthRoleMetadata apiAuthRoleMetadata = (ApiAuthRoleMetadata) o;
    return Objects.equals(this.displayName, apiAuthRoleMetadata.displayName) &&
        Objects.equals(this.uuid, apiAuthRoleMetadata.uuid) &&
        Objects.equals(this.role, apiAuthRoleMetadata.role) &&
        Objects.equals(this.authorities, apiAuthRoleMetadata.authorities) &&
        Objects.equals(this.allowedScopes, apiAuthRoleMetadata.allowedScopes);
  }

  @Override
  public int hashCode() {
    return Objects.hash(displayName, uuid, role, authorities, allowedScopes);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiAuthRoleMetadata {\n");
    
    sb.append("    displayName: ").append(toIndentedString(displayName)).append("\n");
    sb.append("    uuid: ").append(toIndentedString(uuid)).append("\n");
    sb.append("    role: ").append(toIndentedString(role)).append("\n");
    sb.append("    authorities: ").append(toIndentedString(authorities)).append("\n");
    sb.append("    allowedScopes: ").append(toIndentedString(allowedScopes)).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    ");
  }
  
}

