com.huaweicloud.sdk.kms.v2.model.ReplicateKeyResponse 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 com.huaweicloud.sdk.core.SdkResponse;
import java.util.Objects;
/**
* Response Object
*/
public class ReplicateKeyResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "key_id")
private String keyId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "domain_id")
private String domainId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "region")
private String region;
public ReplicateKeyResponse 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 ReplicateKeyResponse withDomainId(String domainId) {
this.domainId = domainId;
return this;
}
/**
* 用户域ID。
* @return domainId
*/
public String getDomainId() {
return domainId;
}
public void setDomainId(String domainId) {
this.domainId = domainId;
}
public ReplicateKeyResponse withRegion(String region) {
this.region = region;
return this;
}
/**
* 复制出的密钥所在区域编码。如cn-north-4。
* @return region
*/
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ReplicateKeyResponse that = (ReplicateKeyResponse) obj;
return Objects.equals(this.keyId, that.keyId) && Objects.equals(this.domainId, that.domainId)
&& Objects.equals(this.region, that.region);
}
@Override
public int hashCode() {
return Objects.hash(keyId, domainId, region);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ReplicateKeyResponse {\n");
sb.append(" keyId: ").append(toIndentedString(keyId)).append("\n");
sb.append(" domainId: ").append(toIndentedString(domainId)).append("\n");
sb.append(" region: ").append(toIndentedString(region)).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 ");
}
}