Skip to content

Commit

Permalink
Merge pull request #740 from commercetools/gen-sdk-updates
Browse files Browse the repository at this point in the history
Update generated SDKs
  • Loading branch information
kodiakhq[bot] authored Oct 7, 2024
2 parents f7ace43 + 082f5b8 commit fcac4c6
Show file tree
Hide file tree
Showing 15 changed files with 500 additions and 43 deletions.
38 changes: 2 additions & 36 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,8 @@
**Api changes**

<details>
<summary>Added Property(s)</summary>

- added property `warnings` to type `ProductTailoring`
- added property `attributes` to type `ProductVariantTailoring`
- added property `attributes` to type `ProductVariantTailoringDraft`
- added property `attributes` to type `ProductTailoringAddVariantAction`
- added property `warnings` to type `Product`
- added property `customers` to type `SearchIndexingConfiguration`
</details>

**Import changes**

<details>
<summary>Added Type(s)</summary>

- added type `SearchNotReadyError`
- added type `GraphQLSearchNotReadyError`
- added type `ProductTailoringAttribute`
- added type `ProductTailoringSetAttributeAction`
- added type `ProductTailoringSetAttributeInAllVariantsAction`
- added type `ImageProcessingOngoingWarning`
- added type `WarningObject`
</details>


<details>
<summary>Removed Type(s)</summary>

- :warning: removed type `ProductSearchStatus`
</details>


<details>
<summary>Added Enum(s)</summary>

- added enum `customer-group` to type `ExtensionResourceTypeId`
- added enum `product-tailoring` to type `MessageSubscriptionResourceTypeId`
- added enum `product-tailoring` to type `ResourceTypeId`
- added type `InvalidFieldsUpdateError`
</details>

Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public interface DiscountCodeImport extends ImportResource {

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public DiscountCodeImportBuilder description(

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public com.commercetools.importapi.models.common.LocalizedString getDescription(

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

public String getCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InsufficientScopeErrorImpl.class, name = InsufficientScopeError.INSUFFICIENT_SCOPE),
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidCredentialsErrorImpl.class, name = InvalidCredentialsError.INVALID_CREDENTIALS),
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidFieldErrorImpl.class, name = InvalidFieldError.INVALID_FIELD),
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidFieldsUpdateErrorImpl.class, name = InvalidFieldsUpdateError.INVALID_FIELD_UPDATE),
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidInputImpl.class, name = InvalidInput.INVALID_INPUT),
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidJsonInputImpl.class, name = InvalidJsonInput.INVALID_JSON_INPUT),
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidOperationImpl.class, name = InvalidOperation.INVALID_OPERATION),
Expand Down Expand Up @@ -133,6 +134,10 @@ public static ErrorObject deepCopy(@Nullable final ErrorObject template) {
return com.commercetools.importapi.models.errors.InvalidFieldError
.deepCopy((com.commercetools.importapi.models.errors.InvalidFieldError) template);
}
if (template instanceof com.commercetools.importapi.models.errors.InvalidFieldsUpdateError) {
return com.commercetools.importapi.models.errors.InvalidFieldsUpdateError
.deepCopy((com.commercetools.importapi.models.errors.InvalidFieldsUpdateError) template);
}
if (template instanceof com.commercetools.importapi.models.errors.InvalidInput) {
return com.commercetools.importapi.models.errors.InvalidInput
.deepCopy((com.commercetools.importapi.models.errors.InvalidInput) template);
Expand Down Expand Up @@ -274,6 +279,14 @@ public static com.commercetools.importapi.models.errors.InvalidFieldErrorBuilder
return com.commercetools.importapi.models.errors.InvalidFieldErrorBuilder.of();
}

/**
* builder for invalidFieldUpdate subtype
* @return builder
*/
public static com.commercetools.importapi.models.errors.InvalidFieldsUpdateErrorBuilder invalidFieldUpdateBuilder() {
return com.commercetools.importapi.models.errors.InvalidFieldsUpdateErrorBuilder.of();
}

