All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.huaweicloud.sdk.kms.v2.model.CreateParametersForImportResponse 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 CreateParametersForImportResponse extends SdkResponse {

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "key_id")

    private String keyId;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "import_token")

    private String importToken;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "expiration_time")

    private Long expirationTime;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "public_key")

    private String publicKey;

    public CreateParametersForImportResponse 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 CreateParametersForImportResponse withImportToken(String importToken) {
        this.importToken = importToken;
        return this;
    }

    /**
     * 密钥导入令牌。
     * @return importToken
     */
    public String getImportToken() {
        return importToken;
    }

    public void setImportToken(String importToken) {
        this.importToken = importToken;
    }

    public CreateParametersForImportResponse withExpirationTime(Long expirationTime) {
        this.expirationTime = expirationTime;
        return this;
    }

    /**
     * 导入参数到期时间,时间戳,即从1970年1月1日至该时间的总秒数。
     * minimum: 0
     * maximum: 10000000000
     * @return expirationTime
     */
    public Long getExpirationTime() {
        return expirationTime;
    }

    public void setExpirationTime(Long expirationTime) {
        this.expirationTime = expirationTime;
    }

    public CreateParametersForImportResponse withPublicKey(String publicKey) {
        this.publicKey = publicKey;
        return this;
    }

    /**
     * 加密密钥材料的公钥,base64格式。
     * @return publicKey
     */
    public String getPublicKey() {
        return publicKey;
    }

    public void setPublicKey(String publicKey) {
        this.publicKey = publicKey;
    }

    @Override
    public boolean equals(java.lang.Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        CreateParametersForImportResponse that = (CreateParametersForImportResponse) obj;
        return Objects.equals(this.keyId, that.keyId) && Objects.equals(this.importToken, that.importToken)
            && Objects.equals(this.expirationTime, that.expirationTime)
            && Objects.equals(this.publicKey, that.publicKey);
    }

    @Override
    public int hashCode() {
        return Objects.hash(keyId, importToken, expirationTime, publicKey);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class CreateParametersForImportResponse {\n");
        sb.append("    keyId: ").append(toIndentedString(keyId)).append("\n");
        sb.append("    importToken: ").append(toIndentedString(importToken)).append("\n");
        sb.append("    expirationTime: ").append(toIndentedString(expirationTime)).append("\n");
        sb.append("    publicKey: ").append(toIndentedString(publicKey)).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    ");
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy