com.tencentcloudapi.kms.v20190118.models.CreateKeyRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tencentcloud-sdk-java-kms Show documentation
Show all versions of tencentcloud-sdk-java-kms Show documentation
Tencent Cloud Open API SDK for Java
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.kms.v20190118.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class CreateKeyRequest extends AbstractModel{
/**
* 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字。以 kms- 作为前缀的用于云产品使用,Alias 不可重复。
*/
@SerializedName("Alias")
@Expose
private String Alias;
/**
* CMK 的描述,最大1024字节
*/
@SerializedName("Description")
@Expose
private String Description;
/**
* 指定key的用途,默认为 "ENCRYPT_DECRYPT" 表示创建对称加解密密钥,其它支持用途 “ASYMMETRIC_DECRYPT_RSA_2048” 表示创建用于加解密的RSA2048非对称密钥,“ASYMMETRIC_DECRYPT_SM2” 表示创建用于加解密的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_SM2” 表示创建用于签名验签的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECC” 表示创建用于签名验签的ECC非对称密钥,“ASYMMETRIC_SIGN_VERIFY_RSA_2048” 表示创建用于签名验签的RSA_2048非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECDSA384”表示创建用于签名验签的 ECDSA384 非对称秘钥。完整的秘钥用途与算法支持列表可通过 ListAlgorithms 接口获取。
*/
@SerializedName("KeyUsage")
@Expose
private String KeyUsage;
/**
* 指定key类型,默认为1,1表示默认类型,由KMS创建CMK密钥,2 表示EXTERNAL 类型,该类型需要用户导入密钥材料,参考 GetParametersForImport 和 ImportKeyMaterial 接口
*/
@SerializedName("Type")
@Expose
private Long Type;
/**
* 标签列表
*/
@SerializedName("Tags")
@Expose
private Tag [] Tags;
/**
* KMS 高级版对应的 HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)。
*/
@SerializedName("HsmClusterId")
@Expose
private String HsmClusterId;
/**
* Get 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字。以 kms- 作为前缀的用于云产品使用,Alias 不可重复。
* @return Alias 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字。以 kms- 作为前缀的用于云产品使用,Alias 不可重复。
*/
public String getAlias() {
return this.Alias;
}
/**
* Set 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字。以 kms- 作为前缀的用于云产品使用,Alias 不可重复。
* @param Alias 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字。以 kms- 作为前缀的用于云产品使用,Alias 不可重复。
*/
public void setAlias(String Alias) {
this.Alias = Alias;
}
/**
* Get CMK 的描述,最大1024字节
* @return Description CMK 的描述,最大1024字节
*/
public String getDescription() {
return this.Description;
}
/**
* Set CMK 的描述,最大1024字节
* @param Description CMK 的描述,最大1024字节
*/
public void setDescription(String Description) {
this.Description = Description;
}
/**
* Get 指定key的用途,默认为 "ENCRYPT_DECRYPT" 表示创建对称加解密密钥,其它支持用途 “ASYMMETRIC_DECRYPT_RSA_2048” 表示创建用于加解密的RSA2048非对称密钥,“ASYMMETRIC_DECRYPT_SM2” 表示创建用于加解密的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_SM2” 表示创建用于签名验签的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECC” 表示创建用于签名验签的ECC非对称密钥,“ASYMMETRIC_SIGN_VERIFY_RSA_2048” 表示创建用于签名验签的RSA_2048非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECDSA384”表示创建用于签名验签的 ECDSA384 非对称秘钥。完整的秘钥用途与算法支持列表可通过 ListAlgorithms 接口获取。
* @return KeyUsage 指定key的用途,默认为 "ENCRYPT_DECRYPT" 表示创建对称加解密密钥,其它支持用途 “ASYMMETRIC_DECRYPT_RSA_2048” 表示创建用于加解密的RSA2048非对称密钥,“ASYMMETRIC_DECRYPT_SM2” 表示创建用于加解密的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_SM2” 表示创建用于签名验签的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECC” 表示创建用于签名验签的ECC非对称密钥,“ASYMMETRIC_SIGN_VERIFY_RSA_2048” 表示创建用于签名验签的RSA_2048非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECDSA384”表示创建用于签名验签的 ECDSA384 非对称秘钥。完整的秘钥用途与算法支持列表可通过 ListAlgorithms 接口获取。
*/
public String getKeyUsage() {
return this.KeyUsage;
}
/**
* Set 指定key的用途,默认为 "ENCRYPT_DECRYPT" 表示创建对称加解密密钥,其它支持用途 “ASYMMETRIC_DECRYPT_RSA_2048” 表示创建用于加解密的RSA2048非对称密钥,“ASYMMETRIC_DECRYPT_SM2” 表示创建用于加解密的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_SM2” 表示创建用于签名验签的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECC” 表示创建用于签名验签的ECC非对称密钥,“ASYMMETRIC_SIGN_VERIFY_RSA_2048” 表示创建用于签名验签的RSA_2048非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECDSA384”表示创建用于签名验签的 ECDSA384 非对称秘钥。完整的秘钥用途与算法支持列表可通过 ListAlgorithms 接口获取。
* @param KeyUsage 指定key的用途,默认为 "ENCRYPT_DECRYPT" 表示创建对称加解密密钥,其它支持用途 “ASYMMETRIC_DECRYPT_RSA_2048” 表示创建用于加解密的RSA2048非对称密钥,“ASYMMETRIC_DECRYPT_SM2” 表示创建用于加解密的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_SM2” 表示创建用于签名验签的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECC” 表示创建用于签名验签的ECC非对称密钥,“ASYMMETRIC_SIGN_VERIFY_RSA_2048” 表示创建用于签名验签的RSA_2048非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECDSA384”表示创建用于签名验签的 ECDSA384 非对称秘钥。完整的秘钥用途与算法支持列表可通过 ListAlgorithms 接口获取。
*/
public void setKeyUsage(String KeyUsage) {
this.KeyUsage = KeyUsage;
}
/**
* Get 指定key类型,默认为1,1表示默认类型,由KMS创建CMK密钥,2 表示EXTERNAL 类型,该类型需要用户导入密钥材料,参考 GetParametersForImport 和 ImportKeyMaterial 接口
* @return Type 指定key类型,默认为1,1表示默认类型,由KMS创建CMK密钥,2 表示EXTERNAL 类型,该类型需要用户导入密钥材料,参考 GetParametersForImport 和 ImportKeyMaterial 接口
*/
public Long getType() {
return this.Type;
}
/**
* Set 指定key类型,默认为1,1表示默认类型,由KMS创建CMK密钥,2 表示EXTERNAL 类型,该类型需要用户导入密钥材料,参考 GetParametersForImport 和 ImportKeyMaterial 接口
* @param Type 指定key类型,默认为1,1表示默认类型,由KMS创建CMK密钥,2 表示EXTERNAL 类型,该类型需要用户导入密钥材料,参考 GetParametersForImport 和 ImportKeyMaterial 接口
*/
public void setType(Long Type) {
this.Type = Type;
}
/**
* Get 标签列表
* @return Tags 标签列表
*/
public Tag [] getTags() {
return this.Tags;
}
/**
* Set 标签列表
* @param Tags 标签列表
*/
public void setTags(Tag [] Tags) {
this.Tags = Tags;
}
/**
* Get KMS 高级版对应的 HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)。
* @return HsmClusterId KMS 高级版对应的 HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)。
*/
public String getHsmClusterId() {
return this.HsmClusterId;
}
/**
* Set KMS 高级版对应的 HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)。
* @param HsmClusterId KMS 高级版对应的 HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)。
*/
public void setHsmClusterId(String HsmClusterId) {
this.HsmClusterId = HsmClusterId;
}
public CreateKeyRequest() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public CreateKeyRequest(CreateKeyRequest source) {
if (source.Alias != null) {
this.Alias = new String(source.Alias);
}
if (source.Description != null) {
this.Description = new String(source.Description);
}
if (source.KeyUsage != null) {
this.KeyUsage = new String(source.KeyUsage);
}
if (source.Type != null) {
this.Type = new Long(source.Type);
}
if (source.Tags != null) {
this.Tags = new Tag[source.Tags.length];
for (int i = 0; i < source.Tags.length; i++) {
this.Tags[i] = new Tag(source.Tags[i]);
}
}
if (source.HsmClusterId != null) {
this.HsmClusterId = new String(source.HsmClusterId);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap map, String prefix) {
this.setParamSimple(map, prefix + "Alias", this.Alias);
this.setParamSimple(map, prefix + "Description", this.Description);
this.setParamSimple(map, prefix + "KeyUsage", this.KeyUsage);
this.setParamSimple(map, prefix + "Type", this.Type);
this.setParamArrayObj(map, prefix + "Tags.", this.Tags);
this.setParamSimple(map, prefix + "HsmClusterId", this.HsmClusterId);
}
}