/**
* builder for invalidInput subtype
* @return builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public com.commercetools.importapi.models.errors.InvalidFieldErrorBuilder invali
return com.commercetools.importapi.models.errors.InvalidFieldErrorBuilder.of();
}

public com.commercetools.importapi.models.errors.InvalidFieldsUpdateErrorBuilder invalidFieldUpdateBuilder() {
return com.commercetools.importapi.models.errors.InvalidFieldsUpdateErrorBuilder.of();
}

public com.commercetools.importapi.models.errors.InvalidInputBuilder invalidInputBuilder() {
return com.commercetools.importapi.models.errors.InvalidInputBuilder.of();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@

package com.commercetools.importapi.models.errors;

import java.time.*;
import java.util.*;
import java.util.function.Function;

import javax.annotation.Nullable;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;

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

import jakarta.validation.constraints.NotNull;

/**
* <p>Returned when a field cannot be updated.</p>
*
* <hr>
* Example to create an instance using the builder pattern
* <div class=code-example>
* <pre><code class='java'>
* InvalidFieldsUpdateError invalidFieldsUpdateError = InvalidFieldsUpdateError.builder()
* .message("{message}")
* .plusFields(fieldsBuilder -> fieldsBuilder)
* .build()
* </code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
@JsonDeserialize(as = InvalidFieldsUpdateErrorImpl.class)
public interface InvalidFieldsUpdateError extends ErrorObject {

/**
* discriminator value for InvalidFieldsUpdateError
*/
String INVALID_FIELD_UPDATE = "InvalidFieldUpdate";

/**
* <p><code>"The following fields are currently not supported for changes/updates"</code></p>
* @return message
*/
@NotNull
@JsonProperty("message")
public String getMessage();

/**
* <p>Fields that cannot be updated.</p>
* @return fields
*/
@NotNull
@JsonProperty("fields")
public List<String> getFields();

/**
* <p><code>"The following fields are currently not supported for changes/updates"</code></p>
* @param message value to be set
*/

public void setMessage(final String message);

/**
* <p>Fields that cannot be updated.</p>
* @param fields values to be set
*/

@JsonIgnore
public void setFields(final String... fields);

/**
* <p>Fields that cannot be updated.</p>
* @param fields values to be set
*/

public void setFields(final List<String> fields);

/**
* factory method
* @return instance of InvalidFieldsUpdateError
*/
public static InvalidFieldsUpdateError of() {
return new InvalidFieldsUpdateErrorImpl();
}

/**
* factory method to create a shallow copy InvalidFieldsUpdateError
* @param template instance to be copied
* @return copy instance
*/
public static InvalidFieldsUpdateError of(final InvalidFieldsUpdateError template) {
InvalidFieldsUpdateErrorImpl instance = new InvalidFieldsUpdateErrorImpl();
instance.setMessage(template.getMessage());
instance.setFields(template.getFields());
return instance;
}

/**
* factory method to create a deep copy of InvalidFieldsUpdateError
* @param template instance to be copied
* @return copy instance
*/
@Nullable
public static InvalidFieldsUpdateError deepCopy(@Nullable final InvalidFieldsUpdateError template) {
if (template == null) {
return null;
}
InvalidFieldsUpdateErrorImpl instance = new InvalidFieldsUpdateErrorImpl();
instance.setMessage(template.getMessage());
instance.setFields(Optional.ofNullable(template.getFields()).map(ArrayList::new).orElse(null));
return instance;
}

/**
* builder factory method for InvalidFieldsUpdateError
* @return builder
*/
public static InvalidFieldsUpdateErrorBuilder builder() {
return InvalidFieldsUpdateErrorBuilder.of();
}

/**
* create builder for InvalidFieldsUpdateError instance
* @param template instance with prefilled values for the builder
* @return builder
*/
public static InvalidFieldsUpdateErrorBuilder builder(final InvalidFieldsUpdateError template) {
return InvalidFieldsUpdateErrorBuilder.of(template);
}

/**
* accessor map function
* @param <T> mapped type
* @param helper function to map the object
* @return mapped value
*/
default <T> T withInvalidFieldsUpdateError(Function<InvalidFieldsUpdateError, T> helper) {
return helper.apply(this);
}

/**
* gives a TypeReference for usage with Jackson DataBind
* @return TypeReference
*/
public static com.fasterxml.jackson.core.type.TypeReference<InvalidFieldsUpdateError> typeReference() {
return new com.fasterxml.jackson.core.type.TypeReference<InvalidFieldsUpdateError>() {
@Override
public String toString() {
return "TypeReference<InvalidFieldsUpdateError>";
}
};
}
}
Loading

0 comments on commit fcac4c6

Please sign in to comment.