Skip to content

Commit 52f7c65

Browse files
author
Lucas McDonald
committedApr 17, 2025·

File tree

5 files changed

+53
-37
lines changed

5 files changed

+53
-37
lines changed
 

‎DynamoDbEncryption/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/dbencryptionsdk/dynamodb/model/BeaconVersion.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class BeaconVersion {
1515
/**
1616
* The version of searchable encryption configured. This must be '1'.
1717
*/
18-
private final Integer version;
18+
private final int version;
1919

2020
/**
2121
* The Key Store that contains the Beacon Keys to use with searchable encryption.
@@ -66,7 +66,7 @@ protected BeaconVersion(BuilderImpl builder) {
6666
/**
6767
* @return The version of searchable encryption configured. This must be '1'.
6868
*/
69-
public Integer version() {
69+
public int version() {
7070
return this.version;
7171
}
7272

@@ -131,12 +131,12 @@ public interface Builder {
131131
/**
132132
* @param version The version of searchable encryption configured. This must be '1'.
133133
*/
134-
Builder version(Integer version);
134+
Builder version(int version);
135135

136136
/**
137137
* @return The version of searchable encryption configured. This must be '1'.
138138
*/
139-
Integer version();
139+
int version();
140140

141141
/**
142142
* @param keyStore The Key Store that contains the Beacon Keys to use with searchable encryption.
@@ -213,7 +213,9 @@ public interface Builder {
213213

214214
static class BuilderImpl implements Builder {
215215

216-
protected Integer version;
216+
protected int version;
217+
218+
private boolean _versionSet = false;
217219

218220
protected KeyStore keyStore;
219221

@@ -233,6 +235,7 @@ protected BuilderImpl() {}
233235

234236
protected BuilderImpl(BeaconVersion model) {
235237
this.version = model.version();
238+
this._versionSet = true;
236239
this.keyStore = model.keyStore();
237240
this.keySource = model.keySource();
238241
this.standardBeacons = model.standardBeacons();
@@ -242,12 +245,13 @@ protected BuilderImpl(BeaconVersion model) {
242245
this.signedParts = model.signedParts();
243246
}
244247

245-
public Builder version(Integer version) {
248+
public Builder version(int version) {
246249
this.version = version;
250+
this._versionSet = true;
247251
return this;
248252
}
249253

250-
public Integer version() {
254+
public int version() {
251255
return this.version;
252256
}
253257

@@ -315,12 +319,12 @@ public List<SignedPart> signedParts() {
315319
}
316320

317321
public BeaconVersion build() {
318-
if (Objects.isNull(this.version())) {
322+
if (!this._versionSet) {
319323
throw new IllegalArgumentException(
320324
"Missing value for required field `version`"
321325
);
322326
}
323-
if (Objects.nonNull(this.version()) && this.version() < 1) {
327+
if (this._versionSet && this.version() < 1) {
324328
throw new IllegalArgumentException(
325329
"`version` must be greater than or equal to 1"
326330
);

‎DynamoDbEncryption/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/dbencryptionsdk/dynamodb/model/SearchConfig.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class SearchConfig {
1919
/**
2020
* The searchable encryption version to use when writing new items. Must be '1'.
2121
*/
22-
private final Integer writeVersion;
22+
private final int writeVersion;
2323

2424
protected SearchConfig(BuilderImpl builder) {
2525
this.versions = builder.versions();
@@ -36,7 +36,7 @@ public List<BeaconVersion> versions() {
3636
/**
3737
* @return The searchable encryption version to use when writing new items. Must be '1'.
3838
*/
39-
public Integer writeVersion() {
39+
public int writeVersion() {
4040
return this.writeVersion;
4141
}
4242

@@ -62,12 +62,12 @@ public interface Builder {
6262
/**
6363
* @param writeVersion The searchable encryption version to use when writing new items. Must be '1'.
6464
*/
65-
Builder writeVersion(Integer writeVersion);
65+
Builder writeVersion(int writeVersion);
6666

6767
/**
6868
* @return The searchable encryption version to use when writing new items. Must be '1'.
6969
*/
70-
Integer writeVersion();
70+
int writeVersion();
7171

7272
SearchConfig build();
7373
}
@@ -76,13 +76,16 @@ static class BuilderImpl implements Builder {
7676

7777
protected List<BeaconVersion> versions;
7878

79-
protected Integer writeVersion;
79+
protected int writeVersion;
80+
81+
private boolean _writeVersionSet = false;
8082

8183
protected BuilderImpl() {}
8284

8385
protected BuilderImpl(SearchConfig model) {
8486
this.versions = model.versions();
8587
this.writeVersion = model.writeVersion();
88+
this._writeVersionSet = true;
8689
}
8790

8891
public Builder versions(List<BeaconVersion> versions) {
@@ -94,12 +97,13 @@ public List<BeaconVersion> versions() {
9497
return this.versions;
9598
}
9699

97-
public Builder writeVersion(Integer writeVersion) {
100+
public Builder writeVersion(int writeVersion) {
98101
this.writeVersion = writeVersion;
102+
this._writeVersionSet = true;
99103
return this;
100104
}
101105

102-
public Integer writeVersion() {
106+
public int writeVersion() {
103107
return this.writeVersion;
104108
}
105109

@@ -119,12 +123,12 @@ public SearchConfig build() {
119123
"The size of `versions` must be less than or equal to 1"
120124
);
121125
}
122-
if (Objects.isNull(this.writeVersion())) {
126+
if (!this._writeVersionSet) {
123127
throw new IllegalArgumentException(
124128
"Missing value for required field `writeVersion`"
125129
);
126130
}
127-
if (Objects.nonNull(this.writeVersion()) && this.writeVersion() < 1) {
131+
if (this._writeVersionSet && this.writeVersion() < 1) {
128132
throw new IllegalArgumentException(
129133
"`writeVersion` must be greater than or equal to 1"
130134
);

‎DynamoDbEncryption/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/dbencryptionsdk/dynamodb/model/StandardBeacon.java

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class StandardBeacon {
1818
/**
1919
* The length of the calculated beacon.
2020
*/
21-
private final Integer length;
21+
private final int length;
2222

2323
/**
2424
* The DynamoDB document path to the value this beacon will calculate over. If not specified, the beacon will calculate values for the attribute with the name specified in 'name'.
@@ -47,7 +47,7 @@ public String name() {
4747
/**
4848
* @return The length of the calculated beacon.
4949
*/
50-
public Integer length() {
50+
public int length() {
5151
return this.length;
5252
}
5353

@@ -87,12 +87,12 @@ public interface Builder {
8787
/**
8888
* @param length The length of the calculated beacon.
8989
*/
90-
Builder length(Integer length);
90+
Builder length(int length);
9191

9292
/**
9393
* @return The length of the calculated beacon.
9494
*/
95-
Integer length();
95+
int length();
9696

9797
/**
9898
* @param loc The DynamoDB document path to the value this beacon will calculate over. If not specified, the beacon will calculate values for the attribute with the name specified in 'name'.
@@ -121,7 +121,9 @@ static class BuilderImpl implements Builder {
121121

122122
protected String name;
123123

124-
protected Integer length;
124+
protected int length;
125+
126+
private boolean _lengthSet = false;
125127

126128
protected String loc;
127129

@@ -132,6 +134,7 @@ protected BuilderImpl() {}
132134
protected BuilderImpl(StandardBeacon model) {
133135
this.name = model.name();
134136
this.length = model.length();
137+
this._lengthSet = true;
135138
this.loc = model.loc();
136139
this.style = model.style();
137140
}
@@ -145,12 +148,13 @@ public String name() {
145148
return this.name;
146149
}
147150

148-
public Builder length(Integer length) {
151+
public Builder length(int length) {
149152
this.length = length;
153+
this._lengthSet = true;
150154
return this;
151155
}
152156

153-
public Integer length() {
157+
public int length() {
154158
return this.length;
155159
}
156160

@@ -178,17 +182,17 @@ public StandardBeacon build() {
178182
"Missing value for required field `name`"
179183
);
180184
}
181-
if (Objects.isNull(this.length())) {
185+
if (!this._lengthSet) {
182186
throw new IllegalArgumentException(
183187
"Missing value for required field `length`"
184188
);
185189
}
186-
if (Objects.nonNull(this.length()) && this.length() < 1) {
190+
if (this._lengthSet && this.length() < 1) {
187191
throw new IllegalArgumentException(
188192
"`length` must be greater than or equal to 1"
189193
);
190194
}
191-
if (Objects.nonNull(this.length()) && this.length() > 63) {
195+
if (this._lengthSet && this.length() > 63) {
192196
throw new IllegalArgumentException(
193197
"`length` must be less than or equal to 63."
194198
);

‎DynamoDbEncryption/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/dbencryptionsdk/dynamodb/transforms/model/ResolveAttributesInput.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class ResolveAttributesInput {
2222
/**
2323
* The beacon version to use. Defaults to 'writeVersion'.
2424
*/
25-
private final Integer Version;
25+
private final int Version;
2626

2727
protected ResolveAttributesInput(BuilderImpl builder) {
2828
this.TableName = builder.TableName();
@@ -47,7 +47,7 @@ public Map<String, AttributeValue> Item() {
4747
/**
4848
* @return The beacon version to use. Defaults to 'writeVersion'.
4949
*/
50-
public Integer Version() {
50+
public int Version() {
5151
return this.Version;
5252
}
5353

@@ -83,12 +83,12 @@ public interface Builder {
8383
/**
8484
* @param Version The beacon version to use. Defaults to 'writeVersion'.
8585
*/
86-
Builder Version(Integer Version);
86+
Builder Version(int Version);
8787

8888
/**
8989
* @return The beacon version to use. Defaults to 'writeVersion'.
9090
*/
91-
Integer Version();
91+
int Version();
9292

9393
ResolveAttributesInput build();
9494
}
@@ -99,14 +99,17 @@ static class BuilderImpl implements Builder {
9999

100100
protected Map<String, AttributeValue> Item;
101101

102-
protected Integer Version;
102+
protected int Version;
103+
104+
private boolean _VersionSet = false;
103105

104106
protected BuilderImpl() {}
105107

106108
protected BuilderImpl(ResolveAttributesInput model) {
107109
this.TableName = model.TableName();
108110
this.Item = model.Item();
109111
this.Version = model.Version();
112+
this._VersionSet = true;
110113
}
111114

112115
public Builder TableName(String TableName) {
@@ -127,12 +130,13 @@ public Map<String, AttributeValue> Item() {
127130
return this.Item;
128131
}
129132

130-
public Builder Version(Integer Version) {
133+
public Builder Version(int Version) {
131134
this.Version = Version;
135+
this._VersionSet = true;
132136
return this;
133137
}
134138

135-
public Integer Version() {
139+
public int Version() {
136140
return this.Version;
137141
}
138142

@@ -159,7 +163,7 @@ public ResolveAttributesInput build() {
159163
"Missing value for required field `Item`"
160164
);
161165
}
162-
if (Objects.nonNull(this.Version()) && this.Version() < 1) {
166+
if (this._VersionSet && this.Version() < 1) {
163167
throw new IllegalArgumentException(
164168
"`Version` must be greater than or equal to 1"
165169
);

0 commit comments

Comments
 (0)
Please sign in to comment.