Skip to content

Commit

Permalink
Merge pull request #716 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 Aug 22, 2024
2 parents 0f047d8 + a3fcc4c commit c26c89e
Show file tree
Hide file tree
Showing 8 changed files with 591 additions and 0 deletions.
8 changes: 8 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@
- added property `applicationMode` to type `CartDiscountValueAbsoluteDraft`
</details>

**Import changes**

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

- added type `ReferencedResourceNotFound`
</details>

Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidScopeErrorImpl.class, name = InvalidScopeError.INVALID_SCOPE),
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidStateTransitionErrorImpl.class, name = InvalidStateTransitionError.INVALID_TRANSITION),
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidTokenErrorImpl.class, name = InvalidTokenError.INVALID_TOKEN),
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.ReferencedResourceNotFoundImpl.class, name = ReferencedResourceNotFound.REFERENCED_RESOURCE_NOT_FOUND),
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.RequiredFieldErrorImpl.class, name = RequiredFieldError.REQUIRED_FIELD),
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.ResourceCreationErrorImpl.class, name = ResourceCreationError.RESOURCE_CREATION),
@JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.ResourceDeletionErrorImpl.class, name = ResourceDeletionError.RESOURCE_DELETION),
Expand Down Expand Up @@ -156,6 +157,10 @@ public static ErrorObject deepCopy(@Nullable final ErrorObject template) {
return com.commercetools.importapi.models.errors.InvalidTokenError
.deepCopy((com.commercetools.importapi.models.errors.InvalidTokenError) template);
}
if (template instanceof com.commercetools.importapi.models.errors.ReferencedResourceNotFound) {
return com.commercetools.importapi.models.errors.ReferencedResourceNotFound
.deepCopy((com.commercetools.importapi.models.errors.ReferencedResourceNotFound) template);
}
if (template instanceof com.commercetools.importapi.models.errors.RequiredFieldError) {
return com.commercetools.importapi.models.errors.RequiredFieldError
.deepCopy((com.commercetools.importapi.models.errors.RequiredFieldError) template);
Expand Down Expand Up @@ -317,6 +322,14 @@ public static com.commercetools.importapi.models.errors.InvalidTokenErrorBuilder
return com.commercetools.importapi.models.errors.InvalidTokenErrorBuilder.of();
}

/**
* builder for referencedResourceNotFound subtype
* @return builder
*/
public static com.commercetools.importapi.models.errors.ReferencedResourceNotFoundBuilder referencedResourceNotFoundBuilder() {
return com.commercetools.importapi.models.errors.ReferencedResourceNotFoundBuilder.of();
}

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

public com.commercetools.importapi.models.errors.ReferencedResourceNotFoundBuilder referencedResourceNotFoundBuilder() {
return com.commercetools.importapi.models.errors.ReferencedResourceNotFoundBuilder.of();
}

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

package com.commercetools.importapi.models.errors;

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

import javax.annotation.Nullable;

import com.commercetools.importapi.models.common.ReferenceType;
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 resource referenced by a Reference or a ResourceIdentifier could not be found.</p>
*
* <hr>
* Example to create an instance using the builder pattern
* <div class=code-example>
* <pre><code class='java'>
* ReferencedResourceNotFound referencedResourceNotFound = ReferencedResourceNotFound.builder()
* .message("{message}")
* .typeId(ReferenceType.CART)
* .build()
* </code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
@JsonDeserialize(as = ReferencedResourceNotFoundImpl.class)
public interface ReferencedResourceNotFound extends ErrorObject {

/**
* discriminator value for ReferencedResourceNotFound
*/
String REFERENCED_RESOURCE_NOT_FOUND = "ReferencedResourceNotFound";

/**
*
* @return code
*/
@NotNull
@JsonProperty("code")
public String getCode();

/**
* <p><code>"The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."</code></p>
* @return message
*/
@NotNull
@JsonProperty("message")
public String getMessage();

/**
* <p>Type of referenced resource.</p>
* @return typeId
*/
@NotNull
@JsonProperty("typeId")
public ReferenceType getTypeId();

/**
* <p>Unique identifier of the referenced resource, if known.</p>
* @return id
*/

@JsonProperty("id")
public String getId();

/**
* <p>User-defined unique identifier of the referenced resource, if known.</p>
* @return key
*/

@JsonProperty("key")
public String getKey();

/**
* <p><code>"The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."</code></p>
* @param message value to be set
*/

public void setMessage(final String message);

/**
* <p>Type of referenced resource.</p>
* @param typeId value to be set
*/

public void setTypeId(final ReferenceType typeId);

/**
* <p>Unique identifier of the referenced resource, if known.</p>
* @param id value to be set
*/

public void setId(final String id);

/**
* <p>User-defined unique identifier of the referenced resource, if known.</p>
* @param key value to be set
*/

public void setKey(final String key);

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

/**
* factory method to create a shallow copy ReferencedResourceNotFound
* @param template instance to be copied
* @return copy instance
*/
public static ReferencedResourceNotFound of(final ReferencedResourceNotFound template) {
ReferencedResourceNotFoundImpl instance = new ReferencedResourceNotFoundImpl();
instance.setMessage(template.getMessage());
instance.setTypeId(template.getTypeId());
instance.setId(template.getId());
instance.setKey(template.getKey());
return instance;
}

/**
* factory method to create a deep copy of ReferencedResourceNotFound
* @param template instance to be copied
* @return copy instance
*/
@Nullable
public static ReferencedResourceNotFound deepCopy(@Nullable final ReferencedResourceNotFound template) {
if (template == null) {
return null;
}
ReferencedResourceNotFoundImpl instance = new ReferencedResourceNotFoundImpl();
instance.setMessage(template.getMessage());
instance.setTypeId(template.getTypeId());
instance.setId(template.getId());
instance.setKey(template.getKey());
return instance;
}

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

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

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

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

0 comments on commit c26c89e

Please sign in to comment.