-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #684 from commercetools/gen-sdk-updates
Update generated SDKs
- Loading branch information
Showing
54 changed files
with
2,669 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
115 changes: 115 additions & 0 deletions
115
...va-generated/com/commercetools/api/models/business_unit/BusinessUnitApprovalRuleMode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
|
||
package com.commercetools.api.models.business_unit; | ||
|
||
import java.util.Arrays; | ||
import java.util.Optional; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonValue; | ||
|
||
import io.vrap.rmf.base.client.JsonEnum; | ||
import io.vrap.rmf.base.client.utils.Generated; | ||
|
||
/** | ||
* <p>Determines whether a Business Unit can inherit Approval Rules from a parent. Only Business Units of type <code>Division</code> can use <code>ExplicitAndFromParent</code>.</p> | ||
*/ | ||
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") | ||
public interface BusinessUnitApprovalRuleMode extends JsonEnum { | ||
|
||
/** | ||
<p>Approval Rules of a Business Unit must be explicitly assigned. The Business Unit cannot inherit Approval Rules from a parent.</p> */ | ||
BusinessUnitApprovalRuleMode EXPLICIT = BusinessUnitApprovalRuleModeEnum.EXPLICIT; | ||
/** | ||
<p>Approval Rules of a Business Unit are inherited from a parent and can also be explicitly assigned.</p> */ | ||
BusinessUnitApprovalRuleMode EXPLICIT_AND_FROM_PARENT = BusinessUnitApprovalRuleModeEnum.EXPLICIT_AND_FROM_PARENT; | ||
|
||
/** | ||
* possible values of BusinessUnitApprovalRuleMode | ||
*/ | ||
enum BusinessUnitApprovalRuleModeEnum implements BusinessUnitApprovalRuleMode { | ||
/** | ||
* Explicit | ||
*/ | ||
EXPLICIT("Explicit"), | ||
|
||
/** | ||
* ExplicitAndFromParent | ||
*/ | ||
EXPLICIT_AND_FROM_PARENT("ExplicitAndFromParent"); | ||
private final String jsonName; | ||
|
||
private BusinessUnitApprovalRuleModeEnum(final String jsonName) { | ||
this.jsonName = jsonName; | ||
} | ||
|
||
public String getJsonName() { | ||
return jsonName; | ||
} | ||
|
||
public String toString() { | ||
return jsonName; | ||
} | ||
} | ||
|
||
/** | ||
* the JSON value | ||
* @return json value | ||
*/ | ||
@JsonValue | ||
String getJsonName(); | ||
|
||
/** | ||
* the enum value | ||
* @return name | ||
*/ | ||
String name(); | ||
|
||
/** | ||
* convert value to string | ||
* @return string representation | ||
*/ | ||
String toString(); | ||
|
||
/** | ||
* factory method for a enum value of BusinessUnitApprovalRuleMode | ||
* if no enum has been found an anonymous instance will be created | ||
* @param value the enum value to be wrapped | ||
* @return enum instance | ||
*/ | ||
@JsonCreator | ||
public static BusinessUnitApprovalRuleMode findEnum(String value) { | ||
return findEnumViaJsonName(value).orElse(new BusinessUnitApprovalRuleMode() { | ||
@Override | ||
public String getJsonName() { | ||
return value; | ||
} | ||
|
||
@Override | ||
public String name() { | ||
return value.toUpperCase(); | ||
} | ||
|
||
public String toString() { | ||
return value; | ||
} | ||
}); | ||
} | ||
|
||
/** | ||
* method to find enum using the JSON value | ||
* @param jsonName the json value to be wrapped | ||
* @return optional of enum instance | ||
*/ | ||
public static Optional<BusinessUnitApprovalRuleMode> findEnumViaJsonName(String jsonName) { | ||
return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); | ||
} | ||
|
||
/** | ||
* possible enum values | ||
* @return array of possible enum values | ||
*/ | ||
public static BusinessUnitApprovalRuleMode[] values() { | ||
return BusinessUnitApprovalRuleModeEnum.values(); | ||
} | ||
|
||
} |
132 changes: 132 additions & 0 deletions
132
.../com/commercetools/api/models/business_unit/BusinessUnitChangeApprovalRuleModeAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
|
||
package com.commercetools.api.models.business_unit; | ||
|
||
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>Updates Approval Rules inheritance behavior between Business Units.</p> | ||
* <p>Only Business Units of type <code>Division</code> can be changed to <code>ExplicitAndFromParent</code>.</p> | ||
* <p>This update action generates a BusinessUnitApprovalRuleModeChanged Message.</p> | ||
* | ||
* <hr> | ||
* Example to create an instance using the builder pattern | ||
* <div class=code-example> | ||
* <pre><code class='java'> | ||
* BusinessUnitChangeApprovalRuleModeAction businessUnitChangeApprovalRuleModeAction = BusinessUnitChangeApprovalRuleModeAction.builder() | ||
* .approvalRuleMode(BusinessUnitApprovalRuleMode.EXPLICIT) | ||
* .build() | ||
* </code></pre> | ||
* </div> | ||
*/ | ||
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") | ||
@JsonDeserialize(as = BusinessUnitChangeApprovalRuleModeActionImpl.class) | ||
public interface BusinessUnitChangeApprovalRuleModeAction extends BusinessUnitUpdateAction { | ||
|
||
/** | ||
* discriminator value for BusinessUnitChangeApprovalRuleModeAction | ||
*/ | ||
String CHANGE_APPROVAL_RULE_MODE = "changeApprovalRuleMode"; | ||
|
||
/** | ||
* <p>The new value for <code>approvalRuleMode</code>.</p> | ||
* @return approvalRuleMode | ||
*/ | ||
@NotNull | ||
@JsonProperty("approvalRuleMode") | ||
public BusinessUnitApprovalRuleMode getApprovalRuleMode(); | ||
|
||
/** | ||
* <p>The new value for <code>approvalRuleMode</code>.</p> | ||
* @param approvalRuleMode value to be set | ||
*/ | ||
|
||
public void setApprovalRuleMode(final BusinessUnitApprovalRuleMode approvalRuleMode); | ||
|
||
/** | ||
* factory method | ||
* @return instance of BusinessUnitChangeApprovalRuleModeAction | ||
*/ | ||
public static BusinessUnitChangeApprovalRuleModeAction of() { | ||
return new BusinessUnitChangeApprovalRuleModeActionImpl(); | ||
} | ||
|
||
/** | ||
* factory method to create a shallow copy BusinessUnitChangeApprovalRuleModeAction | ||
* @param template instance to be copied | ||
* @return copy instance | ||
*/ | ||
public static BusinessUnitChangeApprovalRuleModeAction of(final BusinessUnitChangeApprovalRuleModeAction template) { | ||
BusinessUnitChangeApprovalRuleModeActionImpl instance = new BusinessUnitChangeApprovalRuleModeActionImpl(); | ||
instance.setApprovalRuleMode(template.getApprovalRuleMode()); | ||
return instance; | ||
} | ||
|
||
/** | ||
* factory method to create a deep copy of BusinessUnitChangeApprovalRuleModeAction | ||
* @param template instance to be copied | ||
* @return copy instance | ||
*/ | ||
@Nullable | ||
public static BusinessUnitChangeApprovalRuleModeAction deepCopy( | ||
@Nullable final BusinessUnitChangeApprovalRuleModeAction template) { | ||
if (template == null) { | ||
return null; | ||
} | ||
BusinessUnitChangeApprovalRuleModeActionImpl instance = new BusinessUnitChangeApprovalRuleModeActionImpl(); | ||
instance.setApprovalRuleMode(template.getApprovalRuleMode()); | ||
return instance; | ||
} | ||
|
||
/** | ||
* builder factory method for BusinessUnitChangeApprovalRuleModeAction | ||
* @return builder | ||
*/ | ||
public static BusinessUnitChangeApprovalRuleModeActionBuilder builder() { | ||
return BusinessUnitChangeApprovalRuleModeActionBuilder.of(); | ||
} | ||
|
||
/** | ||
* create builder for BusinessUnitChangeApprovalRuleModeAction instance | ||
* @param template instance with prefilled values for the builder | ||
* @return builder | ||
*/ | ||
public static BusinessUnitChangeApprovalRuleModeActionBuilder builder( | ||
final BusinessUnitChangeApprovalRuleModeAction template) { | ||
return BusinessUnitChangeApprovalRuleModeActionBuilder.of(template); | ||
} | ||
|
||
/** | ||
* accessor map function | ||
* @param <T> mapped type | ||
* @param helper function to map the object | ||
* @return mapped value | ||
*/ | ||
default <T> T withBusinessUnitChangeApprovalRuleModeAction( | ||
Function<BusinessUnitChangeApprovalRuleModeAction, T> helper) { | ||
return helper.apply(this); | ||
} | ||
|
||
/** | ||
* gives a TypeReference for usage with Jackson DataBind | ||
* @return TypeReference | ||
*/ | ||
public static com.fasterxml.jackson.core.type.TypeReference<BusinessUnitChangeApprovalRuleModeAction> typeReference() { | ||
return new com.fasterxml.jackson.core.type.TypeReference<BusinessUnitChangeApprovalRuleModeAction>() { | ||
@Override | ||
public String toString() { | ||
return "TypeReference<BusinessUnitChangeApprovalRuleModeAction>"; | ||
} | ||
}; | ||
} | ||
} |
Oops, something went wrong.