Skip to content

Commit 082f5b8

Browse files
committed
build(codegen): updating SDK
1 parent f7ace43 commit 082f5b8

File tree

15 files changed

+500
-43
lines changed

15 files changed

+500
-43
lines changed

changes.md

+2-36
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,8 @@
1-
**Api changes**
2-
3-
<details>
4-
<summary>Added Property(s)</summary>
5-
6-
- added property `warnings` to type `ProductTailoring`
7-
- added property `attributes` to type `ProductVariantTailoring`
8-
- added property `attributes` to type `ProductVariantTailoringDraft`
9-
- added property `attributes` to type `ProductTailoringAddVariantAction`
10-
- added property `warnings` to type `Product`
11-
- added property `customers` to type `SearchIndexingConfiguration`
12-
</details>
13-
1+
**Import changes**
142

153
<details>
164
<summary>Added Type(s)</summary>
175

18-
- added type `SearchNotReadyError`
19-
- added type `GraphQLSearchNotReadyError`
20-
- added type `ProductTailoringAttribute`
21-
- added type `ProductTailoringSetAttributeAction`
22-
- added type `ProductTailoringSetAttributeInAllVariantsAction`
23-
- added type `ImageProcessingOngoingWarning`
24-
- added type `WarningObject`
25-
</details>
26-
27-
28-
<details>
29-
<summary>Removed Type(s)</summary>
30-
31-
- :warning: removed type `ProductSearchStatus`
32-
</details>
33-
34-
35-
<details>
36-
<summary>Added Enum(s)</summary>
37-
38-
- added enum `customer-group` to type `ExtensionResourceTypeId`
39-
- added enum `product-tailoring` to type `MessageSubscriptionResourceTypeId`
40-
- added enum `product-tailoring` to type `ResourceTypeId`
6+
- added type `InvalidFieldsUpdateError`
417
</details>
428

commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImport.java

+2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public interface DiscountCodeImport extends ImportResource {
6767

6868
/**
6969
* <p>User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.</p>
70+
* <p>The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.</p>
7071
* @return code
7172
*/
7273
@NotNull
@@ -169,6 +170,7 @@ public interface DiscountCodeImport extends ImportResource {
169170

170171
/**
171172
* <p>User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.</p>
173+
* <p>The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.</p>
172174
* @param code value to be set
173175
*/
174176

commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportBuilder.java

+2
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ public DiscountCodeImportBuilder description(
147147

148148
/**
149149
* <p>User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.</p>
150+
* <p>The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.</p>
150151
* @param code value to be set
151152
* @return Builder
152153
*/
@@ -418,6 +419,7 @@ public com.commercetools.importapi.models.common.LocalizedString getDescription(
418419

419420
/**
420421
* <p>User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.</p>
422+
* <p>The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.</p>
421423
* @return code
422424
*/
423425

commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportImpl.java

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public com.commercetools.importapi.models.common.LocalizedString getDescription(
111111

112112
/**
113113
* <p>User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.</p>
114+
* <p>The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.</p>
114115
*/
115116

116117
public String getCode() {

commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObject.java

+13
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InsufficientScopeErrorImpl.class, name = InsufficientScopeError.INSUFFICIENT_SCOPE),
4040
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidCredentialsErrorImpl.class, name = InvalidCredentialsError.INVALID_CREDENTIALS),
4141
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidFieldErrorImpl.class, name = InvalidFieldError.INVALID_FIELD),
42+
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidFieldsUpdateErrorImpl.class, name = InvalidFieldsUpdateError.INVALID_FIELD_UPDATE),
4243
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidInputImpl.class, name = InvalidInput.INVALID_INPUT),
4344
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidJsonInputImpl.class, name = InvalidJsonInput.INVALID_JSON_INPUT),
4445
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidOperationImpl.class, name = InvalidOperation.INVALID_OPERATION),
@@ -133,6 +134,10 @@ public static ErrorObject deepCopy(@Nullable final ErrorObject template) {
133134
return com.commercetools.importapi.models.errors.InvalidFieldError
134135
.deepCopy((com.commercetools.importapi.models.errors.InvalidFieldError) template);
135136
}
137+
if (template instanceof com.commercetools.importapi.models.errors.InvalidFieldsUpdateError) {
138+
return com.commercetools.importapi.models.errors.InvalidFieldsUpdateError
139+
.deepCopy((com.commercetools.importapi.models.errors.InvalidFieldsUpdateError) template);
140+
}
136141
if (template instanceof com.commercetools.importapi.models.errors.InvalidInput) {
137142
return com.commercetools.importapi.models.errors.InvalidInput
138143
.deepCopy((com.commercetools.importapi.models.errors.InvalidInput) template);
@@ -274,6 +279,14 @@ public static com.commercetools.importapi.models.errors.InvalidFieldErrorBuilder
274279
return com.commercetools.importapi.models.errors.InvalidFieldErrorBuilder.of();
275280
}
276281

