-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
261 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 121 additions & 0 deletions
121
...un-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/AdvanceEncryptRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
/* | ||
* 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 AdvanceEncryptRequest extends RpcAcsRequest<AdvanceEncryptResponse> { | ||
|
||
|
||
private String paddingMode; | ||
|
||
private String aad; | ||
|
||
private String keyId; | ||
|
||
private String plaintext; | ||
|
||
private String iv; | ||
|
||
private String algorithm; | ||
public AdvanceEncryptRequest() { | ||
super("Kms", "2016-01-20", "AdvanceEncrypt", "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 getPaddingMode() { | ||
return this.paddingMode; | ||
} | ||
|
||
public void setPaddingMode(String paddingMode) { | ||
this.paddingMode = paddingMode; | ||
if(paddingMode != null){ | ||
putQueryParameter("PaddingMode", paddingMode); | ||
} | ||
} | ||
|
||
public String getAad() { | ||
return this.aad; | ||
} | ||
|
||
public void setAad(String aad) { | ||
this.aad = aad; | ||
if(aad != null){ | ||
putQueryParameter("Aad", aad); | ||
} | ||
} | ||
|
||
public String getKeyId() { | ||
return this.keyId; | ||
} | ||
|
||
public void setKeyId(String keyId) { | ||
this.keyId = keyId; | ||
if(keyId != null){ | ||
putQueryParameter("KeyId", keyId); | ||
} | ||
} | ||
|
||
public String getPlaintext() { | ||
return this.plaintext; | ||
} | ||
|
||
public void setPlaintext(String plaintext) { | ||
this.plaintext = plaintext; | ||
if(plaintext != null){ | ||
putQueryParameter("Plaintext", plaintext); | ||
} | ||
} | ||
|
||
public String getIv() { | ||
return this.iv; | ||
} | ||
|
||
public void setIv(String iv) { | ||
this.iv = iv; | ||
if(iv != null){ | ||
putQueryParameter("Iv", iv); | ||
} | ||
} | ||
|
||
public String getAlgorithm() { | ||
return this.algorithm; | ||
} | ||
|
||
public void setAlgorithm(String algorithm) { | ||
this.algorithm = algorithm; | ||
if(algorithm != null){ | ||
putQueryParameter("Algorithm", algorithm); | ||
} | ||
} | ||
|
||
@Override | ||
public Class<AdvanceEncryptResponse> getResponseClass() { | ||
return AdvanceEncryptResponse.class; | ||
} | ||
|
||
} |
101 changes: 101 additions & 0 deletions
101
...n-java-sdk-kms/src/main/java/com/aliyuncs/kms/model/v20160120/AdvanceEncryptResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
/* | ||
* 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.AdvanceEncryptResponseUnmarshaller; | ||
import com.aliyuncs.transform.UnmarshallerContext; | ||
|
||
/** | ||
* @author auto create | ||
* @version | ||
*/ | ||
public class AdvanceEncryptResponse extends AcsResponse { | ||
|
||
private String requestId; | ||
|
||
private String ciphertextBlob; | ||
|
||
private String algorithm; | ||
|
||
private String keyId; | ||
|
||
private String keyVersionId; | ||
|
||
private String iv; | ||
|
||
private String paddingMode; | ||
|
||
public String getRequestId() { | ||
return this.requestId; | ||
} | ||
|
||
public void setRequestId(String requestId) { | ||
this.requestId = requestId; | ||
} | ||
|
||
public String getCiphertextBlob() { | ||
return this.ciphertextBlob; | ||
} | ||
|
||
public void setCiphertextBlob(String ciphertextBlob) { | ||
this.ciphertextBlob = ciphertextBlob; | ||
} | ||
|
||
public String getAlgorithm() { | ||
return this.algorithm; | ||
} | ||
|
||
public void setAlgorithm(String algorithm) { | ||
this.algorithm = algorithm; | ||
} | ||
|
||
public String getKeyId() { | ||
return this.keyId; | ||
} | ||
|
||
public void setKeyId(String keyId) { | ||
this.keyId = keyId; | ||
} | ||
|
||
public String getKeyVersionId() { | ||
return this.keyVersionId; | ||
} | ||
|
||
public void setKeyVersionId(String keyVersionId) { | ||
this.keyVersionId = keyVersionId; | ||
} | ||
|
||
public String getIv() { | ||
return this.iv; | ||
} | ||
|
||
public void setIv(String iv) { | ||
this.iv = iv; | ||
} | ||
|
||
public String getPaddingMode() { | ||
return this.paddingMode; | ||
} | ||
|
||
public void setPaddingMode(String paddingMode) { | ||
this.paddingMode = paddingMode; | ||
} | ||
|
||
@Override | ||
public AdvanceEncryptResponse getInstance(UnmarshallerContext context) { | ||
return AdvanceEncryptResponseUnmarshaller.unmarshall(this, context); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...rc/main/java/com/aliyuncs/kms/transform/v20160120/AdvanceEncryptResponseUnmarshaller.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* 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.AdvanceEncryptResponse; | ||
import com.aliyuncs.transform.UnmarshallerContext; | ||
|
||
|
||
public class AdvanceEncryptResponseUnmarshaller { | ||
|
||
public static AdvanceEncryptResponse unmarshall(AdvanceEncryptResponse advanceEncryptResponse, UnmarshallerContext _ctx) { | ||
|
||
advanceEncryptResponse.setRequestId(_ctx.stringValue("AdvanceEncryptResponse.RequestId")); | ||
advanceEncryptResponse.setCiphertextBlob(_ctx.stringValue("AdvanceEncryptResponse.CiphertextBlob")); | ||
advanceEncryptResponse.setAlgorithm(_ctx.stringValue("AdvanceEncryptResponse.Algorithm")); | ||
advanceEncryptResponse.setKeyId(_ctx.stringValue("AdvanceEncryptResponse.KeyId")); | ||
advanceEncryptResponse.setKeyVersionId(_ctx.stringValue("AdvanceEncryptResponse.KeyVersionId")); | ||
advanceEncryptResponse.setIv(_ctx.stringValue("AdvanceEncryptResponse.Iv")); | ||
advanceEncryptResponse.setPaddingMode(_ctx.stringValue("AdvanceEncryptResponse.PaddingMode")); | ||
|
||
return advanceEncryptResponse; | ||
} | ||
} |