From bea290b00619c80ad46fdeb09cf5b65c748bc6f1 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Wed, 8 May 2024 08:09:42 +0000 Subject: [PATCH] Support key policy and secret policy OpenAPI. --- aliyun-java-sdk-kms/ChangeLog.txt | 3 + aliyun-java-sdk-kms/pom.xml | 2 +- .../kms/model/v20160120/CreateKeyRequest.java | 15 +++- .../model/v20160120/CreateSecretRequest.java | 15 +++- .../model/v20160120/GetKeyPolicyRequest.java | 69 ++++++++++++++++ .../model/v20160120/GetKeyPolicyResponse.java | 51 ++++++++++++ .../v20160120/GetSecretPolicyRequest.java | 69 ++++++++++++++++ .../v20160120/GetSecretPolicyResponse.java | 51 ++++++++++++ .../model/v20160120/SetKeyPolicyRequest.java | 82 +++++++++++++++++++ .../model/v20160120/SetKeyPolicyResponse.java | 41 ++++++++++ .../v20160120/SetSecretPolicyRequest.java | 82 +++++++++++++++++++ .../v20160120/SetSecretPolicyResponse.java | 41 ++++++++++ .../GetKeyPolicyResponseUnmarshaller.java | 30 +++++++ .../GetSecretPolicyResponseUnmarshaller.java | 30 +++++++ .../SetKeyPolicyResponseUnmarshaller.java | 29 +++++++ .../SetSecretPolicyResponseUnmarshaller.java | 29 +++++++ 16 files changed, 636 insertions(+), 3 deletions(-) create mode 100644 aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetKeyPolicyRequest.java create mode 100644 aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetKeyPolicyResponse.java create mode 100644 aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetSecretPolicyRequest.java create mode 100644 aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetSecretPolicyResponse.java create mode 100644 aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetKeyPolicyRequest.java create mode 100644 aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetKeyPolicyResponse.java create mode 100644 aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetSecretPolicyRequest.java create mode 100644 aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetSecretPolicyResponse.java create mode 100644 aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/GetKeyPolicyResponseUnmarshaller.java create mode 100644 aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/GetSecretPolicyResponseUnmarshaller.java create mode 100644 aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/SetKeyPolicyResponseUnmarshaller.java create mode 100644 aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/SetSecretPolicyResponseUnmarshaller.java diff --git a/aliyun-java-sdk-kms/ChangeLog.txt b/aliyun-java-sdk-kms/ChangeLog.txt index c59f69faf0..7a7acdccde 100644 --- a/aliyun-java-sdk-kms/ChangeLog.txt +++ b/aliyun-java-sdk-kms/ChangeLog.txt @@ -1,3 +1,6 @@ +2024-05-08 Version: 2.16.4 +- Support key policy and secret policy OpenAPI. + 2023-09-11 Version: 2.16.3 - add Instance, NetworkRule, Policy, ApplicationAccessPoint, ClientKey OpenAPIs diff --git a/aliyun-java-sdk-kms/pom.xml b/aliyun-java-sdk-kms/pom.xml index 24f6476c05..00723e93aa 100644 --- a/aliyun-java-sdk-kms/pom.xml +++ b/aliyun-java-sdk-kms/pom.xml @@ -4,7 +4,7 @@ com.aliyun aliyun-java-sdk-kms jar - 2.16.3 + 2.16.4 aliyun-java-sdk-kms http://www.aliyun.com Aliyun Open API SDK for Java diff --git a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/CreateKeyRequest.java b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/CreateKeyRequest.java index 40d087c7dc..caa6e4d5e5 100644 --- a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/CreateKeyRequest.java +++ b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/CreateKeyRequest.java @@ -42,7 +42,9 @@ public class CreateKeyRequest extends RpcAcsRequest { private String keyUsage; - private String dKMSInstanceId; + private String dKMSInstanceId; + + private String policy; public CreateKeyRequest() { super("Kms", "2016-01-20", "CreateKey", "kms"); setProtocol(ProtocolType.HTTPS); @@ -150,6 +152,17 @@ public void setDKMSInstanceId(String dKMSInstanceId) { if(dKMSInstanceId != null){ putQueryParameter("DKMSInstanceId", dKMSInstanceId); } + } + + public String getPolicy() { + return this.policy; + } + + public void setPolicy(String policy) { + this.policy = policy; + if(policy != null){ + putQueryParameter("Policy", policy); + } } @Override diff --git a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/CreateSecretRequest.java b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/CreateSecretRequest.java index a5824c6c11..bc235c0313 100644 --- a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/CreateSecretRequest.java +++ b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/CreateSecretRequest.java @@ -48,7 +48,9 @@ public class CreateSecretRequest extends RpcAcsRequest { private String secretName; - private String secretDataType; + private String secretDataType; + + private String policy; public CreateSecretRequest() { super("Kms", "2016-01-20", "CreateSecret", "kms"); setProtocol(ProtocolType.HTTPS); @@ -189,6 +191,17 @@ public void setSecretDataType(String secretDataType) { if(secretDataType != null){ putQueryParameter("SecretDataType", secretDataType); } + } + + public String getPolicy() { + return this.policy; + } + + public void setPolicy(String policy) { + this.policy = policy; + if(policy != null){ + putQueryParameter("Policy", policy); + } } @Override diff --git a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetKeyPolicyRequest.java b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetKeyPolicyRequest.java new file mode 100644 index 0000000000..87b289b0f4 --- /dev/null +++ b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetKeyPolicyRequest.java @@ -0,0 +1,69 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.kms.model.v20160120; + +import com.aliyuncs.RpcAcsRequest; +import com.aliyuncs.http.ProtocolType; +import com.aliyuncs.http.MethodType; +import com.aliyuncs.kms.Endpoint; + +/** + * @author auto create + * @version + */ +public class GetKeyPolicyRequest extends RpcAcsRequest { + + + private String keyId; + + private String policyName; + public GetKeyPolicyRequest() { + super("Kms", "2016-01-20", "GetKeyPolicy", "kms"); + setProtocol(ProtocolType.HTTPS); + setMethod(MethodType.POST); + try { + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); + } catch (Exception e) {} + } + + public String getKeyId() { + return this.keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + if(keyId != null){ + putQueryParameter("KeyId", keyId); + } + } + + public String getPolicyName() { + return this.policyName; + } + + public void setPolicyName(String policyName) { + this.policyName = policyName; + if(policyName != null){ + putQueryParameter("PolicyName", policyName); + } + } + + @Override + public Class getResponseClass() { + return GetKeyPolicyResponse.class; + } + +} diff --git a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetKeyPolicyResponse.java b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetKeyPolicyResponse.java new file mode 100644 index 0000000000..7713098068 --- /dev/null +++ b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetKeyPolicyResponse.java @@ -0,0 +1,51 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.kms.model.v20160120; + +import com.aliyuncs.AcsResponse; +import com.aliyuncs.kms.transform.v20160120.GetKeyPolicyResponseUnmarshaller; +import com.aliyuncs.transform.UnmarshallerContext; + +/** + * @author auto create + * @version + */ +public class GetKeyPolicyResponse extends AcsResponse { + + private String requestId; + + private String policy; + + public String getRequestId() { + return this.requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public String getPolicy() { + return this.policy; + } + + public void setPolicy(String policy) { + this.policy = policy; + } + + @Override + public GetKeyPolicyResponse getInstance(UnmarshallerContext context) { + return GetKeyPolicyResponseUnmarshaller.unmarshall(this, context); + } +} diff --git a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetSecretPolicyRequest.java b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetSecretPolicyRequest.java new file mode 100644 index 0000000000..e7eae0d7da --- /dev/null +++ b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetSecretPolicyRequest.java @@ -0,0 +1,69 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.kms.model.v20160120; + +import com.aliyuncs.RpcAcsRequest; +import com.aliyuncs.http.ProtocolType; +import com.aliyuncs.http.MethodType; +import com.aliyuncs.kms.Endpoint; + +/** + * @author auto create + * @version + */ +public class GetSecretPolicyRequest extends RpcAcsRequest { + + + private String policyName; + + private String secretName; + public GetSecretPolicyRequest() { + super("Kms", "2016-01-20", "GetSecretPolicy", "kms"); + setProtocol(ProtocolType.HTTPS); + setMethod(MethodType.POST); + try { + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); + } catch (Exception e) {} + } + + public String getPolicyName() { + return this.policyName; + } + + public void setPolicyName(String policyName) { + this.policyName = policyName; + if(policyName != null){ + putQueryParameter("PolicyName", policyName); + } + } + + public String getSecretName() { + return this.secretName; + } + + public void setSecretName(String secretName) { + this.secretName = secretName; + if(secretName != null){ + putQueryParameter("SecretName", secretName); + } + } + + @Override + public Class getResponseClass() { + return GetSecretPolicyResponse.class; + } + +} diff --git a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetSecretPolicyResponse.java b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetSecretPolicyResponse.java new file mode 100644 index 0000000000..2f8840ce83 --- /dev/null +++ b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/GetSecretPolicyResponse.java @@ -0,0 +1,51 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.kms.model.v20160120; + +import com.aliyuncs.AcsResponse; +import com.aliyuncs.kms.transform.v20160120.GetSecretPolicyResponseUnmarshaller; +import com.aliyuncs.transform.UnmarshallerContext; + +/** + * @author auto create + * @version + */ +public class GetSecretPolicyResponse extends AcsResponse { + + private String requestId; + + private String policy; + + public String getRequestId() { + return this.requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public String getPolicy() { + return this.policy; + } + + public void setPolicy(String policy) { + this.policy = policy; + } + + @Override + public GetSecretPolicyResponse getInstance(UnmarshallerContext context) { + return GetSecretPolicyResponseUnmarshaller.unmarshall(this, context); + } +} diff --git a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetKeyPolicyRequest.java b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetKeyPolicyRequest.java new file mode 100644 index 0000000000..d65ecfdb49 --- /dev/null +++ b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetKeyPolicyRequest.java @@ -0,0 +1,82 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.kms.model.v20160120; + +import com.aliyuncs.RpcAcsRequest; +import com.aliyuncs.http.ProtocolType; +import com.aliyuncs.http.MethodType; +import com.aliyuncs.kms.Endpoint; + +/** + * @author auto create + * @version + */ +public class SetKeyPolicyRequest extends RpcAcsRequest { + + + private String keyId; + + private String policyName; + + private String policy; + public SetKeyPolicyRequest() { + super("Kms", "2016-01-20", "SetKeyPolicy", "kms"); + setProtocol(ProtocolType.HTTPS); + setMethod(MethodType.POST); + try { + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); + } catch (Exception e) {} + } + + public String getKeyId() { + return this.keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + if(keyId != null){ + putQueryParameter("KeyId", keyId); + } + } + + public String getPolicyName() { + return this.policyName; + } + + public void setPolicyName(String policyName) { + this.policyName = policyName; + if(policyName != null){ + putQueryParameter("PolicyName", policyName); + } + } + + public String getPolicy() { + return this.policy; + } + + public void setPolicy(String policy) { + this.policy = policy; + if(policy != null){ + putQueryParameter("Policy", policy); + } + } + + @Override + public Class getResponseClass() { + return SetKeyPolicyResponse.class; + } + +} diff --git a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetKeyPolicyResponse.java b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetKeyPolicyResponse.java new file mode 100644 index 0000000000..dc992d5769 --- /dev/null +++ b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetKeyPolicyResponse.java @@ -0,0 +1,41 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.kms.model.v20160120; + +import com.aliyuncs.AcsResponse; +import com.aliyuncs.kms.transform.v20160120.SetKeyPolicyResponseUnmarshaller; +import com.aliyuncs.transform.UnmarshallerContext; + +/** + * @author auto create + * @version + */ +public class SetKeyPolicyResponse extends AcsResponse { + + private String requestId; + + public String getRequestId() { + return this.requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + @Override + public SetKeyPolicyResponse getInstance(UnmarshallerContext context) { + return SetKeyPolicyResponseUnmarshaller.unmarshall(this, context); + } +} diff --git a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetSecretPolicyRequest.java b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetSecretPolicyRequest.java new file mode 100644 index 0000000000..577c552669 --- /dev/null +++ b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetSecretPolicyRequest.java @@ -0,0 +1,82 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.kms.model.v20160120; + +import com.aliyuncs.RpcAcsRequest; +import com.aliyuncs.http.ProtocolType; +import com.aliyuncs.http.MethodType; +import com.aliyuncs.kms.Endpoint; + +/** + * @author auto create + * @version + */ +public class SetSecretPolicyRequest extends RpcAcsRequest { + + + private String policyName; + + private String secretName; + + private String policy; + public SetSecretPolicyRequest() { + super("Kms", "2016-01-20", "SetSecretPolicy", "kms"); + setProtocol(ProtocolType.HTTPS); + setMethod(MethodType.POST); + try { + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); + } catch (Exception e) {} + } + + public String getPolicyName() { + return this.policyName; + } + + public void setPolicyName(String policyName) { + this.policyName = policyName; + if(policyName != null){ + putQueryParameter("PolicyName", policyName); + } + } + + public String getSecretName() { + return this.secretName; + } + + public void setSecretName(String secretName) { + this.secretName = secretName; + if(secretName != null){ + putQueryParameter("SecretName", secretName); + } + } + + public String getPolicy() { + return this.policy; + } + + public void setPolicy(String policy) { + this.policy = policy; + if(policy != null){ + putQueryParameter("Policy", policy); + } + } + + @Override + public Class getResponseClass() { + return SetSecretPolicyResponse.class; + } + +} diff --git a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetSecretPolicyResponse.java b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetSecretPolicyResponse.java new file mode 100644 index 0000000000..3374f755aa --- /dev/null +++ b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/SetSecretPolicyResponse.java @@ -0,0 +1,41 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.kms.model.v20160120; + +import com.aliyuncs.AcsResponse; +import com.aliyuncs.kms.transform.v20160120.SetSecretPolicyResponseUnmarshaller; +import com.aliyuncs.transform.UnmarshallerContext; + +/** + * @author auto create + * @version + */ +public class SetSecretPolicyResponse extends AcsResponse { + + private String requestId; + + public String getRequestId() { + return this.requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + @Override + public SetSecretPolicyResponse getInstance(UnmarshallerContext context) { + return SetSecretPolicyResponseUnmarshaller.unmarshall(this, context); + } +} diff --git a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/GetKeyPolicyResponseUnmarshaller.java b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/GetKeyPolicyResponseUnmarshaller.java new file mode 100644 index 0000000000..bf1ec90818 --- /dev/null +++ b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/GetKeyPolicyResponseUnmarshaller.java @@ -0,0 +1,30 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.kms.transform.v20160120; + +import com.aliyuncs.kms.model.v20160120.GetKeyPolicyResponse; +import com.aliyuncs.transform.UnmarshallerContext; + + +public class GetKeyPolicyResponseUnmarshaller { + + public static GetKeyPolicyResponse unmarshall(GetKeyPolicyResponse getKeyPolicyResponse, UnmarshallerContext _ctx) { + + getKeyPolicyResponse.setRequestId(_ctx.stringValue("GetKeyPolicyResponse.RequestId")); + getKeyPolicyResponse.setPolicy(_ctx.stringValue("GetKeyPolicyResponse.Policy")); + + return getKeyPolicyResponse; + } +} \ No newline at end of file diff --git a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/GetSecretPolicyResponseUnmarshaller.java b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/GetSecretPolicyResponseUnmarshaller.java new file mode 100644 index 0000000000..2aa2b68c45 --- /dev/null +++ b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/GetSecretPolicyResponseUnmarshaller.java @@ -0,0 +1,30 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.kms.transform.v20160120; + +import com.aliyuncs.kms.model.v20160120.GetSecretPolicyResponse; +import com.aliyuncs.transform.UnmarshallerContext; + + +public class GetSecretPolicyResponseUnmarshaller { + + public static GetSecretPolicyResponse unmarshall(GetSecretPolicyResponse getSecretPolicyResponse, UnmarshallerContext _ctx) { + + getSecretPolicyResponse.setRequestId(_ctx.stringValue("GetSecretPolicyResponse.RequestId")); + getSecretPolicyResponse.setPolicy(_ctx.stringValue("GetSecretPolicyResponse.Policy")); + + return getSecretPolicyResponse; + } +} \ No newline at end of file diff --git a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/SetKeyPolicyResponseUnmarshaller.java b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/SetKeyPolicyResponseUnmarshaller.java new file mode 100644 index 0000000000..91fd7b2f93 --- /dev/null +++ b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/SetKeyPolicyResponseUnmarshaller.java @@ -0,0 +1,29 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.kms.transform.v20160120; + +import com.aliyuncs.kms.model.v20160120.SetKeyPolicyResponse; +import com.aliyuncs.transform.UnmarshallerContext; + + +public class SetKeyPolicyResponseUnmarshaller { + + public static SetKeyPolicyResponse unmarshall(SetKeyPolicyResponse setKeyPolicyResponse, UnmarshallerContext _ctx) { + + setKeyPolicyResponse.setRequestId(_ctx.stringValue("SetKeyPolicyResponse.RequestId")); + + return setKeyPolicyResponse; + } +} \ No newline at end of file diff --git a/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/SetSecretPolicyResponseUnmarshaller.java b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/SetSecretPolicyResponseUnmarshaller.java new file mode 100644 index 0000000000..ee3ccb3ac5 --- /dev/null +++ b/aliyun-java-sdk-kms/src/main/java/com/aliyuncs/kms/transform/v20160120/SetSecretPolicyResponseUnmarshaller.java @@ -0,0 +1,29 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.aliyuncs.kms.transform.v20160120; + +import com.aliyuncs.kms.model.v20160120.SetSecretPolicyResponse; +import com.aliyuncs.transform.UnmarshallerContext; + + +public class SetSecretPolicyResponseUnmarshaller { + + public static SetSecretPolicyResponse unmarshall(SetSecretPolicyResponse setSecretPolicyResponse, UnmarshallerContext _ctx) { + + setSecretPolicyResponse.setRequestId(_ctx.stringValue("SetSecretPolicyResponse.RequestId")); + + return setSecretPolicyResponse; + } +} \ No newline at end of file