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 cn.ucloud.ukms.client; + +import cn.ucloud.common.client.DefaultClient; +import cn.ucloud.common.config.Config; +import cn.ucloud.common.credential.Credential; +import cn.ucloud.common.exception.UCloudException; +import cn.ucloud.ukms.models.CancelKeyDeletionRequest; +import cn.ucloud.ukms.models.CancelKeyDeletionResponse; +import cn.ucloud.ukms.models.CancelScheduleKeyDeletionRequest; +import cn.ucloud.ukms.models.CancelScheduleKeyDeletionResponse; +import cn.ucloud.ukms.models.CreateAliasRequest; +import cn.ucloud.ukms.models.CreateAliasResponse; +import cn.ucloud.ukms.models.CreateKeyRequest; +import cn.ucloud.ukms.models.CreateKeyResponse; +import cn.ucloud.ukms.models.DecryptRequest; +import cn.ucloud.ukms.models.DecryptResponse; +import cn.ucloud.ukms.models.DeleteAliasRequest; +import cn.ucloud.ukms.models.DeleteAliasResponse; +import cn.ucloud.ukms.models.DescribeKeyRequest; +import cn.ucloud.ukms.models.DescribeKeyResponse; +import cn.ucloud.ukms.models.DisableKeyRequest; +import cn.ucloud.ukms.models.DisableKeyResponse; +import cn.ucloud.ukms.models.DisableKeyRotationRequest; +import cn.ucloud.ukms.models.DisableKeyRotationResponse; +import cn.ucloud.ukms.models.EnableKeyRequest; +import cn.ucloud.ukms.models.EnableKeyResponse; +import cn.ucloud.ukms.models.EnableKeyRotationRequest; +import cn.ucloud.ukms.models.EnableKeyRotationResponse; +import cn.ucloud.ukms.models.EncryptRequest; +import cn.ucloud.ukms.models.EncryptResponse; +import cn.ucloud.ukms.models.GenerateDataKeyPairRequest; +import cn.ucloud.ukms.models.GenerateDataKeyPairResponse; +import cn.ucloud.ukms.models.GenerateDataKeyPairWithoutPlaintextRequest; +import cn.ucloud.ukms.models.GenerateDataKeyPairWithoutPlaintextResponse; +import cn.ucloud.ukms.models.GenerateDataKeyRequest; +import cn.ucloud.ukms.models.GenerateDataKeyResponse; +import cn.ucloud.ukms.models.GenerateDataKeyWithoutPlaintextRequest; +import cn.ucloud.ukms.models.GenerateDataKeyWithoutPlaintextResponse; +import cn.ucloud.ukms.models.GenerateMacRequest; +import cn.ucloud.ukms.models.GenerateMacResponse; +import cn.ucloud.ukms.models.GenerateRandomRequest; +import cn.ucloud.ukms.models.GenerateRandomResponse; +import cn.ucloud.ukms.models.GetKeyRotationStatusRequest; +import cn.ucloud.ukms.models.GetKeyRotationStatusResponse; +import cn.ucloud.ukms.models.GetPublicKeyRequest; +import cn.ucloud.ukms.models.GetPublicKeyResponse; +import cn.ucloud.ukms.models.ListAliasesRequest; +import cn.ucloud.ukms.models.ListAliasesResponse; +import cn.ucloud.ukms.models.ListKeysRequest; +import cn.ucloud.ukms.models.ListKeysResponse; +import cn.ucloud.ukms.models.ListScheduleDeletionKeysRequest; +import cn.ucloud.ukms.models.ListScheduleDeletionKeysResponse; +import cn.ucloud.ukms.models.RotateKeyOnDemandRequest; +import cn.ucloud.ukms.models.RotateKeyOnDemandResponse; +import cn.ucloud.ukms.models.ScheduleKeyDeletionRequest; +import cn.ucloud.ukms.models.ScheduleKeyDeletionResponse; +import cn.ucloud.ukms.models.SignRequest; +import cn.ucloud.ukms.models.SignResponse; +import cn.ucloud.ukms.models.UpdateAliasRequest; +import cn.ucloud.ukms.models.UpdateAliasResponse; +import cn.ucloud.ukms.models.UpdateKeyDescriptionRequest; +import cn.ucloud.ukms.models.UpdateKeyDescriptionResponse; +import cn.ucloud.ukms.models.VerifyMacRequest; +import cn.ucloud.ukms.models.VerifyMacResponse; +import cn.ucloud.ukms.models.VerifyRequest; +import cn.ucloud.ukms.models.VerifyResponse; + +/** This client is used to call actions of **UKMS** service */ +public class UKMSClient extends DefaultClient implements UKMSClientInterface { + public UKMSClient(Config config, Credential credential) { + super(config, credential); + } + + /** + * CancelKeyDeletion - 取消密钥计划删除 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CancelKeyDeletionResponse cancelKeyDeletion(CancelKeyDeletionRequest request) + throws UCloudException { + request.setAction("CancelKeyDeletion"); + return (CancelKeyDeletionResponse) this.invoke(request, CancelKeyDeletionResponse.class); + } + + /** + * CancelScheduleKeyDeletion - 取消计划删除密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CancelScheduleKeyDeletionResponse cancelScheduleKeyDeletion( + CancelScheduleKeyDeletionRequest request) throws UCloudException { + request.setAction("CancelScheduleKeyDeletion"); + return (CancelScheduleKeyDeletionResponse) + this.invoke(request, CancelScheduleKeyDeletionResponse.class); + } + + /** + * CreateAlias - 创建别名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateAliasResponse createAlias(CreateAliasRequest request) throws UCloudException { + request.setAction("CreateAlias"); + return (CreateAliasResponse) this.invoke(request, CreateAliasResponse.class); + } + + /** + * CreateKey - 创建密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateKeyResponse createKey(CreateKeyRequest request) throws UCloudException { + request.setAction("CreateKey"); + return (CreateKeyResponse) this.invoke(request, CreateKeyResponse.class); + } + + /** + * Decrypt - 解密 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DecryptResponse decrypt(DecryptRequest request) throws UCloudException { + request.setAction("Decrypt"); + return (DecryptResponse) this.invoke(request, DecryptResponse.class); + } + + /** + * DeleteAlias - 删除别名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DeleteAliasResponse deleteAlias(DeleteAliasRequest request) throws UCloudException { + request.setAction("DeleteAlias"); + return (DeleteAliasResponse) this.invoke(request, DeleteAliasResponse.class); + } + + /** + * DescribeKey - 查看主密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeKeyResponse describeKey(DescribeKeyRequest request) throws UCloudException { + request.setAction("DescribeKey"); + return (DescribeKeyResponse) this.invoke(request, DescribeKeyResponse.class); + } + + /** + * DisableKey - 禁用密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DisableKeyResponse disableKey(DisableKeyRequest request) throws UCloudException { + request.setAction("DisableKey"); + return (DisableKeyResponse) this.invoke(request, DisableKeyResponse.class); + } + + /** + * DisableKeyRotation - 关闭密钥轮转 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DisableKeyRotationResponse disableKeyRotation(DisableKeyRotationRequest request) + throws UCloudException { + request.setAction("DisableKeyRotation"); + return (DisableKeyRotationResponse) this.invoke(request, DisableKeyRotationResponse.class); + } + + /** + * EnableKey - 启用密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public EnableKeyResponse enableKey(EnableKeyRequest request) throws UCloudException { + request.setAction("EnableKey"); + return (EnableKeyResponse) this.invoke(request, EnableKeyResponse.class); + } + + /** + * EnableKeyRotation - 开启密钥轮转 + * + * @param request Request object + * @throws UCloudException Exception + */ + public EnableKeyRotationResponse enableKeyRotation(EnableKeyRotationRequest request) + throws UCloudException { + request.setAction("EnableKeyRotation"); + return (EnableKeyRotationResponse) this.invoke(request, EnableKeyRotationResponse.class); + } + + /** + * Encrypt - 加密 + * + * @param request Request object + * @throws UCloudException Exception + */ + public EncryptResponse encrypt(EncryptRequest request) throws UCloudException { + request.setAction("Encrypt"); + return (EncryptResponse) this.invoke(request, EncryptResponse.class); + } + + /** + * GenerateDataKey - 创建数据密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyResponse generateDataKey(GenerateDataKeyRequest request) + throws UCloudException { + request.setAction("GenerateDataKey"); + return (GenerateDataKeyResponse) this.invoke(request, GenerateDataKeyResponse.class); + } + + /** + * GenerateDataKeyPair - 创建数据密钥对 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyPairResponse generateDataKeyPair(GenerateDataKeyPairRequest request) + throws UCloudException { + request.setAction("GenerateDataKeyPair"); + return (GenerateDataKeyPairResponse) + this.invoke(request, GenerateDataKeyPairResponse.class); + } + + /** + * GenerateDataKeyPairWithoutPlaintext - 创建数据密钥对(无明文返回) + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyPairWithoutPlaintextResponse generateDataKeyPairWithoutPlaintext( + GenerateDataKeyPairWithoutPlaintextRequest request) throws UCloudException { + request.setAction("GenerateDataKeyPairWithoutPlaintext"); + return (GenerateDataKeyPairWithoutPlaintextResponse) + this.invoke(request, GenerateDataKeyPairWithoutPlaintextResponse.class); + } + + /** + * GenerateDataKeyWithoutPlaintext - 创建数据密钥(无明文) + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyWithoutPlaintextResponse generateDataKeyWithoutPlaintext( + GenerateDataKeyWithoutPlaintextRequest request) throws UCloudException { + request.setAction("GenerateDataKeyWithoutPlaintext"); + return (GenerateDataKeyWithoutPlaintextResponse) + this.invoke(request, GenerateDataKeyWithoutPlaintextResponse.class); + } + + /** + * GenerateMac - 生成MAC + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateMacResponse generateMac(GenerateMacRequest request) throws UCloudException { + request.setAction("GenerateMac"); + return (GenerateMacResponse) this.invoke(request, GenerateMacResponse.class); + } + + /** + * GenerateRandom - 生成随机数 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateRandomResponse generateRandom(GenerateRandomRequest request) + throws UCloudException { + request.setAction("GenerateRandom"); + return (GenerateRandomResponse) this.invoke(request, GenerateRandomResponse.class); + } + + /** + * GetKeyRotationStatus - 获取密钥轮转状态 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetKeyRotationStatusResponse getKeyRotationStatus(GetKeyRotationStatusRequest request) + throws UCloudException { + request.setAction("GetKeyRotationStatus"); + return (GetKeyRotationStatusResponse) + this.invoke(request, GetKeyRotationStatusResponse.class); + } + + /** + * GetPublicKey - 获取公钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetPublicKeyResponse getPublicKey(GetPublicKeyRequest request) throws UCloudException { + request.setAction("GetPublicKey"); + return (GetPublicKeyResponse) this.invoke(request, GetPublicKeyResponse.class); + } + + /** + * ListAliases - 获取别名列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ListAliasesResponse listAliases(ListAliasesRequest request) throws UCloudException { + request.setAction("ListAliases"); + return (ListAliasesResponse) this.invoke(request, ListAliasesResponse.class); + } + + /** + * ListKeys - 获取主密钥列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ListKeysResponse listKeys(ListKeysRequest request) throws UCloudException { + request.setAction("ListKeys"); + return (ListKeysResponse) this.invoke(request, ListKeysResponse.class); + } + + /** + * ListScheduleDeletionKeys - 获取计划删除密钥列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ListScheduleDeletionKeysResponse listScheduleDeletionKeys( + ListScheduleDeletionKeysRequest request) throws UCloudException { + request.setAction("ListScheduleDeletionKeys"); + return (ListScheduleDeletionKeysResponse) + this.invoke(request, ListScheduleDeletionKeysResponse.class); + } + + /** + * RotateKeyOnDemand - 按需轮转密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public RotateKeyOnDemandResponse rotateKeyOnDemand(RotateKeyOnDemandRequest request) + throws UCloudException { + request.setAction("RotateKeyOnDemand"); + return (RotateKeyOnDemandResponse) this.invoke(request, RotateKeyOnDemandResponse.class); + } + + /** + * ScheduleKeyDeletion - 计划删除密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ScheduleKeyDeletionResponse scheduleKeyDeletion(ScheduleKeyDeletionRequest request) + throws UCloudException { + request.setAction("ScheduleKeyDeletion"); + return (ScheduleKeyDeletionResponse) + this.invoke(request, ScheduleKeyDeletionResponse.class); + } + + /** + * Sign - 签名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public SignResponse sign(SignRequest request) throws UCloudException { + request.setAction("Sign"); + return (SignResponse) this.invoke(request, SignResponse.class); + } + + /** + * UpdateAlias - 更新别名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public UpdateAliasResponse updateAlias(UpdateAliasRequest request) throws UCloudException { + request.setAction("UpdateAlias"); + return (UpdateAliasResponse) this.invoke(request, UpdateAliasResponse.class); + } + + /** + * UpdateKeyDescription - 更新主密钥描述信息 + * + * @param request Request object + * @throws UCloudException Exception + */ + public UpdateKeyDescriptionResponse updateKeyDescription(UpdateKeyDescriptionRequest request) + throws UCloudException { + request.setAction("UpdateKeyDescription"); + return (UpdateKeyDescriptionResponse) + this.invoke(request, UpdateKeyDescriptionResponse.class); + } + + /** + * Verify - 验签 + * + * @param request Request object + * @throws UCloudException Exception + */ + public VerifyResponse verify(VerifyRequest request) throws UCloudException { + request.setAction("Verify"); + return (VerifyResponse) this.invoke(request, VerifyResponse.class); + } + + /** + * VerifyMac - 验证Mac签名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public VerifyMacResponse verifyMac(VerifyMacRequest request) throws UCloudException { + request.setAction("VerifyMac"); + return (VerifyMacResponse) this.invoke(request, VerifyMacResponse.class); + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/client/UKMSClientInterface.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/client/UKMSClientInterface.java new file mode 100644 index 00000000..84ac9983 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/client/UKMSClientInterface.java @@ -0,0 +1,335 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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 cn.ucloud.ukms.client; + +import cn.ucloud.common.client.Client; +import cn.ucloud.common.exception.UCloudException; +import cn.ucloud.ukms.models.CancelKeyDeletionRequest; +import cn.ucloud.ukms.models.CancelKeyDeletionResponse; +import cn.ucloud.ukms.models.CancelScheduleKeyDeletionRequest; +import cn.ucloud.ukms.models.CancelScheduleKeyDeletionResponse; +import cn.ucloud.ukms.models.CreateAliasRequest; +import cn.ucloud.ukms.models.CreateAliasResponse; +import cn.ucloud.ukms.models.CreateKeyRequest; +import cn.ucloud.ukms.models.CreateKeyResponse; +import cn.ucloud.ukms.models.DecryptRequest; +import cn.ucloud.ukms.models.DecryptResponse; +import cn.ucloud.ukms.models.DeleteAliasRequest; +import cn.ucloud.ukms.models.DeleteAliasResponse; +import cn.ucloud.ukms.models.DescribeKeyRequest; +import cn.ucloud.ukms.models.DescribeKeyResponse; +import cn.ucloud.ukms.models.DisableKeyRequest; +import cn.ucloud.ukms.models.DisableKeyResponse; +import cn.ucloud.ukms.models.DisableKeyRotationRequest; +import cn.ucloud.ukms.models.DisableKeyRotationResponse; +import cn.ucloud.ukms.models.EnableKeyRequest; +import cn.ucloud.ukms.models.EnableKeyResponse; +import cn.ucloud.ukms.models.EnableKeyRotationRequest; +import cn.ucloud.ukms.models.EnableKeyRotationResponse; +import cn.ucloud.ukms.models.EncryptRequest; +import cn.ucloud.ukms.models.EncryptResponse; +import cn.ucloud.ukms.models.GenerateDataKeyPairRequest; +import cn.ucloud.ukms.models.GenerateDataKeyPairResponse; +import cn.ucloud.ukms.models.GenerateDataKeyPairWithoutPlaintextRequest; +import cn.ucloud.ukms.models.GenerateDataKeyPairWithoutPlaintextResponse; +import cn.ucloud.ukms.models.GenerateDataKeyRequest; +import cn.ucloud.ukms.models.GenerateDataKeyResponse; +import cn.ucloud.ukms.models.GenerateDataKeyWithoutPlaintextRequest; +import cn.ucloud.ukms.models.GenerateDataKeyWithoutPlaintextResponse; +import cn.ucloud.ukms.models.GenerateMacRequest; +import cn.ucloud.ukms.models.GenerateMacResponse; +import cn.ucloud.ukms.models.GenerateRandomRequest; +import cn.ucloud.ukms.models.GenerateRandomResponse; +import cn.ucloud.ukms.models.GetKeyRotationStatusRequest; +import cn.ucloud.ukms.models.GetKeyRotationStatusResponse; +import cn.ucloud.ukms.models.GetPublicKeyRequest; +import cn.ucloud.ukms.models.GetPublicKeyResponse; +import cn.ucloud.ukms.models.ListAliasesRequest; +import cn.ucloud.ukms.models.ListAliasesResponse; +import cn.ucloud.ukms.models.ListKeysRequest; +import cn.ucloud.ukms.models.ListKeysResponse; +import cn.ucloud.ukms.models.ListScheduleDeletionKeysRequest; +import cn.ucloud.ukms.models.ListScheduleDeletionKeysResponse; +import cn.ucloud.ukms.models.RotateKeyOnDemandRequest; +import cn.ucloud.ukms.models.RotateKeyOnDemandResponse; +import cn.ucloud.ukms.models.ScheduleKeyDeletionRequest; +import cn.ucloud.ukms.models.ScheduleKeyDeletionResponse; +import cn.ucloud.ukms.models.SignRequest; +import cn.ucloud.ukms.models.SignResponse; +import cn.ucloud.ukms.models.UpdateAliasRequest; +import cn.ucloud.ukms.models.UpdateAliasResponse; +import cn.ucloud.ukms.models.UpdateKeyDescriptionRequest; +import cn.ucloud.ukms.models.UpdateKeyDescriptionResponse; +import cn.ucloud.ukms.models.VerifyMacRequest; +import cn.ucloud.ukms.models.VerifyMacResponse; +import cn.ucloud.ukms.models.VerifyRequest; +import cn.ucloud.ukms.models.VerifyResponse; + +/** This client is used to call actions of **UKMS** service */ +public interface UKMSClientInterface extends Client { + + /** + * CancelKeyDeletion - 取消密钥计划删除 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CancelKeyDeletionResponse cancelKeyDeletion(CancelKeyDeletionRequest request) + throws UCloudException; + + /** + * CancelScheduleKeyDeletion - 取消计划删除密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CancelScheduleKeyDeletionResponse cancelScheduleKeyDeletion( + CancelScheduleKeyDeletionRequest request) throws UCloudException; + + /** + * CreateAlias - 创建别名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateAliasResponse createAlias(CreateAliasRequest request) throws UCloudException; + + /** + * CreateKey - 创建密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public CreateKeyResponse createKey(CreateKeyRequest request) throws UCloudException; + + /** + * Decrypt - 解密 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DecryptResponse decrypt(DecryptRequest request) throws UCloudException; + + /** + * DeleteAlias - 删除别名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DeleteAliasResponse deleteAlias(DeleteAliasRequest request) throws UCloudException; + + /** + * DescribeKey - 查看主密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DescribeKeyResponse describeKey(DescribeKeyRequest request) throws UCloudException; + + /** + * DisableKey - 禁用密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DisableKeyResponse disableKey(DisableKeyRequest request) throws UCloudException; + + /** + * DisableKeyRotation - 关闭密钥轮转 + * + * @param request Request object + * @throws UCloudException Exception + */ + public DisableKeyRotationResponse disableKeyRotation(DisableKeyRotationRequest request) + throws UCloudException; + + /** + * EnableKey - 启用密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public EnableKeyResponse enableKey(EnableKeyRequest request) throws UCloudException; + + /** + * EnableKeyRotation - 开启密钥轮转 + * + * @param request Request object + * @throws UCloudException Exception + */ + public EnableKeyRotationResponse enableKeyRotation(EnableKeyRotationRequest request) + throws UCloudException; + + /** + * Encrypt - 加密 + * + * @param request Request object + * @throws UCloudException Exception + */ + public EncryptResponse encrypt(EncryptRequest request) throws UCloudException; + + /** + * GenerateDataKey - 创建数据密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyResponse generateDataKey(GenerateDataKeyRequest request) + throws UCloudException; + + /** + * GenerateDataKeyPair - 创建数据密钥对 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyPairResponse generateDataKeyPair(GenerateDataKeyPairRequest request) + throws UCloudException; + + /** + * GenerateDataKeyPairWithoutPlaintext - 创建数据密钥对(无明文返回) + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyPairWithoutPlaintextResponse generateDataKeyPairWithoutPlaintext( + GenerateDataKeyPairWithoutPlaintextRequest request) throws UCloudException; + + /** + * GenerateDataKeyWithoutPlaintext - 创建数据密钥(无明文) + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateDataKeyWithoutPlaintextResponse generateDataKeyWithoutPlaintext( + GenerateDataKeyWithoutPlaintextRequest request) throws UCloudException; + + /** + * GenerateMac - 生成MAC + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateMacResponse generateMac(GenerateMacRequest request) throws UCloudException; + + /** + * GenerateRandom - 生成随机数 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GenerateRandomResponse generateRandom(GenerateRandomRequest request) + throws UCloudException; + + /** + * GetKeyRotationStatus - 获取密钥轮转状态 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetKeyRotationStatusResponse getKeyRotationStatus(GetKeyRotationStatusRequest request) + throws UCloudException; + + /** + * GetPublicKey - 获取公钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public GetPublicKeyResponse getPublicKey(GetPublicKeyRequest request) throws UCloudException; + + /** + * ListAliases - 获取别名列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ListAliasesResponse listAliases(ListAliasesRequest request) throws UCloudException; + + /** + * ListKeys - 获取主密钥列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ListKeysResponse listKeys(ListKeysRequest request) throws UCloudException; + + /** + * ListScheduleDeletionKeys - 获取计划删除密钥列表 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ListScheduleDeletionKeysResponse listScheduleDeletionKeys( + ListScheduleDeletionKeysRequest request) throws UCloudException; + + /** + * RotateKeyOnDemand - 按需轮转密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public RotateKeyOnDemandResponse rotateKeyOnDemand(RotateKeyOnDemandRequest request) + throws UCloudException; + + /** + * ScheduleKeyDeletion - 计划删除密钥 + * + * @param request Request object + * @throws UCloudException Exception + */ + public ScheduleKeyDeletionResponse scheduleKeyDeletion(ScheduleKeyDeletionRequest request) + throws UCloudException; + + /** + * Sign - 签名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public SignResponse sign(SignRequest request) throws UCloudException; + + /** + * UpdateAlias - 更新别名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public UpdateAliasResponse updateAlias(UpdateAliasRequest request) throws UCloudException; + + /** + * UpdateKeyDescription - 更新主密钥描述信息 + * + * @param request Request object + * @throws UCloudException Exception + */ + public UpdateKeyDescriptionResponse updateKeyDescription(UpdateKeyDescriptionRequest request) + throws UCloudException; + + /** + * Verify - 验签 + * + * @param request Request object + * @throws UCloudException Exception + */ + public VerifyResponse verify(VerifyRequest request) throws UCloudException; + + /** + * VerifyMac - 验证Mac签名 + * + * @param request Request object + * @throws UCloudException Exception + */ + public VerifyMacResponse verifyMac(VerifyMacRequest request) throws UCloudException; +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelKeyDeletionRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelKeyDeletionRequest.java new file mode 100644 index 00000000..193f1741 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelKeyDeletionRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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 cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class CancelKeyDeletionRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥 ID。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelKeyDeletionResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelKeyDeletionResponse.java new file mode 100644 index 00000000..e3a5a2e7 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelKeyDeletionResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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 cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class CancelKeyDeletionResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelScheduleKeyDeletionRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelScheduleKeyDeletionRequest.java new file mode 100644 index 00000000..fd3dba48 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelScheduleKeyDeletionRequest.java @@ -0,0 +1,62 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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 cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class CancelScheduleKeyDeletionRequest extends Request { + + /** + * 项目ID。不填写为默认项目,子帐号必须填写。 + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + */ + @UCloudParam("ProjectId") + private String projectId; + + /** 需要查看的主密钥对应的 KeyId */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** 资源id */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelScheduleKeyDeletionResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelScheduleKeyDeletionResponse.java new file mode 100644 index 00000000..30010e35 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CancelScheduleKeyDeletionResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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 cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class CancelScheduleKeyDeletionResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateAliasRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateAliasRequest.java new file mode 100644 index 00000000..00a3a6df --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateAliasRequest.java @@ -0,0 +1,85 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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 cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class CreateAliasRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥别名,格式为 alias/name。 */ + @NotEmpty + @UCloudParam("AliasName") + private String aliasName; + + /** 密钥 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getAliasName() { + return aliasName; + } + + public void setAliasName(String aliasName) { + this.aliasName = aliasName; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateAliasResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateAliasResponse.java new file mode 100644 index 00000000..44fc692e --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateAliasResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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 cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class CreateAliasResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateKeyRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateKeyRequest.java new file mode 100644 index 00000000..512df3f8 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateKeyRequest.java @@ -0,0 +1,135 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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 cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class CreateKeyRequest extends Request { + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** UKMS 实例资源 ID。 */ + @NotEmpty + @UCloudParam("ResourceId") + private String resourceId; + + /** 密钥描述,最多 8192 字符。 */ + @UCloudParam("Description") + private String description; + + /** 可选密钥别名,格式为 alias/name。 */ + @UCloudParam("Alias") + private String alias; + + /** + * 密钥规格,默认 + * SYMMETRIC_DEFAULT(AES_256)。可选值:SYMMETRIC_DEFAULT(AES_256)、RSA_2048、RSA_3072、RSA_4096、ECC_NIST_P256、ECC_NIST_P384、ECC_NIST_P521、HMAC_256、HMAC_384、HMAC_512。 + */ + @UCloudParam("KeySpec") + private String keySpec; + + /** 密钥用途 */ + @UCloudParam("KeyUsage") + private String keyUsage; + + /** 密钥材料来源,默认 UCLOUD_KMS。当前仅支持 UCLOUD_KMS;EXTERNAL 为 BYOK 规划值,当前传入会返回 100660。 */ + @UCloudParam("Origin") + private String origin; + + /** 是否开启删除保护。可选值:true、false;默认 false。 */ + @UCloudParam("DeletionProtection") + private String deletionProtection; + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getAlias() { + return alias; + } + + public void setAlias(String alias) { + this.alias = alias; + } + + public String getKeySpec() { + return keySpec; + } + + public void setKeySpec(String keySpec) { + this.keySpec = keySpec; + } + + public String getKeyUsage() { + return keyUsage; + } + + public void setKeyUsage(String keyUsage) { + this.keyUsage = keyUsage; + } + + public String getOrigin() { + return origin; + } + + public void setOrigin(String origin) { + this.origin = origin; + } + + public String getDeletionProtection() { + return deletionProtection; + } + + public void setDeletionProtection(String deletionProtection) { + this.deletionProtection = deletionProtection; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateKeyResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateKeyResponse.java new file mode 100644 index 00000000..1a5e36e4 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/CreateKeyResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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 cn.ucloud.ukms.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class CreateKeyResponse extends Response { + + /** 密钥 ID。 */ + @SerializedName("KeyId") + private String keyId; + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DecryptRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DecryptRequest.java new file mode 100644 index 00000000..3484b021 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DecryptRequest.java @@ -0,0 +1,111 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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 cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class DecryptRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 待解密密文。 */ + @NotEmpty + @UCloudParam("CiphertextBlob") + private String ciphertextBlob; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + /** 主密钥 KeyId;对称密钥可空,从 CiphertextBlob 自动识别;非对称必填。 */ + @UCloudParam("KeyId") + private String keyId; + + /** 加密上下文,JSON Object。 */ + @UCloudParam("EncryptionContext") + private Object encryptionContext; + + /** + * 解密算法。可选值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256;非对称密钥解密时必填或使用默认 + * RSAES_OAEP_SHA_256。 + */ + @UCloudParam("EncryptionAlgorithm") + private String encryptionAlgorithm; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getCiphertextBlob() { + return ciphertextBlob; + } + + public void setCiphertextBlob(String ciphertextBlob) { + this.ciphertextBlob = ciphertextBlob; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public Object getEncryptionContext() { + return encryptionContext; + } + + public void setEncryptionContext(Object encryptionContext) { + this.encryptionContext = encryptionContext; + } + + public String getEncryptionAlgorithm() { + return encryptionAlgorithm; + } + + public void setEncryptionAlgorithm(String encryptionAlgorithm) { + this.encryptionAlgorithm = encryptionAlgorithm; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DecryptResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DecryptResponse.java new file mode 100644 index 00000000..71cd42c4 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DecryptResponse.java @@ -0,0 +1,58 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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 cn.ucloud.ukms.models; + + +import cn.ucloud.common.response.Response; + +import com.google.gson.annotations.SerializedName; + +public class DecryptResponse extends Response { + + /** 解密后的明文,Base64 编码。 */ + @SerializedName("Plaintext") + private String plaintext; + + /** 密钥资源长 ID。 */ + @SerializedName("KeyId") + private String keyId; + + /** 实际使用的解密算法。取值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256。 */ + @SerializedName("EncryptionAlgorithm") + private String encryptionAlgorithm; + + public String getPlaintext() { + return plaintext; + } + + public void setPlaintext(String plaintext) { + this.plaintext = plaintext; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getEncryptionAlgorithm() { + return encryptionAlgorithm; + } + + public void setEncryptionAlgorithm(String encryptionAlgorithm) { + this.encryptionAlgorithm = encryptionAlgorithm; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DeleteAliasRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DeleteAliasRequest.java new file mode 100644 index 00000000..3448a790 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DeleteAliasRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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 cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class DeleteAliasRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥别名,格式为 alias/name。 */ + @NotEmpty + @UCloudParam("AliasName") + private String aliasName; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getAliasName() { + return aliasName; + } + + public void setAliasName(String aliasName) { + this.aliasName = aliasName; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DeleteAliasResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DeleteAliasResponse.java new file mode 100644 index 00000000..719f8856 --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DeleteAliasResponse.java @@ -0,0 +1,20 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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 cn.ucloud.ukms.models; + + + +import cn.ucloud.common.response.Response; + +public class DeleteAliasResponse extends Response {} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DescribeKeyRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DescribeKeyRequest.java new file mode 100644 index 00000000..0fe7862d --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DescribeKeyRequest.java @@ -0,0 +1,72 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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 cn.ucloud.ukms.models; + + +import cn.ucloud.common.annotation.NotEmpty; +import cn.ucloud.common.annotation.UCloudParam; +import cn.ucloud.common.request.Request; + +public class DescribeKeyRequest extends Request { + + /** 地域。参见地域和可用区列表。 */ + @NotEmpty + @UCloudParam("Region") + private String region; + + /** 项目ID。不填写为默认项目,子账号必须填写。 */ + @UCloudParam("ProjectId") + private String projectId; + + /** 密钥资源长 ID、ARN 或别名。 */ + @NotEmpty + @UCloudParam("KeyId") + private String keyId; + + /** UKMS 实例资源 ID。 */ + @UCloudParam("ResourceId") + private String resourceId; + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } +} diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DescribeKeyResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DescribeKeyResponse.java new file mode 100644 index 00000000..c814170c --- /dev/null +++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DescribeKeyResponse.java @@ -0,0 +1,184 @@ +/** + * Copyright 2021 UCloud Technology Co., Ltd. + * + *
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 cn.ucloud.ukms.models;
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class DescribeKeyResponse extends Response {
+
+ /** 密钥元数据。 */
+ @SerializedName("KeyMetadata")
+ private KeyMetadata keyMetadata;
+
+ public KeyMetadata getKeyMetadata() {
+ return keyMetadata;
+ }
+
+ public void setKeyMetadata(KeyMetadata keyMetadata) {
+ this.keyMetadata = keyMetadata;
+ }
+
+ public static class KeyMetadata extends Response {
+
+ /** 密钥资源长 ID。 */
+ @SerializedName("KeyId")
+ private String keyId;
+
+ /** 创建时间,Unix 时间戳。 */
+ @SerializedName("CreationDate")
+ private Integer creationDate;
+
+ /** 是否启用。取值:true、false。 */
+ @SerializedName("Enabled")
+ private String enabled;
+
+ /** 密钥用途。取值:ENCRYPT_DECRYPT、SIGN_VERIFY、GENERATE_VERIFY_MAC、KEY_AGREEMENT。 */
+ @SerializedName("KeyUsage")
+ private List 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class DisableKeyRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥 DB 数字 ID。 */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private Integer keyId;
+
+ /** UKMS 实例资源 ID。 */
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public Integer getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(Integer keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyResponse.java
new file mode 100644
index 00000000..b7b0693d
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyResponse.java
@@ -0,0 +1,20 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+
+import cn.ucloud.common.response.Response;
+
+public class DisableKeyResponse extends Response {}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRotationRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRotationRequest.java
new file mode 100644
index 00000000..614bd9f3
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRotationRequest.java
@@ -0,0 +1,72 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class DisableKeyRotationRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥 ID、ARN 或别名。 */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** UKMS 实例资源 ID。 */
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRotationResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRotationResponse.java
new file mode 100644
index 00000000..2f94e17b
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/DisableKeyRotationResponse.java
@@ -0,0 +1,20 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+
+import cn.ucloud.common.response.Response;
+
+public class DisableKeyRotationResponse extends Response {}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRequest.java
new file mode 100644
index 00000000..dbc28025
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRequest.java
@@ -0,0 +1,72 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class EnableKeyRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥 DB 数字 ID。 */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private Integer keyId;
+
+ /** UKMS 实例资源 ID。 */
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public Integer getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(Integer keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyResponse.java
new file mode 100644
index 00000000..290baf9d
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyResponse.java
@@ -0,0 +1,20 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+
+import cn.ucloud.common.response.Response;
+
+public class EnableKeyResponse extends Response {}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRotationRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRotationRequest.java
new file mode 100644
index 00000000..a3482ece
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRotationRequest.java
@@ -0,0 +1,85 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class EnableKeyRotationRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** UKMS 实例资源 ID。 */
+ @NotEmpty
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ /** 密钥 ID、ARN 或别名。 */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** 轮转周期,单位天。取值范围 1~2560,默认 365。仅 SYMMETRIC_DEFAULT 且 Origin=UCLOUD_KMS 的密钥支持轮转。 */
+ @UCloudParam("RotationPeriodInDays")
+ private Integer rotationPeriodInDays;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public Integer getRotationPeriodInDays() {
+ return rotationPeriodInDays;
+ }
+
+ public void setRotationPeriodInDays(Integer rotationPeriodInDays) {
+ this.rotationPeriodInDays = rotationPeriodInDays;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRotationResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRotationResponse.java
new file mode 100644
index 00000000..047cc92d
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EnableKeyRotationResponse.java
@@ -0,0 +1,20 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+
+import cn.ucloud.common.response.Response;
+
+public class EnableKeyRotationResponse extends Response {}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EncryptRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EncryptRequest.java
new file mode 100644
index 00000000..9212ff90
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EncryptRequest.java
@@ -0,0 +1,112 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class EncryptRequest extends Request {
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 密钥资源长 ID、ARN 或别名。 */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** 待加密明文,Base64 编码。 */
+ @NotEmpty
+ @UCloudParam("Plaintext")
+ private String plaintext;
+
+ /** 加密上下文,JSON Object。 */
+ @UCloudParam("EncryptionContext")
+ private Object encryptionContext;
+
+ /** UKMS 实例资源 ID。 */
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ /**
+ * 加密算法。可选值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256;对称密钥默认 SYMMETRIC_DEFAULT,RSA
+ * 默认 RSAES_OAEP_SHA_256。
+ */
+ @UCloudParam("EncryptionAlgorithm")
+ private String encryptionAlgorithm;
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getPlaintext() {
+ return plaintext;
+ }
+
+ public void setPlaintext(String plaintext) {
+ this.plaintext = plaintext;
+ }
+
+ public Object getEncryptionContext() {
+ return encryptionContext;
+ }
+
+ public void setEncryptionContext(Object encryptionContext) {
+ this.encryptionContext = encryptionContext;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public String getEncryptionAlgorithm() {
+ return encryptionAlgorithm;
+ }
+
+ public void setEncryptionAlgorithm(String encryptionAlgorithm) {
+ this.encryptionAlgorithm = encryptionAlgorithm;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EncryptResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EncryptResponse.java
new file mode 100644
index 00000000..9ee55d70
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/EncryptResponse.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+public class EncryptResponse extends Response {
+
+ /** 加密后的密文。 */
+ @SerializedName("CiphertextBlob")
+ private String ciphertextBlob;
+
+ /** 密钥资源长 ID。 */
+ @SerializedName("KeyId")
+ private String keyId;
+
+ /** 实际使用的加密算法。取值:SYMMETRIC_DEFAULT、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256。 */
+ @SerializedName("EncryptionAlgorithm")
+ private String encryptionAlgorithm;
+
+ public String getCiphertextBlob() {
+ return ciphertextBlob;
+ }
+
+ public void setCiphertextBlob(String ciphertextBlob) {
+ this.ciphertextBlob = ciphertextBlob;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getEncryptionAlgorithm() {
+ return encryptionAlgorithm;
+ }
+
+ public void setEncryptionAlgorithm(String encryptionAlgorithm) {
+ this.encryptionAlgorithm = encryptionAlgorithm;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairRequest.java
new file mode 100644
index 00000000..2c689d2a
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairRequest.java
@@ -0,0 +1,88 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class GenerateDataKeyPairRequest extends Request {
+
+ /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /**
+ * 项目ID。不填写为默认项目,子帐号必须填写。
+ * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
+ */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥ID */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** 密钥类型 */
+ @NotEmpty
+ @UCloudParam("KeyPairSpec")
+ private String keyPairSpec;
+
+ /** 加密上下文 */
+ @UCloudParam("EncryptionContext")
+ private String encryptionContext;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getKeyPairSpec() {
+ return keyPairSpec;
+ }
+
+ public void setKeyPairSpec(String keyPairSpec) {
+ this.keyPairSpec = keyPairSpec;
+ }
+
+ public String getEncryptionContext() {
+ return encryptionContext;
+ }
+
+ public void setEncryptionContext(String encryptionContext) {
+ this.encryptionContext = encryptionContext;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairResponse.java
new file mode 100644
index 00000000..ba825f73
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairResponse.java
@@ -0,0 +1,20 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+
+import cn.ucloud.common.response.Response;
+
+public class GenerateDataKeyPairResponse extends Response {}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairWithoutPlaintextRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairWithoutPlaintextRequest.java
new file mode 100644
index 00000000..89ce8436
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairWithoutPlaintextRequest.java
@@ -0,0 +1,63 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class GenerateDataKeyPairWithoutPlaintextRequest extends Request {
+
+ /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /**
+ * 项目ID。不填写为默认项目,子帐号必须填写。
+ * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
+ */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥ID */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairWithoutPlaintextResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairWithoutPlaintextResponse.java
new file mode 100644
index 00000000..f5450acd
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyPairWithoutPlaintextResponse.java
@@ -0,0 +1,20 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+
+import cn.ucloud.common.response.Response;
+
+public class GenerateDataKeyPairWithoutPlaintextResponse extends Response {}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyRequest.java
new file mode 100644
index 00000000..a360bafe
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyRequest.java
@@ -0,0 +1,108 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class GenerateDataKeyRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥资源长 ID、ARN 或别名。 */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** UKMS 实例资源 ID。 */
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ /** 数据密钥规格。可选值:AES_256、AES_128;默认 AES_256。与 NumberOfBytes 二选一,同时填写时 NumberOfBytes 优先。 */
+ @UCloudParam("KeySpec")
+ private String keySpec;
+
+ /** 生成数据密钥的字节长度,取值范围 1~1024。与 KeySpec 二选一,同时填写时本字段优先。 */
+ @UCloudParam("NumberOfBytes")
+ private Integer numberOfBytes;
+
+ /** 加密上下文,JSON Object。 */
+ @UCloudParam("EncryptionContext")
+ private Object encryptionContext;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public String getKeySpec() {
+ return keySpec;
+ }
+
+ public void setKeySpec(String keySpec) {
+ this.keySpec = keySpec;
+ }
+
+ public Integer getNumberOfBytes() {
+ return numberOfBytes;
+ }
+
+ public void setNumberOfBytes(Integer numberOfBytes) {
+ this.numberOfBytes = numberOfBytes;
+ }
+
+ public Object getEncryptionContext() {
+ return encryptionContext;
+ }
+
+ public void setEncryptionContext(Object encryptionContext) {
+ this.encryptionContext = encryptionContext;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyResponse.java
new file mode 100644
index 00000000..213dfd96
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyResponse.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+public class GenerateDataKeyResponse extends Response {
+
+ /** 数据密钥明文,Base64 编码。 */
+ @SerializedName("Plaintext")
+ private String plaintext;
+
+ /** 加密后的数据密钥。 */
+ @SerializedName("CiphertextBlob")
+ private String ciphertextBlob;
+
+ /** 加密该数据密钥的密钥资源长 ID。 */
+ @SerializedName("KeyId")
+ private String keyId;
+
+ public String getPlaintext() {
+ return plaintext;
+ }
+
+ public void setPlaintext(String plaintext) {
+ this.plaintext = plaintext;
+ }
+
+ public String getCiphertextBlob() {
+ return ciphertextBlob;
+ }
+
+ public void setCiphertextBlob(String ciphertextBlob) {
+ this.ciphertextBlob = ciphertextBlob;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyWithoutPlaintextRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyWithoutPlaintextRequest.java
new file mode 100644
index 00000000..38716a3f
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyWithoutPlaintextRequest.java
@@ -0,0 +1,108 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class GenerateDataKeyWithoutPlaintextRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥资源长 ID、ARN 或别名。 */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** UKMS 实例资源 ID。 */
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ /** 数据密钥规格。可选值:AES_256、AES_128;默认 AES_256。与 NumberOfBytes 二选一,同时填写时 NumberOfBytes 优先。 */
+ @UCloudParam("KeySpec")
+ private String keySpec;
+
+ /** 生成数据密钥的字节长度,取值范围 1~1024。与 KeySpec 二选一,同时填写时本字段优先。 */
+ @UCloudParam("NumberOfBytes")
+ private Integer numberOfBytes;
+
+ /** 加密上下文,JSON Object。 */
+ @UCloudParam("EncryptionContext")
+ private Object encryptionContext;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public String getKeySpec() {
+ return keySpec;
+ }
+
+ public void setKeySpec(String keySpec) {
+ this.keySpec = keySpec;
+ }
+
+ public Integer getNumberOfBytes() {
+ return numberOfBytes;
+ }
+
+ public void setNumberOfBytes(Integer numberOfBytes) {
+ this.numberOfBytes = numberOfBytes;
+ }
+
+ public Object getEncryptionContext() {
+ return encryptionContext;
+ }
+
+ public void setEncryptionContext(Object encryptionContext) {
+ this.encryptionContext = encryptionContext;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyWithoutPlaintextResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyWithoutPlaintextResponse.java
new file mode 100644
index 00000000..d2c3d979
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateDataKeyWithoutPlaintextResponse.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+public class GenerateDataKeyWithoutPlaintextResponse extends Response {
+
+ /** 加密后的数据密钥。 */
+ @SerializedName("CiphertextBlob")
+ private String ciphertextBlob;
+
+ /** 加密该数据密钥的密钥资源长 ID。 */
+ @SerializedName("KeyId")
+ private String keyId;
+
+ public String getCiphertextBlob() {
+ return ciphertextBlob;
+ }
+
+ public void setCiphertextBlob(String ciphertextBlob) {
+ this.ciphertextBlob = ciphertextBlob;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateMacRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateMacRequest.java
new file mode 100644
index 00000000..fe70d12e
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateMacRequest.java
@@ -0,0 +1,76 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class GenerateMacRequest extends Request {
+
+ /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /**
+ * 项目ID。不填写为默认项目,子帐号必须填写。
+ * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
+ */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥ID */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** 待哈希的消息。 */
+ @NotEmpty
+ @UCloudParam("MacMessage")
+ private String macMessage;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getMacMessage() {
+ return macMessage;
+ }
+
+ public void setMacMessage(String macMessage) {
+ this.macMessage = macMessage;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateMacResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateMacResponse.java
new file mode 100644
index 00000000..b979549b
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateMacResponse.java
@@ -0,0 +1,20 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+
+import cn.ucloud.common.response.Response;
+
+public class GenerateMacResponse extends Response {}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateRandomRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateRandomRequest.java
new file mode 100644
index 00000000..5292f965
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateRandomRequest.java
@@ -0,0 +1,63 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class GenerateRandomRequest extends Request {
+
+ /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /**
+ * 项目ID。不填写为默认项目,子帐号必须填写。
+ * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
+ */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 随机数长度,最大1024 */
+ @NotEmpty
+ @UCloudParam("NumberOfBytes")
+ private Integer numberOfBytes;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public Integer getNumberOfBytes() {
+ return numberOfBytes;
+ }
+
+ public void setNumberOfBytes(Integer numberOfBytes) {
+ this.numberOfBytes = numberOfBytes;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateRandomResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateRandomResponse.java
new file mode 100644
index 00000000..fa79bc30
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GenerateRandomResponse.java
@@ -0,0 +1,20 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+
+import cn.ucloud.common.response.Response;
+
+public class GenerateRandomResponse extends Response {}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetKeyRotationStatusRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetKeyRotationStatusRequest.java
new file mode 100644
index 00000000..3cc4a775
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetKeyRotationStatusRequest.java
@@ -0,0 +1,72 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class GetKeyRotationStatusRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥资源长 ID、ARN 或别名。 */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** UKMS 实例资源 ID。 */
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetKeyRotationStatusResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetKeyRotationStatusResponse.java
new file mode 100644
index 00000000..1dca4498
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetKeyRotationStatusResponse.java
@@ -0,0 +1,82 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+public class GetKeyRotationStatusResponse extends Response {
+
+ /** 是否开启自动轮转。取值:true、false。 */
+ @SerializedName("KeyRotationEnabled")
+ private Boolean keyRotationEnabled;
+
+ /** 密钥资源长 ID。 */
+ @SerializedName("KeyId")
+ private String keyId;
+
+ /** 轮转周期,单位天;未开启时返回 0。 */
+ @SerializedName("RotationPeriodInDays")
+ private Integer rotationPeriodInDays;
+
+ /** 下次轮转时间,Unix 时间戳。 */
+ @SerializedName("NextRotationDate")
+ private Integer nextRotationDate;
+
+ /** 按需轮转开始时间,Unix 时间戳。 */
+ @SerializedName("OnDemandRotationStartDate")
+ private Integer onDemandRotationStartDate;
+
+ public Boolean getKeyRotationEnabled() {
+ return keyRotationEnabled;
+ }
+
+ public void setKeyRotationEnabled(Boolean keyRotationEnabled) {
+ this.keyRotationEnabled = keyRotationEnabled;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public Integer getRotationPeriodInDays() {
+ return rotationPeriodInDays;
+ }
+
+ public void setRotationPeriodInDays(Integer rotationPeriodInDays) {
+ this.rotationPeriodInDays = rotationPeriodInDays;
+ }
+
+ public Integer getNextRotationDate() {
+ return nextRotationDate;
+ }
+
+ public void setNextRotationDate(Integer nextRotationDate) {
+ this.nextRotationDate = nextRotationDate;
+ }
+
+ public Integer getOnDemandRotationStartDate() {
+ return onDemandRotationStartDate;
+ }
+
+ public void setOnDemandRotationStartDate(Integer onDemandRotationStartDate) {
+ this.onDemandRotationStartDate = onDemandRotationStartDate;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetPublicKeyRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetPublicKeyRequest.java
new file mode 100644
index 00000000..4c979612
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetPublicKeyRequest.java
@@ -0,0 +1,72 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class GetPublicKeyRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥 ID、ARN 或别名。 */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** UKMS 实例资源 ID。 */
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetPublicKeyResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetPublicKeyResponse.java
new file mode 100644
index 00000000..8efe06a9
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/GetPublicKeyResponse.java
@@ -0,0 +1,99 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class GetPublicKeyResponse extends Response {
+
+ /** 密钥 ID。 */
+ @SerializedName("KeyId")
+ private String keyId;
+
+ /** PEM 或 DER 编码的公钥。 */
+ @SerializedName("KmsPublicKey")
+ private String kmsPublicKey;
+
+ /**
+ * 密钥规格。取值:SYMMETRIC_DEFAULT、RSA_2048、RSA_3072、RSA_4096、ECC_NIST_P256、ECC_NIST_P384、ECC_NIST_P521、HMAC_256、HMAC_384、HMAC_512。
+ */
+ @SerializedName("KeySpec")
+ private String keySpec;
+
+ /** 密钥用途。取值:ENCRYPT_DECRYPT、SIGN_VERIFY、GENERATE_VERIFY_MAC、KEY_AGREEMENT。 */
+ @SerializedName("KeyUsage")
+ private List 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class ListAliasesRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** UKMS 实例资源 ID。 */
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ /** 可选:筛选指定密钥资源长 ID 的别名。 */
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** 列表起始位置偏移量。 */
+ @UCloudParam("Offset")
+ private Integer offset;
+
+ /** 返回数据长度。 */
+ @UCloudParam("Limit")
+ private Integer limit;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public Integer getOffset() {
+ return offset;
+ }
+
+ public void setOffset(Integer offset) {
+ this.offset = offset;
+ }
+
+ public Integer getLimit() {
+ return limit;
+ }
+
+ public void setLimit(Integer limit) {
+ this.limit = limit;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListAliasesResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListAliasesResponse.java
new file mode 100644
index 00000000..44c6832f
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListAliasesResponse.java
@@ -0,0 +1,98 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class ListAliasesResponse extends Response {
+
+ /** 别名总数。 */
+ @SerializedName("TotalCount")
+ private Integer totalCount;
+
+ /** 别名列表,每项为 AliasInfo。 */
+ @SerializedName("Aliases")
+ private List 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class ListKeysRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** UKMS 实例资源 ID。 */
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ /** 按密钥 ID 或别名模糊过滤。 */
+ @UCloudParam("Alias")
+ private String alias;
+
+ /** 列表起始位置偏移量。 */
+ @UCloudParam("Offset")
+ private Integer offset;
+
+ /** 返回数据长度。最大1000 */
+ @UCloudParam("Limit")
+ private Integer limit;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public String getAlias() {
+ return alias;
+ }
+
+ public void setAlias(String alias) {
+ this.alias = alias;
+ }
+
+ public Integer getOffset() {
+ return offset;
+ }
+
+ public void setOffset(Integer offset) {
+ this.offset = offset;
+ }
+
+ public Integer getLimit() {
+ return limit;
+ }
+
+ public void setLimit(Integer limit) {
+ this.limit = limit;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListKeysResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListKeysResponse.java
new file mode 100644
index 00000000..6921e86f
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListKeysResponse.java
@@ -0,0 +1,208 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class ListKeysResponse extends Response {
+
+ /** 密钥信息数组,每项为 DEK/ListKeys item。 */
+ @SerializedName("Data")
+ private List 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class ListScheduleDeletionKeysRequest extends Request {
+
+ /** 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 输出列表起始位置,默认从0开始 */
+ @UCloudParam("Offset")
+ private Integer offset;
+
+ /** 输出列表数量,默认返回200个 */
+ @UCloudParam("Limit")
+ private Integer limit;
+
+ /**
+ * 列表排序方式, 可选项: "-created_time",
+ * "created_time","plan_delete_time","-plan_delete_time";默认按-plan_delete_time 计划删除时间升序返回
+ */
+ @UCloudParam("OrderBy")
+ private String orderBy;
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public Integer getOffset() {
+ return offset;
+ }
+
+ public void setOffset(Integer offset) {
+ this.offset = offset;
+ }
+
+ public Integer getLimit() {
+ return limit;
+ }
+
+ public void setLimit(Integer limit) {
+ this.limit = limit;
+ }
+
+ public String getOrderBy() {
+ return orderBy;
+ }
+
+ public void setOrderBy(String orderBy) {
+ this.orderBy = orderBy;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListScheduleDeletionKeysResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListScheduleDeletionKeysResponse.java
new file mode 100644
index 00000000..f603b2c8
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ListScheduleDeletionKeysResponse.java
@@ -0,0 +1,170 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+
+public class ListScheduleDeletionKeysResponse extends Response {
+
+ /** 主密钥信息组成的列表 */
+ @SerializedName("Objects")
+ private List 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class RotateKeyOnDemandRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥 ID、ARN 或别名。 */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** UKMS 实例资源 ID。 */
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/RotateKeyOnDemandResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/RotateKeyOnDemandResponse.java
new file mode 100644
index 00000000..65d388f6
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/RotateKeyOnDemandResponse.java
@@ -0,0 +1,34 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+public class RotateKeyOnDemandResponse extends Response {
+
+ /** 密钥 ID。 */
+ @SerializedName("KeyId")
+ private String keyId;
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ScheduleKeyDeletionRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ScheduleKeyDeletionRequest.java
new file mode 100644
index 00000000..cc3c213b
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ScheduleKeyDeletionRequest.java
@@ -0,0 +1,72 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class ScheduleKeyDeletionRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥 DB 数字 ID。 */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private Integer keyId;
+
+ /** UKMS 实例资源 ID。 */
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public Integer getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(Integer keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ScheduleKeyDeletionResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ScheduleKeyDeletionResponse.java
new file mode 100644
index 00000000..612f475c
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/ScheduleKeyDeletionResponse.java
@@ -0,0 +1,20 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+
+import cn.ucloud.common.response.Response;
+
+public class ScheduleKeyDeletionResponse extends Response {}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/SignRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/SignRequest.java
new file mode 100644
index 00000000..f0bdcc3f
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/SignRequest.java
@@ -0,0 +1,113 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class SignRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥资源长 ID、ARN 或别名。 */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** 待签名消息,Base64 编码,最大 4096 字节。 */
+ @NotEmpty
+ @UCloudParam("SigningMessage")
+ private String signingMessage;
+
+ /**
+ * 签名算法。可选值:RSASSA_PSS_SHA_256、RSASSA_PSS_SHA_384、RSASSA_PSS_SHA_512、RSASSA_PKCS1_V1_5_SHA_256、RSASSA_PKCS1_V1_5_SHA_384、RSASSA_PKCS1_V1_5_SHA_512、ECDSA_SHA_256、ECDSA_SHA_384、ECDSA_SHA_512;须与密钥
+ * KeySpec 匹配。
+ */
+ @NotEmpty
+ @UCloudParam("SigningAlgorithm")
+ private String signingAlgorithm;
+
+ /** UKMS 实例资源 ID。 */
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ /** 消息类型。可选值:RAW、DIGEST;默认 RAW。 */
+ @UCloudParam("MessageType")
+ private String messageType;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getSigningMessage() {
+ return signingMessage;
+ }
+
+ public void setSigningMessage(String signingMessage) {
+ this.signingMessage = signingMessage;
+ }
+
+ public String getSigningAlgorithm() {
+ return signingAlgorithm;
+ }
+
+ public void setSigningAlgorithm(String signingAlgorithm) {
+ this.signingAlgorithm = signingAlgorithm;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public String getMessageType() {
+ return messageType;
+ }
+
+ public void setMessageType(String messageType) {
+ this.messageType = messageType;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/SignResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/SignResponse.java
new file mode 100644
index 00000000..1658fbd8
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/SignResponse.java
@@ -0,0 +1,60 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+public class SignResponse extends Response {
+
+ /** 签名结果,Base64 编码。 */
+ @SerializedName("SignatureResult")
+ private String signatureResult;
+
+ /** 密钥资源长 ID。 */
+ @SerializedName("KeyId")
+ private String keyId;
+
+ /**
+ * 实际使用的签名算法。取值:RSASSA_PSS_SHA_256、RSASSA_PSS_SHA_384、RSASSA_PSS_SHA_512、RSASSA_PKCS1_V1_5_SHA_256、RSASSA_PKCS1_V1_5_SHA_384、RSASSA_PKCS1_V1_5_SHA_512、ECDSA_SHA_256、ECDSA_SHA_384、ECDSA_SHA_512。
+ */
+ @SerializedName("SigningAlgorithm")
+ private String signingAlgorithm;
+
+ public String getSignatureResult() {
+ return signatureResult;
+ }
+
+ public void setSignatureResult(String signatureResult) {
+ this.signatureResult = signatureResult;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getSigningAlgorithm() {
+ return signingAlgorithm;
+ }
+
+ public void setSigningAlgorithm(String signingAlgorithm) {
+ this.signingAlgorithm = signingAlgorithm;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateAliasRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateAliasRequest.java
new file mode 100644
index 00000000..b86c1164
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateAliasRequest.java
@@ -0,0 +1,85 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class UpdateAliasRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥别名,格式为 alias/name。 */
+ @NotEmpty
+ @UCloudParam("AliasName")
+ private String aliasName;
+
+ /** 密钥 ID、ARN 或别名。 */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** UKMS 实例资源 ID。 */
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getAliasName() {
+ return aliasName;
+ }
+
+ public void setAliasName(String aliasName) {
+ this.aliasName = aliasName;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateAliasResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateAliasResponse.java
new file mode 100644
index 00000000..711e6b6b
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateAliasResponse.java
@@ -0,0 +1,20 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+
+import cn.ucloud.common.response.Response;
+
+public class UpdateAliasResponse extends Response {}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateKeyDescriptionRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateKeyDescriptionRequest.java
new file mode 100644
index 00000000..5a974da9
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateKeyDescriptionRequest.java
@@ -0,0 +1,85 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class UpdateKeyDescriptionRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥资源长 ID、ARN 或别名。 */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** 新的密钥描述,最多 8192 字符;空字符串表示清空描述。 */
+ @NotEmpty
+ @UCloudParam("Description")
+ private String description;
+
+ /** UKMS 实例资源 ID。 */
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateKeyDescriptionResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateKeyDescriptionResponse.java
new file mode 100644
index 00000000..43348b00
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/UpdateKeyDescriptionResponse.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+public class UpdateKeyDescriptionResponse extends Response {
+
+ /** 返回状态。 */
+ @SerializedName("Status")
+ private String status;
+
+ /** 此次请求唯一标识符。 */
+ @SerializedName("RequestUuid")
+ private String requestUuid;
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getRequestUuid() {
+ return requestUuid;
+ }
+
+ public void setRequestUuid(String requestUuid) {
+ this.requestUuid = requestUuid;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyMacRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyMacRequest.java
new file mode 100644
index 00000000..87513259
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyMacRequest.java
@@ -0,0 +1,102 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class VerifyMacRequest extends Request {
+
+ /** 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /**
+ * 项目ID。不填写为默认项目,子帐号必须填写。
+ * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
+ */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** 密钥ID */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** 用于验证的消息。请输入与生成 HMAC 时所用消息相同的消息。 */
+ @NotEmpty
+ @UCloudParam("MacMessage")
+ private String macMessage;
+
+ /** 要验证的 HMAC。请输入由 GenerateMac 操作生成的 HMAC,前提是您指定的消息、HMAC KMS 密钥和 MAC 算法与此请求中指定的值相同。 */
+ @NotEmpty
+ @UCloudParam("Mac")
+ private String mac;
+
+ /** 验证过程中将使用的 MAC 算法。请输入与计算 HMAC 时相同的 MAC 算法。 此算法必须受 KeyId 参数标识的 HMAC KMS 密钥支持。 */
+ @NotEmpty
+ @UCloudParam("MacAlgorithm")
+ private String macAlgorithm;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getMacMessage() {
+ return macMessage;
+ }
+
+ public void setMacMessage(String macMessage) {
+ this.macMessage = macMessage;
+ }
+
+ public String getMac() {
+ return mac;
+ }
+
+ public void setMac(String mac) {
+ this.mac = mac;
+ }
+
+ public String getMacAlgorithm() {
+ return macAlgorithm;
+ }
+
+ public void setMacAlgorithm(String macAlgorithm) {
+ this.macAlgorithm = macAlgorithm;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyMacResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyMacResponse.java
new file mode 100644
index 00000000..6694724c
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyMacResponse.java
@@ -0,0 +1,20 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+
+import cn.ucloud.common.response.Response;
+
+public class VerifyMacResponse extends Response {}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyRequest.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyRequest.java
new file mode 100644
index 00000000..61ed9fcc
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyRequest.java
@@ -0,0 +1,127 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.annotation.NotEmpty;
+import cn.ucloud.common.annotation.UCloudParam;
+import cn.ucloud.common.request.Request;
+
+public class VerifyRequest extends Request {
+
+ /** 地域。参见地域和可用区列表。 */
+ @NotEmpty
+ @UCloudParam("Region")
+ private String region;
+
+ /** 项目ID。不填写为默认项目,子账号必须填写。 */
+ @UCloudParam("ProjectId")
+ private String projectId;
+
+ /** UKMS 实例资源 ID。 */
+ @NotEmpty
+ @UCloudParam("ResourceId")
+ private String resourceId;
+
+ /** 密钥 ID、ARN 或别名。 */
+ @NotEmpty
+ @UCloudParam("KeyId")
+ private String keyId;
+
+ /** 待验签的消息或消息摘要,Base64 编码。 */
+ @NotEmpty
+ @UCloudParam("SigningMessage")
+ private String signingMessage;
+
+ /** 待验证的签名,Base64 编码。 */
+ @NotEmpty
+ @UCloudParam("SignatureResult")
+ private String signatureResult;
+
+ /**
+ * 签名时使用的算法。可选值:RSASSA_PSS_SHA_256、RSASSA_PSS_SHA_384、RSASSA_PSS_SHA_512、RSASSA_PKCS1_V1_5_SHA_256、RSASSA_PKCS1_V1_5_SHA_384、RSASSA_PKCS1_V1_5_SHA_512、ECDSA_SHA_256、ECDSA_SHA_384、ECDSA_SHA_512;须与密钥
+ * KeySpec 匹配。
+ */
+ @NotEmpty
+ @UCloudParam("SigningAlgorithm")
+ private String signingAlgorithm;
+
+ /** 消息类型。可选值:RAW、DIGEST;默认 RAW。 */
+ @UCloudParam("MessageType")
+ private String messageType;
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getSigningMessage() {
+ return signingMessage;
+ }
+
+ public void setSigningMessage(String signingMessage) {
+ this.signingMessage = signingMessage;
+ }
+
+ public String getSignatureResult() {
+ return signatureResult;
+ }
+
+ public void setSignatureResult(String signatureResult) {
+ this.signatureResult = signatureResult;
+ }
+
+ public String getSigningAlgorithm() {
+ return signingAlgorithm;
+ }
+
+ public void setSigningAlgorithm(String signingAlgorithm) {
+ this.signingAlgorithm = signingAlgorithm;
+ }
+
+ public String getMessageType() {
+ return messageType;
+ }
+
+ public void setMessageType(String messageType) {
+ this.messageType = messageType;
+ }
+}
diff --git a/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyResponse.java b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyResponse.java
new file mode 100644
index 00000000..c7a1e562
--- /dev/null
+++ b/ucloud-sdk-java-ukms/src/main/java/cn/ucloud/ukms/models/VerifyResponse.java
@@ -0,0 +1,60 @@
+/**
+ * Copyright 2021 UCloud Technology Co., Ltd.
+ *
+ * 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 cn.ucloud.ukms.models;
+
+
+import cn.ucloud.common.response.Response;
+
+import com.google.gson.annotations.SerializedName;
+
+public class VerifyResponse extends Response {
+
+ /** 密钥 ID。 */
+ @SerializedName("KeyId")
+ private String keyId;
+
+ /** 签名是否有效。 */
+ @SerializedName("SignatureValid")
+ private Boolean signatureValid;
+
+ /**
+ * 使用的签名算法。取值:RSASSA_PSS_SHA_256、RSASSA_PSS_SHA_384、RSASSA_PSS_SHA_512、RSASSA_PKCS1_V1_5_SHA_256、RSASSA_PKCS1_V1_5_SHA_384、RSASSA_PKCS1_V1_5_SHA_512、ECDSA_SHA_256、ECDSA_SHA_384、ECDSA_SHA_512。
+ */
+ @SerializedName("SigningAlgorithm")
+ private String signingAlgorithm;
+
+ public String getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId) {
+ this.keyId = keyId;
+ }
+
+ public Boolean getSignatureValid() {
+ return signatureValid;
+ }
+
+ public void setSignatureValid(Boolean signatureValid) {
+ this.signatureValid = signatureValid;
+ }
+
+ public String getSigningAlgorithm() {
+ return signingAlgorithm;
+ }
+
+ public void setSigningAlgorithm(String signingAlgorithm) {
+ this.signingAlgorithm = signingAlgorithm;
+ }
+}
diff --git a/ucloud-sdk-java-ulb/pom.xml b/ucloud-sdk-java-ulb/pom.xml
index 07514e13..2eac54a0 100644
--- a/ucloud-sdk-java-ulb/pom.xml
+++ b/ucloud-sdk-java-ulb/pom.xml
@@ -5,19 +5,19 @@