Skip to content

Commit

Permalink
TASK: Updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
Auto Mation committed Oct 23, 2023
1 parent 78b287e commit f176bf1
Show file tree
Hide file tree
Showing 25 changed files with 109 additions and 36 deletions.
12 changes: 12 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
**Api changes**

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

- added enum `approval-flow` to type `ReferenceTypeId`
- added enum `approval-rule` to type `ReferenceTypeId`
- added enum `approval-flow` to type `ChangeSubscriptionResourceTypeId`
- added enum `approval-rule` to type `ChangeSubscriptionResourceTypeId`
- added enum `approval-flow` to type `MessageSubscriptionResourceTypeId`
- added enum `approval-rule` to type `MessageSubscriptionResourceTypeId`
</details>


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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public interface ReferenceTypeId extends JsonEnum {

/**
<p>References an <a href="ctp:api:type:ApprovalFlow">ApprovalFlow</a>.</p>
*/
ReferenceTypeId APPROVAL_FLOW = ReferenceTypeIdEnum.APPROVAL_FLOW;
/**
<p>References an <a href="ctp:api:type:ApprovalRule">ApprovalRule</a>.</p>
*/
ReferenceTypeId APPROVAL_RULE = ReferenceTypeIdEnum.APPROVAL_RULE;
/**
<p>References an <a href="ctp:api:type:AssociateRole">AssociateRole</a>.</p>
Expand Down Expand Up @@ -206,6 +216,16 @@ public interface ReferenceTypeId extends JsonEnum {
* possible values of ReferenceTypeId
*/
enum ReferenceTypeIdEnum implements ReferenceTypeId {
/**
* approval-flow
*/
APPROVAL_FLOW("approval-flow"),

/**
* approval-rule
*/
APPROVAL_RULE("approval-rule"),

/**
* associate-role
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* <div class=code-example>
* <pre><code class='java'>
* GraphQLMaxResourceLimitExceededError graphQLMaxResourceLimitExceededError = GraphQLMaxResourceLimitExceededError.builder()
* .exceededResource(ReferenceTypeId.ASSOCIATE_ROLE)
* .exceededResource(ReferenceTypeId.APPROVAL_FLOW)
* .build()
* </code></pre>
* </div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* <div class=code-example>
* <pre><code class='java'>
* GraphQLMaxResourceLimitExceededError graphQLMaxResourceLimitExceededError = GraphQLMaxResourceLimitExceededError.builder()
* .exceededResource(ReferenceTypeId.ASSOCIATE_ROLE)
* .exceededResource(ReferenceTypeId.APPROVAL_FLOW)
* .build()
* </code></pre>
* </div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* <div class=code-example>
* <pre><code class='java'>
* GraphQLReferencedResourceNotFoundError graphQLReferencedResourceNotFoundError = GraphQLReferencedResourceNotFoundError.builder()
* .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
* .typeId(ReferenceTypeId.APPROVAL_FLOW)
* .build()
* </code></pre>
* </div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* <div class=code-example>
* <pre><code class='java'>
* GraphQLReferencedResourceNotFoundError graphQLReferencedResourceNotFoundError = GraphQLReferencedResourceNotFoundError.builder()
* .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
* .typeId(ReferenceTypeId.APPROVAL_FLOW)
* .build()
* </code></pre>
* </div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* <pre><code class='java'>
* MaxResourceLimitExceededError maxResourceLimitExceededError = MaxResourceLimitExceededError.builder()
* .message("{message}")
* .exceededResource(ReferenceTypeId.ASSOCIATE_ROLE)
* .exceededResource(ReferenceTypeId.APPROVAL_FLOW)
* .build()
* </code></pre>
* </div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* <pre><code class='java'>
* MaxResourceLimitExceededError maxResourceLimitExceededError = MaxResourceLimitExceededError.builder()
* .message("{message}")
* .exceededResource(ReferenceTypeId.ASSOCIATE_ROLE)
* .exceededResource(ReferenceTypeId.APPROVAL_FLOW)
* .build()
* </code></pre>
* </div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* <pre><code class='java'>
* ReferencedResourceNotFoundError referencedResourceNotFoundError = ReferencedResourceNotFoundError.builder()
* .message("{message}")
* .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
* .typeId(ReferenceTypeId.APPROVAL_FLOW)
* .build()
* </code></pre>
* </div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* <pre><code class='java'>
* ReferencedResourceNotFoundError referencedResourceNotFoundError = ReferencedResourceNotFoundError.builder()
* .message("{message}")
* .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
* .typeId(ReferenceTypeId.APPROVAL_FLOW)
* .build()
* </code></pre>
* </div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* <div class=code-example>
* <pre><code class='java'>
* ChangeSubscription changeSubscription = ChangeSubscription.builder()
* .resourceTypeId(ChangeSubscriptionResourceTypeId.ASSOCIATE_ROLE)
* .resourceTypeId(ChangeSubscriptionResourceTypeId.APPROVAL_FLOW)
* .build()
* </code></pre>
* </div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* <div class=code-example>
* <pre><code class='java'>
* ChangeSubscription changeSubscription = ChangeSubscription.builder()
* .resourceTypeId(ChangeSubscriptionResourceTypeId.ASSOCIATE_ROLE)
* .resourceTypeId(ChangeSubscriptionResourceTypeId.APPROVAL_FLOW)
* .build()
* </code></pre>
* </div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public interface ChangeSubscriptionResourceTypeId extends JsonEnum {

/**
<p>Changes related to <a href="ctp:api:type:ApprovalFlow">ApprovalFlows</a>.</p>
*/
ChangeSubscriptionResourceTypeId APPROVAL_FLOW = ChangeSubscriptionResourceTypeIdEnum.APPROVAL_FLOW;
/**
<p>Changes related to <a href="ctp:api:type:ApprovalRule">ApprovalRules</a>.</p>
*/
ChangeSubscriptionResourceTypeId APPROVAL_RULE = ChangeSubscriptionResourceTypeIdEnum.APPROVAL_RULE;
/**
<p>Changes related to <a href="ctp:api:type:AssociateRole">AssociateRoles</a>.</p>
Expand Down Expand Up @@ -196,6 +206,16 @@ public interface ChangeSubscriptionResourceTypeId extends JsonEnum {
* possible values of ChangeSubscriptionResourceTypeId
*/
enum ChangeSubscriptionResourceTypeIdEnum implements ChangeSubscriptionResourceTypeId {
/**
* approval-flow
*/
APPROVAL_FLOW("approval-flow"),

/**
* approval-rule
*/
APPROVAL_RULE("approval-rule"),

/**
* associate-role
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* <div class=code-example>
* <pre><code class='java'>
* MessageSubscription messageSubscription = MessageSubscription.builder()
* .resourceTypeId(MessageSubscriptionResourceTypeId.ASSOCIATE_ROLE)
* .resourceTypeId(MessageSubscriptionResourceTypeId.APPROVAL_FLOW)
* .build()
* </code></pre>
* </div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* <div class=code-example>
* <pre><code class='java'>
* MessageSubscription messageSubscription = MessageSubscription.builder()
* .resourceTypeId(MessageSubscriptionResourceTypeId.ASSOCIATE_ROLE)
* .resourceTypeId(MessageSubscriptionResourceTypeId.APPROVAL_FLOW)
* .build()
* </code></pre>
* </div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public interface MessageSubscriptionResourceTypeId extends JsonEnum {

/**
<p>Messages related to <a href="ctp:api:type:ApprovalFlow">ApprovalFlows</a>.</p>
*/
MessageSubscriptionResourceTypeId APPROVAL_FLOW = MessageSubscriptionResourceTypeIdEnum.APPROVAL_FLOW;
/**
<p>Messages related to <a href="ctp:api:type:ApprovalRule">ApprovalRules</a>.</p>
*/
MessageSubscriptionResourceTypeId APPROVAL_RULE = MessageSubscriptionResourceTypeIdEnum.APPROVAL_RULE;
/**
<p>Messages related to <a href="ctp:api:type:AssociateRole">AssociateRoles</a>.</p>
Expand Down Expand Up @@ -111,6 +121,16 @@ public interface MessageSubscriptionResourceTypeId extends JsonEnum {
* possible values of MessageSubscriptionResourceTypeId
*/
enum MessageSubscriptionResourceTypeIdEnum implements MessageSubscriptionResourceTypeId {
/**
* approval-flow
*/
APPROVAL_FLOW("approval-flow"),

/**
* approval-rule
*/
APPROVAL_RULE("approval-rule"),

/**
* associate-role
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ public void buildUnchecked(GraphQLMaxResourceLimitExceededErrorBuilder builder)
@DataProvider
public static Object[][] objectBuilder() {
return new Object[][] { new Object[] { GraphQLMaxResourceLimitExceededError.builder()
.exceededResource(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role")) } };
.exceededResource(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow")) } };
}

@Test
public void exceededResource() {
GraphQLMaxResourceLimitExceededError value = GraphQLMaxResourceLimitExceededError.of();
value.setExceededResource(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role"));
value.setExceededResource(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow"));
Assertions.assertThat(value.getExceededResource())
.isEqualTo(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role"));
.isEqualTo(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ public void buildUnchecked(GraphQLReferenceExistsErrorBuilder builder) {
@DataProvider
public static Object[][] objectBuilder() {
return new Object[][] { new Object[] { GraphQLReferenceExistsError.builder()
.referencedBy(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role")) } };
.referencedBy(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow")) } };
}

@Test
public void referencedBy() {
GraphQLReferenceExistsError value = GraphQLReferenceExistsError.of();
value.setReferencedBy(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role"));
value.setReferencedBy(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow"));
Assertions.assertThat(value.getReferencedBy())
.isEqualTo(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role"));
.isEqualTo(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ public void buildUnchecked(GraphQLReferencedResourceNotFoundErrorBuilder builder
public static Object[][] objectBuilder() {
return new Object[][] {
new Object[] { GraphQLReferencedResourceNotFoundError.builder()
.typeId(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role")) },
.typeId(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow")) },
new Object[] { GraphQLReferencedResourceNotFoundError.builder().id("id") },
new Object[] { GraphQLReferencedResourceNotFoundError.builder().key("key") } };
}

@Test
public void typeId() {
GraphQLReferencedResourceNotFoundError value = GraphQLReferencedResourceNotFoundError.of();
value.setTypeId(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role"));
value.setTypeId(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow"));
Assertions.assertThat(value.getTypeId())
.isEqualTo(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role"));
.isEqualTo(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow"));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static Object[][] objectBuilder() {
return new Object[][] { new Object[] { MaxResourceLimitExceededError.builder().message("message") },
new Object[] { MaxResourceLimitExceededError.builder()
.exceededResource(
com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role")) } };
com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow")) } };
}

@Test
Expand All @@ -40,8 +40,8 @@ public void message() {
@Test
public void exceededResource() {
MaxResourceLimitExceededError value = MaxResourceLimitExceededError.of();
value.setExceededResource(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role"));
value.setExceededResource(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow"));
Assertions.assertThat(value.getExceededResource())
.isEqualTo(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role"));
.isEqualTo(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static Object[][] objectBuilder() {
return new Object[][] { new Object[] { ReferenceExistsError.builder().message("message") },
new Object[] { ReferenceExistsError.builder()
.referencedBy(
com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role")) } };
com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow")) } };
}

@Test
Expand All @@ -40,8 +40,8 @@ public void message() {
@Test
public void referencedBy() {
ReferenceExistsError value = ReferenceExistsError.of();
value.setReferencedBy(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role"));
value.setReferencedBy(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow"));
Assertions.assertThat(value.getReferencedBy())
.isEqualTo(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role"));
.isEqualTo(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void buildUnchecked(ReferencedResourceNotFoundErrorBuilder builder) {
public static Object[][] objectBuilder() {
return new Object[][] { new Object[] { ReferencedResourceNotFoundError.builder().message("message") },
new Object[] { ReferencedResourceNotFoundError.builder()
.typeId(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role")) },
.typeId(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow")) },
new Object[] { ReferencedResourceNotFoundError.builder().id("id") },
new Object[] { ReferencedResourceNotFoundError.builder().key("key") } };
}
Expand All @@ -41,9 +41,9 @@ public void message() {
@Test
public void typeId() {
ReferencedResourceNotFoundError value = ReferencedResourceNotFoundError.of();
value.setTypeId(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role"));
value.setTypeId(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow"));
Assertions.assertThat(value.getTypeId())
.isEqualTo(com.commercetools.api.models.common.ReferenceTypeId.findEnum("associate-role"));
.isEqualTo(com.commercetools.api.models.common.ReferenceTypeId.findEnum("approval-flow"));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ public void buildUnchecked(ChangeSubscriptionBuilder builder) {
public static Object[][] objectBuilder() {
return new Object[][] { new Object[] { ChangeSubscription.builder()
.resourceTypeId(com.commercetools.api.models.subscription.ChangeSubscriptionResourceTypeId
.findEnum("associate-role")) } };
.findEnum("approval-flow")) } };
}

@Test
public void resourceTypeId() {
ChangeSubscription value = ChangeSubscription.of();
value.setResourceTypeId(
com.commercetools.api.models.subscription.ChangeSubscriptionResourceTypeId.findEnum("associate-role"));
com.commercetools.api.models.subscription.ChangeSubscriptionResourceTypeId.findEnum("approval-flow"));
Assertions.assertThat(value.getResourceTypeId())
.isEqualTo(com.commercetools.api.models.subscription.ChangeSubscriptionResourceTypeId
.findEnum("associate-role"));
.findEnum("approval-flow"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ public static Object[][] objectBuilder() {
return new Object[][] {
new Object[] { MessageSubscription.builder()
.resourceTypeId(com.commercetools.api.models.subscription.MessageSubscriptionResourceTypeId
.findEnum("associate-role")) },
.findEnum("approval-flow")) },
new Object[] { MessageSubscription.builder().types(Collections.singletonList("types")) } };
}

@Test
public void resourceTypeId() {
MessageSubscription value = MessageSubscription.of();
value.setResourceTypeId(
com.commercetools.api.models.subscription.MessageSubscriptionResourceTypeId.findEnum("associate-role"));
com.commercetools.api.models.subscription.MessageSubscriptionResourceTypeId.findEnum("approval-flow"));
Assertions.assertThat(value.getResourceTypeId())
.isEqualTo(com.commercetools.api.models.subscription.MessageSubscriptionResourceTypeId
.findEnum("associate-role"));
.findEnum("approval-flow"));
}

@Test
Expand Down
1 change: 1 addition & 0 deletions references.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,4 @@ cfb34c1d1b7549d9bfe759d13ca9357646371e72
00ec1791c7297ecf203797bcfe02ebad5c9c9a64
da5022ed759c0ebb3b80c15eb62488c7584dfeba
b25b7cc02df72845f3045528120267d1b6330e0a
8e6bc39ae805ea9d9f046fb70734980f82bbb272

0 comments on commit f176bf1

Please sign in to comment.