com.huaweicloud.sdk.kms.v2.model.RevokeGrantRequestBody Maven / Gradle / Ivy
The newest version!
package com.huaweicloud.sdk.kms.v2.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* RevokeGrantRequestBody
*/
public class RevokeGrantRequestBody {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "key_id")
private String keyId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "grant_id")
private String grantId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "sequence")
private String sequence;
public RevokeGrantRequestBody withKeyId(String keyId) {
this.keyId = keyId;
return this;
}
/**
* 密钥ID,36字节,满足正则匹配“^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$”。 例如:0d0466b0-e727-4d9c-b35d-f84bb474a37f。
* @return keyId
*/
public String getKeyId() {
return keyId;
}
public void setKeyId(String keyId) {
this.keyId = keyId;
}
public RevokeGrantRequestBody withGrantId(String grantId) {
this.grantId = grantId;
return this;
}
/**
* 授权ID,64字节,满足正则匹配“^[A-Fa-f0-9]{64}$”。 例如:7c9a3286af4fcca5f0a385ad13e1d21a50e27b6dbcab50f37f30f93b8939827d
* @return grantId
*/
public String getGrantId() {
return grantId;
}
public void setGrantId(String grantId) {
this.grantId = grantId;
}
public RevokeGrantRequestBody withSequence(String sequence) {
this.sequence = sequence;
return this;
}
/**
* 请求消息序列号,36字节序列号。例如:919c82d4-8046-4722-9094-35c3c6524cff
* @return sequence
*/
public String getSequence() {
return sequence;
}
public void setSequence(String sequence) {
this.sequence = sequence;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
RevokeGrantRequestBody that = (RevokeGrantRequestBody) obj;
return Objects.equals(this.keyId, that.keyId) && Objects.equals(this.grantId, that.grantId)
&& Objects.equals(this.sequence, that.sequence);
}
@Override
public int hashCode() {
return Objects.hash(keyId, grantId, sequence);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RevokeGrantRequestBody {\n");
sb.append(" keyId: ").append(toIndentedString(keyId)).append("\n");
sb.append(" grantId: ").append(toIndentedString(grantId)).append("\n");
sb.append(" sequence: ").append(toIndentedString(sequence)).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 ");
}
}