Skip to content

Commit ca42d85

Browse files
committed
build(codegen): updating SDK
1 parent 5a06e86 commit ca42d85

File tree

54 files changed

+3372
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3372
-12
lines changed

changes.md

+16
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,30 @@
44
<summary>Added Property(s)</summary>
55

66
- 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`
710
- added property `warnings` to type `Product`
811
</details>
912

1013

1114
<details>
1215
<summary>Added Type(s)</summary>
1316

17+
- added type `SearchNotReadyError`
18+
- added type `GraphQLSearchNotReadyError`
19+
- added type `ProductTailoringAttribute`
20+
- added type `ProductTailoringSetAttributeAction`
21+
- added type `ProductTailoringSetAttributeInAllVariantsAction`
1422
- added type `ImageProcessingOngoingWarning`
1523
- added type `WarningObject`
1624
</details>
1725

26+
27+
<details>
28+
<summary>Added Enum(s)</summary>
29+
30+
- added enum `product-tailoring` to type `MessageSubscriptionResourceTypeId`
31+
- added enum `product-tailoring` to type `ResourceTypeId`
32+
</details>
33+

commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls

+27
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ input AddProductVariantTailoring {
352352
id: Int
353353
sku: String
354354
images: [ImageInput!] = []
355+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
356+
attributes: [ProductAttributeInput!] = []
355357
assets: [AssetDraftInput!] = []
356358
staged: Boolean = true
357359
}
@@ -8638,6 +8640,11 @@ input ProductTailoringUpdateAction {
86388640
setAssetTags: SetProductTailoringAssetTags
86398641
setImages: SetProductTailoringImages
86408642
setDescription: SetProductTailoringDescription
8643+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
8644+
setAttribute: SetProductTailoringAttribute
8645+
8646+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
8647+
setAttributeInAllVariants: SetProductTailoringAttributeInAllVariants
86418648
setImageLabel: SetProductTailoringImageLabel
86428649
setMetaAttributes: SetProductTailoringMetaAttributes
86438650
setMetaDescription: SetProductTailoringMetaDescription
@@ -8908,6 +8915,8 @@ type ProductVariantTailoring {
89088915
id: Int!
89098916
images: [Image!]!
89108917
assets: [Asset!]!
8918+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
8919+
attributesRaw: [RawProductAttribute!]!
89118920
}
89128921

89138922
type ProductVariantTailoringAdded implements MessagePayload {
@@ -8923,6 +8932,8 @@ input ProductVariantTailoringInput {
89238932
id: Int
89248933
sku: String
89258934
images: [ImageInput!] = []
8935+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
8936+
attributes: [ProductAttributeInput!] = []
89268937
assets: [AssetDraftInput!] = []
89278938
}
89288939

@@ -11859,6 +11870,22 @@ input SetProductTailoringAssetTags {
1185911870
assetId: String
1186011871
}
1186111872

11873+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
11874+
input SetProductTailoringAttribute {
11875+
variantId: Int
11876+
sku: String
11877+
name: String!
11878+
value: String
11879+
staged: Boolean = true
11880+
}
11881+
11882+
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
11883+
input SetProductTailoringAttributeInAllVariants {
11884+
name: String!
11885+
value: String
11886+
staged: Boolean = true
11887+
}
11888+
1186211889
input SetProductTailoringDescription {
1186311890
description: [LocalizedStringItemInputType!]
1186411891
staged: Boolean = true

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java

+13
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
@JsonSubTypes.Type(value = com.commercetools.api.models.error.SearchExecutionFailureErrorImpl.class, name = SearchExecutionFailureError.SEARCH_EXECUTION_FAILURE),
102102
@JsonSubTypes.Type(value = com.commercetools.api.models.error.SearchFacetPathNotFoundErrorImpl.class, name = SearchFacetPathNotFoundError.SEARCH_FACET_PATH_NOT_FOUND),
103103
@JsonSubTypes.Type(value = com.commercetools.api.models.error.SearchIndexingInProgressErrorImpl.class, name = SearchIndexingInProgressError.SEARCH_INDEXING_IN_PROGRESS),
104+
@JsonSubTypes.Type(value = com.commercetools.api.models.error.SearchNotReadyErrorImpl.class, name = SearchNotReadyError.SEARCH_NOT_READY),
104105
@JsonSubTypes.Type(value = com.commercetools.api.models.error.SemanticErrorErrorImpl.class, name = SemanticErrorError.SEMANTIC_ERROR),
105106
@JsonSubTypes.Type(value = com.commercetools.api.models.error.ShippingMethodDoesNotMatchCartErrorImpl.class, name = ShippingMethodDoesNotMatchCartError.SHIPPING_METHOD_DOES_NOT_MATCH_CART),
106107
@JsonSubTypes.Type(value = com.commercetools.api.models.error.StoreCartDiscountsLimitReachedErrorImpl.class, name = StoreCartDiscountsLimitReachedError.STORE_CART_DISCOUNTS_LIMIT_REACHED),
@@ -448,6 +449,10 @@ public static ErrorObject deepCopy(@Nullable final ErrorObject template) {
448449
return com.commercetools.api.models.error.SearchIndexingInProgressError
449450
.deepCopy((com.commercetools.api.models.error.SearchIndexingInProgressError) template);
450451
}
452+
if (template instanceof com.commercetools.api.models.error.SearchNotReadyError) {
453+
return com.commercetools.api.models.error.SearchNotReadyError
454+
.deepCopy((com.commercetools.api.models.error.SearchNotReadyError) template);
455+
}
451456
if (template instanceof com.commercetools.api.models.error.SemanticErrorError) {
452457
return com.commercetools.api.models.error.SemanticErrorError
453458
.deepCopy((com.commercetools.api.models.error.SemanticErrorError) template);
@@ -1046,6 +1051,14 @@ public static com.commercetools.api.models.error.SearchIndexingInProgressErrorBu
10461051
return com.commercetools.api.models.error.SearchIndexingInProgressErrorBuilder.of();
10471052
}
10481053

1054+
/**
1055+
* builder for searchNotReady subtype
1056+
* @return builder
1057+
*/
1058+
public static com.commercetools.api.models.error.SearchNotReadyErrorBuilder searchNotReadyBuilder() {
1059+
return com.commercetools.api.models.error.SearchNotReadyErrorBuilder.of();
1060+
}
1061+
10491062
/**
10501063
* builder for semanticError subtype
10511064
* @return builder

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java

+4
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ public com.commercetools.api.models.error.SearchIndexingInProgressErrorBuilder s
299299
return com.commercetools.api.models.error.SearchIndexingInProgressErrorBuilder.of();
300300
}
301301

302+
public com.commercetools.api.models.error.SearchNotReadyErrorBuilder searchNotReadyBuilder() {
303+
return com.commercetools.api.models.error.SearchNotReadyErrorBuilder.of();
304+
}
305+
302306
public com.commercetools.api.models.error.SemanticErrorErrorBuilder semanticErrorBuilder() {
303307
return com.commercetools.api.models.error.SemanticErrorErrorBuilder.of();
304308
}

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java

+13
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
@JsonSubTypes.Type(value = com.commercetools.api.models.error.GraphQLSearchExecutionFailureErrorImpl.class, name = GraphQLSearchExecutionFailureError.SEARCH_EXECUTION_FAILURE),
100100
@JsonSubTypes.Type(value = com.commercetools.api.models.error.GraphQLSearchFacetPathNotFoundErrorImpl.class, name = GraphQLSearchFacetPathNotFoundError.SEARCH_FACET_PATH_NOT_FOUND),
101101
@JsonSubTypes.Type(value = com.commercetools.api.models.error.GraphQLSearchIndexingInProgressErrorImpl.class, name = GraphQLSearchIndexingInProgressError.SEARCH_INDEXING_IN_PROGRESS),
102+
@JsonSubTypes.Type(value = com.commercetools.api.models.error.GraphQLSearchNotReadyErrorImpl.class, name = GraphQLSearchNotReadyError.SEARCH_NOT_READY),
102103
@JsonSubTypes.Type(value = com.commercetools.api.models.error.GraphQLSemanticErrorErrorImpl.class, name = GraphQLSemanticErrorError.SEMANTIC_ERROR),
103104
@JsonSubTypes.Type(value = com.commercetools.api.models.error.GraphQLShippingMethodDoesNotMatchCartErrorImpl.class, name = GraphQLShippingMethodDoesNotMatchCartError.SHIPPING_METHOD_DOES_NOT_MATCH_CART),
104105
@JsonSubTypes.Type(value = com.commercetools.api.models.error.GraphQLStoreCartDiscountsLimitReachedErrorImpl.class, name = GraphQLStoreCartDiscountsLimitReachedError.STORE_CART_DISCOUNTS_LIMIT_REACHED),
@@ -431,6 +432,10 @@ public static GraphQLErrorObject deepCopy(@Nullable final GraphQLErrorObject tem
431432
return com.commercetools.api.models.error.GraphQLSearchIndexingInProgressError
432433
.deepCopy((com.commercetools.api.models.error.GraphQLSearchIndexingInProgressError) template);
433434
}
435+
if (template instanceof com.commercetools.api.models.error.GraphQLSearchNotReadyError) {
436+
return com.commercetools.api.models.error.GraphQLSearchNotReadyError
437+
.deepCopy((com.commercetools.api.models.error.GraphQLSearchNotReadyError) template);
438+
}
434439
if (template instanceof com.commercetools.api.models.error.GraphQLSemanticErrorError) {
435440
return com.commercetools.api.models.error.GraphQLSemanticErrorError
436441
.deepCopy((com.commercetools.api.models.error.GraphQLSemanticErrorError) template);
@@ -1028,6 +1033,14 @@ public static com.commercetools.api.models.error.GraphQLSearchIndexingInProgress
10281033
return com.commercetools.api.models.error.GraphQLSearchIndexingInProgressErrorBuilder.of();
10291034
}
10301035

1036+
/**
1037+
* builder for searchNotReady subtype
1038+
* @return builder
1039+
*/
1040+
public static com.commercetools.api.models.error.GraphQLSearchNotReadyErrorBuilder searchNotReadyBuilder() {
1041+
return com.commercetools.api.models.error.GraphQLSearchNotReadyErrorBuilder.of();
1042+
}
1043+
10311044
/**
10321045
* builder for semanticError subtype
10331046
* @return builder

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java

+4
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ public com.commercetools.api.models.error.GraphQLSearchIndexingInProgressErrorBu
299299
return com.commercetools.api.models.error.GraphQLSearchIndexingInProgressErrorBuilder.of();
300300
}
301301

302+
public com.commercetools.api.models.error.GraphQLSearchNotReadyErrorBuilder searchNotReadyBuilder() {
303+
return com.commercetools.api.models.error.GraphQLSearchNotReadyErrorBuilder.of();
304+
}
305+
302306
public com.commercetools.api.models.error.GraphQLSemanticErrorErrorBuilder semanticErrorBuilder() {
303307
return com.commercetools.api.models.error.GraphQLSemanticErrorErrorBuilder.of();
304308
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
2+
package com.commercetools.api.models.error;
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 if the requested search service is not ready. The search might be deactivated or indexing is in progress.</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+
* GraphQLSearchNotReadyError graphQLSearchNotReadyError = GraphQLSearchNotReadyError.builder()
25+
* .build()
26+
* </code></pre>
27+
* </div>
28+
*/
29+
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
30+
@JsonDeserialize(as = GraphQLSearchNotReadyErrorImpl.class)
31+
public interface GraphQLSearchNotReadyError extends GraphQLErrorObject {
32+
33+
/**
34+
* discriminator value for GraphQLSearchNotReadyError
35+
*/
36+
String SEARCH_NOT_READY = "SearchNotReady";
37+
38+
/**
39+
*
40+
* @return code
41+
*/
42+
@NotNull
43+
@JsonProperty("code")
44+
public String getCode();
45+
46+
/**
47+
* factory method
48+
* @return instance of GraphQLSearchNotReadyError
49+
*/
50+
public static GraphQLSearchNotReadyError of() {
51+
return new GraphQLSearchNotReadyErrorImpl();
52+
}
53+
54+
/**
55+
* factory method to create a shallow copy GraphQLSearchNotReadyError
56+
* @param template instance to be copied
57+
* @return copy instance
58+
*/
59+
public static GraphQLSearchNotReadyError of(final GraphQLSearchNotReadyError template) {
60+
GraphQLSearchNotReadyErrorImpl instance = new GraphQLSearchNotReadyErrorImpl();
61+
Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue));
62+
return instance;
63+
}
64+
65+
/**
66+
* factory method to create a deep copy of GraphQLSearchNotReadyError
67+
* @param template instance to be copied
68+
* @return copy instance
69+
*/
70+
@Nullable
71+
public static GraphQLSearchNotReadyError deepCopy(@Nullable final GraphQLSearchNotReadyError template) {
72+
if (template == null) {
73+
return null;
74+
}
75+
GraphQLSearchNotReadyErrorImpl instance = new GraphQLSearchNotReadyErrorImpl();
76+
Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue));
77+
return instance;
78+
}
79+
80+
/**
81+
* builder factory method for GraphQLSearchNotReadyError
82+
* @return builder
83+
*/
84+
public static GraphQLSearchNotReadyErrorBuilder builder() {
85+
return GraphQLSearchNotReadyErrorBuilder.of();
86+
}
87+
88+
/**
89+
* create builder for GraphQLSearchNotReadyError instance
90+
* @param template instance with prefilled values for the builder
91+
* @return builder
92+
*/
93+
public static GraphQLSearchNotReadyErrorBuilder builder(final GraphQLSearchNotReadyError template) {
94+
return GraphQLSearchNotReadyErrorBuilder.of(template);
95+
}
96+
97+
/**
98+
* accessor map function
99+
* @param <T> mapped type
100+
* @param helper function to map the object
101+
* @return mapped value
102+
*/
103+
default <T> T withGraphQLSearchNotReadyError(Function<GraphQLSearchNotReadyError, T> helper) {
104+
return helper.apply(this);
105+
}
106+
107+
/**
108+
* gives a TypeReference for usage with Jackson DataBind
109+
* @return TypeReference
110+
*/
111+
public static com.fasterxml.jackson.core.type.TypeReference<GraphQLSearchNotReadyError> typeReference() {
112+
return new com.fasterxml.jackson.core.type.TypeReference<GraphQLSearchNotReadyError>() {
113+
@Override
114+
public String toString() {
115+
return "TypeReference<GraphQLSearchNotReadyError>";
116+
}
117+
};
118+
}
119+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
2+
package com.commercetools.api.models.error;
3+
4+
import java.util.*;
5+
6+
import io.vrap.rmf.base.client.Builder;
7+
import io.vrap.rmf.base.client.utils.Generated;
8+
9+
/**
10+
* GraphQLSearchNotReadyErrorBuilder
11+
* <hr>
12+
* Example to create an instance using the builder pattern
13+
* <div class=code-example>
14+
* <pre><code class='java'>
15+
* GraphQLSearchNotReadyError graphQLSearchNotReadyError = GraphQLSearchNotReadyError.builder()
16+
* .build()
17+
* </code></pre>
18+
* </div>
19+
*/
20+
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
21+
public class GraphQLSearchNotReadyErrorBuilder implements Builder<GraphQLSearchNotReadyError> {
22+
23+
private Map<String, java.lang.Object> values = new HashMap<>();
24+
25+
/**
26+
* <p>Error-specific additional fields.</p>
27+
* @param values properties to be set
28+
* @return Builder
29+
*/
30+
31+
public GraphQLSearchNotReadyErrorBuilder values(final Map<String, java.lang.Object> values) {
32+
this.values = values;
33+
return this;
34+
}
35+
36+
/**
37+
* <p>Error-specific additional fields.</p>
38+
* @param key property name
39+
* @param value property value
40+
* @return Builder
41+
*/
42+
43+
public GraphQLSearchNotReadyErrorBuilder addValue(final String key, final java.lang.Object value) {
44+
if (this.values == null) {
45+
values = new HashMap<>();
46+
}
47+
values.put(key, value);
48+
return this;
49+
}
50+
51+
/**
52+
* <p>Error-specific additional fields.</p>
53+
* @return pattern properties
54+
*/
55+
56+
public Map<String, java.lang.Object> getValues() {
57+
return this.values;
58+
}
59+
60+
/**
61+
* builds GraphQLSearchNotReadyError with checking for non-null required values
62+
* @return GraphQLSearchNotReadyError
63+
*/
64+
public GraphQLSearchNotReadyError build() {
65+
return new GraphQLSearchNotReadyErrorImpl(values);
66+
}
67+
68+
/**
69+
* builds GraphQLSearchNotReadyError without checking for non-null required values
70+
* @return GraphQLSearchNotReadyError
71+
*/
72+
public GraphQLSearchNotReadyError buildUnchecked() {
73+
return new GraphQLSearchNotReadyErrorImpl(values);
74+
}
75+
76+
/**
77+
* factory method for an instance of GraphQLSearchNotReadyErrorBuilder
78+
* @return builder
79+
*/
80+
public static GraphQLSearchNotReadyErrorBuilder of() {
81+
return new GraphQLSearchNotReadyErrorBuilder();
82+
}
83+
84+
/**
85+
* create builder for GraphQLSearchNotReadyError instance
86+
* @param template instance with prefilled values for the builder
87+
* @return builder
88+
*/
89+
public static GraphQLSearchNotReadyErrorBuilder of(final GraphQLSearchNotReadyError template) {
90+
GraphQLSearchNotReadyErrorBuilder builder = new GraphQLSearchNotReadyErrorBuilder();
91+
builder.values = template.values();
92+
return builder;
93+
}
94+
95+
}

0 commit comments

Comments
 (0)