Skip to content

Commit

Permalink
build(codegen): updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Jan 6, 2025
1 parent b1056a7 commit 8c67852
Show file tree
Hide file tree
Showing 15 changed files with 218 additions and 311 deletions.
67 changes: 4 additions & 63 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,74 +1,15 @@
**Api changes**

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

- :warning: changed property `exact` of type `SearchExactExpression` from type `SearchAnyValue` to `SearchExactValue`
</details>


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

- added property `businessUnits` to type `SearchIndexingConfiguration`
</details>


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

- added resource `/{projectKey}/business-units/search`
- added resource `/{projectKey}/business-units/search/indexing-status`
</details>


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

- added method `apiRoot.withProjectKey().businessUnits().search().post()`
- added method `apiRoot.withProjectKey().businessUnits().search().head()`
- added method `apiRoot.withProjectKey().businessUnits().searchIndexingStatus().get()`
</details>


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

- added type `BusinessUnitIndexingProgress`
- added type `BusinessUnitIndexingStatus`
- added type `BusinessUnitPagedSearchResponse`
- added type `BusinessUnitSearchIndexingStatusResponse`
- added type `BusinessUnitSearchRequest`
- added type `BusinessUnitSearchResult`
- added type `BusinessUnitSearchStatus`
- added type `ProjectChangeBusinessUnitSearchStatusAction`
- added type `SearchExactValue`
</details>

**History changes**

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

- added resource `/{projectKey}/graphql`
</details>


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

- added method `apiRoot.withProjectKeyValue().graphql().post()`
- :warning: changed property `extensions` of type `GraphQLError` from type `GraphQLErrorObject` to `object`
</details>


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

- added type `GraphQLRequest`
- added type `GraphQLResponse`
- added type `GraphQLError`
- added type `GraphQLErrorLocation`
- added type `GraphQLVariablesMap`
- added type `GraphQLErrorObject`
- :warning: removed type `GraphQLErrorObject`
</details>

Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
* <div class=code-example>
* <pre><code class='java'>
* PatternComponent patternComponent = PatternComponent.builder()
* .type("{type}")
* .build()
* </code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
@JsonDeserialize(as = PatternComponentImpl.class)
public interface PatternComponent {

/**
Expand All @@ -37,6 +39,32 @@ public interface PatternComponent {
@JsonProperty("type")
public String getType();

/**
* set type
* @param type value to be set
*/

public void setType(final String type);

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

/**
* factory method to create a shallow copy PatternComponent
* @param template instance to be copied
* @return copy instance
*/
public static PatternComponent of(final PatternComponent template) {
PatternComponentImpl instance = new PatternComponentImpl();
instance.setType(template.getType());
return instance;
}

/**
* factory method to create a deep copy of PatternComponent
* @param template instance to be copied
Expand All @@ -48,9 +76,27 @@ public static PatternComponent deepCopy(@Nullable final PatternComponent templat
return null;
}
PatternComponentImpl instance = new PatternComponentImpl();
instance.setType(template.getType());
return instance;
}

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

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

/**
* accessor map function
* @param <T> mapped type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,62 @@

import java.util.*;

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

/**
* PatternComponentBuilder
* <hr>
* Example to create an instance using the builder pattern
* <div class=code-example>
* <pre><code class='java'>
* PatternComponent patternComponent = PatternComponent.builder()
* .type("{type}")
* .build()
* </code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class PatternComponentBuilder {
public class PatternComponentBuilder implements Builder<PatternComponent> {

private String type;

/**
* set the value to the type
* @param type value to be set
* @return Builder
*/

public PatternComponentBuilder type(final String type) {
this.type = type;
return this;
}

/**
* value of type}
* @return type
*/

public String getType() {
return this.type;
}

/**
* builds PatternComponent with checking for non-null required values
* @return PatternComponent
*/
public PatternComponent build() {
Objects.requireNonNull(type, PatternComponent.class + ": type is missing");
return new PatternComponentImpl(type);
}

/**
* builds PatternComponent without checking for non-null required values
* @return PatternComponent
*/
public PatternComponent buildUnchecked() {
return new PatternComponentImpl(type);
}

/**
* factory method for an instance of PatternComponentBuilder
Expand All @@ -19,4 +68,15 @@ public static PatternComponentBuilder of() {
return new PatternComponentBuilder();
}

/**
* create builder for PatternComponent instance
* @param template instance with prefilled values for the builder
* @return builder
*/
public static PatternComponentBuilder of(final PatternComponent template) {
PatternComponentBuilder builder = new PatternComponentBuilder();
builder.type = template.getType();
return builder;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public String getType() {
return this.type;
}

public void setType(final String type) {
this.type = type;
}

@Override
public boolean equals(Object o) {
if (this == o)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public ChangeTargetPatternChangeValueBuilder plusTriggerPattern(
*/

public ChangeTargetPatternChangeValueBuilder plusTriggerPattern(
Function<com.commercetools.history.models.cart_discount.PatternComponentBuilder, Builder<? extends com.commercetools.history.models.cart_discount.PatternComponent>> builder) {
Function<com.commercetools.history.models.cart_discount.PatternComponentBuilder, com.commercetools.history.models.cart_discount.PatternComponentBuilder> builder) {
if (this.triggerPattern == null) {
this.triggerPattern = new ArrayList<>();
}
Expand All @@ -97,13 +97,37 @@ public ChangeTargetPatternChangeValueBuilder plusTriggerPattern(
*/

public ChangeTargetPatternChangeValueBuilder withTriggerPattern(
Function<com.commercetools.history.models.cart_discount.PatternComponentBuilder, Builder<? extends com.commercetools.history.models.cart_discount.PatternComponent>> builder) {
Function<com.commercetools.history.models.cart_discount.PatternComponentBuilder, com.commercetools.history.models.cart_discount.PatternComponentBuilder> builder) {
this.triggerPattern = new ArrayList<>();
this.triggerPattern.add(
builder.apply(com.commercetools.history.models.cart_discount.PatternComponentBuilder.of()).build());
return this;
}

/**
* <p>Units of a (Custom) Line Item that triggered the discount application.</p>
* @param builder function to build the triggerPattern value
* @return Builder
*/

public ChangeTargetPatternChangeValueBuilder addTriggerPattern(
Function<com.commercetools.history.models.cart_discount.PatternComponentBuilder, com.commercetools.history.models.cart_discount.PatternComponent> builder) {
return plusTriggerPattern(
builder.apply(com.commercetools.history.models.cart_discount.PatternComponentBuilder.of()));
}

/**
* <p>Units of a (Custom) Line Item that triggered the discount application.</p>
* @param builder function to build the triggerPattern value
* @return Builder
*/

public ChangeTargetPatternChangeValueBuilder setTriggerPattern(
Function<com.commercetools.history.models.cart_discount.PatternComponentBuilder, com.commercetools.history.models.cart_discount.PatternComponent> builder) {
return triggerPattern(
builder.apply(com.commercetools.history.models.cart_discount.PatternComponentBuilder.of()));
}

/**
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
* @param targetPattern value to be set
Expand Down Expand Up @@ -150,7 +174,7 @@ public ChangeTargetPatternChangeValueBuilder plusTargetPattern(
*/

public ChangeTargetPatternChangeValueBuilder plusTargetPattern(
Function<com.commercetools.history.models.cart_discount.PatternComponentBuilder, Builder<? extends com.commercetools.history.models.cart_discount.PatternComponent>> builder) {
Function<com.commercetools.history.models.cart_discount.PatternComponentBuilder, com.commercetools.history.models.cart_discount.PatternComponentBuilder> builder) {
if (this.targetPattern == null) {
this.targetPattern = new ArrayList<>();
}
Expand All @@ -166,13 +190,37 @@ public ChangeTargetPatternChangeValueBuilder plusTargetPattern(
*/

public ChangeTargetPatternChangeValueBuilder withTargetPattern(
Function<com.commercetools.history.models.cart_discount.PatternComponentBuilder, Builder<? extends com.commercetools.history.models.cart_discount.PatternComponent>> builder) {
Function<com.commercetools.history.models.cart_discount.PatternComponentBuilder, com.commercetools.history.models.cart_discount.PatternComponentBuilder> builder) {
this.targetPattern = new ArrayList<>();
this.targetPattern.add(
builder.apply(com.commercetools.history.models.cart_discount.PatternComponentBuilder.of()).build());
return this;
}

/**
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
* @param builder function to build the targetPattern value
* @return Builder
*/

public ChangeTargetPatternChangeValueBuilder addTargetPattern(
Function<com.commercetools.history.models.cart_discount.PatternComponentBuilder, com.commercetools.history.models.cart_discount.PatternComponent> builder) {
return plusTargetPattern(
builder.apply(com.commercetools.history.models.cart_discount.PatternComponentBuilder.of()));
}

/**
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
* @param builder function to build the targetPattern value
* @return Builder
*/

public ChangeTargetPatternChangeValueBuilder setTargetPattern(
Function<com.commercetools.history.models.cart_discount.PatternComponentBuilder, com.commercetools.history.models.cart_discount.PatternComponent> builder) {
return targetPattern(
builder.apply(com.commercetools.history.models.cart_discount.PatternComponentBuilder.of()));
}

/**
* <p>Maximum number of times the Discount applies on a Cart.</p>
* <p>If empty, the Discount applies indefinitely.</p>
Expand Down
Loading

0 comments on commit 8c67852

Please sign in to comment.