282+
/**
283+
* builder for invalidFieldUpdate subtype
284+
* @return builder
285+
*/
286+
public static com.commercetools.importapi.models.errors.InvalidFieldsUpdateErrorBuilder invalidFieldUpdateBuilder() {
287+
return com.commercetools.importapi.models.errors.InvalidFieldsUpdateErrorBuilder.of();
288+
}
289+
277290
/**
278291
* builder for invalidInput subtype
279292
* @return builder

commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObjectBuilder.java

+4
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ public com.commercetools.importapi.models.errors.InvalidFieldErrorBuilder invali
5555
return com.commercetools.importapi.models.errors.InvalidFieldErrorBuilder.of();
5656
}
5757

58+
public com.commercetools.importapi.models.errors.InvalidFieldsUpdateErrorBuilder invalidFieldUpdateBuilder() {
59+
return com.commercetools.importapi.models.errors.InvalidFieldsUpdateErrorBuilder.of();
60+
}
61+
5862
public com.commercetools.importapi.models.errors.InvalidInputBuilder invalidInputBuilder() {
5963
return com.commercetools.importapi.models.errors.InvalidInputBuilder.of();
6064
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
2+
package com.commercetools.importapi.models.errors;
3+
4+
import java.time.*;
5+
import java.util.*;
6+
import java.util.function.Function;
7+
8+
import javax.annotation.Nullable;
9+
10+
import com.fasterxml.jackson.annotation.*;
11+
import com.fasterxml.jackson.databind.annotation.*;
12+
13+
import io.vrap.rmf.base.client.utils.Generated;
14+
15+
import jakarta.validation.constraints.NotNull;
16+
17+
/**
18+
* <p>Returned when a field cannot be updated.</p>
19+
*
20+
* <hr>
21+
* Example to create an instance using the builder pattern
22+
* <div class=code-example>
23+
* <pre><code class='java'>
24+
* InvalidFieldsUpdateError invalidFieldsUpdateError = InvalidFieldsUpdateError.builder()
25+
* .message("{message}")
26+
* .plusFields(fieldsBuilder -> fieldsBuilder)
27+
* .build()
28+
* </code></pre>
29+
* </div>
30+
*/
31+
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
32+
@JsonDeserialize(as = InvalidFieldsUpdateErrorImpl.class)
33+
public interface InvalidFieldsUpdateError extends ErrorObject {
34+
35+
/**
36+
* discriminator value for InvalidFieldsUpdateError
37+
*/
38+
String INVALID_FIELD_UPDATE = "InvalidFieldUpdate";
39+
40+
/**
41+
* <p><code>"The following fields are currently not supported for changes/updates"</code></p>
42+
* @return message
43+
*/
44+
@NotNull
45+
@JsonProperty("message")
46+
public String getMessage();
47+
48+
/**
49+
* <p>Fields that cannot be updated.</p>
50+
* @return fields
51+
*/
52+
@NotNull
53+
@JsonProperty("fields")
54+
public List<String> getFields();
55+
56+
/**
57+
* <p><code>"The following fields are currently not supported for changes/updates"</code></p>
58+
* @param message value to be set
59+
*/
60+
61+
public void setMessage(final String message);
62+
63+
/**
64+
* <p>Fields that cannot be updated.</p>
65+
* @param fields values to be set
66+
*/
67+
68+
@JsonIgnore
69+
public void setFields(final String... fields);
70+
71+
/**
72+
* <p>Fields that cannot be updated.</p>
73+
* @param fields values to be set
74+
*/
75+
76+
public void setFields(final List<String> fields);
77+
78+
/**
79+
* factory method
80+
* @return instance of InvalidFieldsUpdateError
81+
*/
82+
public static InvalidFieldsUpdateError of() {
83+
return new InvalidFieldsUpdateErrorImpl();
84+
}
85+
86+
/**
87+
* factory method to create a shallow copy InvalidFieldsUpdateError
88+
* @param template instance to be copied
89+
* @return copy instance
90+
*/
91+
public static InvalidFieldsUpdateError of(final InvalidFieldsUpdateError template) {
92+
InvalidFieldsUpdateErrorImpl instance = new InvalidFieldsUpdateErrorImpl();
93+
instance.setMessage(template.getMessage());
94+
instance.setFields(template.getFields());
95+
return instance;
96+
}
97+
98+
/**
99+
* factory method to create a deep copy of InvalidFieldsUpdateError
100+
* @param template instance to be copied
101+
* @return copy instance
102+
*/
103+
@Nullable
104+
public static InvalidFieldsUpdateError deepCopy(@Nullable final InvalidFieldsUpdateError template) {
105+
if (template == null) {
106+
return null;
107+
}
108+
InvalidFieldsUpdateErrorImpl instance = new InvalidFieldsUpdateErrorImpl();
109+
instance.setMessage(template.getMessage());
110+
instance.setFields(Optional.ofNullable(template.getFields()).map(ArrayList::new).orElse(null));
111+
return instance;
112+
}
113+
114+
/**
115+
* builder factory method for InvalidFieldsUpdateError
116+
* @return builder
117+
*/
118+
public static InvalidFieldsUpdateErrorBuilder builder() {
119+
return InvalidFieldsUpdateErrorBuilder.of();
120+
}
121+
122+
/**
123+
* create builder for InvalidFieldsUpdateError instance
124+
* @param template instance with prefilled values for the builder
125+
* @return builder
126+
*/
127+
public static InvalidFieldsUpdateErrorBuilder builder(final InvalidFieldsUpdateError template) {
128+
return InvalidFieldsUpdateErrorBuilder.of(template);
129+
}
130+
131+
/**
132+
* accessor map function
133+
* @param <T> mapped type
134+
* @param helper function to map the object
135+
* @return mapped value
136+
*/
137+
default <T> T withInvalidFieldsUpdateError(Function<InvalidFieldsUpdateError, T> helper) {
138+
return helper.apply(this);
139+
}
140+
141+
/**
142+
* gives a TypeReference for usage with Jackson DataBind
143+
* @return TypeReference
144+
*/
145+
public static com.fasterxml.jackson.core.type.TypeReference<InvalidFieldsUpdateError> typeReference() {
146+
return new com.fasterxml.jackson.core.type.TypeReference<InvalidFieldsUpdateError>() {
147+
@Override
148+
public String toString() {
149+
return "TypeReference<InvalidFieldsUpdateError>";
150+
}
151+
};
152+
}
153+
}

0 commit comments

Comments
 (0)