com.huaweicloud.sdk.osm.v2.model.CreateAndDeletePrivilegeReq Maven / Gradle / Ivy
package com.huaweicloud.sdk.osm.v2.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* CreateAndDeletePrivilegeReq
*/
public class CreateAndDeletePrivilegeReq {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "operation")
private String operation;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "privilege")
private String privilege;
public CreateAndDeletePrivilegeReq withOperation(String operation) {
this.operation = operation;
return this;
}
/**
* 执行的操作(create|delete)
* @return operation
*/
public String getOperation() {
return operation;
}
public void setOperation(String operation) {
this.operation = operation;
}
public CreateAndDeletePrivilegeReq withPrivilege(String privilege) {
this.privilege = privilege;
return this;
}
/**
* 权限标识
* @return privilege
*/
public String getPrivilege() {
return privilege;
}
public void setPrivilege(String privilege) {
this.privilege = privilege;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
CreateAndDeletePrivilegeReq that = (CreateAndDeletePrivilegeReq) obj;
return Objects.equals(this.operation, that.operation) && Objects.equals(this.privilege, that.privilege);
}
@Override
public int hashCode() {
return Objects.hash(operation, privilege);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateAndDeletePrivilegeReq {\n");
sb.append(" operation: ").append(toIndentedString(operation)).append("\n");
sb.append(" privilege: ").append(toIndentedString(privilege)).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 ");
}
}