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 Dec 20, 2024
1 parent 9b49f2e commit c24d4db
Show file tree
Hide file tree
Showing 14 changed files with 816 additions and 30 deletions.
22 changes: 15 additions & 7 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
**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>

Expand Down Expand Up @@ -28,12 +42,6 @@
- added type `BusinessUnitSearchResult`
- added type `BusinessUnitSearchStatus`
- added type `ProjectChangeBusinessUnitSearchStatusAction`
</details>


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

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

Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ public interface SearchExactExpression extends SearchQueryExpression {
@NotNull
@Valid
@JsonProperty("exact")
public SearchAnyValue getExact();
public SearchExactValue getExact();

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

public void setExact(final SearchAnyValue exact);
public void setExact(final SearchExactValue exact);

/**
* factory method
Expand Down Expand Up @@ -78,7 +78,7 @@ public static SearchExactExpression deepCopy(@Nullable final SearchExactExpressi
return null;
}
SearchExactExpressionImpl instance = new SearchExactExpressionImpl();
instance.setExact(com.commercetools.api.models.search.SearchAnyValue.deepCopy(template.getExact()));
instance.setExact(com.commercetools.api.models.search.SearchExactValue.deepCopy(template.getExact()));
return instance;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class SearchExactExpressionBuilder implements Builder<SearchExactExpression> {

private com.commercetools.api.models.search.SearchAnyValue exact;
private com.commercetools.api.models.search.SearchExactValue exact;

/**
* set the value to the exact using the builder function
Expand All @@ -31,8 +31,8 @@ public class SearchExactExpressionBuilder implements Builder<SearchExactExpressi
*/

public SearchExactExpressionBuilder exact(
Function<com.commercetools.api.models.search.SearchAnyValueBuilder, com.commercetools.api.models.search.SearchAnyValueBuilder> builder) {
this.exact = builder.apply(com.commercetools.api.models.search.SearchAnyValueBuilder.of()).build();
Function<com.commercetools.api.models.search.SearchExactValueBuilder, com.commercetools.api.models.search.SearchExactValueBuilder> builder) {
this.exact = builder.apply(com.commercetools.api.models.search.SearchExactValueBuilder.of()).build();
return this;
}

Expand All @@ -43,8 +43,8 @@ public SearchExactExpressionBuilder exact(
*/

public SearchExactExpressionBuilder withExact(
Function<com.commercetools.api.models.search.SearchAnyValueBuilder, com.commercetools.api.models.search.SearchAnyValue> builder) {
this.exact = builder.apply(com.commercetools.api.models.search.SearchAnyValueBuilder.of());
Function<com.commercetools.api.models.search.SearchExactValueBuilder, com.commercetools.api.models.search.SearchExactValue> builder) {
this.exact = builder.apply(com.commercetools.api.models.search.SearchExactValueBuilder.of());
return this;
}

Expand All @@ -54,7 +54,7 @@ public SearchExactExpressionBuilder withExact(
* @return Builder
*/

public SearchExactExpressionBuilder exact(final com.commercetools.api.models.search.SearchAnyValue exact) {
public SearchExactExpressionBuilder exact(final com.commercetools.api.models.search.SearchExactValue exact) {
this.exact = exact;
return this;
}
Expand All @@ -64,7 +64,7 @@ public SearchExactExpressionBuilder exact(final com.commercetools.api.models.sea
* @return exact
*/

public com.commercetools.api.models.search.SearchAnyValue getExact() {
public com.commercetools.api.models.search.SearchExactValue getExact() {
return this.exact;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class SearchExactExpressionImpl implements SearchExactExpression, ModelBase {

private com.commercetools.api.models.search.SearchAnyValue exact;
private com.commercetools.api.models.search.SearchExactValue exact;

/**
* create instance with all properties
*/
@JsonCreator
SearchExactExpressionImpl(@JsonProperty("exact") final com.commercetools.api.models.search.SearchAnyValue exact) {
SearchExactExpressionImpl(@JsonProperty("exact") final com.commercetools.api.models.search.SearchExactValue exact) {
this.exact = exact;
}

Expand All @@ -42,11 +42,11 @@ public SearchExactExpressionImpl() {
*
*/

public com.commercetools.api.models.search.SearchAnyValue getExact() {
public com.commercetools.api.models.search.SearchExactValue getExact() {
return this.exact;
}

public void setExact(final com.commercetools.api.models.search.SearchAnyValue exact) {
public void setExact(final com.commercetools.api.models.search.SearchExactValue exact) {
this.exact = exact;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@

package com.commercetools.api.models.search;

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;

/**
* SearchExactValue
*
* <hr>
* Example to create an instance using the builder pattern
* <div class=code-example>
* <pre><code class='java'>
* SearchExactValue searchExactValue = SearchExactValue.builder()
* .field("{field}")
* .build()
* </code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
@JsonDeserialize(as = SearchExactValueImpl.class)
public interface SearchExactValue extends SearchQueryExpressionValue {

/**
*
* @return value
*/

@JsonProperty("value")
public Object getValue();

/**
*
* @return values
*/

@JsonProperty("values")
public List<Object> getValues();

/**
* <p>String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47. The format combines language, script, and region using hyphen-separated subtags. For example: <code>en</code>, <code>en-US</code>, <code>zh-Hans-SG</code>.</p>
* @return language
*/

@JsonProperty("language")
public String getLanguage();

/**
*
* @return caseInsensitive
*/

@JsonProperty("caseInsensitive")
public Boolean getCaseInsensitive();

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

public void setValue(final Object value);

/**
* set values
* @param values values to be set
*/

@JsonIgnore
public void setValues(final Object... values);

/**
* set values
* @param values values to be set
*/

public void setValues(final List<Object> values);

/**
* <p>String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47. The format combines language, script, and region using hyphen-separated subtags. For example: <code>en</code>, <code>en-US</code>, <code>zh-Hans-SG</code>.</p>
* @param language value to be set
*/

public void setLanguage(final String language);

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

public void setCaseInsensitive(final Boolean caseInsensitive);

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

/**
* factory method to create a shallow copy SearchExactValue
* @param template instance to be copied
* @return copy instance
*/
public static SearchExactValue of(final SearchExactValue template) {
SearchExactValueImpl instance = new SearchExactValueImpl();
instance.setField(template.getField());
instance.setBoost(template.getBoost());
instance.setFieldType(template.getFieldType());
instance.setValue(template.getValue());
instance.setValues(template.getValues());
instance.setLanguage(template.getLanguage());
instance.setCaseInsensitive(template.getCaseInsensitive());
return instance;
}

/**
* factory method to create a deep copy of SearchExactValue
* @param template instance to be copied
* @return copy instance
*/
@Nullable
public static SearchExactValue deepCopy(@Nullable final SearchExactValue template) {
if (template == null) {
return null;
}
SearchExactValueImpl instance = new SearchExactValueImpl();
instance.setField(template.getField());
instance.setBoost(template.getBoost());
instance.setFieldType(template.getFieldType());
instance.setValue(template.getValue());
instance.setValues(Optional.ofNullable(template.getValues()).map(ArrayList::new).orElse(null));
instance.setLanguage(template.getLanguage());
instance.setCaseInsensitive(template.getCaseInsensitive());
return instance;
}

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

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

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

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

0 comments on commit c24d4db

Please sign in to comment.