Skip to content

Commit a08409b

Browse files
author
BitsAdmin
committed
Merge branch 'kms-Java-2021-02-18-online-794-2024_11_21_10_33_58' into 'integration_2024-11-21_605223123202'
feat: [development task] kms-794-Java (867151) See merge request iaasng/volcengine-java-sdk!297
2 parents 1bb37c5 + 15a1586 commit a08409b

File tree

6 files changed

+120
-22
lines changed

6 files changed

+120
-22
lines changed

volcengine-java-sdk-kms/src/main/java/com/volcengine/kms/model/DecryptRequest.java

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
import com.google.gson.stream.JsonWriter;
2222
import io.swagger.v3.oas.annotations.media.Schema;
2323
import java.io.IOException;
24+
import java.util.HashMap;
25+
import java.util.List;
26+
import java.util.Map;
2427
import javax.validation.constraints.*;
2528
import javax.validation.Valid;
2629
/**
@@ -34,7 +37,7 @@ public class DecryptRequest {
3437
private String ciphertextBlob = null;
3538

3639
@SerializedName("EncryptionContext")
37-
private String encryptionContext = null;
40+
private Map<String, String> encryptionContext = null;
3841

3942
public DecryptRequest ciphertextBlob(String ciphertextBlob) {
4043
this.ciphertextBlob = ciphertextBlob;
@@ -55,21 +58,29 @@ public void setCiphertextBlob(String ciphertextBlob) {
5558
this.ciphertextBlob = ciphertextBlob;
5659
}
5760

58-
public DecryptRequest encryptionContext(String encryptionContext) {
61+
public DecryptRequest encryptionContext(Map<String, String> encryptionContext) {
5962
this.encryptionContext = encryptionContext;
6063
return this;
6164
}
6265

66+
public DecryptRequest putEncryptionContextItem(String key, String encryptionContextItem) {
67+
if (this.encryptionContext == null) {
68+
this.encryptionContext = new HashMap<String, String>();
69+
}
70+
this.encryptionContext.put(key, encryptionContextItem);
71+
return this;
72+
}
73+
6374
/**
6475
* Get encryptionContext
6576
* @return encryptionContext
6677
**/
6778
@Schema(description = "")
68-
public String getEncryptionContext() {
79+
public Map<String, String> getEncryptionContext() {
6980
return encryptionContext;
7081
}
7182

72-
public void setEncryptionContext(String encryptionContext) {
83+
public void setEncryptionContext(Map<String, String> encryptionContext) {
7384
this.encryptionContext = encryptionContext;
7485
}
7586

volcengine-java-sdk-kms/src/main/java/com/volcengine/kms/model/DescribeKeyringsRequest.java

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public class DescribeKeyringsRequest {
3333
@SerializedName("CurrentPage")
3434
private Integer currentPage = null;
3535

36+
@SerializedName("Filters")
37+
private String filters = null;
38+
3639
@SerializedName("PageSize")
3740
private Integer pageSize = null;
3841

@@ -58,6 +61,24 @@ public void setCurrentPage(Integer currentPage) {
5861
this.currentPage = currentPage;
5962
}
6063

64+
public DescribeKeyringsRequest filters(String filters) {
65+
this.filters = filters;
66+
return this;
67+
}
68+
69+
/**
70+
* Get filters
71+
* @return filters
72+
**/
73+
@Size(max=2048) @Schema(description = "")
74+
public String getFilters() {
75+
return filters;
76+
}
77+
78+
public void setFilters(String filters) {
79+
this.filters = filters;
80+
}
81+
6182
public DescribeKeyringsRequest pageSize(Integer pageSize) {
6283
this.pageSize = pageSize;
6384
return this;
@@ -107,13 +128,14 @@ public boolean equals(java.lang.Object o) {
107128
}
108129
DescribeKeyringsRequest describeKeyringsRequest = (DescribeKeyringsRequest) o;
109130
return Objects.equals(this.currentPage, describeKeyringsRequest.currentPage) &&
131+
Objects.equals(this.filters, describeKeyringsRequest.filters) &&
110132
Objects.equals(this.pageSize, describeKeyringsRequest.pageSize) &&
111133
Objects.equals(this.projectName, describeKeyringsRequest.projectName);
112134
}
113135

114136
@Override
115137
public int hashCode() {
116-
return Objects.hash(currentPage, pageSize, projectName);
138+
return Objects.hash(currentPage, filters, pageSize, projectName);
117139
}
118140

119141

@@ -123,6 +145,7 @@ public String toString() {
123145
sb.append("class DescribeKeyringsRequest {\n");
124146

125147
sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n");
148+
sb.append(" filters: ").append(toIndentedString(filters)).append("\n");
126149
sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n");
127150
sb.append(" projectName: ").append(toIndentedString(projectName)).append("\n");
128151
sb.append("}");

volcengine-java-sdk-kms/src/main/java/com/volcengine/kms/model/DescribeKeysRequest.java

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public class DescribeKeysRequest {
3333
@SerializedName("CurrentPage")
3434
private Integer currentPage = null;
3535

36+
@SerializedName("Filters")
37+
private String filters = null;
38+
3639
@SerializedName("KeyringName")
3740
private String keyringName = null;
3841

@@ -58,6 +61,24 @@ public void setCurrentPage(Integer currentPage) {
5861
this.currentPage = currentPage;
5962
}
6063

64+
public DescribeKeysRequest filters(String filters) {
65+
this.filters = filters;
66+
return this;
67+
}
68+
69+
/**
70+
* Get filters
71+
* @return filters
72+
**/
73+
@Size(max=2048) @Schema(description = "")
74+
public String getFilters() {
75+
return filters;
76+
}
77+
78+
public void setFilters(String filters) {
79+
this.filters = filters;
80+
}
81+
6182
public DescribeKeysRequest keyringName(String keyringName) {
6283
this.keyringName = keyringName;
6384
return this;
@@ -108,13 +129,14 @@ public boolean equals(java.lang.Object o) {
108129
}
109130
DescribeKeysRequest describeKeysRequest = (DescribeKeysRequest) o;
110131
return Objects.equals(this.currentPage, describeKeysRequest.currentPage) &&
132+
Objects.equals(this.filters, describeKeysRequest.filters) &&
111133
Objects.equals(this.keyringName, describeKeysRequest.keyringName) &&
112134
Objects.equals(this.pageSize, describeKeysRequest.pageSize);
113135
}
114136

115137
@Override
116138
public int hashCode() {
117-
return Objects.hash(currentPage, keyringName, pageSize);
139+
return Objects.hash(currentPage, filters, keyringName, pageSize);
118140
}
119141

120142

@@ -124,6 +146,7 @@ public String toString() {
124146
sb.append("class DescribeKeysRequest {\n");
125147

126148
sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n");
149+
sb.append(" filters: ").append(toIndentedString(filters)).append("\n");
127150
sb.append(" keyringName: ").append(toIndentedString(keyringName)).append("\n");
128151
sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n");
129152
sb.append("}");

volcengine-java-sdk-kms/src/main/java/com/volcengine/kms/model/EncryptRequest.java

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
import com.google.gson.stream.JsonWriter;
2222
import io.swagger.v3.oas.annotations.media.Schema;
2323
import java.io.IOException;
24+
import java.util.HashMap;
25+
import java.util.List;
26+
import java.util.Map;
2427
import javax.validation.constraints.*;
2528
import javax.validation.Valid;
2629
/**
@@ -31,7 +34,7 @@
3134

3235
public class EncryptRequest {
3336
@SerializedName("EncryptionContext")
34-
private String encryptionContext = null;
37+
private Map<String, String> encryptionContext = null;
3538

3639
@SerializedName("KeyID")
3740
private String keyID = null;
@@ -45,21 +48,29 @@ public class EncryptRequest {
4548
@SerializedName("Plaintext")
4649
private String plaintext = null;
4750

48-
public EncryptRequest encryptionContext(String encryptionContext) {
51+
public EncryptRequest encryptionContext(Map<String, String> encryptionContext) {
4952
this.encryptionContext = encryptionContext;
5053
return this;
5154
}
5255

56+
public EncryptRequest putEncryptionContextItem(String key, String encryptionContextItem) {
57+
if (this.encryptionContext == null) {
58+
this.encryptionContext = new HashMap<String, String>();
59+
}
60+
this.encryptionContext.put(key, encryptionContextItem);
61+
return this;
62+
}
63+
5364
/**
5465
* Get encryptionContext
5566
* @return encryptionContext
5667
**/
5768
@Schema(description = "")
58-
public String getEncryptionContext() {
69+
public Map<String, String> getEncryptionContext() {
5970
return encryptionContext;
6071
}
6172

62-
public void setEncryptionContext(String encryptionContext) {
73+
public void setEncryptionContext(Map<String, String> encryptionContext) {
6374
this.encryptionContext = encryptionContext;
6475
}
6576

volcengine-java-sdk-kms/src/main/java/com/volcengine/kms/model/GenerateDataKeyRequest.java

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
import com.google.gson.stream.JsonWriter;
2222
import io.swagger.v3.oas.annotations.media.Schema;
2323
import java.io.IOException;
24+
import java.util.HashMap;
25+
import java.util.List;
26+
import java.util.Map;
2427
import javax.validation.constraints.*;
2528
import javax.validation.Valid;
2629
/**
@@ -31,7 +34,7 @@
3134

3235
public class GenerateDataKeyRequest {
3336
@SerializedName("EncryptionContext")
34-
private String encryptionContext = null;
37+
private Map<String, String> encryptionContext = null;
3538

3639
@SerializedName("KeyID")
3740
private String keyID = null;
@@ -45,21 +48,29 @@ public class GenerateDataKeyRequest {
4548
@SerializedName("NumberOfBytes")
4649
private Integer numberOfBytes = null;
4750

48-
public GenerateDataKeyRequest encryptionContext(String encryptionContext) {
51+
public GenerateDataKeyRequest encryptionContext(Map<String, String> encryptionContext) {
4952
this.encryptionContext = encryptionContext;
5053
return this;
5154
}
5255

56+
public GenerateDataKeyRequest putEncryptionContextItem(String key, String encryptionContextItem) {
57+
if (this.encryptionContext == null) {
58+
this.encryptionContext = new HashMap<String, String>();
59+
}
60+
this.encryptionContext.put(key, encryptionContextItem);
61+
return this;
62+
}
63+
5364
/**
5465
* Get encryptionContext
5566
* @return encryptionContext
5667
**/
5768
@Schema(description = "")
58-
public String getEncryptionContext() {
69+
public Map<String, String> getEncryptionContext() {
5970
return encryptionContext;
6071
}
6172

62-
public void setEncryptionContext(String encryptionContext) {
73+
public void setEncryptionContext(Map<String, String> encryptionContext) {
6374
this.encryptionContext = encryptionContext;
6475
}
6576

volcengine-java-sdk-kms/src/main/java/com/volcengine/kms/model/ReEncryptRequest.java

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
import com.google.gson.stream.JsonWriter;
2222
import io.swagger.v3.oas.annotations.media.Schema;
2323
import java.io.IOException;
24+
import java.util.HashMap;
25+
import java.util.List;
26+
import java.util.Map;
2427
import javax.validation.constraints.*;
2528
import javax.validation.Valid;
2629
/**
@@ -34,7 +37,7 @@ public class ReEncryptRequest {
3437
private String ciphertextBlob = null;
3538

3639
@SerializedName("NewEncryptionContext")
37-
private String newEncryptionContext = null;
40+
private Map<String, String> newEncryptionContext = null;
3841

3942
@SerializedName("NewKeyName")
4043
private String newKeyName = null;
@@ -43,7 +46,7 @@ public class ReEncryptRequest {
4346
private String newKeyringName = null;
4447

4548
@SerializedName("OldEncryptionContext")
46-
private String oldEncryptionContext = null;
49+
private Map<String, String> oldEncryptionContext = null;
4750

4851
public ReEncryptRequest ciphertextBlob(String ciphertextBlob) {
4952
this.ciphertextBlob = ciphertextBlob;
@@ -64,21 +67,29 @@ public void setCiphertextBlob(String ciphertextBlob) {
6467
this.ciphertextBlob = ciphertextBlob;
6568
}
6669

67-
public ReEncryptRequest newEncryptionContext(String newEncryptionContext) {
70+
public ReEncryptRequest newEncryptionContext(Map<String, String> newEncryptionContext) {
6871
this.newEncryptionContext = newEncryptionContext;
6972
return this;
7073
}
7174

75+
public ReEncryptRequest putNewEncryptionContextItem(String key, String newEncryptionContextItem) {
76+
if (this.newEncryptionContext == null) {
77+
this.newEncryptionContext = new HashMap<String, String>();
78+
}
79+
this.newEncryptionContext.put(key, newEncryptionContextItem);
80+
return this;
81+
}
82+
7283
/**
7384
* Get newEncryptionContext
7485
* @return newEncryptionContext
7586
**/
7687
@Schema(description = "")
77-
public String getNewEncryptionContext() {
88+
public Map<String, String> getNewEncryptionContext() {
7889
return newEncryptionContext;
7990
}
8091

81-
public void setNewEncryptionContext(String newEncryptionContext) {
92+
public void setNewEncryptionContext(Map<String, String> newEncryptionContext) {
8293
this.newEncryptionContext = newEncryptionContext;
8394
}
8495

@@ -120,21 +131,29 @@ public void setNewKeyringName(String newKeyringName) {
120131
this.newKeyringName = newKeyringName;
121132
}
122133

123-
public ReEncryptRequest oldEncryptionContext(String oldEncryptionContext) {
134+
public ReEncryptRequest oldEncryptionContext(Map<String, String> oldEncryptionContext) {
124135
this.oldEncryptionContext = oldEncryptionContext;
125136
return this;
126137
}
127138

139+
public ReEncryptRequest putOldEncryptionContextItem(String key, String oldEncryptionContextItem) {
140+
if (this.oldEncryptionContext == null) {
141+
this.oldEncryptionContext = new HashMap<String, String>();
142+
}
143+
this.oldEncryptionContext.put(key, oldEncryptionContextItem);
144+
return this;
145+
}
146+
128147
/**
129148
* Get oldEncryptionContext
130149
* @return oldEncryptionContext
131150
**/
132151
@Schema(description = "")
133-
public String getOldEncryptionContext() {
152+
public Map<String, String> getOldEncryptionContext() {
134153
return oldEncryptionContext;
135154
}
136155

137-
public void setOldEncryptionContext(String oldEncryptionContext) {
156+
public void setOldEncryptionContext(Map<String, String> oldEncryptionContext) {
138157
this.oldEncryptionContext = oldEncryptionContext;
139158
}
140159

0 commit comments

Comments
 (0)