Skip to content

Commit 08e66de

Browse files
committed
build(codegen): updating SDK
1 parent 23c7131 commit 08e66de

22 files changed

+1286
-31
lines changed

changes.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@
217217
<details>
218218
<summary>Added Property(s)</summary>
219219

220+
- added property `retentionPolicy` to type `ImportContainer`
221+
- added property `expiresAt` to type `ImportContainer`
222+
- added property `retentionPolicy` to type `ImportContainerDraft`
220223
- added property `attributes` to type `ProductImport`
221224
- added property `attributes` to type `ProductDraftImport`
222225
- added property `level` to type `AttributeDefinition`
@@ -226,6 +229,10 @@
226229
<details>
227230
<summary>Added Type(s)</summary>
228231

232+
- added type `StrategyEnum`
233+
- added type `RetentionPolicy`
234+
- added type `TimeToLiveConfig`
235+
- added type `TimeToLiveRetentionPolicy`
229236
- added type `AttributeLevel`
230237
</details>
231238

commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importcontainers/ImportContainer.java

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import io.vrap.rmf.base.client.utils.Generated;
1616

17+
import jakarta.validation.Valid;
1718
import jakarta.validation.constraints.NotNull;
1819

1920
/**
@@ -37,7 +38,7 @@
3738
public interface ImportContainer {
3839

3940
/**
40-
* <p>User-defined unique identifier for the ImportContainer. Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -).</p>
41+
* <p>User-defined unique identifier for the ImportContainer.</p>
4142
* @return key
4243
*/
4344
@NotNull
@@ -61,23 +62,39 @@ public interface ImportContainer {
6162
public Long getVersion();
6263

6364
/**
64-
* <p>The time when the ImportContainer was created.</p>
65+
* <p>The retention policy of the ImportContainer.</p>
66+
* @return retentionPolicy
67+
*/
68+
@Valid
69+
@JsonProperty("retentionPolicy")
70+
public RetentionPolicy getRetentionPolicy();
71+
72+
/**
73+
* <p>Date and time (UTC) the ImportContainer was initially created.</p>
6574
* @return createdAt
6675
*/
6776
@NotNull
6877
@JsonProperty("createdAt")
6978
public ZonedDateTime getCreatedAt();
7079

7180
/**
72-
* <p>The last time when the ImportContainer was modified.</p>
81+
* <p>Date and time (UTC) the ImportContainer was last updated.</p>
7382
* @return lastModifiedAt
7483
*/
7584
@NotNull
7685
@JsonProperty("lastModifiedAt")
7786
public ZonedDateTime getLastModifiedAt();
7887

7988
/**
80-
* <p>User-defined unique identifier for the ImportContainer. Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -).</p>
89+
* <p>Date and time (UTC) the ImportContainer is automatically deleted. Only present if a <code>retentionPolicy</code> is set. ImportContainers without <code>expiresAt</code> are permanent until manually deleted.</p>
90+
* @return expiresAt
91+
*/
92+
93+
@JsonProperty("expiresAt")
94+
public ZonedDateTime getExpiresAt();
95+
96+
/**
97+
* <p>User-defined unique identifier for the ImportContainer.</p>
8198
* @param key value to be set
8299
*/
83100

@@ -98,19 +115,33 @@ public interface ImportContainer {
98115
public void setVersion(final Long version);
99116

100117
/**
101-
* <p>The time when the ImportContainer was created.</p>
118+
* <p>The retention policy of the ImportContainer.</p>
119+
* @param retentionPolicy value to be set
120+
*/
121+
122+
public void setRetentionPolicy(final RetentionPolicy retentionPolicy);
123+
124+
/**
125+
* <p>Date and time (UTC) the ImportContainer was initially created.</p>
102126
* @param createdAt value to be set
103127
*/
104128

105129
public void setCreatedAt(final ZonedDateTime createdAt);
106130

107131
/**
108-
* <p>The last time when the ImportContainer was modified.</p>
132+
* <p>Date and time (UTC) the ImportContainer was last updated.</p>
109133
* @param lastModifiedAt value to be set
110134
*/
111135

112136
public void setLastModifiedAt(final ZonedDateTime lastModifiedAt);
113137

138+
/**
139+
* <p>Date and time (UTC) the ImportContainer is automatically deleted. Only present if a <code>retentionPolicy</code> is set. ImportContainers without <code>expiresAt</code> are permanent until manually deleted.</p>
140+
* @param expiresAt value to be set
141+
*/
142+
143+
public void setExpiresAt(final ZonedDateTime expiresAt);
144+
114145
/**
115146
* factory method
116147
* @return instance of ImportContainer
@@ -129,8 +160,10 @@ public static ImportContainer of(final ImportContainer template) {
129160
instance.setKey(template.getKey());
130161
instance.setResourceType(template.getResourceType());
131162
instance.setVersion(template.getVersion());
163+
instance.setRetentionPolicy(template.getRetentionPolicy());
132164
instance.setCreatedAt(template.getCreatedAt());
133165
instance.setLastModifiedAt(template.getLastModifiedAt());
166+
instance.setExpiresAt(template.getExpiresAt());
134167
return instance;
135168
}
136169

@@ -150,8 +183,11 @@ public static ImportContainer deepCopy(@Nullable final ImportContainer template)
150183
instance.setKey(template.getKey());
151184
instance.setResourceType(template.getResourceType());
152185
instance.setVersion(template.getVersion());
186+
instance.setRetentionPolicy(com.commercetools.importapi.models.importcontainers.RetentionPolicy
187+
.deepCopy(template.getRetentionPolicy()));
153188
instance.setCreatedAt(template.getCreatedAt());
154189
instance.setLastModifiedAt(template.getLastModifiedAt());
190+
instance.setExpiresAt(template.getExpiresAt());
155191
return instance;
156192
}
157193

commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importcontainers/ImportContainerBuilder.java

Lines changed: 76 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
package com.commercetools.importapi.models.importcontainers;
33

44
import java.util.*;
5+
import java.util.function.Function;
56

67
import javax.annotation.Nullable;
78

@@ -33,12 +34,18 @@ public class ImportContainerBuilder implements Builder<ImportContainer> {
3334

3435
private Long version;
3536

37+
@Nullable
38+
private com.commercetools.importapi.models.importcontainers.RetentionPolicy retentionPolicy;
39+
3640
private java.time.ZonedDateTime createdAt;
3741

3842
private java.time.ZonedDateTime lastModifiedAt;
3943

44+
@Nullable
45+
private java.time.ZonedDateTime expiresAt;
46+
4047
/**
41-
* <p>User-defined unique identifier for the ImportContainer. Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -).</p>
48+
* <p>User-defined unique identifier for the ImportContainer.</p>
4249
* @param key value to be set
4350
* @return Builder
4451
*/
@@ -72,7 +79,33 @@ public ImportContainerBuilder version(final Long version) {
7279
}
7380

7481
/**
75-
* <p>The time when the ImportContainer was created.</p>
82+
* <p>The retention policy of the ImportContainer.</p>
83+
* @param retentionPolicy value to be set
84+
* @return Builder
85+
*/
86+
87+
public ImportContainerBuilder retentionPolicy(
88+
@Nullable final com.commercetools.importapi.models.importcontainers.RetentionPolicy retentionPolicy) {
89+
this.retentionPolicy = retentionPolicy;
90+
return this;
91+
}
92+
93+
/**
94+
* <p>The retention policy of the ImportContainer.</p>
95+
* @param builder function to build the retentionPolicy value
96+
* @return Builder
97+
*/
98+
99+
public ImportContainerBuilder retentionPolicy(
100+
Function<com.commercetools.importapi.models.importcontainers.RetentionPolicyBuilder, Builder<? extends com.commercetools.importapi.models.importcontainers.RetentionPolicy>> builder) {
101+
this.retentionPolicy = builder
102+
.apply(com.commercetools.importapi.models.importcontainers.RetentionPolicyBuilder.of())
103+
.build();
104+
return this;
105+
}
106+
107+
/**
108+
* <p>Date and time (UTC) the ImportContainer was initially created.</p>
76109
* @param createdAt value to be set
77110
* @return Builder
78111
*/
@@ -83,7 +116,7 @@ public ImportContainerBuilder createdAt(final java.time.ZonedDateTime createdAt)
83116
}
84117

85118
/**
86-
* <p>The last time when the ImportContainer was modified.</p>
119+
* <p>Date and time (UTC) the ImportContainer was last updated.</p>
87120
* @param lastModifiedAt value to be set
88121
* @return Builder
89122
*/
@@ -94,7 +127,18 @@ public ImportContainerBuilder lastModifiedAt(final java.time.ZonedDateTime lastM
94127
}
95128

96129
/**
97-
* <p>User-defined unique identifier for the ImportContainer. Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -).</p>
130+
* <p>Date and time (UTC) the ImportContainer is automatically deleted. Only present if a <code>retentionPolicy</code> is set. ImportContainers without <code>expiresAt</code> are permanent until manually deleted.</p>
131+
* @param expiresAt value to be set
132+
* @return Builder
133+
*/
134+
135+
public ImportContainerBuilder expiresAt(@Nullable final java.time.ZonedDateTime expiresAt) {
136+
this.expiresAt = expiresAt;
137+
return this;
138+
}
139+
140+
/**
141+
* <p>User-defined unique identifier for the ImportContainer.</p>
98142
* @return key
99143
*/
100144

@@ -122,7 +166,17 @@ public Long getVersion() {
122166
}
123167

124168
/**
125-
* <p>The time when the ImportContainer was created.</p>
169+
* <p>The retention policy of the ImportContainer.</p>
170+
* @return retentionPolicy
171+
*/
172+
173+
@Nullable
174+
public com.commercetools.importapi.models.importcontainers.RetentionPolicy getRetentionPolicy() {
175+
return this.retentionPolicy;
176+
}
177+
178+
/**
179+
* <p>Date and time (UTC) the ImportContainer was initially created.</p>
126180
* @return createdAt
127181
*/
128182

@@ -131,14 +185,24 @@ public java.time.ZonedDateTime getCreatedAt() {
131185
}
132186

133187
/**
134-
* <p>The last time when the ImportContainer was modified.</p>
188+
* <p>Date and time (UTC) the ImportContainer was last updated.</p>
135189
* @return lastModifiedAt
136190
*/
137191

138192
public java.time.ZonedDateTime getLastModifiedAt() {
139193
return this.lastModifiedAt;
140194
}
141195

196+
/**
197+
* <p>Date and time (UTC) the ImportContainer is automatically deleted. Only present if a <code>retentionPolicy</code> is set. ImportContainers without <code>expiresAt</code> are permanent until manually deleted.</p>
198+
* @return expiresAt
199+
*/
200+
201+
@Nullable
202+
public java.time.ZonedDateTime getExpiresAt() {
203+
return this.expiresAt;
204+
}
205+
142206
/**
143207
* builds ImportContainer with checking for non-null required values
144208
* @return ImportContainer
@@ -148,15 +212,17 @@ public ImportContainer build() {
148212
Objects.requireNonNull(version, ImportContainer.class + ": version is missing");
149213
Objects.requireNonNull(createdAt, ImportContainer.class + ": createdAt is missing");
150214
Objects.requireNonNull(lastModifiedAt, ImportContainer.class + ": lastModifiedAt is missing");
151-
return new ImportContainerImpl(key, resourceType, version, createdAt, lastModifiedAt);
215+
return new ImportContainerImpl(key, resourceType, version, retentionPolicy, createdAt, lastModifiedAt,
216+
expiresAt);
152217
}
153218

154219
/**
155220
* builds ImportContainer without checking for non-null required values
156221
* @return ImportContainer
157222
*/
158223
public ImportContainer buildUnchecked() {
159-
return new ImportContainerImpl(key, resourceType, version, createdAt, lastModifiedAt);
224+
return new ImportContainerImpl(key, resourceType, version, retentionPolicy, createdAt, lastModifiedAt,
225+
expiresAt);
160226
}
161227

162228
/**
@@ -177,8 +243,10 @@ public static ImportContainerBuilder of(final ImportContainer template) {
177243
builder.key = template.getKey();
178244
builder.resourceType = template.getResourceType();
179245
builder.version = template.getVersion();
246+
builder.retentionPolicy = template.getRetentionPolicy();
180247
builder.createdAt = template.getCreatedAt();
181248
builder.lastModifiedAt = template.getLastModifiedAt();
249+
builder.expiresAt = template.getExpiresAt();
182250
return builder;
183251
}
184252

commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importcontainers/ImportContainerDraft.java

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import io.vrap.rmf.base.client.utils.Generated;
1515

16+
import jakarta.validation.Valid;
1617
import jakarta.validation.constraints.NotNull;
1718

1819
/**
@@ -33,7 +34,7 @@
3334
public interface ImportContainerDraft extends io.vrap.rmf.base.client.Draft<ImportContainerDraft> {
3435

3536
/**
36-
* <p>User-defined unique identifier of the ImportContainer. Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -).</p>
37+
* <p>User-defined unique identifier of the ImportContainer.</p>
3738
* @return key
3839
*/
3940
@NotNull
@@ -49,7 +50,15 @@ public interface ImportContainerDraft extends io.vrap.rmf.base.client.Draft<Impo
4950
public ImportResourceType getResourceType();
5051

5152
/**
52-
* <p>User-defined unique identifier of the ImportContainer. Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -).</p>
53+
* <p>Set a retention policy to automatically delete the ImportContainer after a defined period.</p>
54+
* @return retentionPolicy
55+
*/
56+
@Valid
57+
@JsonProperty("retentionPolicy")
58+
public RetentionPolicy getRetentionPolicy();
59+
60+
/**
61+
* <p>User-defined unique identifier of the ImportContainer.</p>
5362
* @param key value to be set
5463
*/
5564

@@ -62,6 +71,13 @@ public interface ImportContainerDraft extends io.vrap.rmf.base.client.Draft<Impo
6271

6372
public void setResourceType(final ImportResourceType resourceType);
6473

74+
/**
75+
* <p>Set a retention policy to automatically delete the ImportContainer after a defined period.</p>
76+
* @param retentionPolicy value to be set
77+
*/
78+
79+
public void setRetentionPolicy(final RetentionPolicy retentionPolicy);
80+
6581
/**
6682
* factory method
6783
* @return instance of ImportContainerDraft
@@ -79,6 +95,7 @@ public static ImportContainerDraft of(final ImportContainerDraft template) {
7995
ImportContainerDraftImpl instance = new ImportContainerDraftImpl();
8096
instance.setKey(template.getKey());
8197
instance.setResourceType(template.getResourceType());
98+
instance.setRetentionPolicy(template.getRetentionPolicy());
8299
return instance;
83100
}
84101

@@ -97,6 +114,8 @@ public static ImportContainerDraft deepCopy(@Nullable final ImportContainerDraft
97114
ImportContainerDraftImpl instance = new ImportContainerDraftImpl();
98115
instance.setKey(template.getKey());
99116
instance.setResourceType(template.getResourceType());
117+
instance.setRetentionPolicy(com.commercetools.importapi.models.importcontainers.RetentionPolicy
118+
.deepCopy(template.getRetentionPolicy()));
100119
return instance;
101120
}
102121

0 commit comments

Comments
 (0)