com.huaweicloud.sdk.kms.v2.model.GenerateMacResponse 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 GenerateMacResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "key_id")
private String keyId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "mac_algorithm")
private String macAlgorithm;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "mac")
private String mac;
public GenerateMacResponse withKeyId(String keyId) {
this.keyId = keyId;
return this;
}
/**
* 密钥ID
* @return keyId
*/
public String getKeyId() {
return keyId;
}
public void setKeyId(String keyId) {
this.keyId = keyId;
}
public GenerateMacResponse withMacAlgorithm(String macAlgorithm) {
this.macAlgorithm = macAlgorithm;
return this;
}
/**
* Mac算法
* @return macAlgorithm
*/
public String getMacAlgorithm() {
return macAlgorithm;
}
public void setMacAlgorithm(String macAlgorithm) {
this.macAlgorithm = macAlgorithm;
}
public GenerateMacResponse withMac(String mac) {
this.mac = mac;
return this;
}
/**
* 生成的消息验证码
* @return mac
*/
public String getMac() {
return mac;
}
public void setMac(String mac) {
this.mac = mac;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
GenerateMacResponse that = (GenerateMacResponse) obj;
return Objects.equals(this.keyId, that.keyId) && Objects.equals(this.macAlgorithm, that.macAlgorithm)
&& Objects.equals(this.mac, that.mac);
}
@Override
public int hashCode() {
return Objects.hash(keyId, macAlgorithm, mac);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GenerateMacResponse {\n");
sb.append(" keyId: ").append(toIndentedString(keyId)).append("\n");
sb.append(" macAlgorithm: ").append(toIndentedString(macAlgorithm)).append("\n");
sb.append(" mac: ").append(toIndentedString(mac)).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 ");
}
}