com.huaweicloud.sdk.iam.v3.model.AgencyAllProjectRole Maven / Gradle / Ivy
package com.huaweicloud.sdk.iam.v3.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.huaweicloud.sdk.iam.v3.model.LinksSelf;
import java.util.function.Consumer;
import java.util.Objects;
/**
*
*/
public class AgencyAllProjectRole {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="id")
private String id;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="links")
private LinksSelf links;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="name")
private String name;
public AgencyAllProjectRole withId(String id) {
this.id = id;
return this;
}
/**
* 权限ID。
* @return id
*/
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public AgencyAllProjectRole withLinks(LinksSelf links) {
this.links = links;
return this;
}
public AgencyAllProjectRole withLinks(Consumer linksSetter) {
if(this.links == null ){
this.links = new LinksSelf();
linksSetter.accept(this.links);
}
return this;
}
/**
* Get links
* @return links
*/
public LinksSelf getLinks() {
return links;
}
public void setLinks(LinksSelf links) {
this.links = links;
}
public AgencyAllProjectRole withName(String name) {
this.name = name;
return this;
}
/**
* 权限名。
* @return name
*/
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AgencyAllProjectRole agencyAllProjectRole = (AgencyAllProjectRole) o;
return Objects.equals(this.id, agencyAllProjectRole.id) &&
Objects.equals(this.links, agencyAllProjectRole.links) &&
Objects.equals(this.name, agencyAllProjectRole.name);
}
@Override
public int hashCode() {
return Objects.hash(id, links, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AgencyAllProjectRole {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" links: ").append(toIndentedString(links)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).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 ");
}
}