diff --git a/changes.md b/changes.md index a4137eb7e26..a0b1a26ab9a 100644 --- a/changes.md +++ b/changes.md @@ -3,10 +3,17 @@
Added Enum(s) +- added enum `RecurringOrder` to type `CartOrigin` - added enum `ApplicationStoppedByGroupBestDeal` to type `DiscountCodeState` - added enum `discount-group` to type `ReferenceTypeId` - added enum `payment-method` to type `ReferenceTypeId` +- added enum `recurrence-policy` to type `ReferenceTypeId` +- added enum `recurring-order` to type `ReferenceTypeId` - added enum `payment-method` to type `ExtensionResourceTypeId` +- added enum `RecurringOrderState` to type `StateTypeEnum` +- added enum `recurrence-policy` to type `ChangeSubscriptionResourceTypeId` +- added enum `recurring-order` to type `ChangeSubscriptionResourceTypeId` +- added enum `recurring-order` to type `ResourceTypeId`
@@ -18,10 +25,24 @@ - added property `discountGroup` to type `CartDiscountDraft` - added property `priceRoundingMode` to type `Cart` - added property `priceRoundingMode` to type `CartDraft` +- added property `recurrenceInfo` to type `CustomLineItem` +- added property `recurrenceInfo` to type `CustomLineItemDraft` +- added property `recurrenceInfo` to type `LineItem` +- added property `recurrenceInfo` to type `LineItemDraft` +- added property `recurrenceInfo` to type `CartAddCustomLineItemAction` +- added property `recurrenceInfo` to type `CartAddLineItemAction` +- added property `recurrencePolicy` to type `Price` +- added property `recurrencePolicy` to type `PriceDraft` +- added property `recurrenceInfo` to type `MyLineItemDraft` +- added property `recurrenceInfo` to type `MyCartAddLineItemAction` - added property `attributes` to type `ProductTailoringCreatedMessage` - added property `attributes` to type `ProductTailoringCreatedMessagePayload` - added property `priceRoundingMode` to type `StagedOrder` +- added property `recurringOrder` to type `StagedOrder` +- added property `recurrenceInfo` to type `StagedOrderAddCustomLineItemAction` +- added property `recurrenceInfo` to type `StagedOrderAddLineItemAction` - added property `priceRoundingMode` to type `Order` +- added property `recurringOrder` to type `Order` - added property `priceRoundingMode` to type `OrderImportDraft` - added property `token` to type `PaymentMethodInfo` - added property `interfaceAccount` to type `PaymentMethodInfo` @@ -34,10 +55,13 @@ - added property `attributes` to type `ProductData` - added property `attributes` to type `ProductDraft` - added property `attributes` to type `ProductProjection` +- added property `recurrencePrices` to type `ProductVariant` - added property `priceRoundingMode` to type `CartsConfiguration` - added property `taxRoundingMode` to type `CartsConfiguration` - added property `priceRoundingMode` to type `QuoteRequest` - added property `priceRoundingMode` to type `Quote` +- added property `recurrencePolicy` to type `StandalonePrice` +- added property `recurrencePolicy` to type `StandalonePriceDraft` - added property `events` to type `SubscriptionSetEventsAction` @@ -73,6 +97,12 @@ - added method `apiRoot.withProjectKey().paymentMethods().get()` - added method `apiRoot.withProjectKey().paymentMethods().head()` - added method `apiRoot.withProjectKey().paymentMethods().post()` +- added method `apiRoot.withProjectKey().recurringOrders().get()` +- added method `apiRoot.withProjectKey().recurringOrders().head()` +- added method `apiRoot.withProjectKey().recurringOrders().post()` +- added method `apiRoot.withProjectKey().recurrencePolicies().get()` +- added method `apiRoot.withProjectKey().recurrencePolicies().head()` +- added method `apiRoot.withProjectKey().recurrencePolicies().post()` - added method `apiRoot.withProjectKey().discountGroups().withKey().get()` - added method `apiRoot.withProjectKey().discountGroups().withKey().head()` - added method `apiRoot.withProjectKey().discountGroups().withKey().post()` @@ -89,6 +119,18 @@ - added method `apiRoot.withProjectKey().paymentMethods().withId().head()` - added method `apiRoot.withProjectKey().paymentMethods().withId().post()` - added method `apiRoot.withProjectKey().paymentMethods().withId().delete()` +- added method `apiRoot.withProjectKey().recurringOrders().withId().get()` +- added method `apiRoot.withProjectKey().recurringOrders().withId().head()` +- added method `apiRoot.withProjectKey().recurringOrders().withId().post()` +- added method `apiRoot.withProjectKey().recurringOrders().withKey().get()` +- added method `apiRoot.withProjectKey().recurringOrders().withKey().head()` +- added method `apiRoot.withProjectKey().recurringOrders().withKey().post()` +- added method `apiRoot.withProjectKey().recurrencePolicies().withKey().get()` +- added method `apiRoot.withProjectKey().recurrencePolicies().withKey().head()` +- added method `apiRoot.withProjectKey().recurrencePolicies().withKey().post()` +- added method `apiRoot.withProjectKey().recurrencePolicies().withId().get()` +- added method `apiRoot.withProjectKey().recurrencePolicies().withId().head()` +- added method `apiRoot.withProjectKey().recurrencePolicies().withId().post()` @@ -97,6 +139,8 @@ - added type `CartDiscountSetDiscountGroupAction` - added type `CartChangePriceRoundingModeAction` +- added type `CartSetCustomLineItemRecurrenceInfoAction` +- added type `CartSetLineItemRecurrenceInfoAction` - added type `DiscountGroup` - added type `DiscountGroupDraft` - added type `DiscountGroupPagedQueryResponse` @@ -108,6 +152,8 @@ - added type `DiscountGroupSetKeyAction` - added type `DiscountGroupSetNameAction` - added type `DiscountGroupSetSortOrderAction` +- added type `MyCartSetCustomLineItemRecurrenceInfoAction` +- added type `MyCartSetLineItemRecurrenceInfoAction` - added type `MyPaymentSetMethodInfoCustomFieldAction` - added type `MyPaymentSetMethodInfoCustomTypeAction` - added type `MyPaymentSetMethodInfoInterfaceAccountAction` @@ -115,6 +161,7 @@ - added type `DiscountGroupDeletedMessage` - added type `DiscountGroupKeySetMessage` - added type `DiscountGroupSortOrderSetMessage` +- added type `OrderCreatedFromRecurringOrderMessage` - added type `PaymentInterfaceIdSetMessage` - added type `PaymentMethodCreatedMessage` - added type `PaymentMethodCustomFieldAddedMessage` @@ -140,10 +187,22 @@ - added type `PaymentMethodNameSetMessage` - added type `PaymentMethodPaymentInterfaceSetMessage` - added type `PaymentMethodPaymentMethodStatusSetMessage` +- added type `RecurringOrderCreatedMessage` +- added type `RecurringOrderCustomFieldAddedMessage` +- added type `RecurringOrderCustomFieldChangedMessage` +- added type `RecurringOrderCustomFieldRemovedMessage` +- added type `RecurringOrderCustomTypeRemovedMessage` +- added type `RecurringOrderCustomTypeSetMessage` +- added type `RecurringOrderKeySetMessage` +- added type `RecurringOrderScheduleSetMessage` +- added type `RecurringOrderStartsAtSetMessage` +- added type `RecurringOrderStateChangedMessage` +- added type `RecurringOrderStateTransitionMessage` - added type `DiscountGroupCreatedMessagePayload` - added type `DiscountGroupDeletedMessagePayload` - added type `DiscountGroupKeySetMessagePayload` - added type `DiscountGroupSortOrderSetMessagePayload` +- added type `OrderCreatedFromRecurringOrderMessagePayload` - added type `PaymentInterfaceIdSetMessagePayload` - added type `PaymentMethodCreatedMessagePayload` - added type `PaymentMethodCustomFieldAddedMessagePayload` @@ -169,6 +228,18 @@ - added type `PaymentMethodNameSetMessagePayload` - added type `PaymentMethodPaymentInterfaceSetMessagePayload` - added type `PaymentMethodPaymentMethodStatusSetMessagePayload` +- added type `RecurringOrderCreatedMessagePayload` +- added type `RecurringOrderCustomFieldAddedMessagePayload` +- added type `RecurringOrderCustomFieldChangedMessagePayload` +- added type `RecurringOrderCustomFieldRemovedMessagePayload` +- added type `RecurringOrderCustomTypeRemovedMessagePayload` +- added type `RecurringOrderCustomTypeSetMessagePayload` +- added type `RecurringOrderKeySetMessagePayload` +- added type `RecurringOrderMessagePayload` +- added type `RecurringOrderScheduleSetMessagePayload` +- added type `RecurringOrderStartsAtSetMessagePayload` +- added type `RecurringOrderStateChangedMessagePayload` +- added type `RecurringOrderStateTransitionMessagePayload` - added type `StagedOrderChangePriceRoundingModeAction` - added type `PaymentMethod` - added type `PaymentMethodDraft` @@ -198,6 +269,74 @@ - added type `ProductSetProductAttributeAction` - added type `ProjectChangePriceRoundingModeAction` - added type `ProjectChangeTaxRoundingModeAction` +- added type `DayOfMonthSchedule` +- added type `DayOfMonthScheduleDraft` +- added type `IntervalUnit` +- added type `RecurrencePolicy` +- added type `RecurrencePolicyDraft` +- added type `RecurrencePolicyPagedQueryResponse` +- added type `RecurrencePolicyReference` +- added type `RecurrencePolicyResourceIdentifier` +- added type `RecurrencePolicySchedule` +- added type `RecurrencePolicyScheduleDraft` +- added type `RecurrencePolicyUpdate` +- added type `RecurrencePolicyUpdateAction` +- added type `StandardSchedule` +- added type `StandardScheduleDraft` +- added type `RecurrencePolicySetDescriptionAction` +- added type `RecurrencePolicySetKeyAction` +- added type `RecurrencePolicySetNameAction` +- added type `RecurrencePolicySetScheduleAction` +- added type `Counter` +- added type `CounterDraft` +- added type `CustomLineItemRecurrenceInfo` +- added type `CustomLineItemRecurrenceInfoDraft` +- added type `LineItemRecurrenceInfo` +- added type `LineItemRecurrenceInfoDraft` +- added type `PriceSelectionMode` +- added type `RecurringOrder` +- added type `RecurringOrderActive` +- added type `RecurringOrderCanceled` +- added type `RecurringOrderDraft` +- added type `RecurringOrderExpired` +- added type `RecurringOrderPagedQueryResponse` +- added type `RecurringOrderPaused` +- added type `RecurringOrderReference` +- added type `RecurringOrderResourceIdentifier` +- added type `RecurringOrderState` +- added type `RecurringOrderStateDraft` +- added type `RecurringOrderUpdate` +- added type `RecurringOrderUpdateAction` +- added type `SkipConfiguration` +- added type `SkipConfigurationDraft` +- added type `RecurringOrderSetCustomFieldAction` +- added type `RecurringOrderSetCustomTypeAction` +- added type `RecurringOrderSetKeyAction` +- added type `RecurringOrderSetOrderSkipConfigurationAction` +- added type `RecurringOrderSetScheduleAction` +- added type `RecurringOrderSetStartsAtAction` +- added type `RecurringOrderSetStateAction` +- added type `RecurringOrderTransitionStateAction` + + + +
+Added QueryParameter(s) + +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/products` +- added query parameter `priceRecurrencePolicy` to method `post /{projectKey}/products` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/products/key={key}` +- added query parameter `priceRecurrencePolicy` to method `post /{projectKey}/products/key={key}` +- added query parameter `priceRecurrencePolicy` to method `delete /{projectKey}/products/key={key}` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/products/{ID}` +- added query parameter `priceRecurrencePolicy` to method `post /{projectKey}/products/{ID}` +- added query parameter `priceRecurrencePolicy` to method `delete /{projectKey}/products/{ID}` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections/search` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections/key={key}` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections/{ID}` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/key={key}` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/{ID}`
@@ -206,10 +345,16 @@ - added resource `/{projectKey}/discount-groups` - added resource `/{projectKey}/payment-methods` +- added resource `/{projectKey}/recurring-orders` +- added resource `/{projectKey}/recurrence-policies` - added resource `/{projectKey}/discount-groups/key={key}` - added resource `/{projectKey}/discount-groups/{ID}` - added resource `/{projectKey}/payment-methods/key={key}` - added resource `/{projectKey}/payment-methods/{ID}` +- added resource `/{projectKey}/recurring-orders/{ID}` +- added resource `/{projectKey}/recurring-orders/key={key}` +- added resource `/{projectKey}/recurrence-policies/key={key}` +- added resource `/{projectKey}/recurrence-policies/{ID}` **Import changes** @@ -281,5 +426,6 @@ - added enum `ApplicationStoppedByGroupBestDeal` to type `DiscountCodeState` - added enum `payment-method` to type `ReferenceTypeId` +- added enum `RecurringOrderState` to type `StateTypeEnum` diff --git a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls index c8493c794f2..9b74912ba87 100644 --- a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls +++ b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls @@ -105,16 +105,19 @@ input AddBusinessUnitStore { } input AddCartCustomLineItem { - priceMode: CustomLineItemPriceMode = Standard - shippingDetails: ItemShippingDetailsDraft - custom: CustomFieldsDraft - quantity: Long + name: [LocalizedStringItemInputType!]! + key: String + money: BaseMoneyInput! + slug: String! externalTaxRate: ExternalTaxRateDraft + quantity: Long + custom: CustomFieldsDraft + shippingDetails: ItemShippingDetailsDraft + priceMode: CustomLineItemPriceMode + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrenceInfo: CustomLineItemRecurrenceInfoInputDraft taxCategory: ResourceIdentifierInput - slug: String! - money: BaseMoneyInput! - key: String - name: [LocalizedStringItemInputType!]! } input AddCartCustomShippingMethod { @@ -143,21 +146,24 @@ input AddCartItemShippingAddress { } input AddCartLineItem { - addedAt: DateTime + key: String + productId: String + sku: String + quantity: Long + variantId: Int + supplyChannel: ResourceIdentifierInput + distributionChannel: ResourceIdentifierInput + custom: CustomFieldsDraft shippingDetails: ItemShippingDetailsDraft - inventoryMode: InventoryMode - externalTotalPrice: ExternalLineItemTotalPriceDraft + addedAt: DateTime + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrenceInfo: LineItemRecurrenceInfoInputDraft + externalTaxRate: ExternalTaxRateDraft externalPrice: BaseMoneyInput + externalTotalPrice: ExternalLineItemTotalPriceDraft perMethodExternalTaxRate: [MethodExternalTaxRateDraft!] = [] - externalTaxRate: ExternalTaxRateDraft - custom: CustomFieldsDraft - distributionChannel: ResourceIdentifierInput - supplyChannel: ResourceIdentifierInput - variantId: Int - quantity: Long - key: String - sku: String - productId: String + inventoryMode: InventoryMode } input AddCartPayment { @@ -230,16 +236,19 @@ input AddMyBusinessUnitShippingAddressId { } input AddMyCartLineItem { - addedAt: DateTime - shippingDetails: ItemShippingDetailsDraft - custom: CustomFieldsDraft - distributionChannel: ResourceIdentifierInput - supplyChannel: ResourceIdentifierInput - variantId: Int - quantity: Long - sku: String key: String productId: String + sku: String + quantity: Long + variantId: Int + supplyChannel: ResourceIdentifierInput + distributionChannel: ResourceIdentifierInput + custom: CustomFieldsDraft + shippingDetails: ItemShippingDetailsDraft + addedAt: DateTime + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrenceInfo: LineItemRecurrenceInfoInputDraft } input AddMyPaymentTransaction { @@ -390,16 +399,19 @@ input AddShoppingListTextLineItem { } input AddStagedOrderCustomLineItem { - priceMode: CustomLineItemPriceMode = Standard - shippingDetails: ItemShippingDetailsDraftType - custom: CustomFieldsDraft - quantity: Long + name: [LocalizedStringItemInputType!]! + key: String + money: BaseMoneyInput! + slug: String! externalTaxRate: ExternalTaxRateDraft + quantity: Long + custom: CustomFieldsDraft + priceMode: CustomLineItemPriceMode + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrenceInfo: CustomLineItemRecurrenceInfoInputDraft + shippingDetails: ItemShippingDetailsDraftType taxCategory: ResourceIdentifierInput - slug: String! - money: BaseMoneyInput! - key: String - name: [LocalizedStringItemInputType!]! } type AddStagedOrderCustomLineItemOutput implements StagedOrderUpdateActionOutput { @@ -447,21 +459,24 @@ type AddStagedOrderItemShippingAddressOutput implements StagedOrderUpdateActionO } input AddStagedOrderLineItem { + key: String + productId: String + sku: String + quantity: Long + variantId: Int + supplyChannel: ResourceIdentifierInput + distributionChannel: ResourceIdentifierInput + custom: CustomFieldsDraft addedAt: DateTime - shippingDetails: ItemShippingDetailsDraftType - inventoryMode: InventoryMode - externalTotalPrice: ExternalLineItemTotalPriceDraft + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrenceInfo: LineItemRecurrenceInfoInputDraft + externalTaxRate: ExternalTaxRateDraft externalPrice: BaseMoneyInput + externalTotalPrice: ExternalLineItemTotalPriceDraft perMethodExternalTaxRate: [MethodExternalTaxRateDraft!] = [] - externalTaxRate: ExternalTaxRateDraft - custom: CustomFieldsDraft - distributionChannel: ResourceIdentifierInput - supplyChannel: ResourceIdentifierInput - variantId: Int - quantity: Long - key: String - sku: String - productId: String + inventoryMode: InventoryMode + shippingDetails: ItemShippingDetailsDraftType } type AddStagedOrderLineItemOutput implements StagedOrderUpdateActionOutput { @@ -673,22 +688,22 @@ enum AnonymousCartSignInMode { } type Applied implements OrderEditResult { - appliedAt: DateTime! excerptBeforeEdit: OrderExcerpt! excerptAfterEdit: OrderExcerpt! type: String! + appliedAt: DateTime! } input ApplyCartDeltaToCustomLineItemShippingDetailsTargets { customLineItemId: String customLineItemKey: String - targetsDelta: [ShippingTargetDraft!]! + targetsDelta: [ShippingTargetDraft!] } input ApplyCartDeltaToLineItemShippingDetailsTargets { lineItemId: String - targetsDelta: [ShippingTargetDraft!]! lineItemKey: String + targetsDelta: [ShippingTargetDraft!] } input ApplyStagedChanges { @@ -861,6 +876,8 @@ type ApprovalRuleStatusSet implements MessagePayload { } input ApprovalRuleUpdateAction { + setCustomField: SetApprovalRuleCustomField + setCustomType: SetApprovalRuleCustomType setKey: SetApprovalRuleKey setName: SetApprovalRuleName setDescription: SetApprovalRuleDescription @@ -868,8 +885,6 @@ input ApprovalRuleUpdateAction { setRequesters: SetApprovalRuleRequesters setStatus: SetApprovalRuleStatus setApprovers: SetApprovalRuleApprovers - setCustomField: SetApprovalRuleCustomField - setCustomType: SetApprovalRuleCustomType } input ApproveApprovalFlow { @@ -1328,6 +1343,19 @@ input BaseSearchKeywordInput { custom: CustomSuggestTokenizerInput } +interface DiscountTypeCombination { + type: String! +} + +type Stacking implements DiscountTypeCombination { + type: String! +} + +type BestDeal implements DiscountTypeCombination { + type: String! + chosenDiscountType: ChosenDiscountType +} + "The `BigDecimal` scalar type represents signed fractional values with arbitrary precision." scalar BigDecimal @@ -1609,8 +1637,8 @@ type BusinessUnitQueryResult { type BusinessUnitSearchConfiguration { status: BusinessUnitSearchStatus! - lastModifiedAt: DateTime! lastModifiedBy: Initiator + lastModifiedAt: DateTime! } enum BusinessUnitSearchStatus { @@ -1699,6 +1727,7 @@ input BusinessUnitUpdateAction { addStore: AddBusinessUnitStore changeAddress: ChangeBusinessUnitAddress changeAssociate: ChangeBusinessUnitAssociate + changeAssociateMode: ChangeBusinessUnitAssociateMode changeName: ChangeBusinessUnitName changeParentUnit: ChangeBusinessUnitParentUnit changeStatus: ChangeBusinessUnitStatus @@ -1717,7 +1746,6 @@ input BusinessUnitUpdateAction { setDefaultShippingAddress: SetBusinessUnitDefaultShippingAddress setStores: SetBusinessUnitStores setStoreMode: SetBusinessUnitStoreMode - changeAssociateMode: ChangeBusinessUnitAssociateMode changeApprovalRuleMode: ChangeBusinessUnitApprovalRuleMode "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" @@ -1803,12 +1831,9 @@ type CartCreated implements MessagePayload { "\nCart discounts are recalculated every time LineItems or CustomLineItems are added or removed from the Cart or an order is created from the cart.\n\nThe number of active cart discounts that do not require a discount code (isActive=true and requiresDiscountCode=false) is limited to 100.\n " type CartDiscount implements Versioned & ReferenceExpandable { cartPredicate: String! - validFrom: DateTime - validUntil: DateTime stackingMode: StackingMode! isActive: Boolean! requiresDiscountCode: Boolean! - sortOrder: String! key: String discountGroupRef: Reference name( @@ -1827,12 +1852,16 @@ type CartDiscount implements Versioned & ReferenceExpandable { descriptionAllLocales: [LocalizedString!] referenceRefs: [Reference!]! custom: CustomFieldsType + validFrom: DateTime + validUntil: DateTime storesRef: [KeyReference!]! stores: [Store!]! + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" discountGroup: DiscountGroup value: CartDiscountValue! target: CartDiscountTarget + sortOrder: String! id: String! version: Long! createdAt: DateTime! @@ -1865,6 +1894,7 @@ input CartDiscountDraft { custom: CustomFieldsDraft key: String stores: [ResourceIdentifierInput!] + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" discountGroup: ResourceIdentifierInput } @@ -1989,7 +2019,6 @@ input CartDiscountValueBaseMoneyInput { centAmount: Long } - input CartDiscountValueInput { relative: RelativeDiscountValueInput absolute: AbsoluteDiscountValueInput @@ -1999,25 +2028,6 @@ input CartDiscountValueInput { giftLineItem: GiftLineItemValueInput } -"Chosen discount type for the cart as part of best deal" -enum ChosenDiscountType { - CartDiscount - ProductDiscount -} - -interface DiscountTypeCombination { - type: String! -} - -type Stacking implements DiscountTypeCombination { - type: String! -} - -type BestDeal implements DiscountTypeCombination { - type: String! - chosenDiscountType: ChosenDiscountType -} - input CartDraft { currency: Currency! country: Country @@ -2069,6 +2079,9 @@ enum CartOrigin { "The cart was created by our platform and belongs to a Quote." Quote + + "The cart was created by the merchant as a recurring order." + RecurringOrder } "Fields to access carts. Includes direct access to a single cart and searching for carts." @@ -2108,16 +2121,12 @@ enum CartState { } input CartUpdateAction { - addCustomLineItem: AddCartCustomLineItem addCustomShippingMethod: AddCartCustomShippingMethod addDiscountCode: AddCartDiscountCode addItemShippingAddress: AddCartItemShippingAddress - addLineItem: AddCartLineItem addPayment: AddCartPayment addShippingMethod: AddCartShippingMethod addShoppingList: AddCartShoppingList - applyDeltaToCustomLineItemShippingDetailsTargets: ApplyCartDeltaToCustomLineItemShippingDetailsTargets - applyDeltaToLineItemShippingDetailsTargets: ApplyCartDeltaToLineItemShippingDetailsTargets changeCustomLineItemMoney: ChangeCartCustomLineItemMoney changeCustomLineItemPriceMode: ChangeCartCustomLineItemPriceMode changeCustomLineItemQuantity: ChangeCartCustomLineItemQuantity @@ -2179,6 +2188,17 @@ input CartUpdateAction { updateItemShippingAddress: UpdateCartItemShippingAddress freezeCart: FreezeCart unfreezeCart: UnfreezeCart + applyDeltaToLineItemShippingDetailsTargets: ApplyCartDeltaToLineItemShippingDetailsTargets + applyDeltaToCustomLineItemShippingDetailsTargets: ApplyCartDeltaToCustomLineItemShippingDetailsTargets + addLineItem: AddCartLineItem + addCustomLineItem: AddCartCustomLineItem + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + setLineItemRecurrenceInfo: SetLineItemRecurrenceInfo + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + setCustomLineItemRecurrenceInfo: SetCustomLineItemRecurrenceInfo + changeLineItemQuantity: ChangeCartLineItemQuantity } @@ -2194,8 +2214,8 @@ type CartsConfiguration { deleteDaysAfterLastModification: Int allowAddingUnpublishedProducts: Boolean! countryTaxRateFallbackEnabled: Boolean! - priceRoundingMode: RoundingMode! taxRoundingMode: RoundingMode! + priceRoundingMode: RoundingMode! } input CartsConfigurationInput { @@ -2469,6 +2489,10 @@ input ChangeCartLineItemsOrder { lineItemOrder: [String!]! } +input ChangeCartPriceRoundingMode { + priceRoundingMode: RoundingMode! +} + input ChangeCartTaxCalculationMode { taxCalculationMode: TaxCalculationMode! } @@ -2477,10 +2501,6 @@ input ChangeCartTaxMode { taxMode: TaxMode! } -input ChangeCartPriceRoundingMode { - priceRoundingMode: RoundingMode! -} - input ChangeCartTaxRoundingMode { taxRoundingMode: RoundingMode! } @@ -2754,6 +2774,10 @@ input ChangeProjectSettingsOrderSearchStatus { status: OrderSearchStatus! } +input ChangeProjectSettingsPriceRoundingMode { + priceRoundingMode: RoundingMode! +} + input ChangeProjectSettingsProductSearchIndexingEnabled { enabled: Boolean! } @@ -2766,10 +2790,6 @@ input ChangeProjectSettingsTaxRoundingMode { taxRoundingMode: RoundingMode! } -input ChangeProjectSettingsPriceRoundingMode { - priceRoundingMode: RoundingMode! -} - input ChangeQuoteCustomer { customer: ResourceIdentifierInput! } @@ -2893,6 +2913,15 @@ type ChangeStagedOrderPaymentStateOutput implements StagedOrderUpdateActionOutpu paymentState: PaymentState! } +input ChangeStagedOrderPriceRoundingMode { + priceRoundingMode: RoundingMode! +} + +type ChangeStagedOrderPriceRoundingModeOutput implements StagedOrderUpdateActionOutput { + type: String! + priceRoundingMode: RoundingMode! +} + input ChangeStagedOrderShipmentState { shipmentState: ShipmentState! } @@ -2920,15 +2949,6 @@ type ChangeStagedOrderTaxModeOutput implements StagedOrderUpdateActionOutput { taxMode: TaxMode! } -input ChangeStagedOrderPriceRoundingMode { - priceRoundingMode: RoundingMode! -} - -type ChangeStagedOrderPriceRoundingModeOutput implements StagedOrderUpdateActionOutput { - type: String! - priceRoundingMode: RoundingMode! -} - input ChangeStagedOrderTaxRoundingMode { taxRoundingMode: RoundingMode! } @@ -3113,6 +3133,12 @@ input ChannelUpdateAction { setRoles: SetChannelRoles } +"Chosen discount type for the cart as part of best deal" +enum ChosenDiscountType { + CartDiscount + ProductDiscount +} + type ClassificationShippingRateInput implements ShippingRateInput { key: String! type: String! @@ -3215,6 +3241,17 @@ input CountOnLineItemUnitsInput { excludeCount: Int @deprecated(reason: "Please use 'triggerPattern' to exclude.") } +type Counter implements SkipConfiguration { + totalToSkip: Int! + skipped: Int! + lastSkippedAt: DateTime + type: String! +} + +input CounterInputDraft { + totalToSkip: Int! +} + "[ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) country code." scalar Country @@ -3247,6 +3284,7 @@ input CreateStandalonePrice { custom: CustomFieldsDraft discounted: DiscountedProductPriceValueInput active: Boolean! = true + recurrencePolicy: ResourceIdentifierInput } input CreateStore { @@ -3367,6 +3405,9 @@ type CustomLineItem { custom: CustomFieldsType shippingDetails: ItemShippingDetails priceMode: CustomLineItemPriceMode! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrenceInfo: CustomLineItemRecurrenceInfo } input CustomLineItemDraft { @@ -3380,6 +3421,9 @@ input CustomLineItemDraft { custom: CustomFieldsDraft shippingDetails: ItemShippingDetailsDraft priceMode: CustomLineItemPriceMode + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrenceInfo: CustomLineItemRecurrenceInfoInputDraft } type CustomLineItemDraftOutput { @@ -3399,6 +3443,9 @@ type CustomLineItemDraftOutput { acceptLanguage: [Locale!]): String taxCategoryResId: ResourceIdentifier nameAllLocales: [LocalizedString!]! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrenceInfo: CustomLineItemRecurrenceInfoDraft } input CustomLineItemImportDraft { @@ -3423,6 +3470,25 @@ enum CustomLineItemPriceMode { Standard } +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type CustomLineItemRecurrenceInfo { + recurrencePolicy: RecurrencePolicy + recurrencePolicyRef: RecurrencePolicyRef! + expiresAt: DateTime +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type CustomLineItemRecurrenceInfoDraft { + recurrencePolicyRef: RecurrencePolicyReferenceIdentifier + expiresAt: DateTime +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input CustomLineItemRecurrenceInfoInputDraft { + recurrencePolicy: ResourceIdentifierInput! + expiresAt: DateTime +} + type CustomLineItemReturnItem implements ReturnItem { type: String! customLineItemId: String! @@ -3572,7 +3638,6 @@ type Customer implements Versioned & ReferenceExpandable { billingAddresses: [Address!]! storesRef: [KeyReference!]! stores: [Store!]! - customerGroupAssignments: [CustomerGroupAssignment!] custom: CustomFieldsType id: String! @@ -3895,8 +3960,8 @@ type CustomerQueryResult { type CustomerSearchConfiguration { status: CustomerSearchStatus! - lastModifiedAt: DateTime! lastModifiedBy: Initiator + lastModifiedAt: DateTime! } enum CustomerSearchStatus { @@ -4083,6 +4148,15 @@ type DateType implements FieldType { name: String! } +type DayOfMonthSchedule implements RecurrencePolicySchedule { + day: Int! + type: String! +} + +input DayOfMonthScheduleInput { + day: Int! +} + type Delivery { id: String! key: String @@ -4199,8 +4273,6 @@ type DiscountCode implements Versioned & ReferenceExpandable { maxApplicationsPerCustomer: Long cartPredicate: String applicationVersion: Long - validFrom: DateTime - validUntil: DateTime groups: [String!]! name( "String is defined for different locales. This argument specifies the desired locale." @@ -4215,6 +4287,8 @@ type DiscountCode implements Versioned & ReferenceExpandable { "List of languages the client is able to understand, and which locale variant is preferred." acceptLanguage: [Locale!]): String cartDiscounts: [CartDiscount!]! + validFrom: DateTime + validUntil: DateTime referenceRefs: [Reference!]! nameAllLocales: [LocalizedString!] descriptionAllLocales: [LocalizedString!] @@ -4277,11 +4351,11 @@ type DiscountCodeQueryResult { } enum DiscountCodeState { + ApplicationStoppedByGroupBestDeal + "The discount code is active and none of the discounts were applied because the discount application was stopped by one discount that has the StackingMode of StopAfterThisDiscount defined" ApplicationStoppedByPreviousDiscount - ApplicationStoppedByGroupBestDeal - "The discount code is active and it contains at least one active and valid CartDiscount. But its cart predicate does not match the cart or none of the contained active discount\u2019s cart predicates match the cart" DoesNotMatchCart @@ -4341,14 +4415,6 @@ type DiscountGroup implements Versioned { lastModifiedBy: Initiator } -"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" -input DiscountGroupDraft { - key: String! - sortOrder: String! - name: [LocalizedStringItemInputType!] - description: [LocalizedStringItemInputType!] -} - type DiscountGroupCreated implements MessagePayload { discountGroup: DiscountGroup! type: String! @@ -4359,17 +4425,18 @@ type DiscountGroupDeleted implements MessagePayload { type: String! } -type DiscountGroupKeySet implements MessagePayload { +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input DiscountGroupDraft { key: String! - discountGroupId: String! - oldKey: String - type: String! + sortOrder: String! + name: [LocalizedStringItemInputType!] + description: [LocalizedStringItemInputType!] } -type DiscountGroupSortOrderSet implements MessagePayload { - sortOrder: String! +type DiscountGroupKeySet implements MessagePayload { + key: String! discountGroupId: String! - oldSortOrder: String + oldKey: String type: String! } @@ -4390,6 +4457,13 @@ type DiscountGroupQueryResult { results: [DiscountGroup!]! } +type DiscountGroupSortOrderSet implements MessagePayload { + sortOrder: String! + discountGroupId: String! + oldSortOrder: String + type: String! +} + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" input DiscountGroupUpdateAction { setKey: SetDiscountGroupKey @@ -5140,6 +5214,12 @@ type InterfaceInteractionsRawResult { results: [InterfaceInteractionsRaw!]! } +enum IntervalUnit { + Days + Months + Weeks +} + "Inventory allows you to track stock quantity per SKU and optionally per supply channel" type InventoryEntry implements Versioned & ReferenceExpandable { sku: String! @@ -5147,8 +5227,8 @@ type InventoryEntry implements Versioned & ReferenceExpandable { availableQuantity: Long! key: String restockableInDays: Int - expectedDelivery: DateTime supplyChannel: Channel + expectedDelivery: DateTime supplyChannelRef: Reference custom: CustomFieldsType id: String! @@ -5238,7 +5318,7 @@ type ItemShippingDetails { } input ItemShippingDetailsDraft { - targets: [ShippingTargetDraft!]! + targets: [ShippingTargetDraft!]! = [] } type ItemShippingDetailsDraftOutput { @@ -5246,7 +5326,7 @@ type ItemShippingDetailsDraftOutput { } input ItemShippingDetailsDraftType { - targets: [ShippingTargetDraftType!]! + targets: [ShippingTargetDraftType!] = [] } type ItemShippingTarget { @@ -5348,6 +5428,9 @@ type LineItem { shippingDetails: ItemShippingDetails perMethodTaxRate: [MethodTaxRate!]! taxedPricePortions: [MethodTaxedPrice!]! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrenceInfo: LineItemRecurrenceInfo } input LineItemDraft { @@ -5361,9 +5444,13 @@ input LineItemDraft { custom: CustomFieldsDraft shippingDetails: ItemShippingDetailsDraft addedAt: DateTime + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrenceInfo: LineItemRecurrenceInfoInputDraft externalTaxRate: ExternalTaxRateDraft externalPrice: BaseMoneyInput externalTotalPrice: ExternalLineItemTotalPriceDraft + perMethodExternalTaxRate: [MethodExternalTaxRateDraft!] = [] inventoryMode: InventoryMode } @@ -5383,6 +5470,9 @@ type LineItemDraftOutput { addedAt: DateTime distributionChannelResId: ResourceIdentifier supplyChannelResId: ResourceIdentifier + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrenceInfo: LineItemRecurrenceInfoDraft } input LineItemImportDraft { @@ -5428,6 +5518,28 @@ enum LineItemPriceMode { Platform } +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type LineItemRecurrenceInfo { + recurrencePolicy: RecurrencePolicy + recurrencePolicyRef: RecurrencePolicyRef! + expiresAt: DateTime + priceSelectionMode: PriceSelectionMode! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type LineItemRecurrenceInfoDraft { + recurrencePolicyRef: RecurrencePolicyReferenceIdentifier + expiresAt: DateTime + priceSelectionMode: PriceSelectionMode! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input LineItemRecurrenceInfoInputDraft { + recurrencePolicy: ResourceIdentifierInput! + expiresAt: DateTime + priceSelectionMode: PriceSelectionMode! +} + type LineItemReturnItem implements ReturnItem { type: String! lineItemId: String! @@ -5872,20 +5984,18 @@ type Mutation { "Queries with specified key" key: String): Category createChannel(draft: ChannelDraft!): Channel - updateChannel(version: Long!, actions: [ChannelUpdateAction!]!, - + updateChannel( "Queries with specified ID" id: String, "Queries with specified key" - key: String): Channel - deleteChannel(version: Long!, - + key: String, version: Long!, actions: [ChannelUpdateAction!]!): Channel + deleteChannel( "Queries with specified ID" id: String, "Queries with specified key" - key: String): Channel + key: String, version: Long!): Channel createOrUpdateCustomObject(draft: CustomObjectDraft!): CustomObject deleteCustomObject(version: Long, @@ -6025,29 +6135,30 @@ type Mutation { key: String): ProductDiscount "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" - createDiscountGroup( - "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" - draft: DiscountGroupDraft!): DiscountGroup + createDiscountGroup( + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + draft: DiscountGroupDraft!): DiscountGroup "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" updateDiscountGroup(version: Long!, - "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" - actions: [DiscountGroupUpdateAction!]!, - "Queries with specified ID" - id: String, + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + actions: [DiscountGroupUpdateAction!]!, - "Queries with specified key" - key: String): DiscountGroup + "Queries with specified ID" + id: String, - "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" - deleteDiscountGroup(version: Long!, + "Queries with specified key" + key: String): DiscountGroup - "Queries with specified ID" - id: String, + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + deleteDiscountGroup(version: Long!, + + "Queries with specified ID" + id: String, - "Queries with specified key" - key: String): DiscountGroup + "Queries with specified key" + key: String): DiscountGroup createAttributeGroup(draft: AttributeGroupDraft!): AttributeGroup updateAttributeGroup(version: Long!, actions: [AttributeGroupUpdateAction!]!, @@ -6756,6 +6867,30 @@ type Mutation { "Queries with specified key" key: String): AssociateRole + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + createRecurringOrder(draft: RecurringOrderDraft!): RecurringOrder + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + updateRecurringOrder(version: Long!, actions: [RecurringOrderUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): RecurringOrder + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + createRecurrencePolicy(draft: RecurrencePolicyDraft!): RecurrencePolicy + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + updateRecurrencePolicy(version: Long!, actions: [RecurrencePolicyUpdateAction!]!, + + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): RecurrencePolicy + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" createPaymentMethod(draft: PaymentMethodDraft!): PaymentMethod @@ -6849,10 +6984,8 @@ input MyCartDraft { input MyCartUpdateAction { addDiscountCode: AddCartDiscountCode addItemShippingAddress: AddCartItemShippingAddress - addLineItem: AddMyCartLineItem addPayment: AddCartPayment addShoppingList: AddCartShoppingList - applyDeltaToLineItemShippingDetailsTargets: ApplyCartDeltaToLineItemShippingDetailsTargets changeLineItemsOrder: ChangeCartLineItemsOrder changeTaxMode: ChangeMyCartTaxMode recalculate: RecalculateCart @@ -6884,6 +7017,15 @@ input MyCartUpdateAction { setShippingCustomField: SetCartShippingCustomField setShippingCustomType: SetCartShippingCustomType updateItemShippingAddress: UpdateCartItemShippingAddress + applyDeltaToLineItemShippingDetailsTargets: ApplyCartDeltaToLineItemShippingDetailsTargets + applyDeltaToCustomLineItemShippingDetailsTargets: ApplyCartDeltaToCustomLineItemShippingDetailsTargets + addLineItem: AddMyCartLineItem + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + setLineItemRecurrenceInfo: SetLineItemRecurrenceInfo + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + setCustomLineItemRecurrenceInfo: SetCustomLineItemRecurrenceInfo changeLineItemQuantity: ChangeCartLineItemQuantity } @@ -6924,6 +7066,9 @@ input MyLineItemDraft { custom: CustomFieldsDraft shippingDetails: ItemShippingDetailsDraft addedAt: DateTime + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrenceInfo: LineItemRecurrenceInfoInputDraft } """ @@ -7100,7 +7245,6 @@ type Order implements Versioned & ReferenceExpandable { shippingInfo: ShippingInfo discountCodes: [DiscountCodeInfo!]! directDiscounts: [DirectDiscount!]! - discountTypeCombination: DiscountTypeCombination refusedGifts: [CartDiscount!]! refusedGiftsRefs: [Reference!]! paymentInfo: PaymentInfo @@ -7116,6 +7260,7 @@ type Order implements Versioned & ReferenceExpandable { taxedShippingPrice: TaxedPrice shippingMode: ShippingMode! shippingCustomFields: CustomFieldsType + discountTypeCombination: DiscountTypeCombination completedAt: DateTime orderNumber: String orderState: OrderState! @@ -7131,6 +7276,12 @@ type Order implements Versioned & ReferenceExpandable { cart: Cart quoteRef: Reference quote: Quote + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurringOrderRef: Reference + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurringOrder: RecurringOrder custom: CustomFieldsType id: String! version: Long! @@ -7170,6 +7321,12 @@ type OrderCreated implements MessagePayload & OrderMessagePayload { type: String! } +type OrderCreatedFromRecurringOrder implements MessagePayload & OrderMessagePayload { + order: Order + recurringOrderRef: Reference! + type: String! +} + type OrderCustomFieldAdded implements MessagePayload & OrderMessagePayload { name: String! value: Json! @@ -7456,8 +7613,8 @@ type OrderReturnShipmentStateChanged implements MessagePayload & OrderMessagePay type OrderSearchConfiguration { status: OrderSearchStatus! - lastModifiedAt: DateTime! lastModifiedBy: Initiator + lastModifiedAt: DateTime! } enum OrderSearchStatus { @@ -7987,6 +8144,12 @@ type PaymentMethodPaymentInterfaceSet implements MessagePayload { type: String! } +type PaymentMethodPaymentMethodStatusSet implements MessagePayload { + status: PaymentMethodStatus! + oldStatus: PaymentMethodStatus! + type: String! +} + type PaymentMethodQueryResult { offset: Int! count: Int! @@ -8001,12 +8164,6 @@ enum PaymentMethodStatus { Inactive } -type PaymentMethodPaymentMethodStatusSet implements MessagePayload { - status: PaymentMethodStatus! - oldStatus: PaymentMethodStatus! - type: String! -} - "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" type PaymentMethodToken { value: String! @@ -8238,6 +8395,15 @@ enum PriceMode { Standalone } +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +enum PriceSelectionMode { + "Every time a new order is created from this recurring order, we will update to the latest price available" + Dynamic + + "The price will stay the same until the recurring order expires or is cancelled" + Fixed +} + input PriceSelectorInput { currency: Currency! country: Country @@ -8386,7 +8552,8 @@ type ProductData { acceptLanguage: [Locale!]): String metaDescriptionAllLocales: [LocalizedString!] masterVariant: ProductVariant! - variants( + variants(onlyMatching: Boolean, + "Queries for products with specified SKUs" skus: [String!], isOnStock: Boolean, @@ -8400,7 +8567,8 @@ type ProductData { stockChannelIds: [String!], hasImages: Boolean): [ProductVariant!]! "Fetch all variants, including the master variant in first position." - allVariants( + allVariants(onlyMatching: Boolean, + "Queries for products with specified SKUs" skus: [String!], isOnStock: Boolean, @@ -8433,8 +8601,6 @@ type ProductDeleted implements MessagePayload { "\nA product price can be discounted in two ways:\n\n* with a relative or an absolute product discount, which will be automatically applied to all prices in a product that match a discount predicate.\n A relative discount reduces the matching price by a fraction (for example 10 % off). An absolute discount reduces the matching price by a fixed amount (for example 10\u20AC off). If more than one product discount matches a price, the discount sort order determines which one will be applied.\n* with an external product discount, which can then be used to explicitly set a discounted value on a particular product price.\n\nThe discounted price is stored in the discounted field of the Product Price.\n\nNote that when a discount is created, updated or removed it can take up to 15 minutes to update all the prices with the discounts.\n\nThe maximum number of ProductDiscounts that can be active at the same time is **200**.\n " type ProductDiscount implements Versioned & ReferenceExpandable { predicate: String! - validFrom: DateTime - validUntil: DateTime isActive: Boolean! isValid: Boolean! sortOrder: String! @@ -8454,6 +8620,8 @@ type ProductDiscount implements Versioned & ReferenceExpandable { referenceRefs: [Reference!]! nameAllLocales: [LocalizedString!]! descriptionAllLocales: [LocalizedString!] + validFrom: DateTime + validUntil: DateTime value: ProductDiscountValue! id: String! version: Long! @@ -8546,10 +8714,12 @@ type ProductImageAdded implements MessagePayload { } """ -An input object used to define a ProductAttribute. You should pass `value` in the form of an escaped JSON. +An input object used to define a ProductAttribute. +The value should be passed in a form of escaped JSON. -Here are a few examples for `value`: + +Examples for `value`: * FieldType `String`: `"\"This is a string\""` * FieldType `DateTimeType`: `"\"2018-10-12T14:00:00.000Z\""` @@ -8561,10 +8731,10 @@ input ProductLevelAttributeInput { name: String! """ - An input object used to define a ProductLevelAttribute. You should pass `value` in the form of an escaped JSON. + The value should be passed in a form of escaped JSON. - Here are a few examples for `value`: + Examples for `value`: * FieldType `String`: `"\"This is a string\""` * FieldType `DateTimeType`: `"\"2018-10-12T14:00:00.000Z\""` @@ -8611,6 +8781,12 @@ type ProductPrice { discounted: DiscountedProductPriceValue tiers: [ProductPriceTier!] custom: CustomFieldsType + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrencePolicy: RecurrencePolicy + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrencePolicyRef: Reference } type ProductPriceAdded implements MessagePayload { @@ -8682,6 +8858,7 @@ input ProductPriceDataInput { tiers: [ProductPriceTierInput!] = [] custom: CustomFieldsDraft discounted: DiscountedProductPriceValueInput + recurrencePolicy: ResourceIdentifierInput } type ProductPriceDiscountUpdateMessagePayload { @@ -8951,7 +9128,10 @@ type ProductSearchVariant { prices: [ProductPriceSearch!] "Returns a single price based on the price selection rules." - price(currency: Currency!, country: Country, customerGroupId: String, channelId: String, date: DateTime): ProductPriceSearch + price(currency: Currency!, country: Country, customerGroupId: String, channelId: String, date: DateTime, recurrencePolicyId: String, returnAllPricesByRecurrencePolicy: Boolean): ProductPriceSearch + + "Returns all recurrence prices based on the price selection rules." + allRecurrencePrices(currency: Currency!, country: Country, customerGroupId: String, channelId: String, date: DateTime, recurrencePolicyId: String, returnAllPricesByRecurrencePolicy: Boolean): [ProductPriceSearch!] images: [ImageProductSearch!]! assets: [Asset!]! availability: ProductSearchVariantAvailabilityWithChannels @@ -9424,9 +9604,9 @@ input ProductTailoringUpdateAction { setAssetSources: SetProductTailoringAssetSources setAssetTags: SetProductTailoringAssetTags setImages: SetProductTailoringImages - setDescription: SetProductTailoringDescription setAttribute: SetProductTailoringAttribute setAttributeInAllVariants: SetProductTailoringAttributeInAllVariants + setDescription: SetProductTailoringDescription setImageLabel: SetProductTailoringImageLabel setMetaAttributes: SetProductTailoringMetaAttributes setMetaDescription: SetProductTailoringMetaDescription @@ -9575,7 +9755,10 @@ type ProductVariant { prices: [ProductPrice!] "Returns a single price based on the price selection rules." - price(currency: Currency!, country: Country, customerGroupId: String, customerGroupAssignmentIds: [String!], channelId: String, date: DateTime): ProductPrice + price(currency: Currency!, country: Country, customerGroupId: String, customerGroupAssignmentIds: [String!], channelId: String, date: DateTime, recurrencePolicyId: String, returnAllPricesByRecurrencePolicy: Boolean): ProductPrice + + "Returns all recurrence prices based on the price selection rules." + allRecurrencePrices(currency: Currency!, country: Country, customerGroupId: String, channelId: String, date: DateTime, recurrencePolicyId: String, returnAllPricesByRecurrencePolicy: Boolean): [ProductPrice!] images: [Image!]! assets: [Asset!]! availability: ProductVariantAvailabilityWithChannels @@ -9759,7 +9942,6 @@ type ProjectProjection { key: String! name: String! languages: [Locale!]! - createdAt: DateTime! trialUntil: YearMonth carts: CartsConfiguration! shoppingLists: ShoppingListsConfiguration! @@ -9770,6 +9952,7 @@ type ProjectProjection { countries: [Country!]! currencies: [Currency!]! shippingRateInputType: ShippingRateInputType + createdAt: DateTime! } input ProjectSettingsUpdateAction { @@ -9922,6 +10105,7 @@ type Query { "Queries with specified key" key: String): ProductDiscount productDiscounts(where: String, sort: [String!], limit: Int, offset: Int): ProductDiscountQueryResult! + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" discountGroup( "Queries with specified ID" @@ -10130,6 +10314,27 @@ type Query { "Queries with specified key" key: String): AssociateRole associateRoles(where: String, sort: [String!], limit: Int, offset: Int): AssociateRoleQueryResult! + recurringOrder( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): RecurringOrder + recurringOrders(where: String, sort: [String!], limit: Int, offset: Int): RecurringOrderQueryResult! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrencePolicy( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): RecurrencePolicy + + """ + Recurrence policies are managed and queried through the Recurrence Policy API + and associated to a Price + """ + recurrencePolicies(where: String, sort: [String!], limit: Int, offset: Int): RecurrencePolicyQueryResult! "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" paymentMethod( @@ -10350,143 +10555,374 @@ enum QuoteRequestState { UnderReview } -type QuoteRequestStateChanged implements MessagePayload { - quoteRequestState: QuoteRequestState! - oldQuoteRequestState: QuoteRequestState! +type QuoteRequestStateChanged implements MessagePayload { + quoteRequestState: QuoteRequestState! + oldQuoteRequestState: QuoteRequestState! + type: String! +} + +type QuoteRequestStateTransition implements MessagePayload { + stateRef: Reference! + oldStateRef: Reference + force: Boolean! + state: State + oldState: State + type: String! +} + +input QuoteRequestUpdateAction { + changeCustomer: ChangeQuoteRequestCustomer + changeQuoteRequestState: ChangeQuoteRequestState + setCustomField: SetQuoteRequestCustomField + setCustomType: SetQuoteRequestCustomType + transitionState: TransitionQuoteRequestState +} + +enum QuoteState { + Accepted + Declined + DeclinedForRenegotiation + Pending + RenegotiationAddressed + Withdrawn +} + +type QuoteStateChanged implements MessagePayload { + quoteState: QuoteState! + oldQuoteState: QuoteState! + type: String! +} + +type QuoteStateTransition implements MessagePayload { + stateRef: Reference! + oldStateRef: Reference + force: Boolean! + state: State + oldState: State + type: String! +} + +input QuoteUpdateAction { + changeCustomer: ChangeQuoteCustomer + changeQuoteState: ChangeQuoteState + requestQuoteRenegotiation: RequestQuoteRenegotiation + setCustomField: SetQuoteCustomField + setCustomType: SetQuoteCustomType + transitionState: TransitionQuoteState +} + +interface RangeCount { + type: String! +} + +type RangeCountDouble implements RangeCount { + from: Float! + fromStr: String! + to: Float! + toStr: String! + count: Int! + productCount: Int + totalCount: Int! + total: Float! + min: Float! + max: Float! + mean: Float! + type: String! +} + +type RangeCountLong implements RangeCount { + from: Long! + fromStr: String! + to: Long! + toStr: String! + count: Int! + productCount: Int + totalCount: Int! + total: Long! + min: Long! + max: Long! + mean: Float! + type: String! +} + +input RangeElementInput { + from: String! + to: String! +} + +input RangeFacetInput { + path: String! + ranges: [RangeElementInput!]! + alias: String + countProducts: Boolean! = false +} + +type RangeFacetResult implements FacetResult { + dataType: String! + ranges: [RangeCount!]! + type: String! +} + +input RangeFilterInput { + path: String! + ranges: [RangeElementInput!]! +} + +type RawCustomField { + name: String! + value: Json! + referencedResource: ReferenceExpandable + referencedResourceSet: [ReferenceExpandable!]! +} + +type RawProductAttribute { + name: String! + value: Json! + attributeDefinition: AttributeDefinition + referencedResource: ReferenceExpandable + referencedResourceSet: [ReferenceExpandable!]! +} + +type RawProductSearchAttribute { + name: String! + value: Json! + referencedResource: ReferenceExpandable + referencedResourceSet: [ReferenceExpandable!]! +} + +input RecalculateCart { + updateProductData: Boolean = false +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type RecurrencePolicy implements Versioned { + id: String! + version: Long! + key: String! + name( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + nameAllLocales: [LocalizedString!] + description( + "String is defined for different locales. This argument specifies the desired locale." + locale: Locale, + + "List of languages the client is able to understand, and which locale variant is preferred." + acceptLanguage: [Locale!]): String + descriptionAllLocales: [LocalizedString!] + schedule: RecurrencePolicySchedule! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +input RecurrencePolicyDraft { + key: String! + name: [LocalizedStringItemInputType!] + description: [LocalizedStringItemInputType!] + schedule: RecurrencePolicyScheduleInput! +} + +type RecurrencePolicyQueryResult { + offset: Int! + count: Int! + total: Long! + exists: Boolean! + results: [RecurrencePolicy!]! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type RecurrencePolicyRef { + typeId: String! + id: String! +} + +type RecurrencePolicyReferenceIdentifier { + typeId: String! + id: String + key: String +} + +interface RecurrencePolicySchedule { + type: String! +} + +input RecurrencePolicyScheduleInput { + standard: StandardScheduleInput + dayOfMonth: DayOfMonthScheduleInput +} + +input RecurrencePolicyUpdateAction { + setDescription: SetRecurrencePolicyDescription + setKey: SetRecurrencePolicyKey + setName: SetRecurrencePolicyName + setSchedule: SetRecurrencePolicySchedule +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type RecurringOrder implements Versioned { + key: String + recurringOrderState: RecurringOrderState! + cartRef: Reference! + cart: Cart + startsAt: DateTime! + resumesAt: DateTime + expiresAt: DateTime + lastOrderAt: DateTime + nextOrderAt: DateTime + skipConfiguration: SkipConfiguration + businessUnit: BusinessUnit + businessUnitRef: KeyReference + custom: CustomFieldsType + stateRef: Reference + state: State + originOrderRef: Reference + originOrder: Order + schedule: RecurrencePolicySchedule! + customerRef: Reference + customer: Customer + customerEmail: String + id: String! + version: Long! + createdAt: DateTime! + lastModifiedAt: DateTime! + createdBy: Initiator + lastModifiedBy: Initiator +} + +input RecurringOrderActiveInput { + resumesAt: DateTime +} + +input RecurringOrderCanceledInput { + reason: String +} + +type RecurringOrderCreated implements MessagePayload { + recurringOrder: RecurringOrder! type: String! } -type QuoteRequestStateTransition implements MessagePayload { - stateRef: Reference! - oldStateRef: Reference - force: Boolean! - state: State - oldState: State +type RecurringOrderCustomFieldAdded implements MessagePayload { + name: String! + value: Json! type: String! } -input QuoteRequestUpdateAction { - changeCustomer: ChangeQuoteRequestCustomer - changeQuoteRequestState: ChangeQuoteRequestState - setCustomField: SetQuoteRequestCustomField - setCustomType: SetQuoteRequestCustomType - transitionState: TransitionQuoteRequestState +type RecurringOrderCustomFieldChanged implements MessagePayload { + name: String! + value: Json! + previousValue: Json + type: String! } -enum QuoteState { - Accepted - Declined - DeclinedForRenegotiation - Pending - RenegotiationAddressed - Withdrawn +type RecurringOrderCustomFieldRemoved implements MessagePayload { + name: String! + type: String! } -type QuoteStateChanged implements MessagePayload { - quoteState: QuoteState! - oldQuoteState: QuoteState! +type RecurringOrderCustomTypeRemoved implements MessagePayload { + previousTypeId: String type: String! } -type QuoteStateTransition implements MessagePayload { - stateRef: Reference! - oldStateRef: Reference - force: Boolean! - state: State - oldState: State +type RecurringOrderCustomTypeSet implements MessagePayload { + customFields: CustomFieldsType! + previousTypeId: String type: String! } -input QuoteUpdateAction { - changeCustomer: ChangeQuoteCustomer - changeQuoteState: ChangeQuoteState - requestQuoteRenegotiation: RequestQuoteRenegotiation - setCustomField: SetQuoteCustomField - setCustomType: SetQuoteCustomType - transitionState: TransitionQuoteState +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input RecurringOrderDraft { + key: String + custom: CustomFieldsDraft + cart: ResourceIdentifierInput! + cartVersion: Long! + startsAt: DateTime! + expiresAt: DateTime + state: ResourceIdentifierInput + recurringOrderState: RecurringOrderState } -interface RangeCount { - type: String! +input RecurringOrderExpiredInput { + dummy: String } -type RangeCountDouble implements RangeCount { - from: Float! - fromStr: String! - to: Float! - toStr: String! - count: Int! - productCount: Int - totalCount: Int! - total: Float! - min: Float! - max: Float! - mean: Float! +type RecurringOrderKeySet implements MessagePayload { + key: String + oldKey: String type: String! } -type RangeCountLong implements RangeCount { - from: Long! - fromStr: String! - to: Long! - toStr: String! - count: Int! - productCount: Int - totalCount: Int! - total: Long! - min: Long! - max: Long! - mean: Float! - type: String! +input RecurringOrderPausedInput { + dummy: String } -input RangeElementInput { - from: String! - to: String! +type RecurringOrderQueryResult { + offset: Int! + count: Int! + total: Long! + exists: Boolean! + results: [RecurringOrder!]! } -input RangeFacetInput { - path: String! - ranges: [RangeElementInput!]! - alias: String - countProducts: Boolean! = false +type RecurringOrderScheduleSet implements MessagePayload { + recurrencePolicySchedule: RecurrencePolicySchedule! + oldRecurrencePolicySchedule: RecurrencePolicySchedule! + type: String! } -type RangeFacetResult implements FacetResult { - dataType: String! - ranges: [RangeCount!]! +type RecurringOrderStartsAtSet implements MessagePayload { + startsAt: DateTime! + oldStartsAt: DateTime! type: String! } -input RangeFilterInput { - path: String! - ranges: [RangeElementInput!]! +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +enum RecurringOrderState { + Active + Canceled + Expired + Failed + Paused } -type RawCustomField { - name: String! - value: Json! - referencedResource: ReferenceExpandable - referencedResourceSet: [ReferenceExpandable!]! +type RecurringOrderStateChanged implements MessagePayload { + recurringOrderState: RecurringOrderState! + oldRecurringOrderState: RecurringOrderState! + type: String! } -type RawProductAttribute { - name: String! - value: Json! - attributeDefinition: AttributeDefinition - referencedResource: ReferenceExpandable - referencedResourceSet: [ReferenceExpandable!]! +input RecurringOrderStateDraft { + active: RecurringOrderActiveInput + paused: RecurringOrderPausedInput + canceled: RecurringOrderCanceledInput + expired: RecurringOrderExpiredInput } -type RawProductSearchAttribute { - name: String! - value: Json! - referencedResource: ReferenceExpandable - referencedResourceSet: [ReferenceExpandable!]! +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type RecurringOrderStateTransition implements MessagePayload { + force: Boolean! + state: State + oldState: State + stateRef: Reference! + oldStateRef: Reference + type: String! } -input RecalculateCart { - updateProductData: Boolean = false +input RecurringOrderUpdateAction { + setKey: SetRecurringOrderKey + setOrderSkipConfiguration: SetRecurringOrderOrderSkipConfiguration + setCustomField: SetRecurringOrderCustomField + setCustomType: SetRecurringOrderCustomType + setRecurringOrderState: SetRecurringOrderState + setSchedule: SetRecurringOrderSchedule + setStartsAt: SetRecurringOrderStartsAt + transitionState: TransitionRecurringOrderState } type Reference { @@ -11208,8 +11644,8 @@ type SearchIndexingConfiguration { type SearchIndexingConfigurationValues { status: SearchIndexingStatus - lastModifiedAt: DateTime lastModifiedBy: Initiator + lastModifiedAt: DateTime } enum SearchIndexingStatus { @@ -11298,6 +11734,18 @@ input SetApprovalRuleApprovers { approvers: ApproverHierarchyDraft! } +input SetApprovalRuleCustomField { + name: String! + value: String +} + +input SetApprovalRuleCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + input SetApprovalRuleDescription { description: String } @@ -11322,18 +11770,6 @@ input SetApprovalRuleStatus { status: ApprovalRuleStatus! } -input SetApprovalRuleCustomField { - name: String! - value: String -} - -input SetApprovalRuleCustomType { - fields: [CustomFieldInput!] - type: ResourceIdentifierInput - typeKey: String - typeId: String -} - input SetAssociateRoleCustomField { name: String! value: String @@ -11831,6 +12267,15 @@ input SetChannelRoles { roles: [ChannelRole!]! } +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input SetCustomLineItemRecurrenceInfo { + customLineItemId: String! + customLineItemKey: String + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrenceInfo: CustomLineItemRecurrenceInfoInputDraft +} + input SetCustomerAddressCustomField { name: String! value: String @@ -12049,6 +12494,14 @@ input SetInventoryEntrySupplyChannel { supplyChannel: ResourceIdentifierInput } +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input SetLineItemRecurrenceInfo { + lineItemId: String! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrenceInfo: LineItemRecurrenceInfoInputDraft +} + input SetMyBusinessUnitAddressCustomField { addressId: String addressKey: String @@ -12923,6 +13376,55 @@ input SetQuoteRequestCustomType { typeId: String } +input SetRecurrencePolicyDescription { + description: [LocalizedStringItemInputType!] +} + +input SetRecurrencePolicyKey { + key: String! +} + +input SetRecurrencePolicyName { + name: [LocalizedStringItemInputType!] +} + +input SetRecurrencePolicySchedule { + schedule: RecurrencePolicyScheduleInput! +} + +input SetRecurringOrderCustomField { + name: String! + value: String +} + +input SetRecurringOrderCustomType { + fields: [CustomFieldInput!] + type: ResourceIdentifierInput + typeKey: String + typeId: String +} + +input SetRecurringOrderKey { + key: String +} + +input SetRecurringOrderOrderSkipConfiguration { + skipConfigurationInputDraft: SkipConfigurationInputDraft + updatedExpiresAt: DateTime +} + +input SetRecurringOrderSchedule { + recurrencePolicy: ResourceIdentifierInput! +} + +input SetRecurringOrderStartsAt { + startsAt: DateTime! +} + +input SetRecurringOrderState { + recurringOrderState: RecurringOrderStateDraft! +} + input SetReviewAuthorName { authorName: String } @@ -14320,10 +14822,10 @@ type ShoppingListLineItem { id: String! key: String productId: String! + published: Boolean! variantId: Int productTypeRef: Reference! productType: ProductTypeDefinition! - published: Boolean! quantity: Int! addedAt: DateTime! name( @@ -14435,6 +14937,14 @@ input SimpleFieldTypeDraft { dummy: String } +interface SkipConfiguration { + type: String! +} + +input SkipConfigurationInputDraft { + Counter: CounterInputDraft +} + "Describes how this discount interacts with other discounts" enum StackingMode { "Default. Continue applying other matching discounts after applying this one." @@ -14445,11 +14955,9 @@ enum StackingMode { } input StagedOrderUpdateAction { - addCustomLineItem: AddStagedOrderCustomLineItem addDelivery: AddStagedOrderDelivery addDiscountCode: AddStagedOrderDiscountCode addItemShippingAddress: AddStagedOrderItemShippingAddress - addLineItem: AddStagedOrderLineItem addParcelToDelivery: AddStagedOrderParcelToDelivery addPayment: AddStagedOrderPayment addReturnInfo: AddStagedOrderReturnInfo @@ -14459,8 +14967,8 @@ input StagedOrderUpdateAction { changeLineItemQuantity: ChangeStagedOrderLineItemQuantity changeOrderState: ChangeStagedOrderOrderState changePaymentState: ChangeStagedOrderPaymentState - changeShipmentState: ChangeStagedOrderShipmentState changePriceRoundingMode: ChangeStagedOrderPriceRoundingMode + changeShipmentState: ChangeStagedOrderShipmentState changeTaxCalculationMode: ChangeStagedOrderTaxCalculationMode changeTaxMode: ChangeStagedOrderTaxMode changeTaxRoundingMode: ChangeStagedOrderTaxRoundingMode @@ -14537,6 +15045,8 @@ input StagedOrderUpdateAction { transitionState: TransitionStagedOrderState updateItemShippingAddress: UpdateStagedOrderItemShippingAddress updateSyncInfo: UpdateStagedOrderSyncInfo + addLineItem: AddStagedOrderLineItem + addCustomLineItem: AddStagedOrderCustomLineItem } interface StagedOrderUpdateActionOutput { @@ -14650,23 +15160,64 @@ StandalonePrices are managed and queried through the StandalonePrices API and associated to a ProductVariant through the sku field. """ type StandalonePrice implements Versioned { + "Unique identifier of the StandalonePrice." id: String! + + "Current version of the StandalonePrice." version: Long! + + "User-defined unique identifier of the StandalonePrice." key: String + + "SKU of the ProductVariant to which this Price is associated." sku: String! + + "Money value of this Price." value: BaseMoney! + + "Country for which this Price is valid." country: Country + + "CustomerGroup Reference for which this Price is valid." customerGroupRef: Reference customerGroup: CustomerGroup + + "Product distribution Channel for which this Price is valid." channelRef: Reference channel: Channel + + "Date from which the Price is valid." validFrom: DateTime + + "Date until the Price is valid." validUntil: DateTime + + """ + Price tiers if any are defined. + If `discounted` is present, the tiered Price is ignored for a Product Variant. + """ tiers: [ProductPriceTier!] + + "Set if a matching ProductDiscount exists." discounted: DiscountedProductPriceValue + + "Staged changes of the StandalonePrice. Only present if the StandalonePrice has some changes staged." staged: StagedStandalonePrice + + "Custom Fields for the StandalonePrice." custom: CustomFieldsType + + """ + If set to `true`, the StandalonePrice is considered during Product price selection. + If set to `false`, the StandalonePrice is not considered during Product price selection and any associated Line Items in a Cart cannot be ordered. + """ active: Boolean! + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrencePolicyRef: Reference + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + recurrencePolicy: RecurrencePolicy createdAt: DateTime! lastModifiedAt: DateTime! createdBy: Initiator @@ -14783,6 +15334,17 @@ type StandalonePriceValueChanged implements MessagePayload { type: String! } +type StandardSchedule implements RecurrencePolicySchedule { + value: Int! + intervalUnit: IntervalUnit! + type: String! +} + +input StandardScheduleInput { + value: Int! + intervalUnit: IntervalUnit! +} + "[State](https://docs.commercetools.com/api/projects/states)" type State implements Versioned & ReferenceExpandable { id: String! @@ -14844,6 +15406,7 @@ enum StateType { ProductState QuoteRequestState QuoteState + RecurringOrderState ReviewState StagedQuoteState } @@ -15045,8 +15608,8 @@ enum SubscriptionHealthStatus { ConfigurationError ConfigurationErrorDeliveryStopped Healthy - TemporaryError ManuallySuspended + TemporaryError } input SubscriptionUpdateAction { @@ -15451,6 +16014,11 @@ input TransitionQuoteState { force: Boolean = false } +input TransitionRecurringOrderState { + state: ResourceIdentifierInput! + force: Boolean = false +} + input TransitionReviewState { state: ResourceIdentifierInput! force: Boolean = false diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.java index d0f603ddd84..3731cb6fc86 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.java @@ -134,6 +134,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getLocaleProjection() { return this.getQueryParam("localeProjection"); } @@ -677,6 +681,95 @@ public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet addPri .collect(Collectors.toList())); } + /** + * set priceRecurrencePolicy with the specified value + * @param priceRecurrencePolicy value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet withPriceRecurrencePolicy( + final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param priceRecurrencePolicy value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet addPriceRecurrencePolicy( + final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet withPriceRecurrencePolicy( + final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet addPriceRecurrencePolicy( + final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet withPriceRecurrencePolicy( + final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet addPriceRecurrencePolicy( + final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param priceRecurrencePolicy values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet withPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param priceRecurrencePolicy values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet addPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set localeProjection with the specified value * @param localeProjection value to be set diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.java index 5e8c4e59a0e..68558b6b2db 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.java @@ -134,6 +134,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getLocaleProjection() { return this.getQueryParam("localeProjection"); } @@ -682,6 +686,95 @@ public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet ad .collect(Collectors.toList())); } + /** + * set priceRecurrencePolicy with the specified value + * @param priceRecurrencePolicy value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet withPriceRecurrencePolicy( + final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param priceRecurrencePolicy value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet addPriceRecurrencePolicy( + final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet withPriceRecurrencePolicy( + final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet addPriceRecurrencePolicy( + final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet withPriceRecurrencePolicy( + final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet addPriceRecurrencePolicy( + final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param priceRecurrencePolicy values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet withPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param priceRecurrencePolicy values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet addPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set localeProjection with the specified value * @param localeProjection value to be set diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersPost.java index e7eae0bf306..66a7952ca70 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersPost.java @@ -23,7 +23,7 @@ *

Creates an Order from a Cart.

*

The Cart must have a shipping address and an active Shipping Method set.

*

The shipping address is used for tax calculation for a Cart with Platform TaxMode.

- *

Creating an Order produces the OrderCreated Message.

+ *

Creating an Order produces the OrderCreated Message. If the Order is created from a Recurring Order schedule, the OrderCreatedFromRecurringOrder Message is generated.

*

If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Order creation may still successfully complete after the error is returned. If you receive this error, you should verify the status of the Order by querying a unique identifier supplied during the creation request, such as the Order number.

*

Specific Error Codes:

*
    diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersPostString.java index e9e3f2a1f83..4686cc8e208 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersPostString.java @@ -24,7 +24,7 @@ *

    Creates an Order from a Cart.

    *

    The Cart must have a shipping address and an active Shipping Method set.

    *

    The shipping address is used for tax calculation for a Cart with Platform TaxMode.

    - *

    Creating an Order produces the OrderCreated Message.

    + *

    Creating an Order produces the OrderCreated Message. If the Order is created from a Recurring Order schedule, the OrderCreatedFromRecurringOrder Message is generated.

    *

    If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Order creation may still successfully complete after the error is returned. If you receive this error, you should verify the status of the Order by querying a unique identifier supplied during the creation request, such as the Order number.

    *

    Specific Error Codes:

    *
      diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsByIDGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsByIDGet.java index 8f84b09cad6..7aea21db624 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsByIDGet.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsByIDGet.java @@ -122,6 +122,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getLocaleProjection() { return this.getQueryParam("localeProjection"); } @@ -636,6 +640,92 @@ public ByProjectKeyProductProjectionsByIDGet addPriceChannel(final Coll .collect(Collectors.toList())); } + /** + * set priceRecurrencePolicy with the specified value + * @param priceRecurrencePolicy value to be set + * @param value type + * @return ByProjectKeyProductProjectionsByIDGet + */ + public ByProjectKeyProductProjectionsByIDGet withPriceRecurrencePolicy( + final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param priceRecurrencePolicy value to be added + * @param value type + * @return ByProjectKeyProductProjectionsByIDGet + */ + public ByProjectKeyProductProjectionsByIDGet addPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductProjectionsByIDGet + */ + public ByProjectKeyProductProjectionsByIDGet withPriceRecurrencePolicy(final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductProjectionsByIDGet + */ + public ByProjectKeyProductProjectionsByIDGet addPriceRecurrencePolicy(final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductProjectionsByIDGet + */ + public ByProjectKeyProductProjectionsByIDGet withPriceRecurrencePolicy( + final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductProjectionsByIDGet + */ + public ByProjectKeyProductProjectionsByIDGet addPriceRecurrencePolicy( + final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param priceRecurrencePolicy values to be set + * @param value type + * @return ByProjectKeyProductProjectionsByIDGet + */ + public ByProjectKeyProductProjectionsByIDGet withPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param priceRecurrencePolicy values to be added + * @param value type + * @return ByProjectKeyProductProjectionsByIDGet + */ + public ByProjectKeyProductProjectionsByIDGet addPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set localeProjection with the specified value * @param localeProjection value to be set diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsGet.java index 05effbc20c6..20b8fb52a31 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsGet.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsGet.java @@ -117,6 +117,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getLocaleProjection() { return this.getQueryParam("localeProjection"); } @@ -645,6 +649,90 @@ public ByProjectKeyProductProjectionsGet addPriceChannel(final Collecti .collect(Collectors.toList())); } + /** + * set priceRecurrencePolicy with the specified value + * @param priceRecurrencePolicy value to be set + * @param value type + * @return ByProjectKeyProductProjectionsGet + */ + public ByProjectKeyProductProjectionsGet withPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param priceRecurrencePolicy value to be added + * @param value type + * @return ByProjectKeyProductProjectionsGet + */ + public ByProjectKeyProductProjectionsGet addPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductProjectionsGet + */ + public ByProjectKeyProductProjectionsGet withPriceRecurrencePolicy(final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductProjectionsGet + */ + public ByProjectKeyProductProjectionsGet addPriceRecurrencePolicy(final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductProjectionsGet + */ + public ByProjectKeyProductProjectionsGet withPriceRecurrencePolicy( + final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductProjectionsGet + */ + public ByProjectKeyProductProjectionsGet addPriceRecurrencePolicy(final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param priceRecurrencePolicy values to be set + * @param value type + * @return ByProjectKeyProductProjectionsGet + */ + public ByProjectKeyProductProjectionsGet withPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param priceRecurrencePolicy values to be added + * @param value type + * @return ByProjectKeyProductProjectionsGet + */ + public ByProjectKeyProductProjectionsGet addPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set localeProjection with the specified value * @param localeProjection value to be set diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsKeyByKeyGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsKeyByKeyGet.java index b01b2915650..bea47a7e4a2 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsKeyByKeyGet.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsKeyByKeyGet.java @@ -122,6 +122,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getLocaleProjection() { return this.getQueryParam("localeProjection"); } @@ -639,6 +643,93 @@ public ByProjectKeyProductProjectionsKeyByKeyGet addPriceChannel(final .collect(Collectors.toList())); } + /** + * set priceRecurrencePolicy with the specified value + * @param priceRecurrencePolicy value to be set + * @param value type + * @return ByProjectKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyProductProjectionsKeyByKeyGet withPriceRecurrencePolicy( + final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param priceRecurrencePolicy value to be added + * @param value type + * @return ByProjectKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyProductProjectionsKeyByKeyGet addPriceRecurrencePolicy( + final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyProductProjectionsKeyByKeyGet withPriceRecurrencePolicy(final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyProductProjectionsKeyByKeyGet addPriceRecurrencePolicy(final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyProductProjectionsKeyByKeyGet withPriceRecurrencePolicy( + final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyProductProjectionsKeyByKeyGet addPriceRecurrencePolicy( + final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param priceRecurrencePolicy values to be set + * @param value type + * @return ByProjectKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyProductProjectionsKeyByKeyGet withPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param priceRecurrencePolicy values to be added + * @param value type + * @return ByProjectKeyProductProjectionsKeyByKeyGet + */ + public ByProjectKeyProductProjectionsKeyByKeyGet addPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set localeProjection with the specified value * @param localeProjection value to be set diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsSearchGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsSearchGet.java index 62ada893317..312e594eafd 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsSearchGet.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductProjectionsSearchGet.java @@ -158,6 +158,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getLocaleProjection() { return this.getQueryParam("localeProjection"); } @@ -1544,6 +1548,93 @@ public ByProjectKeyProductProjectionsSearchGet addPriceChannel(final Co .collect(Collectors.toList())); } + /** + * set priceRecurrencePolicy with the specified value + * @param priceRecurrencePolicy value to be set + * @param value type + * @return ByProjectKeyProductProjectionsSearchGet + */ + public ByProjectKeyProductProjectionsSearchGet withPriceRecurrencePolicy( + final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param priceRecurrencePolicy value to be added + * @param value type + * @return ByProjectKeyProductProjectionsSearchGet + */ + public ByProjectKeyProductProjectionsSearchGet addPriceRecurrencePolicy( + final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductProjectionsSearchGet + */ + public ByProjectKeyProductProjectionsSearchGet withPriceRecurrencePolicy(final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductProjectionsSearchGet + */ + public ByProjectKeyProductProjectionsSearchGet addPriceRecurrencePolicy(final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductProjectionsSearchGet + */ + public ByProjectKeyProductProjectionsSearchGet withPriceRecurrencePolicy( + final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductProjectionsSearchGet + */ + public ByProjectKeyProductProjectionsSearchGet addPriceRecurrencePolicy( + final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param priceRecurrencePolicy values to be set + * @param value type + * @return ByProjectKeyProductProjectionsSearchGet + */ + public ByProjectKeyProductProjectionsSearchGet withPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param priceRecurrencePolicy values to be added + * @param value type + * @return ByProjectKeyProductProjectionsSearchGet + */ + public ByProjectKeyProductProjectionsSearchGet addPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set localeProjection with the specified value * @param localeProjection value to be set diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDDelete.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDDelete.java index 90fa35ce213..6fea70a2b33 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDDelete.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDDelete.java @@ -118,6 +118,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getVersion() { return this.getQueryParam("version"); } @@ -545,6 +549,89 @@ public ByProjectKeyProductsByIDDelete addPriceChannel(final Collection< .collect(Collectors.toList())); } + /** + * set priceRecurrencePolicy with the specified value + * @param priceRecurrencePolicy value to be set + * @param value type + * @return ByProjectKeyProductsByIDDelete + */ + public ByProjectKeyProductsByIDDelete withPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param priceRecurrencePolicy value to be added + * @param value type + * @return ByProjectKeyProductsByIDDelete + */ + public ByProjectKeyProductsByIDDelete addPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductsByIDDelete + */ + public ByProjectKeyProductsByIDDelete withPriceRecurrencePolicy(final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductsByIDDelete + */ + public ByProjectKeyProductsByIDDelete addPriceRecurrencePolicy(final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductsByIDDelete + */ + public ByProjectKeyProductsByIDDelete withPriceRecurrencePolicy(final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductsByIDDelete + */ + public ByProjectKeyProductsByIDDelete addPriceRecurrencePolicy(final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param priceRecurrencePolicy values to be set + * @param value type + * @return ByProjectKeyProductsByIDDelete + */ + public ByProjectKeyProductsByIDDelete withPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param priceRecurrencePolicy values to be added + * @param value type + * @return ByProjectKeyProductsByIDDelete + */ + public ByProjectKeyProductsByIDDelete addPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set version with the specified value * @param version value to be set diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDGet.java index 05026da9797..0da15211bea 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDGet.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDGet.java @@ -114,6 +114,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getExpand() { return this.getQueryParam("expand"); } @@ -537,6 +541,89 @@ public ByProjectKeyProductsByIDGet addPriceChannel(final Collection value type + * @return ByProjectKeyProductsByIDGet + */ + public ByProjectKeyProductsByIDGet withPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param priceRecurrencePolicy value to be added + * @param value type + * @return ByProjectKeyProductsByIDGet + */ + public ByProjectKeyProductsByIDGet addPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductsByIDGet + */ + public ByProjectKeyProductsByIDGet withPriceRecurrencePolicy(final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductsByIDGet + */ + public ByProjectKeyProductsByIDGet addPriceRecurrencePolicy(final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductsByIDGet + */ + public ByProjectKeyProductsByIDGet withPriceRecurrencePolicy(final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductsByIDGet + */ + public ByProjectKeyProductsByIDGet addPriceRecurrencePolicy(final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param priceRecurrencePolicy values to be set + * @param value type + * @return ByProjectKeyProductsByIDGet + */ + public ByProjectKeyProductsByIDGet withPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param priceRecurrencePolicy values to be added + * @param value type + * @return ByProjectKeyProductsByIDGet + */ + public ByProjectKeyProductsByIDGet addPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set expand with the specified value * @param expand value to be set diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDPost.java index 9bcee023214..09ffa6356d8 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDPost.java @@ -124,6 +124,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getExpand() { return this.getQueryParam("expand"); } @@ -547,6 +551,89 @@ public ByProjectKeyProductsByIDPost addPriceChannel(final Collection value type + * @return ByProjectKeyProductsByIDPost + */ + public ByProjectKeyProductsByIDPost withPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param priceRecurrencePolicy value to be added + * @param value type + * @return ByProjectKeyProductsByIDPost + */ + public ByProjectKeyProductsByIDPost addPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductsByIDPost + */ + public ByProjectKeyProductsByIDPost withPriceRecurrencePolicy(final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductsByIDPost + */ + public ByProjectKeyProductsByIDPost addPriceRecurrencePolicy(final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductsByIDPost + */ + public ByProjectKeyProductsByIDPost withPriceRecurrencePolicy(final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductsByIDPost + */ + public ByProjectKeyProductsByIDPost addPriceRecurrencePolicy(final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param priceRecurrencePolicy values to be set + * @param value type + * @return ByProjectKeyProductsByIDPost + */ + public ByProjectKeyProductsByIDPost withPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param priceRecurrencePolicy values to be added + * @param value type + * @return ByProjectKeyProductsByIDPost + */ + public ByProjectKeyProductsByIDPost addPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set expand with the specified value * @param expand value to be set diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDPostString.java index 632da449fb5..f9235e6e669 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsByIDPostString.java @@ -123,6 +123,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getExpand() { return this.getQueryParam("expand"); } @@ -548,6 +552,91 @@ public ByProjectKeyProductsByIDPostString addPriceChannel(final Collect .collect(Collectors.toList())); } + /** + * set priceRecurrencePolicy with the specified value + * @param value type + * @param priceRecurrencePolicy value to be set + * @return ByProjectKeyProductsByIDPostString + */ + public ByProjectKeyProductsByIDPostString withPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param value type + * @param priceRecurrencePolicy value to be added + * @return ByProjectKeyProductsByIDPostString + */ + public ByProjectKeyProductsByIDPostString addPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductsByIDPostString + */ + public ByProjectKeyProductsByIDPostString withPriceRecurrencePolicy(final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductsByIDPostString + */ + public ByProjectKeyProductsByIDPostString addPriceRecurrencePolicy(final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductsByIDPostString + */ + public ByProjectKeyProductsByIDPostString withPriceRecurrencePolicy( + final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductsByIDPostString + */ + public ByProjectKeyProductsByIDPostString addPriceRecurrencePolicy( + final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param value type + * @param priceRecurrencePolicy values to be set + * @return ByProjectKeyProductsByIDPostString + */ + public ByProjectKeyProductsByIDPostString withPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param value type + * @param priceRecurrencePolicy values to be added + * @return ByProjectKeyProductsByIDPostString + */ + public ByProjectKeyProductsByIDPostString addPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set expand with the specified value * @param value type diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsGet.java index 1428b0d4728..e0eade6042d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsGet.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsGet.java @@ -113,6 +113,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getExpand() { return this.getQueryParam("expand"); } @@ -625,6 +629,87 @@ public ByProjectKeyProductsGet addPriceChannel(final Collection .collect(Collectors.toList())); } + /** + * set priceRecurrencePolicy with the specified value + * @param priceRecurrencePolicy value to be set + * @param value type + * @return ByProjectKeyProductsGet + */ + public ByProjectKeyProductsGet withPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param priceRecurrencePolicy value to be added + * @param value type + * @return ByProjectKeyProductsGet + */ + public ByProjectKeyProductsGet addPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductsGet + */ + public ByProjectKeyProductsGet withPriceRecurrencePolicy(final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductsGet + */ + public ByProjectKeyProductsGet addPriceRecurrencePolicy(final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductsGet + */ + public ByProjectKeyProductsGet withPriceRecurrencePolicy(final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductsGet + */ + public ByProjectKeyProductsGet addPriceRecurrencePolicy(final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param priceRecurrencePolicy values to be set + * @param value type + * @return ByProjectKeyProductsGet + */ + public ByProjectKeyProductsGet withPriceRecurrencePolicy(final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param priceRecurrencePolicy values to be added + * @param value type + * @return ByProjectKeyProductsGet + */ + public ByProjectKeyProductsGet addPriceRecurrencePolicy(final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set expand with the specified value * @param expand value to be set diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyDelete.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyDelete.java index a92d1840ded..4a0e026a4c3 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyDelete.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyDelete.java @@ -118,6 +118,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getVersion() { return this.getQueryParam("version"); } @@ -547,6 +551,91 @@ public ByProjectKeyProductsKeyByKeyDelete addPriceChannel(final Collect .collect(Collectors.toList())); } + /** + * set priceRecurrencePolicy with the specified value + * @param priceRecurrencePolicy value to be set + * @param value type + * @return ByProjectKeyProductsKeyByKeyDelete + */ + public ByProjectKeyProductsKeyByKeyDelete withPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param priceRecurrencePolicy value to be added + * @param value type + * @return ByProjectKeyProductsKeyByKeyDelete + */ + public ByProjectKeyProductsKeyByKeyDelete addPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductsKeyByKeyDelete + */ + public ByProjectKeyProductsKeyByKeyDelete withPriceRecurrencePolicy(final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductsKeyByKeyDelete + */ + public ByProjectKeyProductsKeyByKeyDelete addPriceRecurrencePolicy(final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductsKeyByKeyDelete + */ + public ByProjectKeyProductsKeyByKeyDelete withPriceRecurrencePolicy( + final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductsKeyByKeyDelete + */ + public ByProjectKeyProductsKeyByKeyDelete addPriceRecurrencePolicy( + final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param priceRecurrencePolicy values to be set + * @param value type + * @return ByProjectKeyProductsKeyByKeyDelete + */ + public ByProjectKeyProductsKeyByKeyDelete withPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param priceRecurrencePolicy values to be added + * @param value type + * @return ByProjectKeyProductsKeyByKeyDelete + */ + public ByProjectKeyProductsKeyByKeyDelete addPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set version with the specified value * @param version value to be set diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyGet.java index 0ecb2f52294..39ea07283fd 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyGet.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyGet.java @@ -114,6 +114,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getExpand() { return this.getQueryParam("expand"); } @@ -538,6 +542,89 @@ public ByProjectKeyProductsKeyByKeyGet addPriceChannel(final Collection .collect(Collectors.toList())); } + /** + * set priceRecurrencePolicy with the specified value + * @param priceRecurrencePolicy value to be set + * @param value type + * @return ByProjectKeyProductsKeyByKeyGet + */ + public ByProjectKeyProductsKeyByKeyGet withPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param priceRecurrencePolicy value to be added + * @param value type + * @return ByProjectKeyProductsKeyByKeyGet + */ + public ByProjectKeyProductsKeyByKeyGet addPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductsKeyByKeyGet + */ + public ByProjectKeyProductsKeyByKeyGet withPriceRecurrencePolicy(final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductsKeyByKeyGet + */ + public ByProjectKeyProductsKeyByKeyGet addPriceRecurrencePolicy(final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductsKeyByKeyGet + */ + public ByProjectKeyProductsKeyByKeyGet withPriceRecurrencePolicy(final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductsKeyByKeyGet + */ + public ByProjectKeyProductsKeyByKeyGet addPriceRecurrencePolicy(final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param priceRecurrencePolicy values to be set + * @param value type + * @return ByProjectKeyProductsKeyByKeyGet + */ + public ByProjectKeyProductsKeyByKeyGet withPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param priceRecurrencePolicy values to be added + * @param value type + * @return ByProjectKeyProductsKeyByKeyGet + */ + public ByProjectKeyProductsKeyByKeyGet addPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set expand with the specified value * @param expand value to be set diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyPost.java index a049944f298..c5084ace99d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyPost.java @@ -123,6 +123,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getExpand() { return this.getQueryParam("expand"); } @@ -548,6 +552,89 @@ public ByProjectKeyProductsKeyByKeyPost addPriceChannel(final Collectio .collect(Collectors.toList())); } + /** + * set priceRecurrencePolicy with the specified value + * @param priceRecurrencePolicy value to be set + * @param value type + * @return ByProjectKeyProductsKeyByKeyPost + */ + public ByProjectKeyProductsKeyByKeyPost withPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param priceRecurrencePolicy value to be added + * @param value type + * @return ByProjectKeyProductsKeyByKeyPost + */ + public ByProjectKeyProductsKeyByKeyPost addPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductsKeyByKeyPost + */ + public ByProjectKeyProductsKeyByKeyPost withPriceRecurrencePolicy(final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductsKeyByKeyPost + */ + public ByProjectKeyProductsKeyByKeyPost addPriceRecurrencePolicy(final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductsKeyByKeyPost + */ + public ByProjectKeyProductsKeyByKeyPost withPriceRecurrencePolicy(final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductsKeyByKeyPost + */ + public ByProjectKeyProductsKeyByKeyPost addPriceRecurrencePolicy(final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param priceRecurrencePolicy values to be set + * @param value type + * @return ByProjectKeyProductsKeyByKeyPost + */ + public ByProjectKeyProductsKeyByKeyPost withPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param priceRecurrencePolicy values to be added + * @param value type + * @return ByProjectKeyProductsKeyByKeyPost + */ + public ByProjectKeyProductsKeyByKeyPost addPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set expand with the specified value * @param expand value to be set diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyPostString.java index 8e057e77f03..27e915721eb 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsKeyByKeyPostString.java @@ -122,6 +122,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getExpand() { return this.getQueryParam("expand"); } @@ -549,6 +553,93 @@ public ByProjectKeyProductsKeyByKeyPostString addPriceChannel(final Col .collect(Collectors.toList())); } + /** + * set priceRecurrencePolicy with the specified value + * @param value type + * @param priceRecurrencePolicy value to be set + * @return ByProjectKeyProductsKeyByKeyPostString + */ + public ByProjectKeyProductsKeyByKeyPostString withPriceRecurrencePolicy( + final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param value type + * @param priceRecurrencePolicy value to be added + * @return ByProjectKeyProductsKeyByKeyPostString + */ + public ByProjectKeyProductsKeyByKeyPostString addPriceRecurrencePolicy( + final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductsKeyByKeyPostString + */ + public ByProjectKeyProductsKeyByKeyPostString withPriceRecurrencePolicy(final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductsKeyByKeyPostString + */ + public ByProjectKeyProductsKeyByKeyPostString addPriceRecurrencePolicy(final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductsKeyByKeyPostString + */ + public ByProjectKeyProductsKeyByKeyPostString withPriceRecurrencePolicy( + final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductsKeyByKeyPostString + */ + public ByProjectKeyProductsKeyByKeyPostString addPriceRecurrencePolicy( + final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param value type + * @param priceRecurrencePolicy values to be set + * @return ByProjectKeyProductsKeyByKeyPostString + */ + public ByProjectKeyProductsKeyByKeyPostString withPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param value type + * @param priceRecurrencePolicy values to be added + * @return ByProjectKeyProductsKeyByKeyPostString + */ + public ByProjectKeyProductsKeyByKeyPostString addPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set expand with the specified value * @param value type diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsPost.java index 894818ac200..64c47ba4ef4 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsPost.java @@ -113,6 +113,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getExpand() { return this.getQueryParam("expand"); } @@ -530,6 +534,87 @@ public ByProjectKeyProductsPost addPriceChannel(final Collection value type + * @return ByProjectKeyProductsPost + */ + public ByProjectKeyProductsPost withPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param priceRecurrencePolicy value to be added + * @param value type + * @return ByProjectKeyProductsPost + */ + public ByProjectKeyProductsPost addPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductsPost + */ + public ByProjectKeyProductsPost withPriceRecurrencePolicy(final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductsPost + */ + public ByProjectKeyProductsPost addPriceRecurrencePolicy(final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductsPost + */ + public ByProjectKeyProductsPost withPriceRecurrencePolicy(final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductsPost + */ + public ByProjectKeyProductsPost addPriceRecurrencePolicy(final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param priceRecurrencePolicy values to be set + * @param value type + * @return ByProjectKeyProductsPost + */ + public ByProjectKeyProductsPost withPriceRecurrencePolicy(final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param priceRecurrencePolicy values to be added + * @param value type + * @return ByProjectKeyProductsPost + */ + public ByProjectKeyProductsPost addPriceRecurrencePolicy(final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set expand with the specified value * @param expand value to be set diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsPostString.java index 2ffdec87f6f..0e3d0ff195e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductsPostString.java @@ -112,6 +112,10 @@ public List getPriceChannel() { return this.getQueryParam("priceChannel"); } + public List getPriceRecurrencePolicy() { + return this.getQueryParam("priceRecurrencePolicy"); + } + public List getExpand() { return this.getQueryParam("expand"); } @@ -531,6 +535,89 @@ public ByProjectKeyProductsPostString addPriceChannel(final Collection< .collect(Collectors.toList())); } + /** + * set priceRecurrencePolicy with the specified value + * @param value type + * @param priceRecurrencePolicy value to be set + * @return ByProjectKeyProductsPostString + */ + public ByProjectKeyProductsPostString withPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().withQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param value type + * @param priceRecurrencePolicy value to be added + * @return ByProjectKeyProductsPostString + */ + public ByProjectKeyProductsPostString addPriceRecurrencePolicy(final TValue priceRecurrencePolicy) { + return copy().addQueryParam("priceRecurrencePolicy", priceRecurrencePolicy); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyProductsPostString + */ + public ByProjectKeyProductsPostString withPriceRecurrencePolicy(final Supplier supplier) { + return copy().withQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyProductsPostString + */ + public ByProjectKeyProductsPostString addPriceRecurrencePolicy(final Supplier supplier) { + return copy().addQueryParam("priceRecurrencePolicy", supplier.get()); + } + + /** + * set priceRecurrencePolicy with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyProductsPostString + */ + public ByProjectKeyProductsPostString withPriceRecurrencePolicy(final Function op) { + return copy().withQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * add additional priceRecurrencePolicy query parameter + * @param op builder for the value to be added + * @return ByProjectKeyProductsPostString + */ + public ByProjectKeyProductsPostString addPriceRecurrencePolicy(final Function op) { + return copy().addQueryParam("priceRecurrencePolicy", op.apply(new StringBuilder())); + } + + /** + * set priceRecurrencePolicy with the specified values + * @param value type + * @param priceRecurrencePolicy values to be set + * @return ByProjectKeyProductsPostString + */ + public ByProjectKeyProductsPostString withPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().withoutQueryParam("priceRecurrencePolicy") + .addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional priceRecurrencePolicy query parameters + * @param value type + * @param priceRecurrencePolicy values to be added + * @return ByProjectKeyProductsPostString + */ + public ByProjectKeyProductsPostString addPriceRecurrencePolicy( + final Collection priceRecurrencePolicy) { + return copy().addQueryParams(priceRecurrencePolicy.stream() + .map(s -> new ParamEntry<>("priceRecurrencePolicy", s.toString())) + .collect(Collectors.toList())); + } + /** * set expand with the specified value * @param value type diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDGet.java new file mode 100644 index 00000000000..41a94c5b70d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDGet.java @@ -0,0 +1,209 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Retrieves a Recurrence Policy with the provided id.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurrencePolicies()
      + *            .withId("{ID}")
      + *            .get()
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesByIDGet extends + TypeApiMethod + implements com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String ID; + + public ByProjectKeyRecurrencePoliciesByIDGet(final ApiHttpClient apiHttpClient, String projectKey, String ID) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + } + + public ByProjectKeyRecurrencePoliciesByIDGet(ByProjectKeyRecurrencePoliciesByIDGet t) { + super(t); + this.projectKey = t.projectKey; + this.ID = t.ID; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurrence-policies/%s", encodePathParam(this.projectKey), + encodePathParam(this.ID)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getID() { + return this.ID; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setID(final String ID) { + this.ID = ID; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesByIDGet + */ + public ByProjectKeyRecurrencePoliciesByIDGet withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesByIDGet + */ + public ByProjectKeyRecurrencePoliciesByIDGet addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurrencePoliciesByIDGet + */ + public ByProjectKeyRecurrencePoliciesByIDGet withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurrencePoliciesByIDGet + */ + public ByProjectKeyRecurrencePoliciesByIDGet addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurrencePoliciesByIDGet + */ + public ByProjectKeyRecurrencePoliciesByIDGet withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurrencePoliciesByIDGet + */ + public ByProjectKeyRecurrencePoliciesByIDGet addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesByIDGet + */ + public ByProjectKeyRecurrencePoliciesByIDGet withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesByIDGet + */ + public ByProjectKeyRecurrencePoliciesByIDGet addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurrencePoliciesByIDGet that = (ByProjectKeyRecurrencePoliciesByIDGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(ID, that.ID).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(ID).toHashCode(); + } + + @Override + protected ByProjectKeyRecurrencePoliciesByIDGet copy() { + return new ByProjectKeyRecurrencePoliciesByIDGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDHead.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDHead.java new file mode 100644 index 00000000000..a8036701395 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDHead.java @@ -0,0 +1,121 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Checks if a Recurrence Policy exists with the provided id. Returns a 200 OK status if the Recurrence Policy exists, or a NotFound error otherwise.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurrencePolicies()
      + *            .withId("{ID}")
      + *            .head()
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesByIDHead + extends TypeApiMethod + implements com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String ID; + + public ByProjectKeyRecurrencePoliciesByIDHead(final ApiHttpClient apiHttpClient, String projectKey, String ID) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + } + + public ByProjectKeyRecurrencePoliciesByIDHead(ByProjectKeyRecurrencePoliciesByIDHead t) { + super(t); + this.projectKey = t.projectKey; + this.ID = t.ID; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurrence-policies/%s", encodePathParam(this.projectKey), + encodePathParam(this.ID)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.fasterxml.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getID() { + return this.ID; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setID(final String ID) { + this.ID = ID; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurrencePoliciesByIDHead that = (ByProjectKeyRecurrencePoliciesByIDHead) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(ID, that.ID).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(ID).toHashCode(); + } + + @Override + protected ByProjectKeyRecurrencePoliciesByIDHead copy() { + return new ByProjectKeyRecurrencePoliciesByIDHead(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDPost.java new file mode 100644 index 00000000000..eff35502a45 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDPost.java @@ -0,0 +1,232 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Updates a Recurrence Policy using one or more update actions.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurrencePolicies()
      + *            .withId("{ID}")
      + *            .post(null)
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesByIDPost extends + TypeBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String ID; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate recurrencePolicyUpdate; + + public ByProjectKeyRecurrencePoliciesByIDPost(final ApiHttpClient apiHttpClient, String projectKey, String ID, + com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate recurrencePolicyUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + this.recurrencePolicyUpdate = recurrencePolicyUpdate; + } + + public ByProjectKeyRecurrencePoliciesByIDPost(ByProjectKeyRecurrencePoliciesByIDPost t) { + super(t); + this.projectKey = t.projectKey; + this.ID = t.ID; + this.recurrencePolicyUpdate = t.recurrencePolicyUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurrence-policies/%s", encodePathParam(this.projectKey), + encodePathParam(this.ID)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(recurrencePolicyUpdate))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getID() { + return this.ID; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setID(final String ID) { + this.ID = ID; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesByIDPost + */ + public ByProjectKeyRecurrencePoliciesByIDPost withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesByIDPost + */ + public ByProjectKeyRecurrencePoliciesByIDPost addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurrencePoliciesByIDPost + */ + public ByProjectKeyRecurrencePoliciesByIDPost withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurrencePoliciesByIDPost + */ + public ByProjectKeyRecurrencePoliciesByIDPost addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurrencePoliciesByIDPost + */ + public ByProjectKeyRecurrencePoliciesByIDPost withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurrencePoliciesByIDPost + */ + public ByProjectKeyRecurrencePoliciesByIDPost addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesByIDPost + */ + public ByProjectKeyRecurrencePoliciesByIDPost withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesByIDPost + */ + public ByProjectKeyRecurrencePoliciesByIDPost addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate getBody() { + return recurrencePolicyUpdate; + } + + public ByProjectKeyRecurrencePoliciesByIDPost withBody( + com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate recurrencePolicyUpdate) { + ByProjectKeyRecurrencePoliciesByIDPost t = copy(); + t.recurrencePolicyUpdate = recurrencePolicyUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurrencePoliciesByIDPost that = (ByProjectKeyRecurrencePoliciesByIDPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(ID, that.ID) + .append(recurrencePolicyUpdate, that.recurrencePolicyUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(ID).append(recurrencePolicyUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyRecurrencePoliciesByIDPost copy() { + return new ByProjectKeyRecurrencePoliciesByIDPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDPostString.java new file mode 100644 index 00000000000..e979c0b562d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDPostString.java @@ -0,0 +1,230 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Updates a Recurrence Policy using one or more update actions.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurrencePolicies()
      + *            .withId("{ID}")
      + *            .post("")
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesByIDPostString extends + StringBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String ID; + + private String recurrencePolicyUpdate; + + public ByProjectKeyRecurrencePoliciesByIDPostString(final ApiHttpClient apiHttpClient, String projectKey, String ID, + String recurrencePolicyUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + this.recurrencePolicyUpdate = recurrencePolicyUpdate; + } + + public ByProjectKeyRecurrencePoliciesByIDPostString(ByProjectKeyRecurrencePoliciesByIDPostString t) { + super(t); + this.projectKey = t.projectKey; + this.ID = t.ID; + this.recurrencePolicyUpdate = t.recurrencePolicyUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurrence-policies/%s", this.projectKey, this.ID); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + recurrencePolicyUpdate.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getID() { + return this.ID; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setID(final String ID) { + this.ID = ID; + } + + /** + * set expand with the specified value + * @param value type + * @param expand value to be set + * @return ByProjectKeyRecurrencePoliciesByIDPostString + */ + public ByProjectKeyRecurrencePoliciesByIDPostString withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param value type + * @param expand value to be added + * @return ByProjectKeyRecurrencePoliciesByIDPostString + */ + public ByProjectKeyRecurrencePoliciesByIDPostString addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurrencePoliciesByIDPostString + */ + public ByProjectKeyRecurrencePoliciesByIDPostString withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurrencePoliciesByIDPostString + */ + public ByProjectKeyRecurrencePoliciesByIDPostString addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurrencePoliciesByIDPostString + */ + public ByProjectKeyRecurrencePoliciesByIDPostString withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurrencePoliciesByIDPostString + */ + public ByProjectKeyRecurrencePoliciesByIDPostString addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param value type + * @param expand values to be set + * @return ByProjectKeyRecurrencePoliciesByIDPostString + */ + public ByProjectKeyRecurrencePoliciesByIDPostString withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param value type + * @param expand values to be added + * @return ByProjectKeyRecurrencePoliciesByIDPostString + */ + public ByProjectKeyRecurrencePoliciesByIDPostString addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public String getBody() { + return recurrencePolicyUpdate; + } + + public ByProjectKeyRecurrencePoliciesByIDPostString withBody(String recurrencePolicyUpdate) { + ByProjectKeyRecurrencePoliciesByIDPostString t = copy(); + t.recurrencePolicyUpdate = recurrencePolicyUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurrencePoliciesByIDPostString that = (ByProjectKeyRecurrencePoliciesByIDPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(ID, that.ID) + .append(recurrencePolicyUpdate, that.recurrencePolicyUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(ID).append(recurrencePolicyUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyRecurrencePoliciesByIDPostString copy() { + return new ByProjectKeyRecurrencePoliciesByIDPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDRequestBuilder.java new file mode 100644 index 00000000000..610400db8dd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesByIDRequestBuilder.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesByIDRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String ID; + + public ByProjectKeyRecurrencePoliciesByIDRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey, + final String ID) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.ID = ID; + } + + public ByProjectKeyRecurrencePoliciesByIDGet get() { + return new ByProjectKeyRecurrencePoliciesByIDGet(apiHttpClient, projectKey, ID); + } + + public ByProjectKeyRecurrencePoliciesByIDHead head() { + return new ByProjectKeyRecurrencePoliciesByIDHead(apiHttpClient, projectKey, ID); + } + + public ByProjectKeyRecurrencePoliciesByIDPost post( + com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate recurrencePolicyUpdate) { + return new ByProjectKeyRecurrencePoliciesByIDPost(apiHttpClient, projectKey, ID, recurrencePolicyUpdate); + } + + public ByProjectKeyRecurrencePoliciesByIDPostString post(final String recurrencePolicyUpdate) { + return new ByProjectKeyRecurrencePoliciesByIDPostString(apiHttpClient, projectKey, ID, recurrencePolicyUpdate); + } + + public ByProjectKeyRecurrencePoliciesByIDPost post( + UnaryOperator op) { + return post( + op.apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdateBuilder.of()).build()); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesGet.java new file mode 100644 index 00000000000..c3df2260094 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesGet.java @@ -0,0 +1,670 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Retrieves Recurrence Policies in the Project.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurrencePolicies()
      + *            .get()
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesGet extends + TypeApiMethod + implements com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.SortableTrait, + com.commercetools.api.client.PagingTrait, + com.commercetools.api.client.QueryTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + public ByProjectKeyRecurrencePoliciesGet(final ApiHttpClient apiHttpClient, String projectKey) { + super(apiHttpClient); + this.projectKey = projectKey; + } + + public ByProjectKeyRecurrencePoliciesGet(ByProjectKeyRecurrencePoliciesGet t) { + super(t); + this.projectKey = t.projectKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurrence-policies", encodePathParam(this.projectKey)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.api.models.recurrence_policy.RecurrencePolicyPagedQueryResponse.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurrence_policy.RecurrencePolicyPagedQueryResponse.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public List getSort() { + return this.getQueryParam("sort"); + } + + public List getLimit() { + return this.getQueryParam("limit"); + } + + public List getOffset() { + return this.getQueryParam("offset"); + } + + public List getWithTotal() { + return this.getQueryParam("withTotal"); + } + + public List getWhere() { + return this.getQueryParam("where"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * set sort with the specified value + * @param sort value to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withSort(final TValue sort) { + return copy().withQueryParam("sort", sort); + } + + /** + * add additional sort query parameter + * @param sort value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addSort(final TValue sort) { + return copy().addQueryParam("sort", sort); + } + + /** + * set sort with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withSort(final Supplier supplier) { + return copy().withQueryParam("sort", supplier.get()); + } + + /** + * add additional sort query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addSort(final Supplier supplier) { + return copy().addQueryParam("sort", supplier.get()); + } + + /** + * set sort with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withSort(final Function op) { + return copy().withQueryParam("sort", op.apply(new StringBuilder())); + } + + /** + * add additional sort query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addSort(final Function op) { + return copy().addQueryParam("sort", op.apply(new StringBuilder())); + } + + /** + * set sort with the specified values + * @param sort values to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withSort(final Collection sort) { + return copy().withoutQueryParam("sort") + .addQueryParams( + sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional sort query parameters + * @param sort values to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addSort(final Collection sort) { + return copy().addQueryParams( + sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList())); + } + + /** + * set limit with the specified value + * @param limit value to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withLimit(final TValue limit) { + return copy().withQueryParam("limit", limit); + } + + /** + * add additional limit query parameter + * @param limit value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addLimit(final TValue limit) { + return copy().addQueryParam("limit", limit); + } + + /** + * set limit with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withLimit(final Supplier supplier) { + return copy().withQueryParam("limit", supplier.get()); + } + + /** + * add additional limit query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addLimit(final Supplier supplier) { + return copy().addQueryParam("limit", supplier.get()); + } + + /** + * set limit with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withLimit(final Function op) { + return copy().withQueryParam("limit", op.apply(new StringBuilder())); + } + + /** + * add additional limit query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addLimit(final Function op) { + return copy().addQueryParam("limit", op.apply(new StringBuilder())); + } + + /** + * set limit with the specified values + * @param limit values to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withLimit(final Collection limit) { + return copy().withoutQueryParam("limit") + .addQueryParams( + limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional limit query parameters + * @param limit values to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addLimit(final Collection limit) { + return copy().addQueryParams( + limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); + } + + /** + * set offset with the specified value + * @param offset value to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withOffset(final TValue offset) { + return copy().withQueryParam("offset", offset); + } + + /** + * add additional offset query parameter + * @param offset value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addOffset(final TValue offset) { + return copy().addQueryParam("offset", offset); + } + + /** + * set offset with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withOffset(final Supplier supplier) { + return copy().withQueryParam("offset", supplier.get()); + } + + /** + * add additional offset query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addOffset(final Supplier supplier) { + return copy().addQueryParam("offset", supplier.get()); + } + + /** + * set offset with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withOffset(final Function op) { + return copy().withQueryParam("offset", op.apply(new StringBuilder())); + } + + /** + * add additional offset query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addOffset(final Function op) { + return copy().addQueryParam("offset", op.apply(new StringBuilder())); + } + + /** + * set offset with the specified values + * @param offset values to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withOffset(final Collection offset) { + return copy().withoutQueryParam("offset") + .addQueryParams( + offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional offset query parameters + * @param offset values to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addOffset(final Collection offset) { + return copy().addQueryParams( + offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); + } + + /** + * set withTotal with the specified value + * @param withTotal value to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withWithTotal(final TValue withTotal) { + return copy().withQueryParam("withTotal", withTotal); + } + + /** + * add additional withTotal query parameter + * @param withTotal value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addWithTotal(final TValue withTotal) { + return copy().addQueryParam("withTotal", withTotal); + } + + /** + * set withTotal with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withWithTotal(final Supplier supplier) { + return copy().withQueryParam("withTotal", supplier.get()); + } + + /** + * add additional withTotal query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addWithTotal(final Supplier supplier) { + return copy().addQueryParam("withTotal", supplier.get()); + } + + /** + * set withTotal with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withWithTotal(final Function op) { + return copy().withQueryParam("withTotal", op.apply(new StringBuilder())); + } + + /** + * add additional withTotal query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addWithTotal(final Function op) { + return copy().addQueryParam("withTotal", op.apply(new StringBuilder())); + } + + /** + * set withTotal with the specified values + * @param withTotal values to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withWithTotal(final Collection withTotal) { + return copy().withoutQueryParam("withTotal") + .addQueryParams(withTotal.stream() + .map(s -> new ParamEntry<>("withTotal", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional withTotal query parameters + * @param withTotal values to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addWithTotal(final Collection withTotal) { + return copy().addQueryParams( + withTotal.stream().map(s -> new ParamEntry<>("withTotal", s.toString())).collect(Collectors.toList())); + } + + /** + * set where with the specified value + * @param where value to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withWhere(final TValue where) { + return copy().withQueryParam("where", where); + } + + /** + * add additional where query parameter + * @param where value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addWhere(final TValue where) { + return copy().addQueryParam("where", where); + } + + /** + * set where with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withWhere(final Supplier supplier) { + return copy().withQueryParam("where", supplier.get()); + } + + /** + * add additional where query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addWhere(final Supplier supplier) { + return copy().addQueryParam("where", supplier.get()); + } + + /** + * set where with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withWhere(final Function op) { + return copy().withQueryParam("where", op.apply(new StringBuilder())); + } + + /** + * add additional where query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addWhere(final Function op) { + return copy().addQueryParam("where", op.apply(new StringBuilder())); + } + + /** + * set where with the specified values + * @param where values to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withWhere(final Collection where) { + return copy().withoutQueryParam("where") + .addQueryParams( + where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional where query parameters + * @param where values to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addWhere(final Collection where) { + return copy().addQueryParams( + where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); + } + + /** + * set predicateVar with the specificied value + * @param value type + * @param varName parameter name + * @param predicateVar parameter value + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withPredicateVar(final String varName, + final TValue predicateVar) { + return copy().withQueryParam(String.format("var.%s", varName), predicateVar); + } + + /** + * add additional predicateVar query parameter + * @param value type + * @param varName parameter name + * @param predicateVar parameter value + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addPredicateVar(final String varName, final TValue predicateVar) { + return copy().addQueryParam(String.format("var.%s", varName), predicateVar); + } + + /** + * set predicateVar with the specificied values + * @param value type + * @param varName parameter name + * @param predicateVar parameter values + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet withPredicateVar(final String varName, + final Collection predicateVar) { + final String placeholderName = String.format("var.%s", varName); + return copy().withoutQueryParam(placeholderName) + .addQueryParams(predicateVar.stream() + .map(s -> new ParamEntry<>(placeholderName, s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional predicateVar query parameters + * @param value type + * @param varName parameter name + * @param predicateVar parameter values + * @return ByProjectKeyRecurrencePoliciesGet + */ + public ByProjectKeyRecurrencePoliciesGet addPredicateVar(final String varName, + final Collection predicateVar) { + final String placeholderName = String.format("var.%s", varName); + return copy().addQueryParams(predicateVar.stream() + .map(s -> new ParamEntry<>(placeholderName, s.toString())) + .collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurrencePoliciesGet that = (ByProjectKeyRecurrencePoliciesGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); + } + + @Override + protected ByProjectKeyRecurrencePoliciesGet copy() { + return new ByProjectKeyRecurrencePoliciesGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesHead.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesHead.java new file mode 100644 index 00000000000..6b3be69ff45 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesHead.java @@ -0,0 +1,195 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Checks if one or more Recurrence Policies exist for the provided query predicate. Returns a 200 OK status if any Recurrence Policies match the query predicate, or a NotFound error otherwise.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurrencePolicies()
      + *            .head()
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesHead + extends TypeApiMethod + implements com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + public ByProjectKeyRecurrencePoliciesHead(final ApiHttpClient apiHttpClient, String projectKey) { + super(apiHttpClient); + this.projectKey = projectKey; + } + + public ByProjectKeyRecurrencePoliciesHead(ByProjectKeyRecurrencePoliciesHead t) { + super(t); + this.projectKey = t.projectKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurrence-policies", encodePathParam(this.projectKey)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.fasterxml.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public List getWhere() { + return this.getQueryParam("where"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + /** + * set where with the specified value + * @param where value to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesHead + */ + public ByProjectKeyRecurrencePoliciesHead withWhere(final TValue where) { + return copy().withQueryParam("where", where); + } + + /** + * add additional where query parameter + * @param where value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesHead + */ + public ByProjectKeyRecurrencePoliciesHead addWhere(final TValue where) { + return copy().addQueryParam("where", where); + } + + /** + * set where with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurrencePoliciesHead + */ + public ByProjectKeyRecurrencePoliciesHead withWhere(final Supplier supplier) { + return copy().withQueryParam("where", supplier.get()); + } + + /** + * add additional where query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurrencePoliciesHead + */ + public ByProjectKeyRecurrencePoliciesHead addWhere(final Supplier supplier) { + return copy().addQueryParam("where", supplier.get()); + } + + /** + * set where with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurrencePoliciesHead + */ + public ByProjectKeyRecurrencePoliciesHead withWhere(final Function op) { + return copy().withQueryParam("where", op.apply(new StringBuilder())); + } + + /** + * add additional where query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurrencePoliciesHead + */ + public ByProjectKeyRecurrencePoliciesHead addWhere(final Function op) { + return copy().addQueryParam("where", op.apply(new StringBuilder())); + } + + /** + * set where with the specified values + * @param where values to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesHead + */ + public ByProjectKeyRecurrencePoliciesHead withWhere(final Collection where) { + return copy().withoutQueryParam("where") + .addQueryParams( + where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional where query parameters + * @param where values to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesHead + */ + public ByProjectKeyRecurrencePoliciesHead addWhere(final Collection where) { + return copy().addQueryParams( + where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurrencePoliciesHead that = (ByProjectKeyRecurrencePoliciesHead) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); + } + + @Override + protected ByProjectKeyRecurrencePoliciesHead copy() { + return new ByProjectKeyRecurrencePoliciesHead(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyGet.java new file mode 100644 index 00000000000..fcf7ca3fd5e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyGet.java @@ -0,0 +1,209 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Retrieves a Recurrence Policy with the provided key.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurrencePolicies()
      + *            .withKey("{key}")
      + *            .get()
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesKeyByKeyGet extends + TypeApiMethod + implements com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + public ByProjectKeyRecurrencePoliciesKeyByKeyGet(final ApiHttpClient apiHttpClient, String projectKey, String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyRecurrencePoliciesKeyByKeyGet(ByProjectKeyRecurrencePoliciesKeyByKeyGet t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurrence-policies/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesKeyByKeyGet + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyGet withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesKeyByKeyGet + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyGet addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurrencePoliciesKeyByKeyGet + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyGet withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurrencePoliciesKeyByKeyGet + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyGet addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurrencePoliciesKeyByKeyGet + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyGet withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurrencePoliciesKeyByKeyGet + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyGet addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesKeyByKeyGet + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyGet withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesKeyByKeyGet + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyGet addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurrencePoliciesKeyByKeyGet that = (ByProjectKeyRecurrencePoliciesKeyByKeyGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(key, that.key).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).toHashCode(); + } + + @Override + protected ByProjectKeyRecurrencePoliciesKeyByKeyGet copy() { + return new ByProjectKeyRecurrencePoliciesKeyByKeyGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyHead.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyHead.java new file mode 100644 index 00000000000..d59fb4ac95f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyHead.java @@ -0,0 +1,122 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Checks if a Recurrence Policy exists with the provided key. Returns a 200 OK status if the Recurrence Policy exists, or a NotFound error otherwise.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurrencePolicies()
      + *            .withKey("{key}")
      + *            .head()
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesKeyByKeyHead + extends TypeApiMethod + implements com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + public ByProjectKeyRecurrencePoliciesKeyByKeyHead(final ApiHttpClient apiHttpClient, String projectKey, + String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyRecurrencePoliciesKeyByKeyHead(ByProjectKeyRecurrencePoliciesKeyByKeyHead t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurrence-policies/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.fasterxml.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurrencePoliciesKeyByKeyHead that = (ByProjectKeyRecurrencePoliciesKeyByKeyHead) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(key, that.key).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).toHashCode(); + } + + @Override + protected ByProjectKeyRecurrencePoliciesKeyByKeyHead copy() { + return new ByProjectKeyRecurrencePoliciesKeyByKeyHead(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyPost.java new file mode 100644 index 00000000000..db5e9d8f082 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyPost.java @@ -0,0 +1,232 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Updates a Recurrence Policy using one or more update actions.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurrencePolicies()
      + *            .withKey("{key}")
      + *            .post(null)
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesKeyByKeyPost extends + TypeBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate recurrencePolicyUpdate; + + public ByProjectKeyRecurrencePoliciesKeyByKeyPost(final ApiHttpClient apiHttpClient, String projectKey, String key, + com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate recurrencePolicyUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + this.recurrencePolicyUpdate = recurrencePolicyUpdate; + } + + public ByProjectKeyRecurrencePoliciesKeyByKeyPost(ByProjectKeyRecurrencePoliciesKeyByKeyPost t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + this.recurrencePolicyUpdate = t.recurrencePolicyUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurrence-policies/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(recurrencePolicyUpdate))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPost + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPost withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPost + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPost addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPost + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPost withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPost + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPost addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPost + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPost withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPost + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPost addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPost + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPost withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPost + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPost addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate getBody() { + return recurrencePolicyUpdate; + } + + public ByProjectKeyRecurrencePoliciesKeyByKeyPost withBody( + com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate recurrencePolicyUpdate) { + ByProjectKeyRecurrencePoliciesKeyByKeyPost t = copy(); + t.recurrencePolicyUpdate = recurrencePolicyUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurrencePoliciesKeyByKeyPost that = (ByProjectKeyRecurrencePoliciesKeyByKeyPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(key, that.key) + .append(recurrencePolicyUpdate, that.recurrencePolicyUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).append(recurrencePolicyUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyRecurrencePoliciesKeyByKeyPost copy() { + return new ByProjectKeyRecurrencePoliciesKeyByKeyPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyPostString.java new file mode 100644 index 00000000000..93602e2604a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyPostString.java @@ -0,0 +1,231 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Updates a Recurrence Policy using one or more update actions.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurrencePolicies()
      + *            .withKey("{key}")
      + *            .post("")
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesKeyByKeyPostString extends + StringBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + private String recurrencePolicyUpdate; + + public ByProjectKeyRecurrencePoliciesKeyByKeyPostString(final ApiHttpClient apiHttpClient, String projectKey, + String key, String recurrencePolicyUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + this.recurrencePolicyUpdate = recurrencePolicyUpdate; + } + + public ByProjectKeyRecurrencePoliciesKeyByKeyPostString(ByProjectKeyRecurrencePoliciesKeyByKeyPostString t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + this.recurrencePolicyUpdate = t.recurrencePolicyUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurrence-policies/key=%s", this.projectKey, this.key); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + recurrencePolicyUpdate.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + /** + * set expand with the specified value + * @param value type + * @param expand value to be set + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPostString + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPostString withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param value type + * @param expand value to be added + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPostString + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPostString addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPostString + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPostString withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPostString + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPostString addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPostString + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPostString withExpand( + final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPostString + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPostString addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param value type + * @param expand values to be set + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPostString + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPostString withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param value type + * @param expand values to be added + * @return ByProjectKeyRecurrencePoliciesKeyByKeyPostString + */ + public ByProjectKeyRecurrencePoliciesKeyByKeyPostString addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public String getBody() { + return recurrencePolicyUpdate; + } + + public ByProjectKeyRecurrencePoliciesKeyByKeyPostString withBody(String recurrencePolicyUpdate) { + ByProjectKeyRecurrencePoliciesKeyByKeyPostString t = copy(); + t.recurrencePolicyUpdate = recurrencePolicyUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurrencePoliciesKeyByKeyPostString that = (ByProjectKeyRecurrencePoliciesKeyByKeyPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(key, that.key) + .append(recurrencePolicyUpdate, that.recurrencePolicyUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).append(recurrencePolicyUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyRecurrencePoliciesKeyByKeyPostString copy() { + return new ByProjectKeyRecurrencePoliciesKeyByKeyPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyRequestBuilder.java new file mode 100644 index 00000000000..b20e69596b2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesKeyByKeyRequestBuilder.java @@ -0,0 +1,47 @@ + +package com.commercetools.api.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesKeyByKeyRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String key; + + public ByProjectKeyRecurrencePoliciesKeyByKeyRequestBuilder(final ApiHttpClient apiHttpClient, + final String projectKey, final String key) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyRecurrencePoliciesKeyByKeyGet get() { + return new ByProjectKeyRecurrencePoliciesKeyByKeyGet(apiHttpClient, projectKey, key); + } + + public ByProjectKeyRecurrencePoliciesKeyByKeyHead head() { + return new ByProjectKeyRecurrencePoliciesKeyByKeyHead(apiHttpClient, projectKey, key); + } + + public ByProjectKeyRecurrencePoliciesKeyByKeyPost post( + com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate recurrencePolicyUpdate) { + return new ByProjectKeyRecurrencePoliciesKeyByKeyPost(apiHttpClient, projectKey, key, recurrencePolicyUpdate); + } + + public ByProjectKeyRecurrencePoliciesKeyByKeyPostString post(final String recurrencePolicyUpdate) { + return new ByProjectKeyRecurrencePoliciesKeyByKeyPostString(apiHttpClient, projectKey, key, + recurrencePolicyUpdate); + } + + public ByProjectKeyRecurrencePoliciesKeyByKeyPost post( + UnaryOperator op) { + return post( + op.apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdateBuilder.of()).build()); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesPost.java new file mode 100644 index 00000000000..1aeb40fa340 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesPost.java @@ -0,0 +1,217 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Creates a Recurrence Policy in the Project.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurrencePolicies()
      + *            .post(null)
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesPost extends + TypeBodyApiMethod + implements com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable201Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyDraft recurrencePolicyDraft; + + public ByProjectKeyRecurrencePoliciesPost(final ApiHttpClient apiHttpClient, String projectKey, + com.commercetools.api.models.recurrence_policy.RecurrencePolicyDraft recurrencePolicyDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.recurrencePolicyDraft = recurrencePolicyDraft; + } + + public ByProjectKeyRecurrencePoliciesPost(ByProjectKeyRecurrencePoliciesPost t) { + super(t); + this.projectKey = t.projectKey; + this.recurrencePolicyDraft = t.recurrencePolicyDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurrence-policies", encodePathParam(this.projectKey)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(recurrencePolicyDraft))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesPost + */ + public ByProjectKeyRecurrencePoliciesPost withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesPost + */ + public ByProjectKeyRecurrencePoliciesPost addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurrencePoliciesPost + */ + public ByProjectKeyRecurrencePoliciesPost withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurrencePoliciesPost + */ + public ByProjectKeyRecurrencePoliciesPost addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurrencePoliciesPost + */ + public ByProjectKeyRecurrencePoliciesPost withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurrencePoliciesPost + */ + public ByProjectKeyRecurrencePoliciesPost addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyRecurrencePoliciesPost + */ + public ByProjectKeyRecurrencePoliciesPost withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyRecurrencePoliciesPost + */ + public ByProjectKeyRecurrencePoliciesPost addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyDraft getBody() { + return recurrencePolicyDraft; + } + + public ByProjectKeyRecurrencePoliciesPost withBody( + com.commercetools.api.models.recurrence_policy.RecurrencePolicyDraft recurrencePolicyDraft) { + ByProjectKeyRecurrencePoliciesPost t = copy(); + t.recurrencePolicyDraft = recurrencePolicyDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurrencePoliciesPost that = (ByProjectKeyRecurrencePoliciesPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(recurrencePolicyDraft, that.recurrencePolicyDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(recurrencePolicyDraft).toHashCode(); + } + + @Override + protected ByProjectKeyRecurrencePoliciesPost copy() { + return new ByProjectKeyRecurrencePoliciesPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesPostString.java new file mode 100644 index 00000000000..1dccabb0b15 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesPostString.java @@ -0,0 +1,216 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Creates a Recurrence Policy in the Project.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurrencePolicies()
      + *            .post("")
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesPostString extends + StringBodyApiMethod + implements com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable201Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private String recurrencePolicyDraft; + + public ByProjectKeyRecurrencePoliciesPostString(final ApiHttpClient apiHttpClient, String projectKey, + String recurrencePolicyDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.recurrencePolicyDraft = recurrencePolicyDraft; + } + + public ByProjectKeyRecurrencePoliciesPostString(ByProjectKeyRecurrencePoliciesPostString t) { + super(t); + this.projectKey = t.projectKey; + this.recurrencePolicyDraft = t.recurrencePolicyDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurrence-policies", this.projectKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + recurrencePolicyDraft.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurrence_policy.RecurrencePolicy.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + /** + * set expand with the specified value + * @param value type + * @param expand value to be set + * @return ByProjectKeyRecurrencePoliciesPostString + */ + public ByProjectKeyRecurrencePoliciesPostString withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param value type + * @param expand value to be added + * @return ByProjectKeyRecurrencePoliciesPostString + */ + public ByProjectKeyRecurrencePoliciesPostString addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurrencePoliciesPostString + */ + public ByProjectKeyRecurrencePoliciesPostString withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurrencePoliciesPostString + */ + public ByProjectKeyRecurrencePoliciesPostString addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurrencePoliciesPostString + */ + public ByProjectKeyRecurrencePoliciesPostString withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurrencePoliciesPostString + */ + public ByProjectKeyRecurrencePoliciesPostString addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param value type + * @param expand values to be set + * @return ByProjectKeyRecurrencePoliciesPostString + */ + public ByProjectKeyRecurrencePoliciesPostString withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param value type + * @param expand values to be added + * @return ByProjectKeyRecurrencePoliciesPostString + */ + public ByProjectKeyRecurrencePoliciesPostString addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public String getBody() { + return recurrencePolicyDraft; + } + + public ByProjectKeyRecurrencePoliciesPostString withBody(String recurrencePolicyDraft) { + ByProjectKeyRecurrencePoliciesPostString t = copy(); + t.recurrencePolicyDraft = recurrencePolicyDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurrencePoliciesPostString that = (ByProjectKeyRecurrencePoliciesPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(recurrencePolicyDraft, that.recurrencePolicyDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(recurrencePolicyDraft).toHashCode(); + } + + @Override + protected ByProjectKeyRecurrencePoliciesPostString copy() { + return new ByProjectKeyRecurrencePoliciesPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesRequestBuilder.java new file mode 100644 index 00000000000..60bfe7f021f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurrencePoliciesRequestBuilder.java @@ -0,0 +1,50 @@ + +package com.commercetools.api.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyRecurrencePoliciesRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyRecurrencePoliciesGet get() { + return new ByProjectKeyRecurrencePoliciesGet(apiHttpClient, projectKey); + } + + public ByProjectKeyRecurrencePoliciesHead head() { + return new ByProjectKeyRecurrencePoliciesHead(apiHttpClient, projectKey); + } + + public ByProjectKeyRecurrencePoliciesPost post( + com.commercetools.api.models.recurrence_policy.RecurrencePolicyDraft recurrencePolicyDraft) { + return new ByProjectKeyRecurrencePoliciesPost(apiHttpClient, projectKey, recurrencePolicyDraft); + } + + public ByProjectKeyRecurrencePoliciesPostString post(final String recurrencePolicyDraft) { + return new ByProjectKeyRecurrencePoliciesPostString(apiHttpClient, projectKey, recurrencePolicyDraft); + } + + public ByProjectKeyRecurrencePoliciesPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyDraftBuilder.of()).build()); + } + + public ByProjectKeyRecurrencePoliciesKeyByKeyRequestBuilder withKey(String key) { + return new ByProjectKeyRecurrencePoliciesKeyByKeyRequestBuilder(apiHttpClient, projectKey, key); + } + + public ByProjectKeyRecurrencePoliciesByIDRequestBuilder withId(String ID) { + return new ByProjectKeyRecurrencePoliciesByIDRequestBuilder(apiHttpClient, projectKey, ID); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersByIDGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersByIDGet.java new file mode 100644 index 00000000000..f8c8ab5a225 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersByIDGet.java @@ -0,0 +1,209 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Retrieves a Recurring Order with the provided id.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurringOrders()
      + *            .withId("{ID}")
      + *            .get()
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersByIDGet extends + TypeApiMethod + implements com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String ID; + + public ByProjectKeyRecurringOrdersByIDGet(final ApiHttpClient apiHttpClient, String projectKey, String ID) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + } + + public ByProjectKeyRecurringOrdersByIDGet(ByProjectKeyRecurringOrdersByIDGet t) { + super(t); + this.projectKey = t.projectKey; + this.ID = t.ID; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurring-orders/%s", encodePathParam(this.projectKey), + encodePathParam(this.ID)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getID() { + return this.ID; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setID(final String ID) { + this.ID = ID; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyRecurringOrdersByIDGet + */ + public ByProjectKeyRecurringOrdersByIDGet withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyRecurringOrdersByIDGet + */ + public ByProjectKeyRecurringOrdersByIDGet addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurringOrdersByIDGet + */ + public ByProjectKeyRecurringOrdersByIDGet withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurringOrdersByIDGet + */ + public ByProjectKeyRecurringOrdersByIDGet addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurringOrdersByIDGet + */ + public ByProjectKeyRecurringOrdersByIDGet withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurringOrdersByIDGet + */ + public ByProjectKeyRecurringOrdersByIDGet addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyRecurringOrdersByIDGet + */ + public ByProjectKeyRecurringOrdersByIDGet withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyRecurringOrdersByIDGet + */ + public ByProjectKeyRecurringOrdersByIDGet addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurringOrdersByIDGet that = (ByProjectKeyRecurringOrdersByIDGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(ID, that.ID).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(ID).toHashCode(); + } + + @Override + protected ByProjectKeyRecurringOrdersByIDGet copy() { + return new ByProjectKeyRecurringOrdersByIDGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersByIDHead.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersByIDHead.java new file mode 100644 index 00000000000..0af2283d5e5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersByIDHead.java @@ -0,0 +1,121 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Checks if a Recurring Order exists with the provided id. Returns a 200 OK status if the Recurring Order exists, or a NotFound error otherwise.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurringOrders()
      + *            .withId("{ID}")
      + *            .head()
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersByIDHead + extends TypeApiMethod + implements com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String ID; + + public ByProjectKeyRecurringOrdersByIDHead(final ApiHttpClient apiHttpClient, String projectKey, String ID) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + } + + public ByProjectKeyRecurringOrdersByIDHead(ByProjectKeyRecurringOrdersByIDHead t) { + super(t); + this.projectKey = t.projectKey; + this.ID = t.ID; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurring-orders/%s", encodePathParam(this.projectKey), + encodePathParam(this.ID)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.fasterxml.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getID() { + return this.ID; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setID(final String ID) { + this.ID = ID; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurringOrdersByIDHead that = (ByProjectKeyRecurringOrdersByIDHead) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(ID, that.ID).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(ID).toHashCode(); + } + + @Override + protected ByProjectKeyRecurringOrdersByIDHead copy() { + return new ByProjectKeyRecurringOrdersByIDHead(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersByIDPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersByIDPost.java new file mode 100644 index 00000000000..e3e641afe3e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersByIDPost.java @@ -0,0 +1,232 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Updates a Recurring Order using one or more update actions.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurringOrders()
      + *            .withId("{ID}")
      + *            .post(null)
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersByIDPost extends + TypeBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String ID; + + private com.commercetools.api.models.recurring_order.RecurringOrderUpdate recurringOrderUpdate; + + public ByProjectKeyRecurringOrdersByIDPost(final ApiHttpClient apiHttpClient, String projectKey, String ID, + com.commercetools.api.models.recurring_order.RecurringOrderUpdate recurringOrderUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + this.recurringOrderUpdate = recurringOrderUpdate; + } + + public ByProjectKeyRecurringOrdersByIDPost(ByProjectKeyRecurringOrdersByIDPost t) { + super(t); + this.projectKey = t.projectKey; + this.ID = t.ID; + this.recurringOrderUpdate = t.recurringOrderUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurring-orders/%s", encodePathParam(this.projectKey), + encodePathParam(this.ID)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(recurringOrderUpdate))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getID() { + return this.ID; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setID(final String ID) { + this.ID = ID; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyRecurringOrdersByIDPost + */ + public ByProjectKeyRecurringOrdersByIDPost withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyRecurringOrdersByIDPost + */ + public ByProjectKeyRecurringOrdersByIDPost addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurringOrdersByIDPost + */ + public ByProjectKeyRecurringOrdersByIDPost withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurringOrdersByIDPost + */ + public ByProjectKeyRecurringOrdersByIDPost addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurringOrdersByIDPost + */ + public ByProjectKeyRecurringOrdersByIDPost withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurringOrdersByIDPost + */ + public ByProjectKeyRecurringOrdersByIDPost addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyRecurringOrdersByIDPost + */ + public ByProjectKeyRecurringOrdersByIDPost withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyRecurringOrdersByIDPost + */ + public ByProjectKeyRecurringOrdersByIDPost addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public com.commercetools.api.models.recurring_order.RecurringOrderUpdate getBody() { + return recurringOrderUpdate; + } + + public ByProjectKeyRecurringOrdersByIDPost withBody( + com.commercetools.api.models.recurring_order.RecurringOrderUpdate recurringOrderUpdate) { + ByProjectKeyRecurringOrdersByIDPost t = copy(); + t.recurringOrderUpdate = recurringOrderUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurringOrdersByIDPost that = (ByProjectKeyRecurringOrdersByIDPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(ID, that.ID) + .append(recurringOrderUpdate, that.recurringOrderUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(ID).append(recurringOrderUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyRecurringOrdersByIDPost copy() { + return new ByProjectKeyRecurringOrdersByIDPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersByIDPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersByIDPostString.java new file mode 100644 index 00000000000..b97cd4acc30 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersByIDPostString.java @@ -0,0 +1,230 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Updates a Recurring Order using one or more update actions.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurringOrders()
      + *            .withId("{ID}")
      + *            .post("")
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersByIDPostString extends + StringBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String ID; + + private String recurringOrderUpdate; + + public ByProjectKeyRecurringOrdersByIDPostString(final ApiHttpClient apiHttpClient, String projectKey, String ID, + String recurringOrderUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + this.recurringOrderUpdate = recurringOrderUpdate; + } + + public ByProjectKeyRecurringOrdersByIDPostString(ByProjectKeyRecurringOrdersByIDPostString t) { + super(t); + this.projectKey = t.projectKey; + this.ID = t.ID; + this.recurringOrderUpdate = t.recurringOrderUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurring-orders/%s", this.projectKey, this.ID); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + recurringOrderUpdate.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getID() { + return this.ID; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setID(final String ID) { + this.ID = ID; + } + + /** + * set expand with the specified value + * @param value type + * @param expand value to be set + * @return ByProjectKeyRecurringOrdersByIDPostString + */ + public ByProjectKeyRecurringOrdersByIDPostString withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param value type + * @param expand value to be added + * @return ByProjectKeyRecurringOrdersByIDPostString + */ + public ByProjectKeyRecurringOrdersByIDPostString addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurringOrdersByIDPostString + */ + public ByProjectKeyRecurringOrdersByIDPostString withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurringOrdersByIDPostString + */ + public ByProjectKeyRecurringOrdersByIDPostString addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurringOrdersByIDPostString + */ + public ByProjectKeyRecurringOrdersByIDPostString withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurringOrdersByIDPostString + */ + public ByProjectKeyRecurringOrdersByIDPostString addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param value type + * @param expand values to be set + * @return ByProjectKeyRecurringOrdersByIDPostString + */ + public ByProjectKeyRecurringOrdersByIDPostString withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param value type + * @param expand values to be added + * @return ByProjectKeyRecurringOrdersByIDPostString + */ + public ByProjectKeyRecurringOrdersByIDPostString addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public String getBody() { + return recurringOrderUpdate; + } + + public ByProjectKeyRecurringOrdersByIDPostString withBody(String recurringOrderUpdate) { + ByProjectKeyRecurringOrdersByIDPostString t = copy(); + t.recurringOrderUpdate = recurringOrderUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurringOrdersByIDPostString that = (ByProjectKeyRecurringOrdersByIDPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(ID, that.ID) + .append(recurringOrderUpdate, that.recurringOrderUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(ID).append(recurringOrderUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyRecurringOrdersByIDPostString copy() { + return new ByProjectKeyRecurringOrdersByIDPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersByIDRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersByIDRequestBuilder.java new file mode 100644 index 00000000000..b2e91008310 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersByIDRequestBuilder.java @@ -0,0 +1,45 @@ + +package com.commercetools.api.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersByIDRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String ID; + + public ByProjectKeyRecurringOrdersByIDRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey, + final String ID) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.ID = ID; + } + + public ByProjectKeyRecurringOrdersByIDGet get() { + return new ByProjectKeyRecurringOrdersByIDGet(apiHttpClient, projectKey, ID); + } + + public ByProjectKeyRecurringOrdersByIDHead head() { + return new ByProjectKeyRecurringOrdersByIDHead(apiHttpClient, projectKey, ID); + } + + public ByProjectKeyRecurringOrdersByIDPost post( + com.commercetools.api.models.recurring_order.RecurringOrderUpdate recurringOrderUpdate) { + return new ByProjectKeyRecurringOrdersByIDPost(apiHttpClient, projectKey, ID, recurringOrderUpdate); + } + + public ByProjectKeyRecurringOrdersByIDPostString post(final String recurringOrderUpdate) { + return new ByProjectKeyRecurringOrdersByIDPostString(apiHttpClient, projectKey, ID, recurringOrderUpdate); + } + + public ByProjectKeyRecurringOrdersByIDPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.api.models.recurring_order.RecurringOrderUpdateBuilder.of()).build()); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersGet.java new file mode 100644 index 00000000000..04c642bfd88 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersGet.java @@ -0,0 +1,669 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Retrieves Recurring Orders in the Project.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurringOrders()
      + *            .get()
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersGet extends + TypeApiMethod + implements com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.SortableTrait, + com.commercetools.api.client.PagingTrait, + com.commercetools.api.client.QueryTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + public ByProjectKeyRecurringOrdersGet(final ApiHttpClient apiHttpClient, String projectKey) { + super(apiHttpClient); + this.projectKey = projectKey; + } + + public ByProjectKeyRecurringOrdersGet(ByProjectKeyRecurringOrdersGet t) { + super(t); + this.projectKey = t.projectKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurring-orders", encodePathParam(this.projectKey)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.api.models.recurring_order.RecurringOrderPagedQueryResponse.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurring_order.RecurringOrderPagedQueryResponse.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public List getSort() { + return this.getQueryParam("sort"); + } + + public List getLimit() { + return this.getQueryParam("limit"); + } + + public List getOffset() { + return this.getQueryParam("offset"); + } + + public List getWithTotal() { + return this.getQueryParam("withTotal"); + } + + public List getWhere() { + return this.getQueryParam("where"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * set sort with the specified value + * @param sort value to be set + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withSort(final TValue sort) { + return copy().withQueryParam("sort", sort); + } + + /** + * add additional sort query parameter + * @param sort value to be added + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addSort(final TValue sort) { + return copy().addQueryParam("sort", sort); + } + + /** + * set sort with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withSort(final Supplier supplier) { + return copy().withQueryParam("sort", supplier.get()); + } + + /** + * add additional sort query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addSort(final Supplier supplier) { + return copy().addQueryParam("sort", supplier.get()); + } + + /** + * set sort with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withSort(final Function op) { + return copy().withQueryParam("sort", op.apply(new StringBuilder())); + } + + /** + * add additional sort query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addSort(final Function op) { + return copy().addQueryParam("sort", op.apply(new StringBuilder())); + } + + /** + * set sort with the specified values + * @param sort values to be set + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withSort(final Collection sort) { + return copy().withoutQueryParam("sort") + .addQueryParams( + sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional sort query parameters + * @param sort values to be added + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addSort(final Collection sort) { + return copy().addQueryParams( + sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList())); + } + + /** + * set limit with the specified value + * @param limit value to be set + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withLimit(final TValue limit) { + return copy().withQueryParam("limit", limit); + } + + /** + * add additional limit query parameter + * @param limit value to be added + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addLimit(final TValue limit) { + return copy().addQueryParam("limit", limit); + } + + /** + * set limit with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withLimit(final Supplier supplier) { + return copy().withQueryParam("limit", supplier.get()); + } + + /** + * add additional limit query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addLimit(final Supplier supplier) { + return copy().addQueryParam("limit", supplier.get()); + } + + /** + * set limit with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withLimit(final Function op) { + return copy().withQueryParam("limit", op.apply(new StringBuilder())); + } + + /** + * add additional limit query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addLimit(final Function op) { + return copy().addQueryParam("limit", op.apply(new StringBuilder())); + } + + /** + * set limit with the specified values + * @param limit values to be set + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withLimit(final Collection limit) { + return copy().withoutQueryParam("limit") + .addQueryParams( + limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional limit query parameters + * @param limit values to be added + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addLimit(final Collection limit) { + return copy().addQueryParams( + limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); + } + + /** + * set offset with the specified value + * @param offset value to be set + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withOffset(final TValue offset) { + return copy().withQueryParam("offset", offset); + } + + /** + * add additional offset query parameter + * @param offset value to be added + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addOffset(final TValue offset) { + return copy().addQueryParam("offset", offset); + } + + /** + * set offset with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withOffset(final Supplier supplier) { + return copy().withQueryParam("offset", supplier.get()); + } + + /** + * add additional offset query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addOffset(final Supplier supplier) { + return copy().addQueryParam("offset", supplier.get()); + } + + /** + * set offset with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withOffset(final Function op) { + return copy().withQueryParam("offset", op.apply(new StringBuilder())); + } + + /** + * add additional offset query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addOffset(final Function op) { + return copy().addQueryParam("offset", op.apply(new StringBuilder())); + } + + /** + * set offset with the specified values + * @param offset values to be set + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withOffset(final Collection offset) { + return copy().withoutQueryParam("offset") + .addQueryParams( + offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional offset query parameters + * @param offset values to be added + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addOffset(final Collection offset) { + return copy().addQueryParams( + offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); + } + + /** + * set withTotal with the specified value + * @param withTotal value to be set + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withWithTotal(final TValue withTotal) { + return copy().withQueryParam("withTotal", withTotal); + } + + /** + * add additional withTotal query parameter + * @param withTotal value to be added + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addWithTotal(final TValue withTotal) { + return copy().addQueryParam("withTotal", withTotal); + } + + /** + * set withTotal with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withWithTotal(final Supplier supplier) { + return copy().withQueryParam("withTotal", supplier.get()); + } + + /** + * add additional withTotal query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addWithTotal(final Supplier supplier) { + return copy().addQueryParam("withTotal", supplier.get()); + } + + /** + * set withTotal with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withWithTotal(final Function op) { + return copy().withQueryParam("withTotal", op.apply(new StringBuilder())); + } + + /** + * add additional withTotal query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addWithTotal(final Function op) { + return copy().addQueryParam("withTotal", op.apply(new StringBuilder())); + } + + /** + * set withTotal with the specified values + * @param withTotal values to be set + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withWithTotal(final Collection withTotal) { + return copy().withoutQueryParam("withTotal") + .addQueryParams(withTotal.stream() + .map(s -> new ParamEntry<>("withTotal", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional withTotal query parameters + * @param withTotal values to be added + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addWithTotal(final Collection withTotal) { + return copy().addQueryParams( + withTotal.stream().map(s -> new ParamEntry<>("withTotal", s.toString())).collect(Collectors.toList())); + } + + /** + * set where with the specified value + * @param where value to be set + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withWhere(final TValue where) { + return copy().withQueryParam("where", where); + } + + /** + * add additional where query parameter + * @param where value to be added + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addWhere(final TValue where) { + return copy().addQueryParam("where", where); + } + + /** + * set where with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withWhere(final Supplier supplier) { + return copy().withQueryParam("where", supplier.get()); + } + + /** + * add additional where query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addWhere(final Supplier supplier) { + return copy().addQueryParam("where", supplier.get()); + } + + /** + * set where with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withWhere(final Function op) { + return copy().withQueryParam("where", op.apply(new StringBuilder())); + } + + /** + * add additional where query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addWhere(final Function op) { + return copy().addQueryParam("where", op.apply(new StringBuilder())); + } + + /** + * set where with the specified values + * @param where values to be set + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withWhere(final Collection where) { + return copy().withoutQueryParam("where") + .addQueryParams( + where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional where query parameters + * @param where values to be added + * @param value type + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addWhere(final Collection where) { + return copy().addQueryParams( + where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); + } + + /** + * set predicateVar with the specificied value + * @param value type + * @param varName parameter name + * @param predicateVar parameter value + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withPredicateVar(final String varName, final TValue predicateVar) { + return copy().withQueryParam(String.format("var.%s", varName), predicateVar); + } + + /** + * add additional predicateVar query parameter + * @param value type + * @param varName parameter name + * @param predicateVar parameter value + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addPredicateVar(final String varName, final TValue predicateVar) { + return copy().addQueryParam(String.format("var.%s", varName), predicateVar); + } + + /** + * set predicateVar with the specificied values + * @param value type + * @param varName parameter name + * @param predicateVar parameter values + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet withPredicateVar(final String varName, + final Collection predicateVar) { + final String placeholderName = String.format("var.%s", varName); + return copy().withoutQueryParam(placeholderName) + .addQueryParams(predicateVar.stream() + .map(s -> new ParamEntry<>(placeholderName, s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional predicateVar query parameters + * @param value type + * @param varName parameter name + * @param predicateVar parameter values + * @return ByProjectKeyRecurringOrdersGet + */ + public ByProjectKeyRecurringOrdersGet addPredicateVar(final String varName, + final Collection predicateVar) { + final String placeholderName = String.format("var.%s", varName); + return copy().addQueryParams(predicateVar.stream() + .map(s -> new ParamEntry<>(placeholderName, s.toString())) + .collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurringOrdersGet that = (ByProjectKeyRecurringOrdersGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); + } + + @Override + protected ByProjectKeyRecurringOrdersGet copy() { + return new ByProjectKeyRecurringOrdersGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersHead.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersHead.java new file mode 100644 index 00000000000..97a8ec4ce71 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersHead.java @@ -0,0 +1,195 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Checks if one or more Recurring Orders exist for the provided query predicate. Returns a 200 OK status if any Recurring Orders match the query predicate, or a NotFound error otherwise.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurringOrders()
      + *            .head()
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersHead + extends TypeApiMethod + implements com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + public ByProjectKeyRecurringOrdersHead(final ApiHttpClient apiHttpClient, String projectKey) { + super(apiHttpClient); + this.projectKey = projectKey; + } + + public ByProjectKeyRecurringOrdersHead(ByProjectKeyRecurringOrdersHead t) { + super(t); + this.projectKey = t.projectKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurring-orders", encodePathParam(this.projectKey)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.fasterxml.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public List getWhere() { + return this.getQueryParam("where"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + /** + * set where with the specified value + * @param where value to be set + * @param value type + * @return ByProjectKeyRecurringOrdersHead + */ + public ByProjectKeyRecurringOrdersHead withWhere(final TValue where) { + return copy().withQueryParam("where", where); + } + + /** + * add additional where query parameter + * @param where value to be added + * @param value type + * @return ByProjectKeyRecurringOrdersHead + */ + public ByProjectKeyRecurringOrdersHead addWhere(final TValue where) { + return copy().addQueryParam("where", where); + } + + /** + * set where with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurringOrdersHead + */ + public ByProjectKeyRecurringOrdersHead withWhere(final Supplier supplier) { + return copy().withQueryParam("where", supplier.get()); + } + + /** + * add additional where query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurringOrdersHead + */ + public ByProjectKeyRecurringOrdersHead addWhere(final Supplier supplier) { + return copy().addQueryParam("where", supplier.get()); + } + + /** + * set where with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurringOrdersHead + */ + public ByProjectKeyRecurringOrdersHead withWhere(final Function op) { + return copy().withQueryParam("where", op.apply(new StringBuilder())); + } + + /** + * add additional where query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurringOrdersHead + */ + public ByProjectKeyRecurringOrdersHead addWhere(final Function op) { + return copy().addQueryParam("where", op.apply(new StringBuilder())); + } + + /** + * set where with the specified values + * @param where values to be set + * @param value type + * @return ByProjectKeyRecurringOrdersHead + */ + public ByProjectKeyRecurringOrdersHead withWhere(final Collection where) { + return copy().withoutQueryParam("where") + .addQueryParams( + where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional where query parameters + * @param where values to be added + * @param value type + * @return ByProjectKeyRecurringOrdersHead + */ + public ByProjectKeyRecurringOrdersHead addWhere(final Collection where) { + return copy().addQueryParams( + where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurringOrdersHead that = (ByProjectKeyRecurringOrdersHead) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); + } + + @Override + protected ByProjectKeyRecurringOrdersHead copy() { + return new ByProjectKeyRecurringOrdersHead(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersKeyByKeyGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersKeyByKeyGet.java new file mode 100644 index 00000000000..35c44ee23e7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersKeyByKeyGet.java @@ -0,0 +1,209 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Retrieves a Recurring Order with the provided key.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurringOrders()
      + *            .withKey("{key}")
      + *            .get()
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersKeyByKeyGet extends + TypeApiMethod + implements com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + public ByProjectKeyRecurringOrdersKeyByKeyGet(final ApiHttpClient apiHttpClient, String projectKey, String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyRecurringOrdersKeyByKeyGet(ByProjectKeyRecurringOrdersKeyByKeyGet t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurring-orders/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyRecurringOrdersKeyByKeyGet + */ + public ByProjectKeyRecurringOrdersKeyByKeyGet withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyRecurringOrdersKeyByKeyGet + */ + public ByProjectKeyRecurringOrdersKeyByKeyGet addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurringOrdersKeyByKeyGet + */ + public ByProjectKeyRecurringOrdersKeyByKeyGet withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurringOrdersKeyByKeyGet + */ + public ByProjectKeyRecurringOrdersKeyByKeyGet addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurringOrdersKeyByKeyGet + */ + public ByProjectKeyRecurringOrdersKeyByKeyGet withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurringOrdersKeyByKeyGet + */ + public ByProjectKeyRecurringOrdersKeyByKeyGet addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyRecurringOrdersKeyByKeyGet + */ + public ByProjectKeyRecurringOrdersKeyByKeyGet withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyRecurringOrdersKeyByKeyGet + */ + public ByProjectKeyRecurringOrdersKeyByKeyGet addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurringOrdersKeyByKeyGet that = (ByProjectKeyRecurringOrdersKeyByKeyGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(key, that.key).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).toHashCode(); + } + + @Override + protected ByProjectKeyRecurringOrdersKeyByKeyGet copy() { + return new ByProjectKeyRecurringOrdersKeyByKeyGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersKeyByKeyHead.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersKeyByKeyHead.java new file mode 100644 index 00000000000..85fc74243f6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersKeyByKeyHead.java @@ -0,0 +1,121 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Checks if a Recurring Order exists with the provided key. Returns a 200 OK status if the Recurring Order exists, or a NotFound error otherwise.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurringOrders()
      + *            .withKey("{key}")
      + *            .head()
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersKeyByKeyHead + extends TypeApiMethod + implements com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + public ByProjectKeyRecurringOrdersKeyByKeyHead(final ApiHttpClient apiHttpClient, String projectKey, String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyRecurringOrdersKeyByKeyHead(ByProjectKeyRecurringOrdersKeyByKeyHead t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurring-orders/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.fasterxml.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurringOrdersKeyByKeyHead that = (ByProjectKeyRecurringOrdersKeyByKeyHead) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(key, that.key).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).toHashCode(); + } + + @Override + protected ByProjectKeyRecurringOrdersKeyByKeyHead copy() { + return new ByProjectKeyRecurringOrdersKeyByKeyHead(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersKeyByKeyPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersKeyByKeyPost.java new file mode 100644 index 00000000000..856ba0dd49d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersKeyByKeyPost.java @@ -0,0 +1,232 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Updates a Recurring Order using one or more update actions.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurringOrders()
      + *            .withKey("{key}")
      + *            .post(null)
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersKeyByKeyPost extends + TypeBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + private com.commercetools.api.models.recurring_order.RecurringOrderUpdate recurringOrderUpdate; + + public ByProjectKeyRecurringOrdersKeyByKeyPost(final ApiHttpClient apiHttpClient, String projectKey, String key, + com.commercetools.api.models.recurring_order.RecurringOrderUpdate recurringOrderUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + this.recurringOrderUpdate = recurringOrderUpdate; + } + + public ByProjectKeyRecurringOrdersKeyByKeyPost(ByProjectKeyRecurringOrdersKeyByKeyPost t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + this.recurringOrderUpdate = t.recurringOrderUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurring-orders/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(recurringOrderUpdate))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyRecurringOrdersKeyByKeyPost + */ + public ByProjectKeyRecurringOrdersKeyByKeyPost withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyRecurringOrdersKeyByKeyPost + */ + public ByProjectKeyRecurringOrdersKeyByKeyPost addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurringOrdersKeyByKeyPost + */ + public ByProjectKeyRecurringOrdersKeyByKeyPost withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurringOrdersKeyByKeyPost + */ + public ByProjectKeyRecurringOrdersKeyByKeyPost addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurringOrdersKeyByKeyPost + */ + public ByProjectKeyRecurringOrdersKeyByKeyPost withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurringOrdersKeyByKeyPost + */ + public ByProjectKeyRecurringOrdersKeyByKeyPost addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyRecurringOrdersKeyByKeyPost + */ + public ByProjectKeyRecurringOrdersKeyByKeyPost withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyRecurringOrdersKeyByKeyPost + */ + public ByProjectKeyRecurringOrdersKeyByKeyPost addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public com.commercetools.api.models.recurring_order.RecurringOrderUpdate getBody() { + return recurringOrderUpdate; + } + + public ByProjectKeyRecurringOrdersKeyByKeyPost withBody( + com.commercetools.api.models.recurring_order.RecurringOrderUpdate recurringOrderUpdate) { + ByProjectKeyRecurringOrdersKeyByKeyPost t = copy(); + t.recurringOrderUpdate = recurringOrderUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurringOrdersKeyByKeyPost that = (ByProjectKeyRecurringOrdersKeyByKeyPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(key, that.key) + .append(recurringOrderUpdate, that.recurringOrderUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).append(recurringOrderUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyRecurringOrdersKeyByKeyPost copy() { + return new ByProjectKeyRecurringOrdersKeyByKeyPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersKeyByKeyPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersKeyByKeyPostString.java new file mode 100644 index 00000000000..9f381c41309 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersKeyByKeyPostString.java @@ -0,0 +1,230 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Updates a Recurring Order using one or more update actions.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurringOrders()
      + *            .withKey("{key}")
      + *            .post("")
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersKeyByKeyPostString extends + StringBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable200Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + private String recurringOrderUpdate; + + public ByProjectKeyRecurringOrdersKeyByKeyPostString(final ApiHttpClient apiHttpClient, String projectKey, + String key, String recurringOrderUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + this.recurringOrderUpdate = recurringOrderUpdate; + } + + public ByProjectKeyRecurringOrdersKeyByKeyPostString(ByProjectKeyRecurringOrdersKeyByKeyPostString t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + this.recurringOrderUpdate = t.recurringOrderUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurring-orders/key=%s", this.projectKey, this.key); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + recurringOrderUpdate.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + /** + * set expand with the specified value + * @param value type + * @param expand value to be set + * @return ByProjectKeyRecurringOrdersKeyByKeyPostString + */ + public ByProjectKeyRecurringOrdersKeyByKeyPostString withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param value type + * @param expand value to be added + * @return ByProjectKeyRecurringOrdersKeyByKeyPostString + */ + public ByProjectKeyRecurringOrdersKeyByKeyPostString addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurringOrdersKeyByKeyPostString + */ + public ByProjectKeyRecurringOrdersKeyByKeyPostString withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurringOrdersKeyByKeyPostString + */ + public ByProjectKeyRecurringOrdersKeyByKeyPostString addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurringOrdersKeyByKeyPostString + */ + public ByProjectKeyRecurringOrdersKeyByKeyPostString withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurringOrdersKeyByKeyPostString + */ + public ByProjectKeyRecurringOrdersKeyByKeyPostString addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param value type + * @param expand values to be set + * @return ByProjectKeyRecurringOrdersKeyByKeyPostString + */ + public ByProjectKeyRecurringOrdersKeyByKeyPostString withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param value type + * @param expand values to be added + * @return ByProjectKeyRecurringOrdersKeyByKeyPostString + */ + public ByProjectKeyRecurringOrdersKeyByKeyPostString addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public String getBody() { + return recurringOrderUpdate; + } + + public ByProjectKeyRecurringOrdersKeyByKeyPostString withBody(String recurringOrderUpdate) { + ByProjectKeyRecurringOrdersKeyByKeyPostString t = copy(); + t.recurringOrderUpdate = recurringOrderUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurringOrdersKeyByKeyPostString that = (ByProjectKeyRecurringOrdersKeyByKeyPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(key, that.key) + .append(recurringOrderUpdate, that.recurringOrderUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).append(recurringOrderUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyRecurringOrdersKeyByKeyPostString copy() { + return new ByProjectKeyRecurringOrdersKeyByKeyPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersKeyByKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersKeyByKeyRequestBuilder.java new file mode 100644 index 00000000000..03b74ed0da4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersKeyByKeyRequestBuilder.java @@ -0,0 +1,45 @@ + +package com.commercetools.api.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersKeyByKeyRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String key; + + public ByProjectKeyRecurringOrdersKeyByKeyRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey, + final String key) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyRecurringOrdersKeyByKeyGet get() { + return new ByProjectKeyRecurringOrdersKeyByKeyGet(apiHttpClient, projectKey, key); + } + + public ByProjectKeyRecurringOrdersKeyByKeyHead head() { + return new ByProjectKeyRecurringOrdersKeyByKeyHead(apiHttpClient, projectKey, key); + } + + public ByProjectKeyRecurringOrdersKeyByKeyPost post( + com.commercetools.api.models.recurring_order.RecurringOrderUpdate recurringOrderUpdate) { + return new ByProjectKeyRecurringOrdersKeyByKeyPost(apiHttpClient, projectKey, key, recurringOrderUpdate); + } + + public ByProjectKeyRecurringOrdersKeyByKeyPostString post(final String recurringOrderUpdate) { + return new ByProjectKeyRecurringOrdersKeyByKeyPostString(apiHttpClient, projectKey, key, recurringOrderUpdate); + } + + public ByProjectKeyRecurringOrdersKeyByKeyPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.api.models.recurring_order.RecurringOrderUpdateBuilder.of()).build()); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersPost.java new file mode 100644 index 00000000000..cb431673e90 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersPost.java @@ -0,0 +1,220 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Creates a Recurring Order in the Project. The Cart is validated to ensure that it is convertible to an Order. If validation fails, an error is returned.

      + *

      Produces the RecurringOrderCreated message.

      + *

      If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Recurring Order creation may still successfully complete after the error is returned. If you receive this error, you should verify the status of the Recurring Order by querying a unique identifier supplied during the creation request, such as the key.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurringOrders()
      + *            .post(null)
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersPost extends + TypeBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable201Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private com.commercetools.api.models.recurring_order.RecurringOrderDraft recurringOrderDraft; + + public ByProjectKeyRecurringOrdersPost(final ApiHttpClient apiHttpClient, String projectKey, + com.commercetools.api.models.recurring_order.RecurringOrderDraft recurringOrderDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.recurringOrderDraft = recurringOrderDraft; + } + + public ByProjectKeyRecurringOrdersPost(ByProjectKeyRecurringOrdersPost t) { + super(t); + this.projectKey = t.projectKey; + this.recurringOrderDraft = t.recurringOrderDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurring-orders", encodePathParam(this.projectKey)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(recurringOrderDraft))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyRecurringOrdersPost + */ + public ByProjectKeyRecurringOrdersPost withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyRecurringOrdersPost + */ + public ByProjectKeyRecurringOrdersPost addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurringOrdersPost + */ + public ByProjectKeyRecurringOrdersPost withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurringOrdersPost + */ + public ByProjectKeyRecurringOrdersPost addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurringOrdersPost + */ + public ByProjectKeyRecurringOrdersPost withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurringOrdersPost + */ + public ByProjectKeyRecurringOrdersPost addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param expand values to be set + * @param value type + * @return ByProjectKeyRecurringOrdersPost + */ + public ByProjectKeyRecurringOrdersPost withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param expand values to be added + * @param value type + * @return ByProjectKeyRecurringOrdersPost + */ + public ByProjectKeyRecurringOrdersPost addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public com.commercetools.api.models.recurring_order.RecurringOrderDraft getBody() { + return recurringOrderDraft; + } + + public ByProjectKeyRecurringOrdersPost withBody( + com.commercetools.api.models.recurring_order.RecurringOrderDraft recurringOrderDraft) { + ByProjectKeyRecurringOrdersPost t = copy(); + t.recurringOrderDraft = recurringOrderDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurringOrdersPost that = (ByProjectKeyRecurringOrdersPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(recurringOrderDraft, that.recurringOrderDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(recurringOrderDraft).toHashCode(); + } + + @Override + protected ByProjectKeyRecurringOrdersPost copy() { + return new ByProjectKeyRecurringOrdersPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersPostString.java new file mode 100644 index 00000000000..a680600edce --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersPostString.java @@ -0,0 +1,219 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

      Creates a Recurring Order in the Project. The Cart is validated to ensure that it is convertible to an Order. If validation fails, an error is returned.

      + *

      Produces the RecurringOrderCreated message.

      + *

      If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Recurring Order creation may still successfully complete after the error is returned. If you receive this error, you should verify the status of the Recurring Order by querying a unique identifier supplied during the creation request, such as the key.

      + * + *
      + *
      + *
      {@code
      + *   CompletableFuture> result = apiRoot
      + *            .withProjectKey("{projectKey}")
      + *            .recurringOrders()
      + *            .post("")
      + *            .execute()
      + * }
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersPostString extends + StringBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ExpandableTrait, + com.commercetools.api.client.Deprecatable201Trait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private String recurringOrderDraft; + + public ByProjectKeyRecurringOrdersPostString(final ApiHttpClient apiHttpClient, String projectKey, + String recurringOrderDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.recurringOrderDraft = recurringOrderDraft; + } + + public ByProjectKeyRecurringOrdersPostString(ByProjectKeyRecurringOrdersPostString t) { + super(t); + this.projectKey = t.projectKey; + this.recurringOrderDraft = t.recurringOrderDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/recurring-orders", this.projectKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + recurringOrderDraft.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.recurring_order.RecurringOrder.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + /** + * set expand with the specified value + * @param value type + * @param expand value to be set + * @return ByProjectKeyRecurringOrdersPostString + */ + public ByProjectKeyRecurringOrdersPostString withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param value type + * @param expand value to be added + * @return ByProjectKeyRecurringOrdersPostString + */ + public ByProjectKeyRecurringOrdersPostString addExpand(final TValue expand) { + return copy().addQueryParam("expand", expand); + } + + /** + * set expand with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyRecurringOrdersPostString + */ + public ByProjectKeyRecurringOrdersPostString withExpand(final Supplier supplier) { + return copy().withQueryParam("expand", supplier.get()); + } + + /** + * add additional expand query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyRecurringOrdersPostString + */ + public ByProjectKeyRecurringOrdersPostString addExpand(final Supplier supplier) { + return copy().addQueryParam("expand", supplier.get()); + } + + /** + * set expand with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyRecurringOrdersPostString + */ + public ByProjectKeyRecurringOrdersPostString withExpand(final Function op) { + return copy().withQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * add additional expand query parameter + * @param op builder for the value to be added + * @return ByProjectKeyRecurringOrdersPostString + */ + public ByProjectKeyRecurringOrdersPostString addExpand(final Function op) { + return copy().addQueryParam("expand", op.apply(new StringBuilder())); + } + + /** + * set expand with the specified values + * @param value type + * @param expand values to be set + * @return ByProjectKeyRecurringOrdersPostString + */ + public ByProjectKeyRecurringOrdersPostString withExpand(final Collection expand) { + return copy().withoutQueryParam("expand") + .addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional expand query parameters + * @param value type + * @param expand values to be added + * @return ByProjectKeyRecurringOrdersPostString + */ + public ByProjectKeyRecurringOrdersPostString addExpand(final Collection expand) { + return copy().addQueryParams( + expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); + } + + public String getBody() { + return recurringOrderDraft; + } + + public ByProjectKeyRecurringOrdersPostString withBody(String recurringOrderDraft) { + ByProjectKeyRecurringOrdersPostString t = copy(); + t.recurringOrderDraft = recurringOrderDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyRecurringOrdersPostString that = (ByProjectKeyRecurringOrdersPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(recurringOrderDraft, that.recurringOrderDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(recurringOrderDraft).toHashCode(); + } + + @Override + protected ByProjectKeyRecurringOrdersPostString copy() { + return new ByProjectKeyRecurringOrdersPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersRequestBuilder.java new file mode 100644 index 00000000000..44dc55436c7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRecurringOrdersRequestBuilder.java @@ -0,0 +1,50 @@ + +package com.commercetools.api.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyRecurringOrdersRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyRecurringOrdersGet get() { + return new ByProjectKeyRecurringOrdersGet(apiHttpClient, projectKey); + } + + public ByProjectKeyRecurringOrdersHead head() { + return new ByProjectKeyRecurringOrdersHead(apiHttpClient, projectKey); + } + + public ByProjectKeyRecurringOrdersPost post( + com.commercetools.api.models.recurring_order.RecurringOrderDraft recurringOrderDraft) { + return new ByProjectKeyRecurringOrdersPost(apiHttpClient, projectKey, recurringOrderDraft); + } + + public ByProjectKeyRecurringOrdersPostString post(final String recurringOrderDraft) { + return new ByProjectKeyRecurringOrdersPostString(apiHttpClient, projectKey, recurringOrderDraft); + } + + public ByProjectKeyRecurringOrdersPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.api.models.recurring_order.RecurringOrderDraftBuilder.of()).build()); + } + + public ByProjectKeyRecurringOrdersByIDRequestBuilder withId(String ID) { + return new ByProjectKeyRecurringOrdersByIDRequestBuilder(apiHttpClient, projectKey, ID); + } + + public ByProjectKeyRecurringOrdersKeyByKeyRequestBuilder withKey(String key) { + return new ByProjectKeyRecurringOrdersKeyByKeyRequestBuilder(apiHttpClient, projectKey, key); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRequestBuilder.java index 66f63c9be74..b86917795ef 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyRequestBuilder.java @@ -149,6 +149,14 @@ public ByProjectKeyStagedQuotesRequestBuilder stagedQuotes() { return new ByProjectKeyStagedQuotesRequestBuilder(apiHttpClient, projectKey); } + public ByProjectKeyRecurringOrdersRequestBuilder recurringOrders() { + return new ByProjectKeyRecurringOrdersRequestBuilder(apiHttpClient, projectKey); + } + + public ByProjectKeyRecurrencePoliciesRequestBuilder recurrencePolicies() { + return new ByProjectKeyRecurrencePoliciesRequestBuilder(apiHttpClient, projectKey); + } + public ByProjectKeyReviewsRequestBuilder reviews() { return new ByProjectKeyReviewsRequestBuilder(apiHttpClient, projectKey); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/PriceselectingTrait.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/PriceselectingTrait.java index 71738fb1bf4..8904d84c730 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/PriceselectingTrait.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/PriceselectingTrait.java @@ -21,6 +21,8 @@ public interface PriceselectingTrait> { List getPriceChannel(); + List getPriceRecurrencePolicy(); + /** * set priceCurrency with the specificied value * @param priceCurrency value to be set @@ -101,6 +103,22 @@ public interface PriceselectingTrait> { */ PriceselectingTrait addPriceChannel(final TValue priceChannel); + /** + * set priceRecurrencePolicy with the specificied value + * @param priceRecurrencePolicy value to be set + * @param value type + * @return PriceselectingTrait + */ + PriceselectingTrait withPriceRecurrencePolicy(final TValue priceRecurrencePolicy); + + /** + * add additional priceRecurrencePolicy query parameter + * @param priceRecurrencePolicy value to be added + * @param value type + * @return PriceselectingTrait + */ + PriceselectingTrait addPriceRecurrencePolicy(final TValue priceRecurrencePolicy); + default PriceselectingTrait asPriceselectingTrait() { return this; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnit.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnit.java index c2d3a7ca555..a7dc57ce274 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnit.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnit.java @@ -119,8 +119,8 @@ public interface BusinessUnit extends BaseResource, com.commercetools.api.models /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @return stores */ @Valid @@ -324,8 +324,8 @@ public interface BusinessUnit extends BaseResource, com.commercetools.api.models /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores values to be set */ @@ -334,8 +334,8 @@ public interface BusinessUnit extends BaseResource, com.commercetools.api.models /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores values to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnitDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnitDraft.java index 6b125963d17..a5a865992b3 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnitDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnitDraft.java @@ -56,8 +56,8 @@ public interface BusinessUnitDraft extends com.commercetools.api.models.WithKey /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @return stores */ @Valid @@ -184,8 +184,8 @@ public interface BusinessUnitDraft extends com.commercetools.api.models.WithKey /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores values to be set */ @@ -194,8 +194,8 @@ public interface BusinessUnitDraft extends com.commercetools.api.models.WithKey /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores values to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnitDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnitDraftImpl.java index 24d94c26187..55196da2015 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnitDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnitDraftImpl.java @@ -115,8 +115,8 @@ public com.commercetools.api.models.business_unit.BusinessUnitStatus getStatus() /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      */ public java.util.List getStores() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnitImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnitImpl.java index e87f6e4b10f..1708a04c1f2 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnitImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/BusinessUnitImpl.java @@ -202,8 +202,8 @@ public com.commercetools.api.models.business_unit.BusinessUnitStatus getStatus() /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      */ public java.util.List getStores() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyBuilder.java index 4559ad3f6bb..5f6fd4aa881 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyBuilder.java @@ -237,8 +237,8 @@ public CompanyBuilder status(final com.commercetools.api.models.business_unit.Bu /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores value to be set * @return Builder */ @@ -250,8 +250,8 @@ public CompanyBuilder stores(@Nullable final com.commercetools.api.models.store. /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores value to be set * @return Builder */ @@ -264,8 +264,8 @@ public CompanyBuilder stores( /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores value to be set * @return Builder */ @@ -280,8 +280,8 @@ public CompanyBuilder plusStores(@Nullable final com.commercetools.api.models.st /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -297,8 +297,8 @@ public CompanyBuilder plusStores( /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -312,8 +312,8 @@ public CompanyBuilder withStores( /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -325,8 +325,8 @@ public CompanyBuilder addStores( /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -1032,8 +1032,8 @@ public com.commercetools.api.models.business_unit.BusinessUnitStatus getStatus() /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @return stores */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyDraftBuilder.java index 7a3047bb432..300452021a8 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyDraftBuilder.java @@ -93,8 +93,8 @@ public CompanyDraftBuilder status( /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores value to be set * @return Builder */ @@ -107,8 +107,8 @@ public CompanyDraftBuilder stores( /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores value to be set * @return Builder */ @@ -121,8 +121,8 @@ public CompanyDraftBuilder stores( /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores value to be set * @return Builder */ @@ -138,8 +138,8 @@ public CompanyDraftBuilder plusStores( /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -155,8 +155,8 @@ public CompanyDraftBuilder plusStores( /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -170,8 +170,8 @@ public CompanyDraftBuilder withStores( /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -183,8 +183,8 @@ public CompanyDraftBuilder addStores( /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -581,8 +581,8 @@ public com.commercetools.api.models.business_unit.BusinessUnitStatus getStatus() /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @return stores */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyDraftImpl.java index 3e21c9c933d..317ed02340d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyDraftImpl.java @@ -115,8 +115,8 @@ public com.commercetools.api.models.business_unit.BusinessUnitStatus getStatus() /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      */ public java.util.List getStores() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyImpl.java index 59bd1e2a8fe..ebc18a748d4 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/CompanyImpl.java @@ -202,8 +202,8 @@ public com.commercetools.api.models.business_unit.BusinessUnitStatus getStatus() /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      */ public java.util.List getStores() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionBuilder.java index b204c5ca9a3..bee478b0684 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionBuilder.java @@ -237,8 +237,8 @@ public DivisionBuilder status(final com.commercetools.api.models.business_unit.B /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores value to be set * @return Builder */ @@ -250,8 +250,8 @@ public DivisionBuilder stores(@Nullable final com.commercetools.api.models.store /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores value to be set * @return Builder */ @@ -264,8 +264,8 @@ public DivisionBuilder stores( /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores value to be set * @return Builder */ @@ -280,8 +280,8 @@ public DivisionBuilder plusStores(@Nullable final com.commercetools.api.models.s /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -297,8 +297,8 @@ public DivisionBuilder plusStores( /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -312,8 +312,8 @@ public DivisionBuilder withStores( /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -325,8 +325,8 @@ public DivisionBuilder addStores( /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -1032,8 +1032,8 @@ public com.commercetools.api.models.business_unit.BusinessUnitStatus getStatus() /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @return stores */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionDraftBuilder.java index 160efb9ce82..42d37dd075b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionDraftBuilder.java @@ -96,8 +96,8 @@ public DivisionDraftBuilder status( /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores value to be set * @return Builder */ @@ -110,8 +110,8 @@ public DivisionDraftBuilder stores( /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores value to be set * @return Builder */ @@ -124,8 +124,8 @@ public DivisionDraftBuilder stores( /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param stores value to be set * @return Builder */ @@ -141,8 +141,8 @@ public DivisionDraftBuilder plusStores( /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -158,8 +158,8 @@ public DivisionDraftBuilder plusStores( /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -173,8 +173,8 @@ public DivisionDraftBuilder withStores( /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -186,8 +186,8 @@ public DivisionDraftBuilder addStores( /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @param builder function to build the stores value * @return Builder */ @@ -624,8 +624,8 @@ public com.commercetools.api.models.business_unit.BusinessUnitStatus getStatus() /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      * @return stores */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionDraftImpl.java index 26863fe40ac..7d1fa206465 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionDraftImpl.java @@ -119,8 +119,8 @@ public com.commercetools.api.models.business_unit.BusinessUnitStatus getStatus() /** *

      Sets the Stores the Business Unit is associated with. Can only be set when storeMode is Explicit. Defaults to empty for Companies and not set for Divisions.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      */ public java.util.List getStores() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionImpl.java index d3fdc6017e2..3467035faea 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit/DivisionImpl.java @@ -202,8 +202,8 @@ public com.commercetools.api.models.business_unit.BusinessUnitStatus getStatus() /** *

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      - *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      - *

      If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      + *

      If the Business Unit has Stores defined, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must belong to one of the Business Unit's Stores.

      + *

      If the Business Unit has no Stores, then all of its Carts, Orders, Recurring Orders, Quotes, Quote Requests, or Shopping Lists must not belong to any Store.

      */ public java.util.List getStores() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemAction.java index 3091dacd06f..0974c181f54 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemAction.java @@ -9,6 +9,7 @@ import com.commercetools.api.models.common.LocalizedString; import com.commercetools.api.models.common.Money; +import com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft; import com.commercetools.api.models.tax_category.TaxCategoryResourceIdentifier; import com.commercetools.api.models.type.CustomFieldsDraft; import com.fasterxml.jackson.annotation.*; @@ -133,6 +134,14 @@ public interface CartAddCustomLineItemAction @JsonProperty("priceMode") public CustomLineItemPriceMode getPriceMode(); + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public CustomLineItemRecurrenceInfoDraft getRecurrenceInfo(); + /** *

      Money value of the Custom Line Item. The value can be negative.

      * @param money value to be set @@ -207,6 +216,13 @@ public interface CartAddCustomLineItemAction public void setPriceMode(final CustomLineItemPriceMode priceMode); + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + */ + + public void setRecurrenceInfo(final CustomLineItemRecurrenceInfoDraft recurrenceInfo); + /** * factory method * @return instance of CartAddCustomLineItemAction @@ -232,6 +248,7 @@ public static CartAddCustomLineItemAction of(final CartAddCustomLineItemAction t instance.setShippingDetails(template.getShippingDetails()); instance.setCustom(template.getCustom()); instance.setPriceMode(template.getPriceMode()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); return instance; } @@ -261,6 +278,8 @@ public static CartAddCustomLineItemAction deepCopy(@Nullable final CartAddCustom com.commercetools.api.models.cart.ItemShippingDetailsDraft.deepCopy(template.getShippingDetails())); instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom())); instance.setPriceMode(template.getPriceMode()); + instance.setRecurrenceInfo(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft + .deepCopy(template.getRecurrenceInfo())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemActionBuilder.java index ea4b32f601a..6802349a1c1 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemActionBuilder.java @@ -53,6 +53,9 @@ public class CartAddCustomLineItemActionBuilder implements BuilderMoney value of the Custom Line Item. The value can be negative.

      * @param builder function to build the money value @@ -323,6 +326,45 @@ public CartAddCustomLineItemActionBuilder priceMode( return this; } + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public CartAddCustomLineItemActionBuilder recurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public CartAddCustomLineItemActionBuilder withRecurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftBuilder.of()); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + * @return Builder + */ + + public CartAddCustomLineItemActionBuilder recurrenceInfo( + @Nullable final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + /** *

      Money value of the Custom Line Item. The value can be negative.

      * @return money @@ -424,6 +466,16 @@ public com.commercetools.api.models.cart.CustomLineItemPriceMode getPriceMode() return this.priceMode; } + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + /** * builds CartAddCustomLineItemAction with checking for non-null required values * @return CartAddCustomLineItemAction @@ -433,7 +485,7 @@ public CartAddCustomLineItemAction build() { Objects.requireNonNull(name, CartAddCustomLineItemAction.class + ": name is missing"); Objects.requireNonNull(slug, CartAddCustomLineItemAction.class + ": slug is missing"); return new CartAddCustomLineItemActionImpl(money, name, key, quantity, slug, taxCategory, externalTaxRate, - shippingDetails, custom, priceMode); + shippingDetails, custom, priceMode, recurrenceInfo); } /** @@ -442,7 +494,7 @@ public CartAddCustomLineItemAction build() { */ public CartAddCustomLineItemAction buildUnchecked() { return new CartAddCustomLineItemActionImpl(money, name, key, quantity, slug, taxCategory, externalTaxRate, - shippingDetails, custom, priceMode); + shippingDetails, custom, priceMode, recurrenceInfo); } /** @@ -470,6 +522,7 @@ public static CartAddCustomLineItemActionBuilder of(final CartAddCustomLineItemA builder.shippingDetails = template.getShippingDetails(); builder.custom = template.getCustom(); builder.priceMode = template.getPriceMode(); + builder.recurrenceInfo = template.getRecurrenceInfo(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemActionImpl.java index a293f004ebb..a88166a4d55 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemActionImpl.java @@ -46,6 +46,8 @@ public class CartAddCustomLineItemActionImpl implements CartAddCustomLineItemAct private com.commercetools.api.models.cart.CustomLineItemPriceMode priceMode; + private com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo; + /** * create instance with all properties */ @@ -58,7 +60,8 @@ public class CartAddCustomLineItemActionImpl implements CartAddCustomLineItemAct @JsonProperty("externalTaxRate") final com.commercetools.api.models.cart.ExternalTaxRateDraft externalTaxRate, @JsonProperty("shippingDetails") final com.commercetools.api.models.cart.ItemShippingDetailsDraft shippingDetails, @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom, - @JsonProperty("priceMode") final com.commercetools.api.models.cart.CustomLineItemPriceMode priceMode) { + @JsonProperty("priceMode") final com.commercetools.api.models.cart.CustomLineItemPriceMode priceMode, + @JsonProperty("recurrenceInfo") final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo) { this.money = money; this.name = name; this.key = key; @@ -69,6 +72,7 @@ public class CartAddCustomLineItemActionImpl implements CartAddCustomLineItemAct this.shippingDetails = shippingDetails; this.custom = custom; this.priceMode = priceMode; + this.recurrenceInfo = recurrenceInfo; this.action = ADD_CUSTOM_LINE_ITEM; } @@ -171,6 +175,14 @@ public com.commercetools.api.models.cart.CustomLineItemPriceMode getPriceMode() return this.priceMode; } + /** + *

      Recurring Order and frequency data.

      + */ + + public com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + public void setMoney(final com.commercetools.api.models.common.Money money) { this.money = money; } @@ -212,6 +224,11 @@ public void setPriceMode(final com.commercetools.api.models.cart.CustomLineItemP this.priceMode = priceMode; } + public void setRecurrenceInfo( + final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + } + @Override public boolean equals(Object o) { if (this == o) @@ -233,6 +250,7 @@ public boolean equals(Object o) { .append(shippingDetails, that.shippingDetails) .append(custom, that.custom) .append(priceMode, that.priceMode) + .append(recurrenceInfo, that.recurrenceInfo) .append(action, that.action) .append(money, that.money) .append(name, that.name) @@ -244,6 +262,7 @@ public boolean equals(Object o) { .append(shippingDetails, that.shippingDetails) .append(custom, that.custom) .append(priceMode, that.priceMode) + .append(recurrenceInfo, that.recurrenceInfo) .isEquals(); } @@ -260,6 +279,7 @@ public int hashCode() { .append(shippingDetails) .append(custom) .append(priceMode) + .append(recurrenceInfo) .toHashCode(); } @@ -276,6 +296,7 @@ public String toString() { .append("shippingDetails", shippingDetails) .append("custom", custom) .append("priceMode", priceMode) + .append("recurrenceInfo", recurrenceInfo) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemAction.java index 5786857e01c..ff231906bab 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemAction.java @@ -11,6 +11,7 @@ import com.commercetools.api.models.channel.ChannelResourceIdentifier; import com.commercetools.api.models.common.Money; +import com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft; import com.commercetools.api.models.type.CustomFieldsDraft; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -161,6 +162,14 @@ public interface CartAddLineItemAction @JsonProperty("shippingDetails") public ItemShippingDetailsDraft getShippingDetails(); + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public LineItemRecurrenceInfoDraft getRecurrenceInfo(); + /** *

      Custom Fields for the Line Item.

      * @return custom @@ -279,6 +288,13 @@ public interface CartAddLineItemAction public void setShippingDetails(final ItemShippingDetailsDraft shippingDetails); + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + */ + + public void setRecurrenceInfo(final LineItemRecurrenceInfoDraft recurrenceInfo); + /** *

      Custom Fields for the Line Item.

      * @param custom value to be set @@ -315,6 +331,7 @@ public static CartAddLineItemAction of(final CartAddLineItemAction template) { instance.setPerMethodExternalTaxRate(template.getPerMethodExternalTaxRate()); instance.setInventoryMode(template.getInventoryMode()); instance.setShippingDetails(template.getShippingDetails()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); instance.setCustom(template.getCustom()); return instance; } @@ -355,6 +372,8 @@ public static CartAddLineItemAction deepCopy(@Nullable final CartAddLineItemActi instance.setInventoryMode(template.getInventoryMode()); instance.setShippingDetails( com.commercetools.api.models.cart.ItemShippingDetailsDraft.deepCopy(template.getShippingDetails())); + instance.setRecurrenceInfo(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft + .deepCopy(template.getRecurrenceInfo())); instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionBuilder.java index 1b9bbca5a11..295416b25bf 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionBuilder.java @@ -65,6 +65,9 @@ public class CartAddLineItemActionBuilder implements BuilderRecurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public CartAddLineItemActionBuilder recurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public CartAddLineItemActionBuilder withRecurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftBuilder.of()); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + * @return Builder + */ + + public CartAddLineItemActionBuilder recurrenceInfo( + @Nullable final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + /** *

      Custom Fields for the Line Item.

      * @param builder function to build the custom value @@ -648,6 +690,16 @@ public com.commercetools.api.models.cart.ItemShippingDetailsDraft getShippingDet return this.shippingDetails; } + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + /** *

      Custom Fields for the Line Item.

      * @return custom @@ -665,7 +717,7 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { public CartAddLineItemAction build() { return new CartAddLineItemActionImpl(key, productId, variantId, sku, quantity, addedAt, distributionChannel, supplyChannel, externalPrice, externalTotalPrice, externalTaxRate, perMethodExternalTaxRate, inventoryMode, - shippingDetails, custom); + shippingDetails, recurrenceInfo, custom); } /** @@ -675,7 +727,7 @@ public CartAddLineItemAction build() { public CartAddLineItemAction buildUnchecked() { return new CartAddLineItemActionImpl(key, productId, variantId, sku, quantity, addedAt, distributionChannel, supplyChannel, externalPrice, externalTotalPrice, externalTaxRate, perMethodExternalTaxRate, inventoryMode, - shippingDetails, custom); + shippingDetails, recurrenceInfo, custom); } /** @@ -707,6 +759,7 @@ public static CartAddLineItemActionBuilder of(final CartAddLineItemAction templa builder.perMethodExternalTaxRate = template.getPerMethodExternalTaxRate(); builder.inventoryMode = template.getInventoryMode(); builder.shippingDetails = template.getShippingDetails(); + builder.recurrenceInfo = template.getRecurrenceInfo(); builder.custom = template.getCustom(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionImpl.java index c191068d6c3..afb0ccfd5bc 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionImpl.java @@ -55,6 +55,8 @@ public class CartAddLineItemActionImpl implements CartAddLineItemAction, ModelBa private com.commercetools.api.models.cart.ItemShippingDetailsDraft shippingDetails; + private com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo; + private com.commercetools.api.models.type.CustomFieldsDraft custom; /** @@ -73,6 +75,7 @@ public class CartAddLineItemActionImpl implements CartAddLineItemAction, ModelBa @JsonProperty("perMethodExternalTaxRate") final java.util.List perMethodExternalTaxRate, @JsonProperty("inventoryMode") final com.commercetools.api.models.cart.InventoryMode inventoryMode, @JsonProperty("shippingDetails") final com.commercetools.api.models.cart.ItemShippingDetailsDraft shippingDetails, + @JsonProperty("recurrenceInfo") final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo, @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom) { this.key = key; this.productId = productId; @@ -88,6 +91,7 @@ public class CartAddLineItemActionImpl implements CartAddLineItemAction, ModelBa this.perMethodExternalTaxRate = perMethodExternalTaxRate; this.inventoryMode = inventoryMode; this.shippingDetails = shippingDetails; + this.recurrenceInfo = recurrenceInfo; this.custom = custom; this.action = ADD_LINE_ITEM; } @@ -223,6 +227,14 @@ public com.commercetools.api.models.cart.ItemShippingDetailsDraft getShippingDet return this.shippingDetails; } + /** + *

      Recurring Order and frequency data.

      + */ + + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + /** *

      Custom Fields for the Line Item.

      */ @@ -295,6 +307,11 @@ public void setShippingDetails(final com.commercetools.api.models.cart.ItemShipp this.shippingDetails = shippingDetails; } + public void setRecurrenceInfo( + final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + } + public void setCustom(final com.commercetools.api.models.type.CustomFieldsDraft custom) { this.custom = custom; } @@ -324,6 +341,7 @@ public boolean equals(Object o) { .append(perMethodExternalTaxRate, that.perMethodExternalTaxRate) .append(inventoryMode, that.inventoryMode) .append(shippingDetails, that.shippingDetails) + .append(recurrenceInfo, that.recurrenceInfo) .append(custom, that.custom) .append(action, that.action) .append(key, that.key) @@ -340,6 +358,7 @@ public boolean equals(Object o) { .append(perMethodExternalTaxRate, that.perMethodExternalTaxRate) .append(inventoryMode, that.inventoryMode) .append(shippingDetails, that.shippingDetails) + .append(recurrenceInfo, that.recurrenceInfo) .append(custom, that.custom) .isEquals(); } @@ -361,6 +380,7 @@ public int hashCode() { .append(perMethodExternalTaxRate) .append(inventoryMode) .append(shippingDetails) + .append(recurrenceInfo) .append(custom) .toHashCode(); } @@ -382,6 +402,7 @@ public String toString() { .append("perMethodExternalTaxRate", perMethodExternalTaxRate) .append("inventoryMode", inventoryMode) .append("shippingDetails", shippingDetails) + .append("recurrenceInfo", recurrenceInfo) .append("custom", custom) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartOrigin.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartOrigin.java index 255df51b7b0..1c2ff8232dd 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartOrigin.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartOrigin.java @@ -26,6 +26,9 @@ public interface CartOrigin extends JsonEnum { /**

      Cart was created as part of a Quote.

      */ CartOrigin QUOTE = CartOriginEnum.QUOTE; + /** +

      Cart was created as part of a Recurring Order.

      */ + CartOrigin RECURRING_ORDER = CartOriginEnum.RECURRING_ORDER; /** * possible values of CartOrigin @@ -44,7 +47,12 @@ enum CartOriginEnum implements CartOrigin { /** * Quote */ - QUOTE("Quote"); + QUOTE("Quote"), + + /** + * RecurringOrder + */ + RECURRING_ORDER("RecurringOrder"); private final String jsonName; private CartOriginEnum(final String jsonName) { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomLineItemRecurrenceInfoAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomLineItemRecurrenceInfoAction.java new file mode 100644 index 00000000000..82452d3baab --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomLineItemRecurrenceInfoAction.java @@ -0,0 +1,169 @@ + +package com.commercetools.api.models.cart; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

      Sets the recurrence information on the CustomLineItem. If the Cart is already associated with a Recurring Order, this action will fail.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     CartSetCustomLineItemRecurrenceInfoAction cartSetCustomLineItemRecurrenceInfoAction = CartSetCustomLineItemRecurrenceInfoAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("setCustomLineItemRecurrenceInfo") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CartSetCustomLineItemRecurrenceInfoActionImpl.class) +public interface CartSetCustomLineItemRecurrenceInfoAction extends CartUpdateAction { + + /** + * discriminator value for CartSetCustomLineItemRecurrenceInfoAction + */ + String SET_CUSTOM_LINE_ITEM_RECURRENCE_INFO = "setCustomLineItemRecurrenceInfo"; + + /** + *

      id of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @return customLineItemId + */ + + @JsonProperty("customLineItemId") + public String getCustomLineItemId(); + + /** + *

      key of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @return customLineItemKey + */ + + @JsonProperty("customLineItemKey") + public String getCustomLineItemKey(); + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public CustomLineItemRecurrenceInfoDraft getRecurrenceInfo(); + + /** + *

      id of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @param customLineItemId value to be set + */ + + public void setCustomLineItemId(final String customLineItemId); + + /** + *

      key of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @param customLineItemKey value to be set + */ + + public void setCustomLineItemKey(final String customLineItemKey); + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param recurrenceInfo value to be set + */ + + public void setRecurrenceInfo(final CustomLineItemRecurrenceInfoDraft recurrenceInfo); + + /** + * factory method + * @return instance of CartSetCustomLineItemRecurrenceInfoAction + */ + public static CartSetCustomLineItemRecurrenceInfoAction of() { + return new CartSetCustomLineItemRecurrenceInfoActionImpl(); + } + + /** + * factory method to create a shallow copy CartSetCustomLineItemRecurrenceInfoAction + * @param template instance to be copied + * @return copy instance + */ + public static CartSetCustomLineItemRecurrenceInfoAction of( + final CartSetCustomLineItemRecurrenceInfoAction template) { + CartSetCustomLineItemRecurrenceInfoActionImpl instance = new CartSetCustomLineItemRecurrenceInfoActionImpl(); + instance.setCustomLineItemId(template.getCustomLineItemId()); + instance.setCustomLineItemKey(template.getCustomLineItemKey()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); + return instance; + } + + public CartSetCustomLineItemRecurrenceInfoAction copyDeep(); + + /** + * factory method to create a deep copy of CartSetCustomLineItemRecurrenceInfoAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartSetCustomLineItemRecurrenceInfoAction deepCopy( + @Nullable final CartSetCustomLineItemRecurrenceInfoAction template) { + if (template == null) { + return null; + } + CartSetCustomLineItemRecurrenceInfoActionImpl instance = new CartSetCustomLineItemRecurrenceInfoActionImpl(); + instance.setCustomLineItemId(template.getCustomLineItemId()); + instance.setCustomLineItemKey(template.getCustomLineItemKey()); + instance.setRecurrenceInfo(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft + .deepCopy(template.getRecurrenceInfo())); + return instance; + } + + /** + * builder factory method for CartSetCustomLineItemRecurrenceInfoAction + * @return builder + */ + public static CartSetCustomLineItemRecurrenceInfoActionBuilder builder() { + return CartSetCustomLineItemRecurrenceInfoActionBuilder.of(); + } + + /** + * create builder for CartSetCustomLineItemRecurrenceInfoAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartSetCustomLineItemRecurrenceInfoActionBuilder builder( + final CartSetCustomLineItemRecurrenceInfoAction template) { + return CartSetCustomLineItemRecurrenceInfoActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCartSetCustomLineItemRecurrenceInfoAction( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomLineItemRecurrenceInfoActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomLineItemRecurrenceInfoActionBuilder.java new file mode 100644 index 00000000000..d8b4a83c581 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomLineItemRecurrenceInfoActionBuilder.java @@ -0,0 +1,166 @@ + +package com.commercetools.api.models.cart; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CartSetCustomLineItemRecurrenceInfoActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     CartSetCustomLineItemRecurrenceInfoAction cartSetCustomLineItemRecurrenceInfoAction = CartSetCustomLineItemRecurrenceInfoAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartSetCustomLineItemRecurrenceInfoActionBuilder + implements Builder { + + @Nullable + private String customLineItemId; + + @Nullable + private String customLineItemKey; + + @Nullable + private com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo; + + /** + *

      id of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @param customLineItemId value to be set + * @return Builder + */ + + public CartSetCustomLineItemRecurrenceInfoActionBuilder customLineItemId(@Nullable final String customLineItemId) { + this.customLineItemId = customLineItemId; + return this; + } + + /** + *

      key of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @param customLineItemKey value to be set + * @return Builder + */ + + public CartSetCustomLineItemRecurrenceInfoActionBuilder customLineItemKey( + @Nullable final String customLineItemKey) { + this.customLineItemKey = customLineItemKey; + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public CartSetCustomLineItemRecurrenceInfoActionBuilder recurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public CartSetCustomLineItemRecurrenceInfoActionBuilder withRecurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftBuilder.of()); + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param recurrenceInfo value to be set + * @return Builder + */ + + public CartSetCustomLineItemRecurrenceInfoActionBuilder recurrenceInfo( + @Nullable final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + + /** + *

      id of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @return customLineItemId + */ + + @Nullable + public String getCustomLineItemId() { + return this.customLineItemId; + } + + /** + *

      key of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @return customLineItemKey + */ + + @Nullable + public String getCustomLineItemKey() { + return this.customLineItemKey; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + + /** + * builds CartSetCustomLineItemRecurrenceInfoAction with checking for non-null required values + * @return CartSetCustomLineItemRecurrenceInfoAction + */ + public CartSetCustomLineItemRecurrenceInfoAction build() { + return new CartSetCustomLineItemRecurrenceInfoActionImpl(customLineItemId, customLineItemKey, recurrenceInfo); + } + + /** + * builds CartSetCustomLineItemRecurrenceInfoAction without checking for non-null required values + * @return CartSetCustomLineItemRecurrenceInfoAction + */ + public CartSetCustomLineItemRecurrenceInfoAction buildUnchecked() { + return new CartSetCustomLineItemRecurrenceInfoActionImpl(customLineItemId, customLineItemKey, recurrenceInfo); + } + + /** + * factory method for an instance of CartSetCustomLineItemRecurrenceInfoActionBuilder + * @return builder + */ + public static CartSetCustomLineItemRecurrenceInfoActionBuilder of() { + return new CartSetCustomLineItemRecurrenceInfoActionBuilder(); + } + + /** + * create builder for CartSetCustomLineItemRecurrenceInfoAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartSetCustomLineItemRecurrenceInfoActionBuilder of( + final CartSetCustomLineItemRecurrenceInfoAction template) { + CartSetCustomLineItemRecurrenceInfoActionBuilder builder = new CartSetCustomLineItemRecurrenceInfoActionBuilder(); + builder.customLineItemId = template.getCustomLineItemId(); + builder.customLineItemKey = template.getCustomLineItemKey(); + builder.recurrenceInfo = template.getRecurrenceInfo(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomLineItemRecurrenceInfoActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomLineItemRecurrenceInfoActionImpl.java new file mode 100644 index 00000000000..b5eac363faf --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomLineItemRecurrenceInfoActionImpl.java @@ -0,0 +1,142 @@ + +package com.commercetools.api.models.cart; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Sets the recurrence information on the CustomLineItem. If the Cart is already associated with a Recurring Order, this action will fail.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartSetCustomLineItemRecurrenceInfoActionImpl + implements CartSetCustomLineItemRecurrenceInfoAction, ModelBase { + + private String action; + + private String customLineItemId; + + private String customLineItemKey; + + private com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo; + + /** + * create instance with all properties + */ + @JsonCreator + CartSetCustomLineItemRecurrenceInfoActionImpl(@JsonProperty("customLineItemId") final String customLineItemId, + @JsonProperty("customLineItemKey") final String customLineItemKey, + @JsonProperty("recurrenceInfo") final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo) { + this.customLineItemId = customLineItemId; + this.customLineItemKey = customLineItemKey; + this.recurrenceInfo = recurrenceInfo; + this.action = SET_CUSTOM_LINE_ITEM_RECURRENCE_INFO; + } + + /** + * create empty instance + */ + public CartSetCustomLineItemRecurrenceInfoActionImpl() { + this.action = SET_CUSTOM_LINE_ITEM_RECURRENCE_INFO; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      id of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + */ + + public String getCustomLineItemId() { + return this.customLineItemId; + } + + /** + *

      key of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + */ + + public String getCustomLineItemKey() { + return this.customLineItemKey; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + */ + + public com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + + public void setCustomLineItemId(final String customLineItemId) { + this.customLineItemId = customLineItemId; + } + + public void setCustomLineItemKey(final String customLineItemKey) { + this.customLineItemKey = customLineItemKey; + } + + public void setRecurrenceInfo( + final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartSetCustomLineItemRecurrenceInfoActionImpl that = (CartSetCustomLineItemRecurrenceInfoActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(customLineItemId, that.customLineItemId) + .append(customLineItemKey, that.customLineItemKey) + .append(recurrenceInfo, that.recurrenceInfo) + .append(action, that.action) + .append(customLineItemId, that.customLineItemId) + .append(customLineItemKey, that.customLineItemKey) + .append(recurrenceInfo, that.recurrenceInfo) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(customLineItemId) + .append(customLineItemKey) + .append(recurrenceInfo) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("customLineItemId", customLineItemId) + .append("customLineItemKey", customLineItemKey) + .append("recurrenceInfo", recurrenceInfo) + .build(); + } + + @Override + public CartSetCustomLineItemRecurrenceInfoAction copyDeep() { + return CartSetCustomLineItemRecurrenceInfoAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemRecurrenceInfoAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemRecurrenceInfoAction.java new file mode 100644 index 00000000000..a44b8159d5b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemRecurrenceInfoAction.java @@ -0,0 +1,167 @@ + +package com.commercetools.api.models.cart; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

      Sets the recurrence information on the LineItem. If the Cart is already associated with a Recurring Order, this action will fail.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     CartSetLineItemRecurrenceInfoAction cartSetLineItemRecurrenceInfoAction = CartSetLineItemRecurrenceInfoAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("setLineItemRecurrenceInfo") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CartSetLineItemRecurrenceInfoActionImpl.class) +public interface CartSetLineItemRecurrenceInfoAction extends CartUpdateAction { + + /** + * discriminator value for CartSetLineItemRecurrenceInfoAction + */ + String SET_LINE_ITEM_RECURRENCE_INFO = "setLineItemRecurrenceInfo"; + + /** + *

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @return lineItemId + */ + + @JsonProperty("lineItemId") + public String getLineItemId(); + + /** + *

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @return lineItemKey + */ + + @JsonProperty("lineItemKey") + public String getLineItemKey(); + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public LineItemRecurrenceInfoDraft getRecurrenceInfo(); + + /** + *

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @param lineItemId value to be set + */ + + public void setLineItemId(final String lineItemId); + + /** + *

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @param lineItemKey value to be set + */ + + public void setLineItemKey(final String lineItemKey); + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param recurrenceInfo value to be set + */ + + public void setRecurrenceInfo(final LineItemRecurrenceInfoDraft recurrenceInfo); + + /** + * factory method + * @return instance of CartSetLineItemRecurrenceInfoAction + */ + public static CartSetLineItemRecurrenceInfoAction of() { + return new CartSetLineItemRecurrenceInfoActionImpl(); + } + + /** + * factory method to create a shallow copy CartSetLineItemRecurrenceInfoAction + * @param template instance to be copied + * @return copy instance + */ + public static CartSetLineItemRecurrenceInfoAction of(final CartSetLineItemRecurrenceInfoAction template) { + CartSetLineItemRecurrenceInfoActionImpl instance = new CartSetLineItemRecurrenceInfoActionImpl(); + instance.setLineItemId(template.getLineItemId()); + instance.setLineItemKey(template.getLineItemKey()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); + return instance; + } + + public CartSetLineItemRecurrenceInfoAction copyDeep(); + + /** + * factory method to create a deep copy of CartSetLineItemRecurrenceInfoAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartSetLineItemRecurrenceInfoAction deepCopy( + @Nullable final CartSetLineItemRecurrenceInfoAction template) { + if (template == null) { + return null; + } + CartSetLineItemRecurrenceInfoActionImpl instance = new CartSetLineItemRecurrenceInfoActionImpl(); + instance.setLineItemId(template.getLineItemId()); + instance.setLineItemKey(template.getLineItemKey()); + instance.setRecurrenceInfo(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft + .deepCopy(template.getRecurrenceInfo())); + return instance; + } + + /** + * builder factory method for CartSetLineItemRecurrenceInfoAction + * @return builder + */ + public static CartSetLineItemRecurrenceInfoActionBuilder builder() { + return CartSetLineItemRecurrenceInfoActionBuilder.of(); + } + + /** + * create builder for CartSetLineItemRecurrenceInfoAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartSetLineItemRecurrenceInfoActionBuilder builder( + final CartSetLineItemRecurrenceInfoAction template) { + return CartSetLineItemRecurrenceInfoActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCartSetLineItemRecurrenceInfoAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemRecurrenceInfoActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemRecurrenceInfoActionBuilder.java new file mode 100644 index 00000000000..475eb49ccb7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemRecurrenceInfoActionBuilder.java @@ -0,0 +1,163 @@ + +package com.commercetools.api.models.cart; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CartSetLineItemRecurrenceInfoActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     CartSetLineItemRecurrenceInfoAction cartSetLineItemRecurrenceInfoAction = CartSetLineItemRecurrenceInfoAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartSetLineItemRecurrenceInfoActionBuilder implements Builder { + + @Nullable + private String lineItemId; + + @Nullable + private String lineItemKey; + + @Nullable + private com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo; + + /** + *

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @param lineItemId value to be set + * @return Builder + */ + + public CartSetLineItemRecurrenceInfoActionBuilder lineItemId(@Nullable final String lineItemId) { + this.lineItemId = lineItemId; + return this; + } + + /** + *

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @param lineItemKey value to be set + * @return Builder + */ + + public CartSetLineItemRecurrenceInfoActionBuilder lineItemKey(@Nullable final String lineItemKey) { + this.lineItemKey = lineItemKey; + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public CartSetLineItemRecurrenceInfoActionBuilder recurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public CartSetLineItemRecurrenceInfoActionBuilder withRecurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftBuilder.of()); + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param recurrenceInfo value to be set + * @return Builder + */ + + public CartSetLineItemRecurrenceInfoActionBuilder recurrenceInfo( + @Nullable final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + + /** + *

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @return lineItemId + */ + + @Nullable + public String getLineItemId() { + return this.lineItemId; + } + + /** + *

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @return lineItemKey + */ + + @Nullable + public String getLineItemKey() { + return this.lineItemKey; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + + /** + * builds CartSetLineItemRecurrenceInfoAction with checking for non-null required values + * @return CartSetLineItemRecurrenceInfoAction + */ + public CartSetLineItemRecurrenceInfoAction build() { + return new CartSetLineItemRecurrenceInfoActionImpl(lineItemId, lineItemKey, recurrenceInfo); + } + + /** + * builds CartSetLineItemRecurrenceInfoAction without checking for non-null required values + * @return CartSetLineItemRecurrenceInfoAction + */ + public CartSetLineItemRecurrenceInfoAction buildUnchecked() { + return new CartSetLineItemRecurrenceInfoActionImpl(lineItemId, lineItemKey, recurrenceInfo); + } + + /** + * factory method for an instance of CartSetLineItemRecurrenceInfoActionBuilder + * @return builder + */ + public static CartSetLineItemRecurrenceInfoActionBuilder of() { + return new CartSetLineItemRecurrenceInfoActionBuilder(); + } + + /** + * create builder for CartSetLineItemRecurrenceInfoAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartSetLineItemRecurrenceInfoActionBuilder of(final CartSetLineItemRecurrenceInfoAction template) { + CartSetLineItemRecurrenceInfoActionBuilder builder = new CartSetLineItemRecurrenceInfoActionBuilder(); + builder.lineItemId = template.getLineItemId(); + builder.lineItemKey = template.getLineItemKey(); + builder.recurrenceInfo = template.getRecurrenceInfo(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemRecurrenceInfoActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemRecurrenceInfoActionImpl.java new file mode 100644 index 00000000000..44a0aff4628 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemRecurrenceInfoActionImpl.java @@ -0,0 +1,141 @@ + +package com.commercetools.api.models.cart; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Sets the recurrence information on the LineItem. If the Cart is already associated with a Recurring Order, this action will fail.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartSetLineItemRecurrenceInfoActionImpl implements CartSetLineItemRecurrenceInfoAction, ModelBase { + + private String action; + + private String lineItemId; + + private String lineItemKey; + + private com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo; + + /** + * create instance with all properties + */ + @JsonCreator + CartSetLineItemRecurrenceInfoActionImpl(@JsonProperty("lineItemId") final String lineItemId, + @JsonProperty("lineItemKey") final String lineItemKey, + @JsonProperty("recurrenceInfo") final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.lineItemId = lineItemId; + this.lineItemKey = lineItemKey; + this.recurrenceInfo = recurrenceInfo; + this.action = SET_LINE_ITEM_RECURRENCE_INFO; + } + + /** + * create empty instance + */ + public CartSetLineItemRecurrenceInfoActionImpl() { + this.action = SET_LINE_ITEM_RECURRENCE_INFO; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      + */ + + public String getLineItemId() { + return this.lineItemId; + } + + /** + *

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      + */ + + public String getLineItemKey() { + return this.lineItemKey; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + */ + + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + + public void setLineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + } + + public void setLineItemKey(final String lineItemKey) { + this.lineItemKey = lineItemKey; + } + + public void setRecurrenceInfo( + final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartSetLineItemRecurrenceInfoActionImpl that = (CartSetLineItemRecurrenceInfoActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(lineItemId, that.lineItemId) + .append(lineItemKey, that.lineItemKey) + .append(recurrenceInfo, that.recurrenceInfo) + .append(action, that.action) + .append(lineItemId, that.lineItemId) + .append(lineItemKey, that.lineItemKey) + .append(recurrenceInfo, that.recurrenceInfo) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(lineItemId) + .append(lineItemKey) + .append(recurrenceInfo) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("lineItemId", lineItemId) + .append("lineItemKey", lineItemKey) + .append("recurrenceInfo", recurrenceInfo) + .build(); + } + + @Override + public CartSetLineItemRecurrenceInfoAction copyDeep() { + return CartSetLineItemRecurrenceInfoAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartUpdateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartUpdateAction.java index 4e1daff161a..02a69498802 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartUpdateAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartUpdateAction.java @@ -358,6 +358,14 @@ public static com.commercetools.api.models.cart.CartSetCustomLineItemCustomTypeA return com.commercetools.api.models.cart.CartSetCustomLineItemCustomTypeActionBuilder.of(); } + /** + * builder for setCustomLineItemRecurrenceInfo subtype + * @return builder + */ + public static com.commercetools.api.models.cart.CartSetCustomLineItemRecurrenceInfoActionBuilder setCustomLineItemRecurrenceInfoBuilder() { + return com.commercetools.api.models.cart.CartSetCustomLineItemRecurrenceInfoActionBuilder.of(); + } + /** * builder for setCustomLineItemShippingDetails subtype * @return builder @@ -502,6 +510,14 @@ public static com.commercetools.api.models.cart.CartSetLineItemPriceActionBuilde return com.commercetools.api.models.cart.CartSetLineItemPriceActionBuilder.of(); } + /** + * builder for setLineItemRecurrenceInfo subtype + * @return builder + */ + public static com.commercetools.api.models.cart.CartSetLineItemRecurrenceInfoActionBuilder setLineItemRecurrenceInfoBuilder() { + return com.commercetools.api.models.cart.CartSetLineItemRecurrenceInfoActionBuilder.of(); + } + /** * builder for setLineItemShippingDetails subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartUpdateActionBuilder.java index 8081b9ce0ba..6723cac6538 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartUpdateActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartUpdateActionBuilder.java @@ -159,6 +159,10 @@ public com.commercetools.api.models.cart.CartSetCustomLineItemCustomTypeActionBu return com.commercetools.api.models.cart.CartSetCustomLineItemCustomTypeActionBuilder.of(); } + public com.commercetools.api.models.cart.CartSetCustomLineItemRecurrenceInfoActionBuilder setCustomLineItemRecurrenceInfoBuilder() { + return com.commercetools.api.models.cart.CartSetCustomLineItemRecurrenceInfoActionBuilder.of(); + } + public com.commercetools.api.models.cart.CartSetCustomLineItemShippingDetailsActionBuilder setCustomLineItemShippingDetailsBuilder() { return com.commercetools.api.models.cart.CartSetCustomLineItemShippingDetailsActionBuilder.of(); } @@ -231,6 +235,10 @@ public com.commercetools.api.models.cart.CartSetLineItemPriceActionBuilder setLi return com.commercetools.api.models.cart.CartSetLineItemPriceActionBuilder.of(); } + public com.commercetools.api.models.cart.CartSetLineItemRecurrenceInfoActionBuilder setLineItemRecurrenceInfoBuilder() { + return com.commercetools.api.models.cart.CartSetLineItemRecurrenceInfoActionBuilder.of(); + } + public com.commercetools.api.models.cart.CartSetLineItemShippingDetailsActionBuilder setLineItemShippingDetailsBuilder() { return com.commercetools.api.models.cart.CartSetLineItemShippingDetailsActionBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItem.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItem.java index 49f4db4e870..1744c72f532 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItem.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItem.java @@ -12,6 +12,7 @@ import com.commercetools.api.models.common.LocalizedString; import com.commercetools.api.models.common.TypedMoney; import com.commercetools.api.models.order.ItemState; +import com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfo; import com.commercetools.api.models.tax_category.TaxCategoryReference; import com.commercetools.api.models.tax_category.TaxRate; import com.commercetools.api.models.type.CustomFields; @@ -197,6 +198,14 @@ public interface CustomLineItem extends com.commercetools.api.models.Customizabl @JsonProperty("priceMode") public CustomLineItemPriceMode getPriceMode(); + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public CustomLineItemRecurrenceInfo getRecurrenceInfo(); + /** *

      Unique identifier of the Custom Line Item.

      * @param id value to be set @@ -353,6 +362,13 @@ public void setDiscountedPricePerQuantity( public void setPriceMode(final CustomLineItemPriceMode priceMode); + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + */ + + public void setRecurrenceInfo(final CustomLineItemRecurrenceInfo recurrenceInfo); + /** * factory method * @return instance of CustomLineItem @@ -385,6 +401,7 @@ public static CustomLineItem of(final CustomLineItem template) { instance.setCustom(template.getCustom()); instance.setShippingDetails(template.getShippingDetails()); instance.setPriceMode(template.getPriceMode()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); return instance; } @@ -437,6 +454,8 @@ public static CustomLineItem deepCopy(@Nullable final CustomLineItem template) { instance.setShippingDetails( com.commercetools.api.models.cart.ItemShippingDetails.deepCopy(template.getShippingDetails())); instance.setPriceMode(template.getPriceMode()); + instance.setRecurrenceInfo(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfo + .deepCopy(template.getRecurrenceInfo())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemBuilder.java index 5dd0c904c09..e0eaee5c48f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemBuilder.java @@ -74,6 +74,9 @@ public class CustomLineItemBuilder implements Builder { private com.commercetools.api.models.cart.CustomLineItemPriceMode priceMode; + @Nullable + private com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfo recurrenceInfo; + /** *

      Unique identifier of the Custom Line Item.

      * @param id value to be set @@ -772,6 +775,45 @@ public CustomLineItemBuilder priceMode(final com.commercetools.api.models.cart.C return this; } + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public CustomLineItemBuilder recurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoBuilder.of()) + .build(); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public CustomLineItemBuilder withRecurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoBuilder.of()); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + * @return Builder + */ + + public CustomLineItemBuilder recurrenceInfo( + @Nullable final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfo recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + /** *

      Unique identifier of the Custom Line Item.

      * @return id @@ -935,6 +977,16 @@ public com.commercetools.api.models.cart.CustomLineItemPriceMode getPriceMode() return this.priceMode; } + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfo getRecurrenceInfo() { + return this.recurrenceInfo; + } + /** * builds CustomLineItem with checking for non-null required values * @return CustomLineItem @@ -954,7 +1006,7 @@ public CustomLineItem build() { Objects.requireNonNull(priceMode, CustomLineItem.class + ": priceMode is missing"); return new CustomLineItemImpl(id, key, name, money, taxedPrice, taxedPricePortions, totalPrice, slug, quantity, state, taxCategory, taxRate, perMethodTaxRate, discountedPricePerQuantity, custom, shippingDetails, - priceMode); + priceMode, recurrenceInfo); } /** @@ -964,7 +1016,7 @@ public CustomLineItem build() { public CustomLineItem buildUnchecked() { return new CustomLineItemImpl(id, key, name, money, taxedPrice, taxedPricePortions, totalPrice, slug, quantity, state, taxCategory, taxRate, perMethodTaxRate, discountedPricePerQuantity, custom, shippingDetails, - priceMode); + priceMode, recurrenceInfo); } /** @@ -999,6 +1051,7 @@ public static CustomLineItemBuilder of(final CustomLineItem template) { builder.custom = template.getCustom(); builder.shippingDetails = template.getShippingDetails(); builder.priceMode = template.getPriceMode(); + builder.recurrenceInfo = template.getRecurrenceInfo(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemDraft.java index 8798962bce7..7848e747464 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemDraft.java @@ -9,6 +9,7 @@ import com.commercetools.api.models.common.LocalizedString; import com.commercetools.api.models.common.Money; +import com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft; import com.commercetools.api.models.tax_category.TaxCategoryResourceIdentifier; import com.commercetools.api.models.type.CustomFieldsDraft; import com.fasterxml.jackson.annotation.*; @@ -124,6 +125,14 @@ public interface CustomLineItemDraft extends com.commercetools.api.models.Custom @JsonProperty("priceMode") public CustomLineItemPriceMode getPriceMode(); + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public CustomLineItemRecurrenceInfoDraft getRecurrenceInfo(); + /** *

      Name of the Custom Line Item.

      * @param name value to be set @@ -197,6 +206,13 @@ public interface CustomLineItemDraft extends com.commercetools.api.models.Custom public void setPriceMode(final CustomLineItemPriceMode priceMode); + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + */ + + public void setRecurrenceInfo(final CustomLineItemRecurrenceInfoDraft recurrenceInfo); + /** * factory method * @return instance of CustomLineItemDraft @@ -222,6 +238,7 @@ public static CustomLineItemDraft of(final CustomLineItemDraft template) { instance.setCustom(template.getCustom()); instance.setShippingDetails(template.getShippingDetails()); instance.setPriceMode(template.getPriceMode()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); return instance; } @@ -251,6 +268,8 @@ public static CustomLineItemDraft deepCopy(@Nullable final CustomLineItemDraft t instance.setShippingDetails( com.commercetools.api.models.cart.ItemShippingDetailsDraft.deepCopy(template.getShippingDetails())); instance.setPriceMode(template.getPriceMode()); + instance.setRecurrenceInfo(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft + .deepCopy(template.getRecurrenceInfo())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemDraftBuilder.java index a5b6752b98a..d90cfe62334 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemDraftBuilder.java @@ -53,6 +53,9 @@ public class CustomLineItemDraftBuilder implements Builder @Nullable private com.commercetools.api.models.cart.CustomLineItemPriceMode priceMode; + @Nullable + private com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo; + /** *

      Name of the Custom Line Item.

      * @param builder function to build the name value @@ -320,6 +323,45 @@ public CustomLineItemDraftBuilder priceMode( return this; } + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public CustomLineItemDraftBuilder recurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public CustomLineItemDraftBuilder withRecurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftBuilder.of()); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + * @return Builder + */ + + public CustomLineItemDraftBuilder recurrenceInfo( + @Nullable final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + /** *

      Name of the Custom Line Item.

      * @return name @@ -420,6 +462,16 @@ public com.commercetools.api.models.cart.CustomLineItemPriceMode getPriceMode() return this.priceMode; } + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + /** * builds CustomLineItemDraft with checking for non-null required values * @return CustomLineItemDraft @@ -429,7 +481,7 @@ public CustomLineItemDraft build() { Objects.requireNonNull(money, CustomLineItemDraft.class + ": money is missing"); Objects.requireNonNull(slug, CustomLineItemDraft.class + ": slug is missing"); return new CustomLineItemDraftImpl(name, key, quantity, money, slug, taxCategory, externalTaxRate, custom, - shippingDetails, priceMode); + shippingDetails, priceMode, recurrenceInfo); } /** @@ -438,7 +490,7 @@ public CustomLineItemDraft build() { */ public CustomLineItemDraft buildUnchecked() { return new CustomLineItemDraftImpl(name, key, quantity, money, slug, taxCategory, externalTaxRate, custom, - shippingDetails, priceMode); + shippingDetails, priceMode, recurrenceInfo); } /** @@ -466,6 +518,7 @@ public static CustomLineItemDraftBuilder of(final CustomLineItemDraft template) builder.custom = template.getCustom(); builder.shippingDetails = template.getShippingDetails(); builder.priceMode = template.getPriceMode(); + builder.recurrenceInfo = template.getRecurrenceInfo(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemDraftImpl.java index 8c4ad42b031..af546b729dc 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemDraftImpl.java @@ -42,6 +42,8 @@ public class CustomLineItemDraftImpl implements CustomLineItemDraft, ModelBase { private com.commercetools.api.models.cart.CustomLineItemPriceMode priceMode; + private com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo; + /** * create instance with all properties */ @@ -54,7 +56,8 @@ public class CustomLineItemDraftImpl implements CustomLineItemDraft, ModelBase { @JsonProperty("externalTaxRate") final com.commercetools.api.models.cart.ExternalTaxRateDraft externalTaxRate, @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom, @JsonProperty("shippingDetails") final com.commercetools.api.models.cart.ItemShippingDetailsDraft shippingDetails, - @JsonProperty("priceMode") final com.commercetools.api.models.cart.CustomLineItemPriceMode priceMode) { + @JsonProperty("priceMode") final com.commercetools.api.models.cart.CustomLineItemPriceMode priceMode, + @JsonProperty("recurrenceInfo") final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo) { this.name = name; this.key = key; this.quantity = quantity; @@ -65,6 +68,7 @@ public class CustomLineItemDraftImpl implements CustomLineItemDraft, ModelBase { this.custom = custom; this.shippingDetails = shippingDetails; this.priceMode = priceMode; + this.recurrenceInfo = recurrenceInfo; } /** @@ -156,6 +160,14 @@ public com.commercetools.api.models.cart.CustomLineItemPriceMode getPriceMode() return this.priceMode; } + /** + *

      Recurring Order and frequency data.

      + */ + + public com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + public void setName(final com.commercetools.api.models.common.LocalizedString name) { this.name = name; } @@ -197,6 +209,11 @@ public void setPriceMode(final com.commercetools.api.models.cart.CustomLineItemP this.priceMode = priceMode; } + public void setRecurrenceInfo( + final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + } + @Override public boolean equals(Object o) { if (this == o) @@ -217,6 +234,7 @@ public boolean equals(Object o) { .append(custom, that.custom) .append(shippingDetails, that.shippingDetails) .append(priceMode, that.priceMode) + .append(recurrenceInfo, that.recurrenceInfo) .append(name, that.name) .append(key, that.key) .append(quantity, that.quantity) @@ -227,6 +245,7 @@ public boolean equals(Object o) { .append(custom, that.custom) .append(shippingDetails, that.shippingDetails) .append(priceMode, that.priceMode) + .append(recurrenceInfo, that.recurrenceInfo) .isEquals(); } @@ -242,6 +261,7 @@ public int hashCode() { .append(custom) .append(shippingDetails) .append(priceMode) + .append(recurrenceInfo) .toHashCode(); } @@ -257,6 +277,7 @@ public String toString() { .append("custom", custom) .append("shippingDetails", shippingDetails) .append("priceMode", priceMode) + .append("recurrenceInfo", recurrenceInfo) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemImpl.java index aeabd383114..91dbbe8af9e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CustomLineItemImpl.java @@ -56,6 +56,8 @@ public class CustomLineItemImpl implements CustomLineItem, ModelBase { private com.commercetools.api.models.cart.CustomLineItemPriceMode priceMode; + private com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfo recurrenceInfo; + /** * create instance with all properties */ @@ -74,7 +76,8 @@ public class CustomLineItemImpl implements CustomLineItem, ModelBase { @JsonProperty("discountedPricePerQuantity") final java.util.List discountedPricePerQuantity, @JsonProperty("custom") final com.commercetools.api.models.type.CustomFields custom, @JsonProperty("shippingDetails") final com.commercetools.api.models.cart.ItemShippingDetails shippingDetails, - @JsonProperty("priceMode") final com.commercetools.api.models.cart.CustomLineItemPriceMode priceMode) { + @JsonProperty("priceMode") final com.commercetools.api.models.cart.CustomLineItemPriceMode priceMode, + @JsonProperty("recurrenceInfo") final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfo recurrenceInfo) { this.id = id; this.key = key; this.name = name; @@ -92,6 +95,7 @@ public class CustomLineItemImpl implements CustomLineItem, ModelBase { this.custom = custom; this.shippingDetails = shippingDetails; this.priceMode = priceMode; + this.recurrenceInfo = recurrenceInfo; } /** @@ -240,6 +244,14 @@ public com.commercetools.api.models.cart.CustomLineItemPriceMode getPriceMode() return this.priceMode; } + /** + *

      Recurring Order and frequency data.

      + */ + + public com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfo getRecurrenceInfo() { + return this.recurrenceInfo; + } + public void setId(final String id) { this.id = id; } @@ -328,6 +340,11 @@ public void setPriceMode(final com.commercetools.api.models.cart.CustomLineItemP this.priceMode = priceMode; } + public void setRecurrenceInfo( + final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfo recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + } + @Override public boolean equals(Object o) { if (this == o) @@ -355,6 +372,7 @@ public boolean equals(Object o) { .append(custom, that.custom) .append(shippingDetails, that.shippingDetails) .append(priceMode, that.priceMode) + .append(recurrenceInfo, that.recurrenceInfo) .append(id, that.id) .append(key, that.key) .append(name, that.name) @@ -372,6 +390,7 @@ public boolean equals(Object o) { .append(custom, that.custom) .append(shippingDetails, that.shippingDetails) .append(priceMode, that.priceMode) + .append(recurrenceInfo, that.recurrenceInfo) .isEquals(); } @@ -394,6 +413,7 @@ public int hashCode() { .append(custom) .append(shippingDetails) .append(priceMode) + .append(recurrenceInfo) .toHashCode(); } @@ -416,6 +436,7 @@ public String toString() { .append("custom", custom) .append("shippingDetails", shippingDetails) .append("priceMode", priceMode) + .append("recurrenceInfo", recurrenceInfo) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItem.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItem.java index 1a5824e2f99..6b4af4691e3 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItem.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItem.java @@ -16,6 +16,7 @@ import com.commercetools.api.models.order.ItemState; import com.commercetools.api.models.product.ProductVariant; import com.commercetools.api.models.product_type.ProductTypeReference; +import com.commercetools.api.models.recurring_order.LineItemRecurrenceInfo; import com.commercetools.api.models.tax_category.TaxRate; import com.commercetools.api.models.type.CustomFields; import com.fasterxml.jackson.annotation.*; @@ -284,6 +285,14 @@ public interface LineItem extends com.commercetools.api.models.CustomizableRecurring Order and frequency data.

      + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public LineItemRecurrenceInfo getRecurrenceInfo(); + /** *

      Unique identifier of the LineItem.

      * @param id value to be set @@ -510,6 +519,13 @@ public void setDiscountedPricePerQuantity( public void setLastModifiedAt(final ZonedDateTime lastModifiedAt); + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + */ + + public void setRecurrenceInfo(final LineItemRecurrenceInfo recurrenceInfo); + /** * factory method * @return instance of LineItem @@ -551,6 +567,7 @@ public static LineItem of(final LineItem template) { instance.setCustom(template.getCustom()); instance.setAddedAt(template.getAddedAt()); instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); return instance; } @@ -615,6 +632,8 @@ public static LineItem deepCopy(@Nullable final LineItem template) { instance.setCustom(com.commercetools.api.models.type.CustomFields.deepCopy(template.getCustom())); instance.setAddedAt(template.getAddedAt()); instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setRecurrenceInfo( + com.commercetools.api.models.recurring_order.LineItemRecurrenceInfo.deepCopy(template.getRecurrenceInfo())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemBuilder.java index bc80a44eca4..552f14a780f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemBuilder.java @@ -101,6 +101,9 @@ public class LineItemBuilder implements Builder { @Nullable private java.time.ZonedDateTime lastModifiedAt; + @Nullable + private com.commercetools.api.models.recurring_order.LineItemRecurrenceInfo recurrenceInfo; + /** *

      Unique identifier of the LineItem.

      * @param id value to be set @@ -1018,6 +1021,45 @@ public LineItemBuilder lastModifiedAt(@Nullable final java.time.ZonedDateTime la return this; } + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public LineItemBuilder recurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoBuilder.of()) + .build(); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public LineItemBuilder withRecurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoBuilder.of()); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + * @return Builder + */ + + public LineItemBuilder recurrenceInfo( + @Nullable final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfo recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + /** *

      Unique identifier of the LineItem.

      * @return id @@ -1275,6 +1317,16 @@ public java.time.ZonedDateTime getLastModifiedAt() { return this.lastModifiedAt; } + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfo getRecurrenceInfo() { + return this.recurrenceInfo; + } + /** * builds LineItem with checking for non-null required values * @return LineItem @@ -1297,7 +1349,7 @@ public LineItem build() { return new LineItemImpl(id, key, productId, productKey, name, productSlug, productType, variant, price, quantity, totalPrice, discountedPricePerQuantity, taxedPrice, taxedPricePortions, state, taxRate, perMethodTaxRate, supplyChannel, distributionChannel, priceMode, lineItemMode, inventoryMode, - shippingDetails, custom, addedAt, lastModifiedAt); + shippingDetails, custom, addedAt, lastModifiedAt, recurrenceInfo); } /** @@ -1308,7 +1360,7 @@ public LineItem buildUnchecked() { return new LineItemImpl(id, key, productId, productKey, name, productSlug, productType, variant, price, quantity, totalPrice, discountedPricePerQuantity, taxedPrice, taxedPricePortions, state, taxRate, perMethodTaxRate, supplyChannel, distributionChannel, priceMode, lineItemMode, inventoryMode, - shippingDetails, custom, addedAt, lastModifiedAt); + shippingDetails, custom, addedAt, lastModifiedAt, recurrenceInfo); } /** @@ -1352,6 +1404,7 @@ public static LineItemBuilder of(final LineItem template) { builder.custom = template.getCustom(); builder.addedAt = template.getAddedAt(); builder.lastModifiedAt = template.getLastModifiedAt(); + builder.recurrenceInfo = template.getRecurrenceInfo(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraft.java index ba6619c23d1..8ca999f94f1 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraft.java @@ -11,6 +11,7 @@ import com.commercetools.api.models.channel.ChannelResourceIdentifier; import com.commercetools.api.models.common.Money; +import com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft; import com.commercetools.api.models.type.CustomFieldsDraft; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -158,6 +159,14 @@ public interface LineItemDraft extends com.commercetools.api.models.Customizable @JsonProperty("custom") public CustomFieldsDraft getCustom(); + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public LineItemRecurrenceInfoDraft getRecurrenceInfo(); + /** *

      User-defined unique identifier of the LineItem.

      * @param key value to be set @@ -273,6 +282,13 @@ public interface LineItemDraft extends com.commercetools.api.models.Customizable public void setCustom(final CustomFieldsDraft custom); + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + */ + + public void setRecurrenceInfo(final LineItemRecurrenceInfoDraft recurrenceInfo); + /** * factory method * @return instance of LineItemDraft @@ -303,6 +319,7 @@ public static LineItemDraft of(final LineItemDraft template) { instance.setInventoryMode(template.getInventoryMode()); instance.setShippingDetails(template.getShippingDetails()); instance.setCustom(template.getCustom()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); return instance; } @@ -343,6 +360,8 @@ public static LineItemDraft deepCopy(@Nullable final LineItemDraft template) { instance.setShippingDetails( com.commercetools.api.models.cart.ItemShippingDetailsDraft.deepCopy(template.getShippingDetails())); instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom())); + instance.setRecurrenceInfo(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft + .deepCopy(template.getRecurrenceInfo())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftBuilder.java index 2ba288f5155..0f2a8262774 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftBuilder.java @@ -68,6 +68,9 @@ public class LineItemDraftBuilder implements Builder { @Nullable private com.commercetools.api.models.type.CustomFieldsDraft custom; + @Nullable + private com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo; + /** *

      User-defined unique identifier of the LineItem.

      * @param key value to be set @@ -502,6 +505,45 @@ public LineItemDraftBuilder custom(@Nullable final com.commercetools.api.models. return this; } + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public LineItemDraftBuilder recurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public LineItemDraftBuilder withRecurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftBuilder.of()); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + * @return Builder + */ + + public LineItemDraftBuilder recurrenceInfo( + @Nullable final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + /** *

      User-defined unique identifier of the LineItem.

      * @return key @@ -654,6 +696,16 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { return this.custom; } + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + /** * builds LineItemDraft with checking for non-null required values * @return LineItemDraft @@ -661,7 +713,7 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { public LineItemDraft build() { return new LineItemDraftImpl(key, productId, variantId, sku, quantity, addedAt, distributionChannel, supplyChannel, externalPrice, externalTotalPrice, externalTaxRate, perMethodExternalTaxRate, inventoryMode, - shippingDetails, custom); + shippingDetails, custom, recurrenceInfo); } /** @@ -671,7 +723,7 @@ public LineItemDraft build() { public LineItemDraft buildUnchecked() { return new LineItemDraftImpl(key, productId, variantId, sku, quantity, addedAt, distributionChannel, supplyChannel, externalPrice, externalTotalPrice, externalTaxRate, perMethodExternalTaxRate, inventoryMode, - shippingDetails, custom); + shippingDetails, custom, recurrenceInfo); } /** @@ -704,6 +756,7 @@ public static LineItemDraftBuilder of(final LineItemDraft template) { builder.inventoryMode = template.getInventoryMode(); builder.shippingDetails = template.getShippingDetails(); builder.custom = template.getCustom(); + builder.recurrenceInfo = template.getRecurrenceInfo(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftImpl.java index ecf2da9bdbf..7895fec50ef 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftImpl.java @@ -52,6 +52,8 @@ public class LineItemDraftImpl implements LineItemDraft, ModelBase { private com.commercetools.api.models.type.CustomFieldsDraft custom; + private com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo; + /** * create instance with all properties */ @@ -68,7 +70,8 @@ public class LineItemDraftImpl implements LineItemDraft, ModelBase { @JsonProperty("perMethodExternalTaxRate") final java.util.List perMethodExternalTaxRate, @JsonProperty("inventoryMode") final com.commercetools.api.models.cart.InventoryMode inventoryMode, @JsonProperty("shippingDetails") final com.commercetools.api.models.cart.ItemShippingDetailsDraft shippingDetails, - @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom) { + @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom, + @JsonProperty("recurrenceInfo") final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { this.key = key; this.productId = productId; this.variantId = variantId; @@ -84,6 +87,7 @@ public class LineItemDraftImpl implements LineItemDraft, ModelBase { this.inventoryMode = inventoryMode; this.shippingDetails = shippingDetails; this.custom = custom; + this.recurrenceInfo = recurrenceInfo; } /** @@ -214,6 +218,14 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { return this.custom; } + /** + *

      Recurring Order and frequency data.

      + */ + + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + public void setKey(final String key) { this.key = key; } @@ -282,6 +294,11 @@ public void setCustom(final com.commercetools.api.models.type.CustomFieldsDraft this.custom = custom; } + public void setRecurrenceInfo( + final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + } + @Override public boolean equals(Object o) { if (this == o) @@ -307,6 +324,7 @@ public boolean equals(Object o) { .append(inventoryMode, that.inventoryMode) .append(shippingDetails, that.shippingDetails) .append(custom, that.custom) + .append(recurrenceInfo, that.recurrenceInfo) .append(key, that.key) .append(productId, that.productId) .append(variantId, that.variantId) @@ -322,6 +340,7 @@ public boolean equals(Object o) { .append(inventoryMode, that.inventoryMode) .append(shippingDetails, that.shippingDetails) .append(custom, that.custom) + .append(recurrenceInfo, that.recurrenceInfo) .isEquals(); } @@ -342,6 +361,7 @@ public int hashCode() { .append(inventoryMode) .append(shippingDetails) .append(custom) + .append(recurrenceInfo) .toHashCode(); } @@ -362,6 +382,7 @@ public String toString() { .append("inventoryMode", inventoryMode) .append("shippingDetails", shippingDetails) .append("custom", custom) + .append("recurrenceInfo", recurrenceInfo) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemImpl.java index 297cb756387..8bf8971b0b8 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemImpl.java @@ -74,6 +74,8 @@ public class LineItemImpl implements LineItem, ModelBase { private java.time.ZonedDateTime lastModifiedAt; + private com.commercetools.api.models.recurring_order.LineItemRecurrenceInfo recurrenceInfo; + /** * create instance with all properties */ @@ -101,7 +103,8 @@ public class LineItemImpl implements LineItem, ModelBase { @JsonProperty("shippingDetails") final com.commercetools.api.models.cart.ItemShippingDetails shippingDetails, @JsonProperty("custom") final com.commercetools.api.models.type.CustomFields custom, @JsonProperty("addedAt") final java.time.ZonedDateTime addedAt, - @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt) { + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("recurrenceInfo") final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfo recurrenceInfo) { this.id = id; this.key = key; this.productId = productId; @@ -128,6 +131,7 @@ public class LineItemImpl implements LineItem, ModelBase { this.custom = custom; this.addedAt = addedAt; this.lastModifiedAt = lastModifiedAt; + this.recurrenceInfo = recurrenceInfo; } /** @@ -355,6 +359,14 @@ public java.time.ZonedDateTime getLastModifiedAt() { return this.lastModifiedAt; } + /** + *

      Recurring Order and frequency data.

      + */ + + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfo getRecurrenceInfo() { + return this.recurrenceInfo; + } + public void setId(final String id) { this.id = id; } @@ -480,6 +492,11 @@ public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { this.lastModifiedAt = lastModifiedAt; } + public void setRecurrenceInfo( + final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfo recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + } + @Override public boolean equals(Object o) { if (this == o) @@ -516,6 +533,7 @@ public boolean equals(Object o) { .append(custom, that.custom) .append(addedAt, that.addedAt) .append(lastModifiedAt, that.lastModifiedAt) + .append(recurrenceInfo, that.recurrenceInfo) .append(id, that.id) .append(key, that.key) .append(productId, that.productId) @@ -542,6 +560,7 @@ public boolean equals(Object o) { .append(custom, that.custom) .append(addedAt, that.addedAt) .append(lastModifiedAt, that.lastModifiedAt) + .append(recurrenceInfo, that.recurrenceInfo) .isEquals(); } @@ -573,6 +592,7 @@ public int hashCode() { .append(custom) .append(addedAt) .append(lastModifiedAt) + .append(recurrenceInfo) .toHashCode(); } @@ -604,6 +624,7 @@ public String toString() { .append("custom", custom) .append("addedAt", addedAt) .append("lastModifiedAt", lastModifiedAt) + .append("recurrenceInfo", recurrenceInfo) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Price.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Price.java index a7dc7d7f84b..c7c05ad979b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Price.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Price.java @@ -11,6 +11,7 @@ import com.commercetools.api.models.channel.ChannelReference; import com.commercetools.api.models.customer_group.CustomerGroupReference; +import com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference; import com.commercetools.api.models.type.CustomFields; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -128,6 +129,14 @@ public interface Price extends com.commercetools.api.models.Customizable, @JsonProperty("custom") public CustomFields getCustom(); + /** + *

      Recurrence Policy for which this Price is valid.

      + * @return recurrencePolicy + */ + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyReference getRecurrencePolicy(); + /** *

      Unique identifier of this Price.

      * @param id value to be set @@ -215,6 +224,13 @@ public interface Price extends com.commercetools.api.models.Customizable, public void setCustom(final CustomFields custom); + /** + *

      Recurrence Policy for which this Price is valid.

      + * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyReference recurrencePolicy); + /** * factory method * @return instance of Price @@ -241,6 +257,7 @@ public static Price of(final Price template) { instance.setDiscounted(template.getDiscounted()); instance.setTiers(template.getTiers()); instance.setCustom(template.getCustom()); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); return instance; } @@ -273,6 +290,8 @@ public static Price deepCopy(@Nullable final Price template) { .collect(Collectors.toList())) .orElse(null)); instance.setCustom(com.commercetools.api.models.type.CustomFields.deepCopy(template.getCustom())); + instance.setRecurrencePolicy(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference + .deepCopy(template.getRecurrencePolicy())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceBuilder.java index 91421b8bac7..1e7f4088319 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceBuilder.java @@ -56,6 +56,9 @@ public class PriceBuilder implements Builder { @Nullable private com.commercetools.api.models.type.CustomFields custom; + @Nullable + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy; + /** *

      Unique identifier of this Price.

      * @param id value to be set @@ -371,6 +374,45 @@ public PriceBuilder custom(@Nullable final com.commercetools.api.models.type.Cus return this; } + /** + *

      Recurrence Policy for which this Price is valid.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public PriceBuilder recurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

      Recurrence Policy for which this Price is valid.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public PriceBuilder withRecurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder.of()); + return this; + } + + /** + *

      Recurrence Policy for which this Price is valid.

      + * @param recurrencePolicy value to be set + * @return Builder + */ + + public PriceBuilder recurrencePolicy( + @Nullable final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + return this; + } + /** *

      Unique identifier of this Price.

      * @return id @@ -480,6 +522,16 @@ public com.commercetools.api.models.type.CustomFields getCustom() { return this.custom; } + /** + *

      Recurrence Policy for which this Price is valid.

      + * @return recurrencePolicy + */ + + @Nullable + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + /** * builds Price with checking for non-null required values * @return Price @@ -488,7 +540,7 @@ public Price build() { Objects.requireNonNull(id, Price.class + ": id is missing"); Objects.requireNonNull(value, Price.class + ": value is missing"); return new PriceImpl(id, key, value, country, customerGroup, channel, validFrom, validUntil, discounted, tiers, - custom); + custom, recurrencePolicy); } /** @@ -497,7 +549,7 @@ public Price build() { */ public Price buildUnchecked() { return new PriceImpl(id, key, value, country, customerGroup, channel, validFrom, validUntil, discounted, tiers, - custom); + custom, recurrencePolicy); } /** @@ -526,6 +578,7 @@ public static PriceBuilder of(final Price template) { builder.discounted = template.getDiscounted(); builder.tiers = template.getTiers(); builder.custom = template.getCustom(); + builder.recurrencePolicy = template.getRecurrencePolicy(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceDraft.java index c84250cfad4..e13968efc74 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceDraft.java @@ -11,6 +11,7 @@ import com.commercetools.api.models.channel.ChannelResourceIdentifier; import com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier; +import com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier; import com.commercetools.api.models.type.CustomFieldsDraft; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -127,6 +128,14 @@ public interface PriceDraft extends com.commercetools.api.models.CustomizableDra @JsonProperty("custom") public CustomFieldsDraft getCustom(); + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @return recurrencePolicy + */ + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyResourceIdentifier getRecurrencePolicy(); + /** *

      User-defined identifier for the Price. It must be unique per ProductVariant.

      * @param key value to be set @@ -214,6 +223,13 @@ public interface PriceDraft extends com.commercetools.api.models.CustomizableDra public void setCustom(final CustomFieldsDraft custom); + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyResourceIdentifier recurrencePolicy); + /** * factory method * @return instance of PriceDraft @@ -239,6 +255,7 @@ public static PriceDraft of(final PriceDraft template) { instance.setDiscounted(template.getDiscounted()); instance.setTiers(template.getTiers()); instance.setCustom(template.getCustom()); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); return instance; } @@ -272,6 +289,8 @@ public static PriceDraft deepCopy(@Nullable final PriceDraft template) { .collect(Collectors.toList())) .orElse(null)); instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom())); + instance.setRecurrencePolicy(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier + .deepCopy(template.getRecurrencePolicy())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceDraftBuilder.java index 40b6cc5c1ef..ab9dc7b3a10 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceDraftBuilder.java @@ -53,6 +53,9 @@ public class PriceDraftBuilder implements Builder { @Nullable private com.commercetools.api.models.type.CustomFieldsDraft custom; + @Nullable + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy; + /** *

      User-defined identifier for the Price. It must be unique per ProductVariant.

      * @param key value to be set @@ -394,6 +397,45 @@ public PriceDraftBuilder custom(@Nullable final com.commercetools.api.models.typ return this; } + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public PriceDraftBuilder recurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public PriceDraftBuilder withRecurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of()); + return this; + } + + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @param recurrencePolicy value to be set + * @return Builder + */ + + public PriceDraftBuilder recurrencePolicy( + @Nullable final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + return this; + } + /** *

      User-defined identifier for the Price. It must be unique per ProductVariant.

      * @return key @@ -501,6 +543,16 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { return this.custom; } + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @return recurrencePolicy + */ + + @Nullable + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier getRecurrencePolicy() { + return this.recurrencePolicy; + } + /** * builds PriceDraft with checking for non-null required values * @return PriceDraft @@ -508,7 +560,7 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { public PriceDraft build() { Objects.requireNonNull(value, PriceDraft.class + ": value is missing"); return new PriceDraftImpl(key, value, country, customerGroup, channel, validFrom, validUntil, discounted, tiers, - custom); + custom, recurrencePolicy); } /** @@ -517,7 +569,7 @@ public PriceDraft build() { */ public PriceDraft buildUnchecked() { return new PriceDraftImpl(key, value, country, customerGroup, channel, validFrom, validUntil, discounted, tiers, - custom); + custom, recurrencePolicy); } /** @@ -545,6 +597,7 @@ public static PriceDraftBuilder of(final PriceDraft template) { builder.discounted = template.getDiscounted(); builder.tiers = template.getTiers(); builder.custom = template.getCustom(); + builder.recurrencePolicy = template.getRecurrencePolicy(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceDraftImpl.java index 26ab84705c5..0476f37f06f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceDraftImpl.java @@ -42,6 +42,8 @@ public class PriceDraftImpl implements PriceDraft, ModelBase { private com.commercetools.api.models.type.CustomFieldsDraft custom; + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy; + /** * create instance with all properties */ @@ -55,7 +57,8 @@ public class PriceDraftImpl implements PriceDraft, ModelBase { @JsonProperty("validUntil") final java.time.ZonedDateTime validUntil, @JsonProperty("discounted") final com.commercetools.api.models.common.DiscountedPriceDraft discounted, @JsonProperty("tiers") final java.util.List tiers, - @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom) { + @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom, + @JsonProperty("recurrencePolicy") final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { this.key = key; this.value = value; this.country = country; @@ -66,6 +69,7 @@ public class PriceDraftImpl implements PriceDraft, ModelBase { this.discounted = discounted; this.tiers = tiers; this.custom = custom; + this.recurrencePolicy = recurrencePolicy; } /** @@ -162,6 +166,14 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { return this.custom; } + /** + *

      RecurrencePolicy for which this Price is valid.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier getRecurrencePolicy() { + return this.recurrencePolicy; + } + public void setKey(final String key) { this.key = key; } @@ -207,6 +219,11 @@ public void setCustom(final com.commercetools.api.models.type.CustomFieldsDraft this.custom = custom; } + public void setRecurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + @Override public boolean equals(Object o) { if (this == o) @@ -227,6 +244,7 @@ public boolean equals(Object o) { .append(discounted, that.discounted) .append(tiers, that.tiers) .append(custom, that.custom) + .append(recurrencePolicy, that.recurrencePolicy) .append(key, that.key) .append(value, that.value) .append(country, that.country) @@ -237,6 +255,7 @@ public boolean equals(Object o) { .append(discounted, that.discounted) .append(tiers, that.tiers) .append(custom, that.custom) + .append(recurrencePolicy, that.recurrencePolicy) .isEquals(); } @@ -252,6 +271,7 @@ public int hashCode() { .append(discounted) .append(tiers) .append(custom) + .append(recurrencePolicy) .toHashCode(); } @@ -267,6 +287,7 @@ public String toString() { .append("discounted", discounted) .append("tiers", tiers) .append("custom", custom) + .append("recurrencePolicy", recurrencePolicy) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceImpl.java index bc6f3dcbcaa..21fd66cbb51 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceImpl.java @@ -44,6 +44,8 @@ public class PriceImpl implements Price, ModelBase { private com.commercetools.api.models.type.CustomFields custom; + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy; + /** * create instance with all properties */ @@ -57,7 +59,8 @@ public class PriceImpl implements Price, ModelBase { @JsonProperty("validUntil") final java.time.ZonedDateTime validUntil, @JsonProperty("discounted") final com.commercetools.api.models.common.DiscountedPrice discounted, @JsonProperty("tiers") final java.util.List tiers, - @JsonProperty("custom") final com.commercetools.api.models.type.CustomFields custom) { + @JsonProperty("custom") final com.commercetools.api.models.type.CustomFields custom, + @JsonProperty("recurrencePolicy") final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { this.id = id; this.key = key; this.value = value; @@ -69,6 +72,7 @@ public class PriceImpl implements Price, ModelBase { this.discounted = discounted; this.tiers = tiers; this.custom = custom; + this.recurrencePolicy = recurrencePolicy; } /** @@ -166,6 +170,14 @@ public com.commercetools.api.models.type.CustomFields getCustom() { return this.custom; } + /** + *

      Recurrence Policy for which this Price is valid.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + public void setId(final String id) { this.id = id; } @@ -215,6 +227,11 @@ public void setCustom(final com.commercetools.api.models.type.CustomFields custo this.custom = custom; } + public void setRecurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + @Override public boolean equals(Object o) { if (this == o) @@ -236,6 +253,7 @@ public boolean equals(Object o) { .append(discounted, that.discounted) .append(tiers, that.tiers) .append(custom, that.custom) + .append(recurrencePolicy, that.recurrencePolicy) .append(id, that.id) .append(key, that.key) .append(value, that.value) @@ -247,6 +265,7 @@ public boolean equals(Object o) { .append(discounted, that.discounted) .append(tiers, that.tiers) .append(custom, that.custom) + .append(recurrencePolicy, that.recurrencePolicy) .isEquals(); } @@ -263,6 +282,7 @@ public int hashCode() { .append(discounted) .append(tiers) .append(custom) + .append(recurrencePolicy) .toHashCode(); } @@ -279,6 +299,7 @@ public String toString() { .append("discounted", discounted) .append("tiers", tiers) .append("custom", custom) + .append("recurrencePolicy", recurrencePolicy) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Reference.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Reference.java index c48053313e7..5474c5d34ef 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Reference.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Reference.java @@ -292,6 +292,22 @@ public static com.commercetools.api.models.quote_request.QuoteRequestReferenceBu return com.commercetools.api.models.quote_request.QuoteRequestReferenceBuilder.of(); } + /** + * builder for recurrencePolicy subtype + * @return builder + */ + public static com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder recurrencePolicyBuilder() { + return com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder.of(); + } + + /** + * builder for recurringOrder subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.RecurringOrderReferenceBuilder recurringOrderBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderReferenceBuilder.of(); + } + /** * builder for review subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceBuilder.java index 8d57141db10..f49efd8ef1e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceBuilder.java @@ -119,6 +119,14 @@ public com.commercetools.api.models.quote_request.QuoteRequestReferenceBuilder q return com.commercetools.api.models.quote_request.QuoteRequestReferenceBuilder.of(); } + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder recurrencePolicyBuilder() { + return com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder.of(); + } + + public com.commercetools.api.models.recurring_order.RecurringOrderReferenceBuilder recurringOrderBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderReferenceBuilder.of(); + } + public com.commercetools.api.models.review.ReviewReferenceBuilder reviewBuilder() { return com.commercetools.api.models.review.ReviewReferenceBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceTypeId.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceTypeId.java index 5ed2e521fab..d7ec23794aa 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceTypeId.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ReferenceTypeId.java @@ -110,6 +110,12 @@ public interface ReferenceTypeId extends JsonEnum {

      References a QuoteRequest.

      */ ReferenceTypeId QUOTE_REQUEST = ReferenceTypeIdEnum.QUOTE_REQUEST; /** +

      References a RecurrencePolicy.

      */ + ReferenceTypeId RECURRENCE_POLICY = ReferenceTypeIdEnum.RECURRENCE_POLICY; + /** +

      References a RecurringOrder.

      */ + ReferenceTypeId RECURRING_ORDER = ReferenceTypeIdEnum.RECURRING_ORDER; + /**

      References a Review.

      */ ReferenceTypeId REVIEW = ReferenceTypeIdEnum.REVIEW; /** @@ -302,6 +308,16 @@ enum ReferenceTypeIdEnum implements ReferenceTypeId { */ QUOTE_REQUEST("quote-request"), + /** + * recurrence-policy + */ + RECURRENCE_POLICY("recurrence-policy"), + + /** + * recurring-order + */ + RECURRING_ORDER("recurring-order"), + /** * review */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifier.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifier.java index 7be5ac4a094..2653afdee39 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifier.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifier.java @@ -258,6 +258,22 @@ public static com.commercetools.api.models.quote.QuoteResourceIdentifierBuilder return com.commercetools.api.models.quote.QuoteResourceIdentifierBuilder.of(); } + /** + * builder for recurrencePolicy subtype + * @return builder + */ + public static com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder recurrencePolicyBuilder() { + return com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of(); + } + + /** + * builder for recurringOrder subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.RecurringOrderResourceIdentifierBuilder recurringOrderBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderResourceIdentifierBuilder.of(); + } + /** * builder for review subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifierBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifierBuilder.java index c6fc9f60b43..20d488ecab0 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifierBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/ResourceIdentifierBuilder.java @@ -95,6 +95,14 @@ public com.commercetools.api.models.quote.QuoteResourceIdentifierBuilder quoteBu return com.commercetools.api.models.quote.QuoteResourceIdentifierBuilder.of(); } + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder recurrencePolicyBuilder() { + return com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of(); + } + + public com.commercetools.api.models.recurring_order.RecurringOrderResourceIdentifierBuilder recurringOrderBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderResourceIdentifierBuilder.of(); + } + public com.commercetools.api.models.review.ReviewResourceIdentifierBuilder reviewBuilder() { return com.commercetools.api.models.review.ReviewResourceIdentifierBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddLineItemAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddLineItemAction.java index 52f88b96a11..f143e5de3ec 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddLineItemAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddLineItemAction.java @@ -10,6 +10,7 @@ import com.commercetools.api.models.cart.ItemShippingDetailsDraft; import com.commercetools.api.models.channel.ChannelResourceIdentifier; +import com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft; import com.commercetools.api.models.type.CustomFieldsDraft; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -120,6 +121,14 @@ public interface MyCartAddLineItemAction @JsonProperty("shippingDetails") public ItemShippingDetailsDraft getShippingDetails(); + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public LineItemRecurrenceInfoDraft getRecurrenceInfo(); + /** *

      Custom Fields for the Line Item.

      * @return custom @@ -196,6 +205,13 @@ public interface MyCartAddLineItemAction public void setShippingDetails(final ItemShippingDetailsDraft shippingDetails); + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + */ + + public void setRecurrenceInfo(final LineItemRecurrenceInfoDraft recurrenceInfo); + /** *

      Custom Fields for the Line Item.

      * @param custom value to be set @@ -227,6 +243,7 @@ public static MyCartAddLineItemAction of(final MyCartAddLineItemAction template) instance.setDistributionChannel(template.getDistributionChannel()); instance.setSupplyChannel(template.getSupplyChannel()); instance.setShippingDetails(template.getShippingDetails()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); instance.setCustom(template.getCustom()); return instance; } @@ -256,6 +273,8 @@ public static MyCartAddLineItemAction deepCopy(@Nullable final MyCartAddLineItem com.commercetools.api.models.channel.ChannelResourceIdentifier.deepCopy(template.getSupplyChannel())); instance.setShippingDetails( com.commercetools.api.models.cart.ItemShippingDetailsDraft.deepCopy(template.getShippingDetails())); + instance.setRecurrenceInfo(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft + .deepCopy(template.getRecurrenceInfo())); instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddLineItemActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddLineItemActionBuilder.java index 4db58faa073..cc568fec4b0 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddLineItemActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddLineItemActionBuilder.java @@ -50,6 +50,9 @@ public class MyCartAddLineItemActionBuilder implements BuilderRecurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public MyCartAddLineItemActionBuilder recurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public MyCartAddLineItemActionBuilder withRecurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftBuilder.of()); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + * @return Builder + */ + + public MyCartAddLineItemActionBuilder recurrenceInfo( + @Nullable final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + /** *

      Custom Fields for the Line Item.

      * @param builder function to build the custom value @@ -368,6 +410,16 @@ public com.commercetools.api.models.cart.ItemShippingDetailsDraft getShippingDet return this.shippingDetails; } + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + /** *

      Custom Fields for the Line Item.

      * @return custom @@ -384,7 +436,7 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { */ public MyCartAddLineItemAction build() { return new MyCartAddLineItemActionImpl(key, productId, variantId, sku, quantity, addedAt, distributionChannel, - supplyChannel, shippingDetails, custom); + supplyChannel, shippingDetails, recurrenceInfo, custom); } /** @@ -393,7 +445,7 @@ public MyCartAddLineItemAction build() { */ public MyCartAddLineItemAction buildUnchecked() { return new MyCartAddLineItemActionImpl(key, productId, variantId, sku, quantity, addedAt, distributionChannel, - supplyChannel, shippingDetails, custom); + supplyChannel, shippingDetails, recurrenceInfo, custom); } /** @@ -420,6 +472,7 @@ public static MyCartAddLineItemActionBuilder of(final MyCartAddLineItemAction te builder.distributionChannel = template.getDistributionChannel(); builder.supplyChannel = template.getSupplyChannel(); builder.shippingDetails = template.getShippingDetails(); + builder.recurrenceInfo = template.getRecurrenceInfo(); builder.custom = template.getCustom(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddLineItemActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddLineItemActionImpl.java index 092871b9990..9abc99407e4 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddLineItemActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddLineItemActionImpl.java @@ -44,6 +44,8 @@ public class MyCartAddLineItemActionImpl implements MyCartAddLineItemAction, Mod private com.commercetools.api.models.cart.ItemShippingDetailsDraft shippingDetails; + private com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo; + private com.commercetools.api.models.type.CustomFieldsDraft custom; /** @@ -57,6 +59,7 @@ public class MyCartAddLineItemActionImpl implements MyCartAddLineItemAction, Mod @JsonProperty("distributionChannel") final com.commercetools.api.models.channel.ChannelResourceIdentifier distributionChannel, @JsonProperty("supplyChannel") final com.commercetools.api.models.channel.ChannelResourceIdentifier supplyChannel, @JsonProperty("shippingDetails") final com.commercetools.api.models.cart.ItemShippingDetailsDraft shippingDetails, + @JsonProperty("recurrenceInfo") final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo, @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom) { this.key = key; this.productId = productId; @@ -67,6 +70,7 @@ public class MyCartAddLineItemActionImpl implements MyCartAddLineItemAction, Mod this.distributionChannel = distributionChannel; this.supplyChannel = supplyChannel; this.shippingDetails = shippingDetails; + this.recurrenceInfo = recurrenceInfo; this.custom = custom; this.action = ADD_LINE_ITEM; } @@ -163,6 +167,14 @@ public com.commercetools.api.models.cart.ItemShippingDetailsDraft getShippingDet return this.shippingDetails; } + /** + *

      Recurring Order and frequency data.

      + */ + + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + /** *

      Custom Fields for the Line Item.

      */ @@ -208,6 +220,11 @@ public void setShippingDetails(final com.commercetools.api.models.cart.ItemShipp this.shippingDetails = shippingDetails; } + public void setRecurrenceInfo( + final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + } + public void setCustom(final com.commercetools.api.models.type.CustomFieldsDraft custom) { this.custom = custom; } @@ -232,6 +249,7 @@ public boolean equals(Object o) { .append(distributionChannel, that.distributionChannel) .append(supplyChannel, that.supplyChannel) .append(shippingDetails, that.shippingDetails) + .append(recurrenceInfo, that.recurrenceInfo) .append(custom, that.custom) .append(action, that.action) .append(key, that.key) @@ -243,6 +261,7 @@ public boolean equals(Object o) { .append(distributionChannel, that.distributionChannel) .append(supplyChannel, that.supplyChannel) .append(shippingDetails, that.shippingDetails) + .append(recurrenceInfo, that.recurrenceInfo) .append(custom, that.custom) .isEquals(); } @@ -259,6 +278,7 @@ public int hashCode() { .append(distributionChannel) .append(supplyChannel) .append(shippingDetails) + .append(recurrenceInfo) .append(custom) .toHashCode(); } @@ -275,6 +295,7 @@ public String toString() { .append("distributionChannel", distributionChannel) .append("supplyChannel", supplyChannel) .append("shippingDetails", shippingDetails) + .append("recurrenceInfo", recurrenceInfo) .append("custom", custom) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetCustomLineItemRecurrenceInfoAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetCustomLineItemRecurrenceInfoAction.java new file mode 100644 index 00000000000..199e0a881fe --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetCustomLineItemRecurrenceInfoAction.java @@ -0,0 +1,169 @@ + +package com.commercetools.api.models.me; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

      Sets the recurrence information on the CustomLineItem. If the Cart is already associated with a Recurring Order, this action will fail.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     MyCartSetCustomLineItemRecurrenceInfoAction myCartSetCustomLineItemRecurrenceInfoAction = MyCartSetCustomLineItemRecurrenceInfoAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("setCustomLineItemRecurrenceInfo") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = MyCartSetCustomLineItemRecurrenceInfoActionImpl.class) +public interface MyCartSetCustomLineItemRecurrenceInfoAction extends MyCartUpdateAction { + + /** + * discriminator value for MyCartSetCustomLineItemRecurrenceInfoAction + */ + String SET_CUSTOM_LINE_ITEM_RECURRENCE_INFO = "setCustomLineItemRecurrenceInfo"; + + /** + *

      id of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @return customLineItemId + */ + + @JsonProperty("customLineItemId") + public String getCustomLineItemId(); + + /** + *

      key of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @return customLineItemKey + */ + + @JsonProperty("customLineItemKey") + public String getCustomLineItemKey(); + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public CustomLineItemRecurrenceInfoDraft getRecurrenceInfo(); + + /** + *

      id of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @param customLineItemId value to be set + */ + + public void setCustomLineItemId(final String customLineItemId); + + /** + *

      key of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @param customLineItemKey value to be set + */ + + public void setCustomLineItemKey(final String customLineItemKey); + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param recurrenceInfo value to be set + */ + + public void setRecurrenceInfo(final CustomLineItemRecurrenceInfoDraft recurrenceInfo); + + /** + * factory method + * @return instance of MyCartSetCustomLineItemRecurrenceInfoAction + */ + public static MyCartSetCustomLineItemRecurrenceInfoAction of() { + return new MyCartSetCustomLineItemRecurrenceInfoActionImpl(); + } + + /** + * factory method to create a shallow copy MyCartSetCustomLineItemRecurrenceInfoAction + * @param template instance to be copied + * @return copy instance + */ + public static MyCartSetCustomLineItemRecurrenceInfoAction of( + final MyCartSetCustomLineItemRecurrenceInfoAction template) { + MyCartSetCustomLineItemRecurrenceInfoActionImpl instance = new MyCartSetCustomLineItemRecurrenceInfoActionImpl(); + instance.setCustomLineItemId(template.getCustomLineItemId()); + instance.setCustomLineItemKey(template.getCustomLineItemKey()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); + return instance; + } + + public MyCartSetCustomLineItemRecurrenceInfoAction copyDeep(); + + /** + * factory method to create a deep copy of MyCartSetCustomLineItemRecurrenceInfoAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static MyCartSetCustomLineItemRecurrenceInfoAction deepCopy( + @Nullable final MyCartSetCustomLineItemRecurrenceInfoAction template) { + if (template == null) { + return null; + } + MyCartSetCustomLineItemRecurrenceInfoActionImpl instance = new MyCartSetCustomLineItemRecurrenceInfoActionImpl(); + instance.setCustomLineItemId(template.getCustomLineItemId()); + instance.setCustomLineItemKey(template.getCustomLineItemKey()); + instance.setRecurrenceInfo(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft + .deepCopy(template.getRecurrenceInfo())); + return instance; + } + + /** + * builder factory method for MyCartSetCustomLineItemRecurrenceInfoAction + * @return builder + */ + public static MyCartSetCustomLineItemRecurrenceInfoActionBuilder builder() { + return MyCartSetCustomLineItemRecurrenceInfoActionBuilder.of(); + } + + /** + * create builder for MyCartSetCustomLineItemRecurrenceInfoAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MyCartSetCustomLineItemRecurrenceInfoActionBuilder builder( + final MyCartSetCustomLineItemRecurrenceInfoAction template) { + return MyCartSetCustomLineItemRecurrenceInfoActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMyCartSetCustomLineItemRecurrenceInfoAction( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetCustomLineItemRecurrenceInfoActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetCustomLineItemRecurrenceInfoActionBuilder.java new file mode 100644 index 00000000000..f290b95a32e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetCustomLineItemRecurrenceInfoActionBuilder.java @@ -0,0 +1,167 @@ + +package com.commercetools.api.models.me; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * MyCartSetCustomLineItemRecurrenceInfoActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     MyCartSetCustomLineItemRecurrenceInfoAction myCartSetCustomLineItemRecurrenceInfoAction = MyCartSetCustomLineItemRecurrenceInfoAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MyCartSetCustomLineItemRecurrenceInfoActionBuilder + implements Builder { + + @Nullable + private String customLineItemId; + + @Nullable + private String customLineItemKey; + + @Nullable + private com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo; + + /** + *

      id of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @param customLineItemId value to be set + * @return Builder + */ + + public MyCartSetCustomLineItemRecurrenceInfoActionBuilder customLineItemId( + @Nullable final String customLineItemId) { + this.customLineItemId = customLineItemId; + return this; + } + + /** + *

      key of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @param customLineItemKey value to be set + * @return Builder + */ + + public MyCartSetCustomLineItemRecurrenceInfoActionBuilder customLineItemKey( + @Nullable final String customLineItemKey) { + this.customLineItemKey = customLineItemKey; + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public MyCartSetCustomLineItemRecurrenceInfoActionBuilder recurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public MyCartSetCustomLineItemRecurrenceInfoActionBuilder withRecurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftBuilder.of()); + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param recurrenceInfo value to be set + * @return Builder + */ + + public MyCartSetCustomLineItemRecurrenceInfoActionBuilder recurrenceInfo( + @Nullable final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + + /** + *

      id of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @return customLineItemId + */ + + @Nullable + public String getCustomLineItemId() { + return this.customLineItemId; + } + + /** + *

      key of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + * @return customLineItemKey + */ + + @Nullable + public String getCustomLineItemKey() { + return this.customLineItemKey; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + + /** + * builds MyCartSetCustomLineItemRecurrenceInfoAction with checking for non-null required values + * @return MyCartSetCustomLineItemRecurrenceInfoAction + */ + public MyCartSetCustomLineItemRecurrenceInfoAction build() { + return new MyCartSetCustomLineItemRecurrenceInfoActionImpl(customLineItemId, customLineItemKey, recurrenceInfo); + } + + /** + * builds MyCartSetCustomLineItemRecurrenceInfoAction without checking for non-null required values + * @return MyCartSetCustomLineItemRecurrenceInfoAction + */ + public MyCartSetCustomLineItemRecurrenceInfoAction buildUnchecked() { + return new MyCartSetCustomLineItemRecurrenceInfoActionImpl(customLineItemId, customLineItemKey, recurrenceInfo); + } + + /** + * factory method for an instance of MyCartSetCustomLineItemRecurrenceInfoActionBuilder + * @return builder + */ + public static MyCartSetCustomLineItemRecurrenceInfoActionBuilder of() { + return new MyCartSetCustomLineItemRecurrenceInfoActionBuilder(); + } + + /** + * create builder for MyCartSetCustomLineItemRecurrenceInfoAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MyCartSetCustomLineItemRecurrenceInfoActionBuilder of( + final MyCartSetCustomLineItemRecurrenceInfoAction template) { + MyCartSetCustomLineItemRecurrenceInfoActionBuilder builder = new MyCartSetCustomLineItemRecurrenceInfoActionBuilder(); + builder.customLineItemId = template.getCustomLineItemId(); + builder.customLineItemKey = template.getCustomLineItemKey(); + builder.recurrenceInfo = template.getRecurrenceInfo(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetCustomLineItemRecurrenceInfoActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetCustomLineItemRecurrenceInfoActionImpl.java new file mode 100644 index 00000000000..e63c33a34c0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetCustomLineItemRecurrenceInfoActionImpl.java @@ -0,0 +1,142 @@ + +package com.commercetools.api.models.me; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Sets the recurrence information on the CustomLineItem. If the Cart is already associated with a Recurring Order, this action will fail.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MyCartSetCustomLineItemRecurrenceInfoActionImpl + implements MyCartSetCustomLineItemRecurrenceInfoAction, ModelBase { + + private String action; + + private String customLineItemId; + + private String customLineItemKey; + + private com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo; + + /** + * create instance with all properties + */ + @JsonCreator + MyCartSetCustomLineItemRecurrenceInfoActionImpl(@JsonProperty("customLineItemId") final String customLineItemId, + @JsonProperty("customLineItemKey") final String customLineItemKey, + @JsonProperty("recurrenceInfo") final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo) { + this.customLineItemId = customLineItemId; + this.customLineItemKey = customLineItemKey; + this.recurrenceInfo = recurrenceInfo; + this.action = SET_CUSTOM_LINE_ITEM_RECURRENCE_INFO; + } + + /** + * create empty instance + */ + public MyCartSetCustomLineItemRecurrenceInfoActionImpl() { + this.action = SET_CUSTOM_LINE_ITEM_RECURRENCE_INFO; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      id of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + */ + + public String getCustomLineItemId() { + return this.customLineItemId; + } + + /** + *

      key of the CustomLineItem to update. Either customLineItemId or customLineItemKey is required.

      + */ + + public String getCustomLineItemKey() { + return this.customLineItemKey; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + */ + + public com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + + public void setCustomLineItemId(final String customLineItemId) { + this.customLineItemId = customLineItemId; + } + + public void setCustomLineItemKey(final String customLineItemKey) { + this.customLineItemKey = customLineItemKey; + } + + public void setRecurrenceInfo( + final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + MyCartSetCustomLineItemRecurrenceInfoActionImpl that = (MyCartSetCustomLineItemRecurrenceInfoActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(customLineItemId, that.customLineItemId) + .append(customLineItemKey, that.customLineItemKey) + .append(recurrenceInfo, that.recurrenceInfo) + .append(action, that.action) + .append(customLineItemId, that.customLineItemId) + .append(customLineItemKey, that.customLineItemKey) + .append(recurrenceInfo, that.recurrenceInfo) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(customLineItemId) + .append(customLineItemKey) + .append(recurrenceInfo) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("customLineItemId", customLineItemId) + .append("customLineItemKey", customLineItemKey) + .append("recurrenceInfo", recurrenceInfo) + .build(); + } + + @Override + public MyCartSetCustomLineItemRecurrenceInfoAction copyDeep() { + return MyCartSetCustomLineItemRecurrenceInfoAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetLineItemRecurrenceInfoAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetLineItemRecurrenceInfoAction.java new file mode 100644 index 00000000000..ac7391e02d8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetLineItemRecurrenceInfoAction.java @@ -0,0 +1,167 @@ + +package com.commercetools.api.models.me; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

      Sets the recurrence information on the LineItem. If the Cart is already associated with a Recurring Order, this action will fail.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     MyCartSetLineItemRecurrenceInfoAction myCartSetLineItemRecurrenceInfoAction = MyCartSetLineItemRecurrenceInfoAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("setLineItemRecurrenceInfo") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = MyCartSetLineItemRecurrenceInfoActionImpl.class) +public interface MyCartSetLineItemRecurrenceInfoAction extends MyCartUpdateAction { + + /** + * discriminator value for MyCartSetLineItemRecurrenceInfoAction + */ + String SET_LINE_ITEM_RECURRENCE_INFO = "setLineItemRecurrenceInfo"; + + /** + *

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @return lineItemId + */ + + @JsonProperty("lineItemId") + public String getLineItemId(); + + /** + *

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @return lineItemKey + */ + + @JsonProperty("lineItemKey") + public String getLineItemKey(); + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public LineItemRecurrenceInfoDraft getRecurrenceInfo(); + + /** + *

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @param lineItemId value to be set + */ + + public void setLineItemId(final String lineItemId); + + /** + *

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @param lineItemKey value to be set + */ + + public void setLineItemKey(final String lineItemKey); + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param recurrenceInfo value to be set + */ + + public void setRecurrenceInfo(final LineItemRecurrenceInfoDraft recurrenceInfo); + + /** + * factory method + * @return instance of MyCartSetLineItemRecurrenceInfoAction + */ + public static MyCartSetLineItemRecurrenceInfoAction of() { + return new MyCartSetLineItemRecurrenceInfoActionImpl(); + } + + /** + * factory method to create a shallow copy MyCartSetLineItemRecurrenceInfoAction + * @param template instance to be copied + * @return copy instance + */ + public static MyCartSetLineItemRecurrenceInfoAction of(final MyCartSetLineItemRecurrenceInfoAction template) { + MyCartSetLineItemRecurrenceInfoActionImpl instance = new MyCartSetLineItemRecurrenceInfoActionImpl(); + instance.setLineItemId(template.getLineItemId()); + instance.setLineItemKey(template.getLineItemKey()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); + return instance; + } + + public MyCartSetLineItemRecurrenceInfoAction copyDeep(); + + /** + * factory method to create a deep copy of MyCartSetLineItemRecurrenceInfoAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static MyCartSetLineItemRecurrenceInfoAction deepCopy( + @Nullable final MyCartSetLineItemRecurrenceInfoAction template) { + if (template == null) { + return null; + } + MyCartSetLineItemRecurrenceInfoActionImpl instance = new MyCartSetLineItemRecurrenceInfoActionImpl(); + instance.setLineItemId(template.getLineItemId()); + instance.setLineItemKey(template.getLineItemKey()); + instance.setRecurrenceInfo(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft + .deepCopy(template.getRecurrenceInfo())); + return instance; + } + + /** + * builder factory method for MyCartSetLineItemRecurrenceInfoAction + * @return builder + */ + public static MyCartSetLineItemRecurrenceInfoActionBuilder builder() { + return MyCartSetLineItemRecurrenceInfoActionBuilder.of(); + } + + /** + * create builder for MyCartSetLineItemRecurrenceInfoAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MyCartSetLineItemRecurrenceInfoActionBuilder builder( + final MyCartSetLineItemRecurrenceInfoAction template) { + return MyCartSetLineItemRecurrenceInfoActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMyCartSetLineItemRecurrenceInfoAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetLineItemRecurrenceInfoActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetLineItemRecurrenceInfoActionBuilder.java new file mode 100644 index 00000000000..150631a3c2f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetLineItemRecurrenceInfoActionBuilder.java @@ -0,0 +1,164 @@ + +package com.commercetools.api.models.me; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * MyCartSetLineItemRecurrenceInfoActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     MyCartSetLineItemRecurrenceInfoAction myCartSetLineItemRecurrenceInfoAction = MyCartSetLineItemRecurrenceInfoAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MyCartSetLineItemRecurrenceInfoActionBuilder implements Builder { + + @Nullable + private String lineItemId; + + @Nullable + private String lineItemKey; + + @Nullable + private com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo; + + /** + *

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @param lineItemId value to be set + * @return Builder + */ + + public MyCartSetLineItemRecurrenceInfoActionBuilder lineItemId(@Nullable final String lineItemId) { + this.lineItemId = lineItemId; + return this; + } + + /** + *

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @param lineItemKey value to be set + * @return Builder + */ + + public MyCartSetLineItemRecurrenceInfoActionBuilder lineItemKey(@Nullable final String lineItemKey) { + this.lineItemKey = lineItemKey; + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public MyCartSetLineItemRecurrenceInfoActionBuilder recurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public MyCartSetLineItemRecurrenceInfoActionBuilder withRecurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftBuilder.of()); + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param recurrenceInfo value to be set + * @return Builder + */ + + public MyCartSetLineItemRecurrenceInfoActionBuilder recurrenceInfo( + @Nullable final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + + /** + *

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @return lineItemId + */ + + @Nullable + public String getLineItemId() { + return this.lineItemId; + } + + /** + *

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      + * @return lineItemKey + */ + + @Nullable + public String getLineItemKey() { + return this.lineItemKey; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + + /** + * builds MyCartSetLineItemRecurrenceInfoAction with checking for non-null required values + * @return MyCartSetLineItemRecurrenceInfoAction + */ + public MyCartSetLineItemRecurrenceInfoAction build() { + return new MyCartSetLineItemRecurrenceInfoActionImpl(lineItemId, lineItemKey, recurrenceInfo); + } + + /** + * builds MyCartSetLineItemRecurrenceInfoAction without checking for non-null required values + * @return MyCartSetLineItemRecurrenceInfoAction + */ + public MyCartSetLineItemRecurrenceInfoAction buildUnchecked() { + return new MyCartSetLineItemRecurrenceInfoActionImpl(lineItemId, lineItemKey, recurrenceInfo); + } + + /** + * factory method for an instance of MyCartSetLineItemRecurrenceInfoActionBuilder + * @return builder + */ + public static MyCartSetLineItemRecurrenceInfoActionBuilder of() { + return new MyCartSetLineItemRecurrenceInfoActionBuilder(); + } + + /** + * create builder for MyCartSetLineItemRecurrenceInfoAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MyCartSetLineItemRecurrenceInfoActionBuilder of( + final MyCartSetLineItemRecurrenceInfoAction template) { + MyCartSetLineItemRecurrenceInfoActionBuilder builder = new MyCartSetLineItemRecurrenceInfoActionBuilder(); + builder.lineItemId = template.getLineItemId(); + builder.lineItemKey = template.getLineItemKey(); + builder.recurrenceInfo = template.getRecurrenceInfo(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetLineItemRecurrenceInfoActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetLineItemRecurrenceInfoActionImpl.java new file mode 100644 index 00000000000..83a4171e4f6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartSetLineItemRecurrenceInfoActionImpl.java @@ -0,0 +1,141 @@ + +package com.commercetools.api.models.me; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Sets the recurrence information on the LineItem. If the Cart is already associated with a Recurring Order, this action will fail.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MyCartSetLineItemRecurrenceInfoActionImpl implements MyCartSetLineItemRecurrenceInfoAction, ModelBase { + + private String action; + + private String lineItemId; + + private String lineItemKey; + + private com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo; + + /** + * create instance with all properties + */ + @JsonCreator + MyCartSetLineItemRecurrenceInfoActionImpl(@JsonProperty("lineItemId") final String lineItemId, + @JsonProperty("lineItemKey") final String lineItemKey, + @JsonProperty("recurrenceInfo") final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.lineItemId = lineItemId; + this.lineItemKey = lineItemKey; + this.recurrenceInfo = recurrenceInfo; + this.action = SET_LINE_ITEM_RECURRENCE_INFO; + } + + /** + * create empty instance + */ + public MyCartSetLineItemRecurrenceInfoActionImpl() { + this.action = SET_LINE_ITEM_RECURRENCE_INFO; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      + */ + + public String getLineItemId() { + return this.lineItemId; + } + + /** + *

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      + */ + + public String getLineItemKey() { + return this.lineItemKey; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + */ + + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + + public void setLineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + } + + public void setLineItemKey(final String lineItemKey) { + this.lineItemKey = lineItemKey; + } + + public void setRecurrenceInfo( + final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + MyCartSetLineItemRecurrenceInfoActionImpl that = (MyCartSetLineItemRecurrenceInfoActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(lineItemId, that.lineItemId) + .append(lineItemKey, that.lineItemKey) + .append(recurrenceInfo, that.recurrenceInfo) + .append(action, that.action) + .append(lineItemId, that.lineItemId) + .append(lineItemKey, that.lineItemKey) + .append(recurrenceInfo, that.recurrenceInfo) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(lineItemId) + .append(lineItemKey) + .append(recurrenceInfo) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("lineItemId", lineItemId) + .append("lineItemKey", lineItemKey) + .append("recurrenceInfo", recurrenceInfo) + .build(); + } + + @Override + public MyCartSetLineItemRecurrenceInfoAction copyDeep() { + return MyCartSetLineItemRecurrenceInfoAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartUpdateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartUpdateAction.java index 6b9ca12d828..78ec14eb7ed 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartUpdateAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartUpdateAction.java @@ -196,6 +196,14 @@ public static com.commercetools.api.models.me.MyCartSetCustomFieldActionBuilder return com.commercetools.api.models.me.MyCartSetCustomFieldActionBuilder.of(); } + /** + * builder for setCustomLineItemRecurrenceInfo subtype + * @return builder + */ + public static com.commercetools.api.models.me.MyCartSetCustomLineItemRecurrenceInfoActionBuilder setCustomLineItemRecurrenceInfoBuilder() { + return com.commercetools.api.models.me.MyCartSetCustomLineItemRecurrenceInfoActionBuilder.of(); + } + /** * builder for setCustomType subtype * @return builder @@ -244,6 +252,14 @@ public static com.commercetools.api.models.me.MyCartSetLineItemDistributionChann return com.commercetools.api.models.me.MyCartSetLineItemDistributionChannelActionBuilder.of(); } + /** + * builder for setLineItemRecurrenceInfo subtype + * @return builder + */ + public static com.commercetools.api.models.me.MyCartSetLineItemRecurrenceInfoActionBuilder setLineItemRecurrenceInfoBuilder() { + return com.commercetools.api.models.me.MyCartSetLineItemRecurrenceInfoActionBuilder.of(); + } + /** * builder for setLineItemShippingDetails subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartUpdateActionBuilder.java index 0008c8ec621..190b25b28aa 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartUpdateActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartUpdateActionBuilder.java @@ -79,6 +79,10 @@ public com.commercetools.api.models.me.MyCartSetCustomFieldActionBuilder setCust return com.commercetools.api.models.me.MyCartSetCustomFieldActionBuilder.of(); } + public com.commercetools.api.models.me.MyCartSetCustomLineItemRecurrenceInfoActionBuilder setCustomLineItemRecurrenceInfoBuilder() { + return com.commercetools.api.models.me.MyCartSetCustomLineItemRecurrenceInfoActionBuilder.of(); + } + public com.commercetools.api.models.me.MyCartSetCustomTypeActionBuilder setCustomTypeBuilder() { return com.commercetools.api.models.me.MyCartSetCustomTypeActionBuilder.of(); } @@ -103,6 +107,10 @@ public com.commercetools.api.models.me.MyCartSetLineItemDistributionChannelActio return com.commercetools.api.models.me.MyCartSetLineItemDistributionChannelActionBuilder.of(); } + public com.commercetools.api.models.me.MyCartSetLineItemRecurrenceInfoActionBuilder setLineItemRecurrenceInfoBuilder() { + return com.commercetools.api.models.me.MyCartSetLineItemRecurrenceInfoActionBuilder.of(); + } + public com.commercetools.api.models.me.MyCartSetLineItemShippingDetailsActionBuilder setLineItemShippingDetailsBuilder() { return com.commercetools.api.models.me.MyCartSetLineItemShippingDetailsActionBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyLineItemDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyLineItemDraft.java index d174791be16..6d914830120 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyLineItemDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyLineItemDraft.java @@ -10,6 +10,7 @@ import com.commercetools.api.models.cart.ItemShippingDetailsDraft; import com.commercetools.api.models.channel.ChannelResourceIdentifier; +import com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft; import com.commercetools.api.models.type.CustomFieldsDraft; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -109,6 +110,14 @@ public interface MyLineItemDraft extends com.commercetools.api.models.Customizab @JsonProperty("shippingDetails") public ItemShippingDetailsDraft getShippingDetails(); + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public LineItemRecurrenceInfoDraft getRecurrenceInfo(); + /** *

      Custom Fields for the Cart.

      * @return custom @@ -182,6 +191,13 @@ public interface MyLineItemDraft extends com.commercetools.api.models.Customizab public void setShippingDetails(final ItemShippingDetailsDraft shippingDetails); + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + */ + + public void setRecurrenceInfo(final LineItemRecurrenceInfoDraft recurrenceInfo); + /** *

      Custom Fields for the Cart.

      * @param custom value to be set @@ -213,6 +229,7 @@ public static MyLineItemDraft of(final MyLineItemDraft template) { instance.setSupplyChannel(template.getSupplyChannel()); instance.setDistributionChannel(template.getDistributionChannel()); instance.setShippingDetails(template.getShippingDetails()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); instance.setCustom(template.getCustom()); return instance; } @@ -242,6 +259,8 @@ public static MyLineItemDraft deepCopy(@Nullable final MyLineItemDraft template) com.commercetools.api.models.channel.ChannelResourceIdentifier.deepCopy(template.getDistributionChannel())); instance.setShippingDetails( com.commercetools.api.models.cart.ItemShippingDetailsDraft.deepCopy(template.getShippingDetails())); + instance.setRecurrenceInfo(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft + .deepCopy(template.getRecurrenceInfo())); instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyLineItemDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyLineItemDraftBuilder.java index cb798a83919..c939b34e5b4 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyLineItemDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyLineItemDraftBuilder.java @@ -50,6 +50,9 @@ public class MyLineItemDraftBuilder implements Builder { @Nullable private com.commercetools.api.models.cart.ItemShippingDetailsDraft shippingDetails; + @Nullable + private com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo; + @Nullable private com.commercetools.api.models.type.CustomFieldsDraft custom; @@ -236,6 +239,45 @@ public MyLineItemDraftBuilder shippingDetails( return this; } + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public MyLineItemDraftBuilder recurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public MyLineItemDraftBuilder withRecurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftBuilder.of()); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + * @return Builder + */ + + public MyLineItemDraftBuilder recurrenceInfo( + @Nullable final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + /** *

      Custom Fields for the Cart.

      * @param builder function to build the custom value @@ -363,6 +405,16 @@ public com.commercetools.api.models.cart.ItemShippingDetailsDraft getShippingDet return this.shippingDetails; } + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + /** *

      Custom Fields for the Cart.

      * @return custom @@ -379,7 +431,7 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { */ public MyLineItemDraft build() { return new MyLineItemDraftImpl(key, productId, variantId, sku, quantity, addedAt, supplyChannel, - distributionChannel, shippingDetails, custom); + distributionChannel, shippingDetails, recurrenceInfo, custom); } /** @@ -388,7 +440,7 @@ public MyLineItemDraft build() { */ public MyLineItemDraft buildUnchecked() { return new MyLineItemDraftImpl(key, productId, variantId, sku, quantity, addedAt, supplyChannel, - distributionChannel, shippingDetails, custom); + distributionChannel, shippingDetails, recurrenceInfo, custom); } /** @@ -415,6 +467,7 @@ public static MyLineItemDraftBuilder of(final MyLineItemDraft template) { builder.supplyChannel = template.getSupplyChannel(); builder.distributionChannel = template.getDistributionChannel(); builder.shippingDetails = template.getShippingDetails(); + builder.recurrenceInfo = template.getRecurrenceInfo(); builder.custom = template.getCustom(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyLineItemDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyLineItemDraftImpl.java index a718dd39364..dba2d131965 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyLineItemDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyLineItemDraftImpl.java @@ -40,6 +40,8 @@ public class MyLineItemDraftImpl implements MyLineItemDraft, ModelBase { private com.commercetools.api.models.cart.ItemShippingDetailsDraft shippingDetails; + private com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo; + private com.commercetools.api.models.type.CustomFieldsDraft custom; /** @@ -53,6 +55,7 @@ public class MyLineItemDraftImpl implements MyLineItemDraft, ModelBase { @JsonProperty("supplyChannel") final com.commercetools.api.models.channel.ChannelResourceIdentifier supplyChannel, @JsonProperty("distributionChannel") final com.commercetools.api.models.channel.ChannelResourceIdentifier distributionChannel, @JsonProperty("shippingDetails") final com.commercetools.api.models.cart.ItemShippingDetailsDraft shippingDetails, + @JsonProperty("recurrenceInfo") final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo, @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom) { this.key = key; this.productId = productId; @@ -63,6 +66,7 @@ public class MyLineItemDraftImpl implements MyLineItemDraft, ModelBase { this.supplyChannel = supplyChannel; this.distributionChannel = distributionChannel; this.shippingDetails = shippingDetails; + this.recurrenceInfo = recurrenceInfo; this.custom = custom; } @@ -146,6 +150,14 @@ public com.commercetools.api.models.cart.ItemShippingDetailsDraft getShippingDet return this.shippingDetails; } + /** + *

      Recurring Order and frequency data.

      + */ + + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + /** *

      Custom Fields for the Cart.

      */ @@ -191,6 +203,11 @@ public void setShippingDetails(final com.commercetools.api.models.cart.ItemShipp this.shippingDetails = shippingDetails; } + public void setRecurrenceInfo( + final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + } + public void setCustom(final com.commercetools.api.models.type.CustomFieldsDraft custom) { this.custom = custom; } @@ -214,6 +231,7 @@ public boolean equals(Object o) { .append(supplyChannel, that.supplyChannel) .append(distributionChannel, that.distributionChannel) .append(shippingDetails, that.shippingDetails) + .append(recurrenceInfo, that.recurrenceInfo) .append(custom, that.custom) .append(key, that.key) .append(productId, that.productId) @@ -224,6 +242,7 @@ public boolean equals(Object o) { .append(supplyChannel, that.supplyChannel) .append(distributionChannel, that.distributionChannel) .append(shippingDetails, that.shippingDetails) + .append(recurrenceInfo, that.recurrenceInfo) .append(custom, that.custom) .isEquals(); } @@ -239,6 +258,7 @@ public int hashCode() { .append(supplyChannel) .append(distributionChannel) .append(shippingDetails) + .append(recurrenceInfo) .append(custom) .toHashCode(); } @@ -254,6 +274,7 @@ public String toString() { .append("supplyChannel", supplyChannel) .append("distributionChannel", distributionChannel) .append("shippingDetails", shippingDetails) + .append("recurrenceInfo", recurrenceInfo) .append("custom", custom) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java index e3caa75b865..ee493d01e6e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java @@ -1197,6 +1197,14 @@ public static com.commercetools.api.models.message.OrderBusinessUnitSetMessageBu return com.commercetools.api.models.message.OrderBusinessUnitSetMessageBuilder.of(); } + /** + * builder for orderCreatedFromRecurringOrder subtype + * @return builder + */ + public static com.commercetools.api.models.message.OrderCreatedFromRecurringOrderMessageBuilder orderCreatedFromRecurringOrderBuilder() { + return com.commercetools.api.models.message.OrderCreatedFromRecurringOrderMessageBuilder.of(); + } + /** * builder for orderCreated subtype * @return builder @@ -2189,6 +2197,94 @@ public static com.commercetools.api.models.message.QuoteStateTransitionMessageBu return com.commercetools.api.models.message.QuoteStateTransitionMessageBuilder.of(); } + /** + * builder for recurringOrderCreated subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderCreatedMessageBuilder recurringOrderCreatedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCreatedMessageBuilder.of(); + } + + /** + * builder for recurringOrderCustomFieldAdded subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderCustomFieldAddedMessageBuilder recurringOrderCustomFieldAddedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomFieldAddedMessageBuilder.of(); + } + + /** + * builder for recurringOrderCustomFieldChanged subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderCustomFieldChangedMessageBuilder recurringOrderCustomFieldChangedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomFieldChangedMessageBuilder.of(); + } + + /** + * builder for recurringOrderCustomFieldRemoved subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderCustomFieldRemovedMessageBuilder recurringOrderCustomFieldRemovedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomFieldRemovedMessageBuilder.of(); + } + + /** + * builder for recurringOrderCustomTypeRemoved subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderCustomTypeRemovedMessageBuilder recurringOrderCustomTypeRemovedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomTypeRemovedMessageBuilder.of(); + } + + /** + * builder for recurringOrderCustomTypeSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderCustomTypeSetMessageBuilder recurringOrderCustomTypeSetBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomTypeSetMessageBuilder.of(); + } + + /** + * builder for recurringOrderKeySet subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderKeySetMessageBuilder recurringOrderKeySetBuilder() { + return com.commercetools.api.models.message.RecurringOrderKeySetMessageBuilder.of(); + } + + /** + * builder for recurringOrderScheduleSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderScheduleSetMessageBuilder recurringOrderScheduleSetBuilder() { + return com.commercetools.api.models.message.RecurringOrderScheduleSetMessageBuilder.of(); + } + + /** + * builder for recurringOrderStartsAtSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderStartsAtSetMessageBuilder recurringOrderStartsAtSetBuilder() { + return com.commercetools.api.models.message.RecurringOrderStartsAtSetMessageBuilder.of(); + } + + /** + * builder for recurringOrderStateChanged subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderStateChangedMessageBuilder recurringOrderStateChangedBuilder() { + return com.commercetools.api.models.message.RecurringOrderStateChangedMessageBuilder.of(); + } + + /** + * builder for recurringOrderStateTransition subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderStateTransitionMessageBuilder recurringOrderStateTransitionBuilder() { + return com.commercetools.api.models.message.RecurringOrderStateTransitionMessageBuilder.of(); + } + /** * builder for returnInfoAdded subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java index f431afdfdd8..1f3aefd2d61 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java @@ -491,6 +491,10 @@ public com.commercetools.api.models.message.OrderBusinessUnitSetMessageBuilder o return com.commercetools.api.models.message.OrderBusinessUnitSetMessageBuilder.of(); } + public com.commercetools.api.models.message.OrderCreatedFromRecurringOrderMessageBuilder orderCreatedFromRecurringOrderBuilder() { + return com.commercetools.api.models.message.OrderCreatedFromRecurringOrderMessageBuilder.of(); + } + public com.commercetools.api.models.message.OrderCreatedMessageBuilder orderCreatedBuilder() { return com.commercetools.api.models.message.OrderCreatedMessageBuilder.of(); } @@ -987,6 +991,50 @@ public com.commercetools.api.models.message.QuoteStateTransitionMessageBuilder q return com.commercetools.api.models.message.QuoteStateTransitionMessageBuilder.of(); } + public com.commercetools.api.models.message.RecurringOrderCreatedMessageBuilder recurringOrderCreatedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCreatedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderCustomFieldAddedMessageBuilder recurringOrderCustomFieldAddedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomFieldAddedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderCustomFieldChangedMessageBuilder recurringOrderCustomFieldChangedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomFieldChangedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderCustomFieldRemovedMessageBuilder recurringOrderCustomFieldRemovedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomFieldRemovedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderCustomTypeRemovedMessageBuilder recurringOrderCustomTypeRemovedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomTypeRemovedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderCustomTypeSetMessageBuilder recurringOrderCustomTypeSetBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomTypeSetMessageBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderKeySetMessageBuilder recurringOrderKeySetBuilder() { + return com.commercetools.api.models.message.RecurringOrderKeySetMessageBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderScheduleSetMessageBuilder recurringOrderScheduleSetBuilder() { + return com.commercetools.api.models.message.RecurringOrderScheduleSetMessageBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderStartsAtSetMessageBuilder recurringOrderStartsAtSetBuilder() { + return com.commercetools.api.models.message.RecurringOrderStartsAtSetMessageBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderStateChangedMessageBuilder recurringOrderStateChangedBuilder() { + return com.commercetools.api.models.message.RecurringOrderStateChangedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderStateTransitionMessageBuilder recurringOrderStateTransitionBuilder() { + return com.commercetools.api.models.message.RecurringOrderStateTransitionMessageBuilder.of(); + } + public com.commercetools.api.models.message.ReturnInfoAddedMessageBuilder returnInfoAddedBuilder() { return com.commercetools.api.models.message.ReturnInfoAddedMessageBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java index ac3d50e748f..33ef4dc28b0 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java @@ -1021,6 +1021,14 @@ public static com.commercetools.api.models.message.OrderBusinessUnitSetMessagePa return com.commercetools.api.models.message.OrderBusinessUnitSetMessagePayloadBuilder.of(); } + /** + * builder for orderCreatedFromRecurringOrder subtype + * @return builder + */ + public static com.commercetools.api.models.message.OrderCreatedFromRecurringOrderMessagePayloadBuilder orderCreatedFromRecurringOrderBuilder() { + return com.commercetools.api.models.message.OrderCreatedFromRecurringOrderMessagePayloadBuilder.of(); + } + /** * builder for orderCreated subtype * @return builder @@ -2013,6 +2021,94 @@ public static com.commercetools.api.models.message.QuoteStateTransitionMessagePa return com.commercetools.api.models.message.QuoteStateTransitionMessagePayloadBuilder.of(); } + /** + * builder for recurringOrderCreated subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderCreatedMessagePayloadBuilder recurringOrderCreatedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCreatedMessagePayloadBuilder.of(); + } + + /** + * builder for recurringOrderCustomFieldAdded subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderCustomFieldAddedMessagePayloadBuilder recurringOrderCustomFieldAddedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomFieldAddedMessagePayloadBuilder.of(); + } + + /** + * builder for recurringOrderCustomFieldChanged subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderCustomFieldChangedMessagePayloadBuilder recurringOrderCustomFieldChangedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomFieldChangedMessagePayloadBuilder.of(); + } + + /** + * builder for recurringOrderCustomFieldRemoved subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderCustomFieldRemovedMessagePayloadBuilder recurringOrderCustomFieldRemovedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomFieldRemovedMessagePayloadBuilder.of(); + } + + /** + * builder for recurringOrderCustomTypeRemoved subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderCustomTypeRemovedMessagePayloadBuilder recurringOrderCustomTypeRemovedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomTypeRemovedMessagePayloadBuilder.of(); + } + + /** + * builder for recurringOrderCustomTypeSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderCustomTypeSetMessagePayloadBuilder recurringOrderCustomTypeSetBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomTypeSetMessagePayloadBuilder.of(); + } + + /** + * builder for recurringOrderKeySet subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderKeySetMessagePayloadBuilder recurringOrderKeySetBuilder() { + return com.commercetools.api.models.message.RecurringOrderKeySetMessagePayloadBuilder.of(); + } + + /** + * builder for recurringOrderScheduleSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderScheduleSetMessagePayloadBuilder recurringOrderScheduleSetBuilder() { + return com.commercetools.api.models.message.RecurringOrderScheduleSetMessagePayloadBuilder.of(); + } + + /** + * builder for recurringOrderStartsAtSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderStartsAtSetMessagePayloadBuilder recurringOrderStartsAtSetBuilder() { + return com.commercetools.api.models.message.RecurringOrderStartsAtSetMessagePayloadBuilder.of(); + } + + /** + * builder for recurringOrderStateChanged subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderStateChangedMessagePayloadBuilder recurringOrderStateChangedBuilder() { + return com.commercetools.api.models.message.RecurringOrderStateChangedMessagePayloadBuilder.of(); + } + + /** + * builder for recurringOrderStateTransition subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderStateTransitionMessagePayloadBuilder recurringOrderStateTransitionBuilder() { + return com.commercetools.api.models.message.RecurringOrderStateTransitionMessagePayloadBuilder.of(); + } + /** * builder for returnInfoAdded subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java index 635190d885d..56045ff67e9 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java @@ -491,6 +491,10 @@ public com.commercetools.api.models.message.OrderBusinessUnitSetMessagePayloadBu return com.commercetools.api.models.message.OrderBusinessUnitSetMessagePayloadBuilder.of(); } + public com.commercetools.api.models.message.OrderCreatedFromRecurringOrderMessagePayloadBuilder orderCreatedFromRecurringOrderBuilder() { + return com.commercetools.api.models.message.OrderCreatedFromRecurringOrderMessagePayloadBuilder.of(); + } + public com.commercetools.api.models.message.OrderCreatedMessagePayloadBuilder orderCreatedBuilder() { return com.commercetools.api.models.message.OrderCreatedMessagePayloadBuilder.of(); } @@ -987,6 +991,50 @@ public com.commercetools.api.models.message.QuoteStateTransitionMessagePayloadBu return com.commercetools.api.models.message.QuoteStateTransitionMessagePayloadBuilder.of(); } + public com.commercetools.api.models.message.RecurringOrderCreatedMessagePayloadBuilder recurringOrderCreatedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCreatedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderCustomFieldAddedMessagePayloadBuilder recurringOrderCustomFieldAddedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomFieldAddedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderCustomFieldChangedMessagePayloadBuilder recurringOrderCustomFieldChangedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomFieldChangedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderCustomFieldRemovedMessagePayloadBuilder recurringOrderCustomFieldRemovedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomFieldRemovedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderCustomTypeRemovedMessagePayloadBuilder recurringOrderCustomTypeRemovedBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomTypeRemovedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderCustomTypeSetMessagePayloadBuilder recurringOrderCustomTypeSetBuilder() { + return com.commercetools.api.models.message.RecurringOrderCustomTypeSetMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderKeySetMessagePayloadBuilder recurringOrderKeySetBuilder() { + return com.commercetools.api.models.message.RecurringOrderKeySetMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderScheduleSetMessagePayloadBuilder recurringOrderScheduleSetBuilder() { + return com.commercetools.api.models.message.RecurringOrderScheduleSetMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderStartsAtSetMessagePayloadBuilder recurringOrderStartsAtSetBuilder() { + return com.commercetools.api.models.message.RecurringOrderStartsAtSetMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderStateChangedMessagePayloadBuilder recurringOrderStateChangedBuilder() { + return com.commercetools.api.models.message.RecurringOrderStateChangedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.RecurringOrderStateTransitionMessagePayloadBuilder recurringOrderStateTransitionBuilder() { + return com.commercetools.api.models.message.RecurringOrderStateTransitionMessagePayloadBuilder.of(); + } + public com.commercetools.api.models.message.ReturnInfoAddedMessagePayloadBuilder returnInfoAddedBuilder() { return com.commercetools.api.models.message.ReturnInfoAddedMessagePayloadBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessage.java new file mode 100644 index 00000000000..70787df4974 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessage.java @@ -0,0 +1,185 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.order.Order; +import com.commercetools.api.models.recurring_order.RecurringOrderReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Generated after an Order is successfully created according to the defined schedule of a Recurring Order.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     OrderCreatedFromRecurringOrderMessage orderCreatedFromRecurringOrderMessage = OrderCreatedFromRecurringOrderMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .order(orderBuilder -> orderBuilder)
      + *             .recurringOrderRef(recurringOrderRefBuilder -> recurringOrderRefBuilder)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("OrderCreatedFromRecurringOrder") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = OrderCreatedFromRecurringOrderMessageImpl.class) +public interface OrderCreatedFromRecurringOrderMessage extends OrderMessage { + + /** + * discriminator value for OrderCreatedFromRecurringOrderMessage + */ + String ORDER_CREATED_FROM_RECURRING_ORDER = "OrderCreatedFromRecurringOrder"; + + /** + *

      Order that was created.

      + * @return order + */ + @NotNull + @Valid + @JsonProperty("order") + public Order getOrder(); + + /** + *

      Reference to the origin Recurring Order.

      + * @return recurringOrderRef + */ + @NotNull + @Valid + @JsonProperty("recurringOrderRef") + public RecurringOrderReference getRecurringOrderRef(); + + /** + *

      Order that was created.

      + * @param order value to be set + */ + + public void setOrder(final Order order); + + /** + *

      Reference to the origin Recurring Order.

      + * @param recurringOrderRef value to be set + */ + + public void setRecurringOrderRef(final RecurringOrderReference recurringOrderRef); + + /** + * factory method + * @return instance of OrderCreatedFromRecurringOrderMessage + */ + public static OrderCreatedFromRecurringOrderMessage of() { + return new OrderCreatedFromRecurringOrderMessageImpl(); + } + + /** + * factory method to create a shallow copy OrderCreatedFromRecurringOrderMessage + * @param template instance to be copied + * @return copy instance + */ + public static OrderCreatedFromRecurringOrderMessage of(final OrderCreatedFromRecurringOrderMessage template) { + OrderCreatedFromRecurringOrderMessageImpl instance = new OrderCreatedFromRecurringOrderMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setOrder(template.getOrder()); + instance.setRecurringOrderRef(template.getRecurringOrderRef()); + return instance; + } + + public OrderCreatedFromRecurringOrderMessage copyDeep(); + + /** + * factory method to create a deep copy of OrderCreatedFromRecurringOrderMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static OrderCreatedFromRecurringOrderMessage deepCopy( + @Nullable final OrderCreatedFromRecurringOrderMessage template) { + if (template == null) { + return null; + } + OrderCreatedFromRecurringOrderMessageImpl instance = new OrderCreatedFromRecurringOrderMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setOrder(com.commercetools.api.models.order.Order.deepCopy(template.getOrder())); + instance.setRecurringOrderRef(com.commercetools.api.models.recurring_order.RecurringOrderReference + .deepCopy(template.getRecurringOrderRef())); + return instance; + } + + /** + * builder factory method for OrderCreatedFromRecurringOrderMessage + * @return builder + */ + public static OrderCreatedFromRecurringOrderMessageBuilder builder() { + return OrderCreatedFromRecurringOrderMessageBuilder.of(); + } + + /** + * create builder for OrderCreatedFromRecurringOrderMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderCreatedFromRecurringOrderMessageBuilder builder( + final OrderCreatedFromRecurringOrderMessage template) { + return OrderCreatedFromRecurringOrderMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withOrderCreatedFromRecurringOrderMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessageBuilder.java new file mode 100644 index 00000000000..5426d092c32 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessageBuilder.java @@ -0,0 +1,512 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * OrderCreatedFromRecurringOrderMessageBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     OrderCreatedFromRecurringOrderMessage orderCreatedFromRecurringOrderMessage = OrderCreatedFromRecurringOrderMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .order(orderBuilder -> orderBuilder)
      + *             .recurringOrderRef(recurringOrderRefBuilder -> recurringOrderRefBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderCreatedFromRecurringOrderMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.order.Order order; + + private com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrderRef; + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @param id value to be set + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @param version value to be set + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @param createdAt value to be set + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

      Value of createdAt.

      + * @param lastModifiedAt value to be set + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param lastModifiedBy value to be set + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param createdBy value to be set + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @param sequenceNumber value to be set + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param resource value to be set + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder resource( + final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param builder function to build the resource value + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @param resourceVersion value to be set + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

      Order that was created.

      + * @param builder function to build the order value + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder order( + Function builder) { + this.order = builder.apply(com.commercetools.api.models.order.OrderBuilder.of()).build(); + return this; + } + + /** + *

      Order that was created.

      + * @param builder function to build the order value + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder withOrder( + Function builder) { + this.order = builder.apply(com.commercetools.api.models.order.OrderBuilder.of()); + return this; + } + + /** + *

      Order that was created.

      + * @param order value to be set + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder order(final com.commercetools.api.models.order.Order order) { + this.order = order; + return this; + } + + /** + *

      Reference to the origin Recurring Order.

      + * @param builder function to build the recurringOrderRef value + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder recurringOrderRef( + Function builder) { + this.recurringOrderRef = builder + .apply(com.commercetools.api.models.recurring_order.RecurringOrderReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

      Reference to the origin Recurring Order.

      + * @param builder function to build the recurringOrderRef value + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder withRecurringOrderRef( + Function builder) { + this.recurringOrderRef = builder + .apply(com.commercetools.api.models.recurring_order.RecurringOrderReferenceBuilder.of()); + return this; + } + + /** + *

      Reference to the origin Recurring Order.

      + * @param recurringOrderRef value to be set + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessageBuilder recurringOrderRef( + final com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrderRef) { + this.recurringOrderRef = recurringOrderRef; + return this; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      Order that was created.

      + * @return order + */ + + public com.commercetools.api.models.order.Order getOrder() { + return this.order; + } + + /** + *

      Reference to the origin Recurring Order.

      + * @return recurringOrderRef + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderReference getRecurringOrderRef() { + return this.recurringOrderRef; + } + + /** + * builds OrderCreatedFromRecurringOrderMessage with checking for non-null required values + * @return OrderCreatedFromRecurringOrderMessage + */ + public OrderCreatedFromRecurringOrderMessage build() { + Objects.requireNonNull(id, OrderCreatedFromRecurringOrderMessage.class + ": id is missing"); + Objects.requireNonNull(version, OrderCreatedFromRecurringOrderMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, OrderCreatedFromRecurringOrderMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + OrderCreatedFromRecurringOrderMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + OrderCreatedFromRecurringOrderMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, OrderCreatedFromRecurringOrderMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + OrderCreatedFromRecurringOrderMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(order, OrderCreatedFromRecurringOrderMessage.class + ": order is missing"); + Objects.requireNonNull(recurringOrderRef, + OrderCreatedFromRecurringOrderMessage.class + ": recurringOrderRef is missing"); + return new OrderCreatedFromRecurringOrderMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, order, + recurringOrderRef); + } + + /** + * builds OrderCreatedFromRecurringOrderMessage without checking for non-null required values + * @return OrderCreatedFromRecurringOrderMessage + */ + public OrderCreatedFromRecurringOrderMessage buildUnchecked() { + return new OrderCreatedFromRecurringOrderMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, order, + recurringOrderRef); + } + + /** + * factory method for an instance of OrderCreatedFromRecurringOrderMessageBuilder + * @return builder + */ + public static OrderCreatedFromRecurringOrderMessageBuilder of() { + return new OrderCreatedFromRecurringOrderMessageBuilder(); + } + + /** + * create builder for OrderCreatedFromRecurringOrderMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderCreatedFromRecurringOrderMessageBuilder of( + final OrderCreatedFromRecurringOrderMessage template) { + OrderCreatedFromRecurringOrderMessageBuilder builder = new OrderCreatedFromRecurringOrderMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.order = template.getOrder(); + builder.recurringOrderRef = template.getRecurringOrderRef(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessageImpl.java new file mode 100644 index 00000000000..99abe6b4e59 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessageImpl.java @@ -0,0 +1,322 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after an Order is successfully created according to the defined schedule of a Recurring Order.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderCreatedFromRecurringOrderMessageImpl implements OrderCreatedFromRecurringOrderMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.order.Order order; + + private com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrderRef; + + /** + * create instance with all properties + */ + @JsonCreator + OrderCreatedFromRecurringOrderMessageImpl(@JsonProperty("id") final String id, + @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("order") final com.commercetools.api.models.order.Order order, + @JsonProperty("recurringOrderRef") final com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrderRef) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.order = order; + this.recurringOrderRef = recurringOrderRef; + this.type = ORDER_CREATED_FROM_RECURRING_ORDER; + } + + /** + * create empty instance + */ + public OrderCreatedFromRecurringOrderMessageImpl() { + this.type = ORDER_CREATED_FROM_RECURRING_ORDER; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      Message Type of the Message.

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

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      Order that was created.

      + */ + + public com.commercetools.api.models.order.Order getOrder() { + return this.order; + } + + /** + *

      Reference to the origin Recurring Order.

      + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderReference getRecurringOrderRef() { + return this.recurringOrderRef; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setOrder(final com.commercetools.api.models.order.Order order) { + this.order = order; + } + + public void setRecurringOrderRef( + final com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrderRef) { + this.recurringOrderRef = recurringOrderRef; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + OrderCreatedFromRecurringOrderMessageImpl that = (OrderCreatedFromRecurringOrderMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(order, that.order) + .append(recurringOrderRef, that.recurringOrderRef) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(order, that.order) + .append(recurringOrderRef, that.recurringOrderRef) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(order) + .append(recurringOrderRef) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("order", order) + .append("recurringOrderRef", recurringOrderRef) + .build(); + } + + @Override + public OrderCreatedFromRecurringOrderMessage copyDeep() { + return OrderCreatedFromRecurringOrderMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessagePayload.java new file mode 100644 index 00000000000..2043c988f75 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessagePayload.java @@ -0,0 +1,158 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.order.Order; +import com.commercetools.api.models.recurring_order.RecurringOrderReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Generated after an Order is successfully created according to the defined schedule of a Recurring Order.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     OrderCreatedFromRecurringOrderMessagePayload orderCreatedFromRecurringOrderMessagePayload = OrderCreatedFromRecurringOrderMessagePayload.builder()
      + *             .order(orderBuilder -> orderBuilder)
      + *             .recurringOrderRef(recurringOrderRefBuilder -> recurringOrderRefBuilder)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("OrderCreatedFromRecurringOrder") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = OrderCreatedFromRecurringOrderMessagePayloadImpl.class) +public interface OrderCreatedFromRecurringOrderMessagePayload extends OrderMessagePayload { + + /** + * discriminator value for OrderCreatedFromRecurringOrderMessagePayload + */ + String ORDER_CREATED_FROM_RECURRING_ORDER = "OrderCreatedFromRecurringOrder"; + + /** + *

      Order that was created.

      + * @return order + */ + @NotNull + @Valid + @JsonProperty("order") + public Order getOrder(); + + /** + *

      Reference to the origin Recurring Order.

      + * @return recurringOrderRef + */ + @NotNull + @Valid + @JsonProperty("recurringOrderRef") + public RecurringOrderReference getRecurringOrderRef(); + + /** + *

      Order that was created.

      + * @param order value to be set + */ + + public void setOrder(final Order order); + + /** + *

      Reference to the origin Recurring Order.

      + * @param recurringOrderRef value to be set + */ + + public void setRecurringOrderRef(final RecurringOrderReference recurringOrderRef); + + /** + * factory method + * @return instance of OrderCreatedFromRecurringOrderMessagePayload + */ + public static OrderCreatedFromRecurringOrderMessagePayload of() { + return new OrderCreatedFromRecurringOrderMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy OrderCreatedFromRecurringOrderMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static OrderCreatedFromRecurringOrderMessagePayload of( + final OrderCreatedFromRecurringOrderMessagePayload template) { + OrderCreatedFromRecurringOrderMessagePayloadImpl instance = new OrderCreatedFromRecurringOrderMessagePayloadImpl(); + instance.setOrder(template.getOrder()); + instance.setRecurringOrderRef(template.getRecurringOrderRef()); + return instance; + } + + public OrderCreatedFromRecurringOrderMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of OrderCreatedFromRecurringOrderMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static OrderCreatedFromRecurringOrderMessagePayload deepCopy( + @Nullable final OrderCreatedFromRecurringOrderMessagePayload template) { + if (template == null) { + return null; + } + OrderCreatedFromRecurringOrderMessagePayloadImpl instance = new OrderCreatedFromRecurringOrderMessagePayloadImpl(); + instance.setOrder(com.commercetools.api.models.order.Order.deepCopy(template.getOrder())); + instance.setRecurringOrderRef(com.commercetools.api.models.recurring_order.RecurringOrderReference + .deepCopy(template.getRecurringOrderRef())); + return instance; + } + + /** + * builder factory method for OrderCreatedFromRecurringOrderMessagePayload + * @return builder + */ + public static OrderCreatedFromRecurringOrderMessagePayloadBuilder builder() { + return OrderCreatedFromRecurringOrderMessagePayloadBuilder.of(); + } + + /** + * create builder for OrderCreatedFromRecurringOrderMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderCreatedFromRecurringOrderMessagePayloadBuilder builder( + final OrderCreatedFromRecurringOrderMessagePayload template) { + return OrderCreatedFromRecurringOrderMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withOrderCreatedFromRecurringOrderMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessagePayloadBuilder.java new file mode 100644 index 00000000000..a48b0a2e4c7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessagePayloadBuilder.java @@ -0,0 +1,164 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * OrderCreatedFromRecurringOrderMessagePayloadBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     OrderCreatedFromRecurringOrderMessagePayload orderCreatedFromRecurringOrderMessagePayload = OrderCreatedFromRecurringOrderMessagePayload.builder()
      + *             .order(orderBuilder -> orderBuilder)
      + *             .recurringOrderRef(recurringOrderRefBuilder -> recurringOrderRefBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderCreatedFromRecurringOrderMessagePayloadBuilder + implements Builder { + + private com.commercetools.api.models.order.Order order; + + private com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrderRef; + + /** + *

      Order that was created.

      + * @param builder function to build the order value + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessagePayloadBuilder order( + Function builder) { + this.order = builder.apply(com.commercetools.api.models.order.OrderBuilder.of()).build(); + return this; + } + + /** + *

      Order that was created.

      + * @param builder function to build the order value + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessagePayloadBuilder withOrder( + Function builder) { + this.order = builder.apply(com.commercetools.api.models.order.OrderBuilder.of()); + return this; + } + + /** + *

      Order that was created.

      + * @param order value to be set + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessagePayloadBuilder order( + final com.commercetools.api.models.order.Order order) { + this.order = order; + return this; + } + + /** + *

      Reference to the origin Recurring Order.

      + * @param builder function to build the recurringOrderRef value + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessagePayloadBuilder recurringOrderRef( + Function builder) { + this.recurringOrderRef = builder + .apply(com.commercetools.api.models.recurring_order.RecurringOrderReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

      Reference to the origin Recurring Order.

      + * @param builder function to build the recurringOrderRef value + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessagePayloadBuilder withRecurringOrderRef( + Function builder) { + this.recurringOrderRef = builder + .apply(com.commercetools.api.models.recurring_order.RecurringOrderReferenceBuilder.of()); + return this; + } + + /** + *

      Reference to the origin Recurring Order.

      + * @param recurringOrderRef value to be set + * @return Builder + */ + + public OrderCreatedFromRecurringOrderMessagePayloadBuilder recurringOrderRef( + final com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrderRef) { + this.recurringOrderRef = recurringOrderRef; + return this; + } + + /** + *

      Order that was created.

      + * @return order + */ + + public com.commercetools.api.models.order.Order getOrder() { + return this.order; + } + + /** + *

      Reference to the origin Recurring Order.

      + * @return recurringOrderRef + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderReference getRecurringOrderRef() { + return this.recurringOrderRef; + } + + /** + * builds OrderCreatedFromRecurringOrderMessagePayload with checking for non-null required values + * @return OrderCreatedFromRecurringOrderMessagePayload + */ + public OrderCreatedFromRecurringOrderMessagePayload build() { + Objects.requireNonNull(order, OrderCreatedFromRecurringOrderMessagePayload.class + ": order is missing"); + Objects.requireNonNull(recurringOrderRef, + OrderCreatedFromRecurringOrderMessagePayload.class + ": recurringOrderRef is missing"); + return new OrderCreatedFromRecurringOrderMessagePayloadImpl(order, recurringOrderRef); + } + + /** + * builds OrderCreatedFromRecurringOrderMessagePayload without checking for non-null required values + * @return OrderCreatedFromRecurringOrderMessagePayload + */ + public OrderCreatedFromRecurringOrderMessagePayload buildUnchecked() { + return new OrderCreatedFromRecurringOrderMessagePayloadImpl(order, recurringOrderRef); + } + + /** + * factory method for an instance of OrderCreatedFromRecurringOrderMessagePayloadBuilder + * @return builder + */ + public static OrderCreatedFromRecurringOrderMessagePayloadBuilder of() { + return new OrderCreatedFromRecurringOrderMessagePayloadBuilder(); + } + + /** + * create builder for OrderCreatedFromRecurringOrderMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderCreatedFromRecurringOrderMessagePayloadBuilder of( + final OrderCreatedFromRecurringOrderMessagePayload template) { + OrderCreatedFromRecurringOrderMessagePayloadBuilder builder = new OrderCreatedFromRecurringOrderMessagePayloadBuilder(); + builder.order = template.getOrder(); + builder.recurringOrderRef = template.getRecurringOrderRef(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessagePayloadImpl.java new file mode 100644 index 00000000000..3476d2776f8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessagePayloadImpl.java @@ -0,0 +1,120 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after an Order is successfully created according to the defined schedule of a Recurring Order.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderCreatedFromRecurringOrderMessagePayloadImpl + implements OrderCreatedFromRecurringOrderMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.order.Order order; + + private com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrderRef; + + /** + * create instance with all properties + */ + @JsonCreator + OrderCreatedFromRecurringOrderMessagePayloadImpl( + @JsonProperty("order") final com.commercetools.api.models.order.Order order, + @JsonProperty("recurringOrderRef") final com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrderRef) { + this.order = order; + this.recurringOrderRef = recurringOrderRef; + this.type = ORDER_CREATED_FROM_RECURRING_ORDER; + } + + /** + * create empty instance + */ + public OrderCreatedFromRecurringOrderMessagePayloadImpl() { + this.type = ORDER_CREATED_FROM_RECURRING_ORDER; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      Order that was created.

      + */ + + public com.commercetools.api.models.order.Order getOrder() { + return this.order; + } + + /** + *

      Reference to the origin Recurring Order.

      + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderReference getRecurringOrderRef() { + return this.recurringOrderRef; + } + + public void setOrder(final com.commercetools.api.models.order.Order order) { + this.order = order; + } + + public void setRecurringOrderRef( + final com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrderRef) { + this.recurringOrderRef = recurringOrderRef; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + OrderCreatedFromRecurringOrderMessagePayloadImpl that = (OrderCreatedFromRecurringOrderMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(order, that.order) + .append(recurringOrderRef, that.recurringOrderRef) + .append(type, that.type) + .append(order, that.order) + .append(recurringOrderRef, that.recurringOrderRef) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(order).append(recurringOrderRef).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("order", order) + .append("recurringOrderRef", recurringOrderRef) + .build(); + } + + @Override + public OrderCreatedFromRecurringOrderMessagePayload copyDeep() { + return OrderCreatedFromRecurringOrderMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessage.java new file mode 100644 index 00000000000..0829914c568 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessage.java @@ -0,0 +1,162 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.recurring_order.RecurringOrder; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Generated after a successful Create RecurringOrder request.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCreatedMessage recurringOrderCreatedMessage = RecurringOrderCreatedMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .order(orderBuilder -> orderBuilder)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderCreated") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderCreatedMessageImpl.class) +public interface RecurringOrderCreatedMessage extends Message { + + /** + * discriminator value for RecurringOrderCreatedMessage + */ + String RECURRING_ORDER_CREATED = "RecurringOrderCreated"; + + /** + *

      RecurringOrder that was created.

      + * @return order + */ + @NotNull + @Valid + @JsonProperty("order") + public RecurringOrder getOrder(); + + /** + *

      RecurringOrder that was created.

      + * @param order value to be set + */ + + public void setOrder(final RecurringOrder order); + + /** + * factory method + * @return instance of RecurringOrderCreatedMessage + */ + public static RecurringOrderCreatedMessage of() { + return new RecurringOrderCreatedMessageImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderCreatedMessage + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderCreatedMessage of(final RecurringOrderCreatedMessage template) { + RecurringOrderCreatedMessageImpl instance = new RecurringOrderCreatedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setOrder(template.getOrder()); + return instance; + } + + public RecurringOrderCreatedMessage copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderCreatedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderCreatedMessage deepCopy(@Nullable final RecurringOrderCreatedMessage template) { + if (template == null) { + return null; + } + RecurringOrderCreatedMessageImpl instance = new RecurringOrderCreatedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setOrder(com.commercetools.api.models.recurring_order.RecurringOrder.deepCopy(template.getOrder())); + return instance; + } + + /** + * builder factory method for RecurringOrderCreatedMessage + * @return builder + */ + public static RecurringOrderCreatedMessageBuilder builder() { + return RecurringOrderCreatedMessageBuilder.of(); + } + + /** + * create builder for RecurringOrderCreatedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCreatedMessageBuilder builder(final RecurringOrderCreatedMessage template) { + return RecurringOrderCreatedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderCreatedMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessageBuilder.java new file mode 100644 index 00000000000..5ba5d10b16e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessageBuilder.java @@ -0,0 +1,452 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderCreatedMessageBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCreatedMessage recurringOrderCreatedMessage = RecurringOrderCreatedMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .order(orderBuilder -> orderBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCreatedMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.recurring_order.RecurringOrder order; + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @param id value to be set + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @param version value to be set + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @param createdAt value to be set + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

      Value of createdAt.

      + * @param lastModifiedAt value to be set + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param lastModifiedBy value to be set + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param createdBy value to be set + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @param sequenceNumber value to be set + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param resource value to be set + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder resource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param builder function to build the resource value + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @param resourceVersion value to be set + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

      RecurringOrder that was created.

      + * @param builder function to build the order value + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder order( + Function builder) { + this.order = builder.apply(com.commercetools.api.models.recurring_order.RecurringOrderBuilder.of()).build(); + return this; + } + + /** + *

      RecurringOrder that was created.

      + * @param builder function to build the order value + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder withOrder( + Function builder) { + this.order = builder.apply(com.commercetools.api.models.recurring_order.RecurringOrderBuilder.of()); + return this; + } + + /** + *

      RecurringOrder that was created.

      + * @param order value to be set + * @return Builder + */ + + public RecurringOrderCreatedMessageBuilder order( + final com.commercetools.api.models.recurring_order.RecurringOrder order) { + this.order = order; + return this; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      RecurringOrder that was created.

      + * @return order + */ + + public com.commercetools.api.models.recurring_order.RecurringOrder getOrder() { + return this.order; + } + + /** + * builds RecurringOrderCreatedMessage with checking for non-null required values + * @return RecurringOrderCreatedMessage + */ + public RecurringOrderCreatedMessage build() { + Objects.requireNonNull(id, RecurringOrderCreatedMessage.class + ": id is missing"); + Objects.requireNonNull(version, RecurringOrderCreatedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, RecurringOrderCreatedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, RecurringOrderCreatedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, RecurringOrderCreatedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, RecurringOrderCreatedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, RecurringOrderCreatedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(order, RecurringOrderCreatedMessage.class + ": order is missing"); + return new RecurringOrderCreatedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, order); + } + + /** + * builds RecurringOrderCreatedMessage without checking for non-null required values + * @return RecurringOrderCreatedMessage + */ + public RecurringOrderCreatedMessage buildUnchecked() { + return new RecurringOrderCreatedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, order); + } + + /** + * factory method for an instance of RecurringOrderCreatedMessageBuilder + * @return builder + */ + public static RecurringOrderCreatedMessageBuilder of() { + return new RecurringOrderCreatedMessageBuilder(); + } + + /** + * create builder for RecurringOrderCreatedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCreatedMessageBuilder of(final RecurringOrderCreatedMessage template) { + RecurringOrderCreatedMessageBuilder builder = new RecurringOrderCreatedMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.order = template.getOrder(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessageImpl.java new file mode 100644 index 00000000000..76acbd86dd6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessageImpl.java @@ -0,0 +1,300 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Create RecurringOrder request.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCreatedMessageImpl implements RecurringOrderCreatedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.recurring_order.RecurringOrder order; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderCreatedMessageImpl(@JsonProperty("id") final String id, @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("order") final com.commercetools.api.models.recurring_order.RecurringOrder order) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.order = order; + this.type = RECURRING_ORDER_CREATED; + } + + /** + * create empty instance + */ + public RecurringOrderCreatedMessageImpl() { + this.type = RECURRING_ORDER_CREATED; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      Message Type of the Message.

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

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      RecurringOrder that was created.

      + */ + + public com.commercetools.api.models.recurring_order.RecurringOrder getOrder() { + return this.order; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setOrder(final com.commercetools.api.models.recurring_order.RecurringOrder order) { + this.order = order; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderCreatedMessageImpl that = (RecurringOrderCreatedMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(order, that.order) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(order, that.order) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(order) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("order", order) + .build(); + } + + @Override + public RecurringOrderCreatedMessage copyDeep() { + return RecurringOrderCreatedMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessagePayload.java new file mode 100644 index 00000000000..6982c379dba --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessagePayload.java @@ -0,0 +1,135 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.recurring_order.RecurringOrder; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Generated after a successful Create RecurringOrder request.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCreatedMessagePayload recurringOrderCreatedMessagePayload = RecurringOrderCreatedMessagePayload.builder()
      + *             .order(orderBuilder -> orderBuilder)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderCreated") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderCreatedMessagePayloadImpl.class) +public interface RecurringOrderCreatedMessagePayload extends MessagePayload { + + /** + * discriminator value for RecurringOrderCreatedMessagePayload + */ + String RECURRING_ORDER_CREATED = "RecurringOrderCreated"; + + /** + *

      RecurringOrder that was created.

      + * @return order + */ + @NotNull + @Valid + @JsonProperty("order") + public RecurringOrder getOrder(); + + /** + *

      RecurringOrder that was created.

      + * @param order value to be set + */ + + public void setOrder(final RecurringOrder order); + + /** + * factory method + * @return instance of RecurringOrderCreatedMessagePayload + */ + public static RecurringOrderCreatedMessagePayload of() { + return new RecurringOrderCreatedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderCreatedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderCreatedMessagePayload of(final RecurringOrderCreatedMessagePayload template) { + RecurringOrderCreatedMessagePayloadImpl instance = new RecurringOrderCreatedMessagePayloadImpl(); + instance.setOrder(template.getOrder()); + return instance; + } + + public RecurringOrderCreatedMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderCreatedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderCreatedMessagePayload deepCopy( + @Nullable final RecurringOrderCreatedMessagePayload template) { + if (template == null) { + return null; + } + RecurringOrderCreatedMessagePayloadImpl instance = new RecurringOrderCreatedMessagePayloadImpl(); + instance.setOrder(com.commercetools.api.models.recurring_order.RecurringOrder.deepCopy(template.getOrder())); + return instance; + } + + /** + * builder factory method for RecurringOrderCreatedMessagePayload + * @return builder + */ + public static RecurringOrderCreatedMessagePayloadBuilder builder() { + return RecurringOrderCreatedMessagePayloadBuilder.of(); + } + + /** + * create builder for RecurringOrderCreatedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCreatedMessagePayloadBuilder builder( + final RecurringOrderCreatedMessagePayload template) { + return RecurringOrderCreatedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderCreatedMessagePayload(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessagePayloadBuilder.java new file mode 100644 index 00000000000..15072886829 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessagePayloadBuilder.java @@ -0,0 +1,108 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderCreatedMessagePayloadBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCreatedMessagePayload recurringOrderCreatedMessagePayload = RecurringOrderCreatedMessagePayload.builder()
      + *             .order(orderBuilder -> orderBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCreatedMessagePayloadBuilder implements Builder { + + private com.commercetools.api.models.recurring_order.RecurringOrder order; + + /** + *

      RecurringOrder that was created.

      + * @param builder function to build the order value + * @return Builder + */ + + public RecurringOrderCreatedMessagePayloadBuilder order( + Function builder) { + this.order = builder.apply(com.commercetools.api.models.recurring_order.RecurringOrderBuilder.of()).build(); + return this; + } + + /** + *

      RecurringOrder that was created.

      + * @param builder function to build the order value + * @return Builder + */ + + public RecurringOrderCreatedMessagePayloadBuilder withOrder( + Function builder) { + this.order = builder.apply(com.commercetools.api.models.recurring_order.RecurringOrderBuilder.of()); + return this; + } + + /** + *

      RecurringOrder that was created.

      + * @param order value to be set + * @return Builder + */ + + public RecurringOrderCreatedMessagePayloadBuilder order( + final com.commercetools.api.models.recurring_order.RecurringOrder order) { + this.order = order; + return this; + } + + /** + *

      RecurringOrder that was created.

      + * @return order + */ + + public com.commercetools.api.models.recurring_order.RecurringOrder getOrder() { + return this.order; + } + + /** + * builds RecurringOrderCreatedMessagePayload with checking for non-null required values + * @return RecurringOrderCreatedMessagePayload + */ + public RecurringOrderCreatedMessagePayload build() { + Objects.requireNonNull(order, RecurringOrderCreatedMessagePayload.class + ": order is missing"); + return new RecurringOrderCreatedMessagePayloadImpl(order); + } + + /** + * builds RecurringOrderCreatedMessagePayload without checking for non-null required values + * @return RecurringOrderCreatedMessagePayload + */ + public RecurringOrderCreatedMessagePayload buildUnchecked() { + return new RecurringOrderCreatedMessagePayloadImpl(order); + } + + /** + * factory method for an instance of RecurringOrderCreatedMessagePayloadBuilder + * @return builder + */ + public static RecurringOrderCreatedMessagePayloadBuilder of() { + return new RecurringOrderCreatedMessagePayloadBuilder(); + } + + /** + * create builder for RecurringOrderCreatedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCreatedMessagePayloadBuilder of(final RecurringOrderCreatedMessagePayload template) { + RecurringOrderCreatedMessagePayloadBuilder builder = new RecurringOrderCreatedMessagePayloadBuilder(); + builder.order = template.getOrder(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessagePayloadImpl.java new file mode 100644 index 00000000000..8870931aca8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessagePayloadImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Create RecurringOrder request.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCreatedMessagePayloadImpl implements RecurringOrderCreatedMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.recurring_order.RecurringOrder order; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderCreatedMessagePayloadImpl( + @JsonProperty("order") final com.commercetools.api.models.recurring_order.RecurringOrder order) { + this.order = order; + this.type = RECURRING_ORDER_CREATED; + } + + /** + * create empty instance + */ + public RecurringOrderCreatedMessagePayloadImpl() { + this.type = RECURRING_ORDER_CREATED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      RecurringOrder that was created.

      + */ + + public com.commercetools.api.models.recurring_order.RecurringOrder getOrder() { + return this.order; + } + + public void setOrder(final com.commercetools.api.models.recurring_order.RecurringOrder order) { + this.order = order; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderCreatedMessagePayloadImpl that = (RecurringOrderCreatedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(order, that.order) + .append(type, that.type) + .append(order, that.order) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(order).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("order", order) + .build(); + } + + @Override + public RecurringOrderCreatedMessagePayload copyDeep() { + return RecurringOrderCreatedMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessage.java new file mode 100644 index 00000000000..8f33366926b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessage.java @@ -0,0 +1,178 @@ + +package com.commercetools.api.models.message; + +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; + +/** + *

      Generated after adding a Custom Field using the Set CustomField.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomFieldAddedMessage recurringOrderCustomFieldAddedMessage = RecurringOrderCustomFieldAddedMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .name("{name}")
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderCustomFieldAdded") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderCustomFieldAddedMessageImpl.class) +public interface RecurringOrderCustomFieldAddedMessage extends Message { + + /** + * discriminator value for RecurringOrderCustomFieldAddedMessage + */ + String RECURRING_ORDER_CUSTOM_FIELD_ADDED = "RecurringOrderCustomFieldAdded"; + + /** + *

      Name of the Custom Field that was added.

      + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

      The added CustomFieldValue based on the FieldType.

      + * @return value + */ + @NotNull + @JsonProperty("value") + public Object getValue(); + + /** + *

      Name of the Custom Field that was added.

      + * @param name value to be set + */ + + public void setName(final String name); + + /** + *

      The added CustomFieldValue based on the FieldType.

      + * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * factory method + * @return instance of RecurringOrderCustomFieldAddedMessage + */ + public static RecurringOrderCustomFieldAddedMessage of() { + return new RecurringOrderCustomFieldAddedMessageImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderCustomFieldAddedMessage + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderCustomFieldAddedMessage of(final RecurringOrderCustomFieldAddedMessage template) { + RecurringOrderCustomFieldAddedMessageImpl instance = new RecurringOrderCustomFieldAddedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + public RecurringOrderCustomFieldAddedMessage copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderCustomFieldAddedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderCustomFieldAddedMessage deepCopy( + @Nullable final RecurringOrderCustomFieldAddedMessage template) { + if (template == null) { + return null; + } + RecurringOrderCustomFieldAddedMessageImpl instance = new RecurringOrderCustomFieldAddedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * builder factory method for RecurringOrderCustomFieldAddedMessage + * @return builder + */ + public static RecurringOrderCustomFieldAddedMessageBuilder builder() { + return RecurringOrderCustomFieldAddedMessageBuilder.of(); + } + + /** + * create builder for RecurringOrderCustomFieldAddedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomFieldAddedMessageBuilder builder( + final RecurringOrderCustomFieldAddedMessage template) { + return RecurringOrderCustomFieldAddedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderCustomFieldAddedMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessageBuilder.java new file mode 100644 index 00000000000..41e04dae7c0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessageBuilder.java @@ -0,0 +1,456 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderCustomFieldAddedMessageBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomFieldAddedMessage recurringOrderCustomFieldAddedMessage = RecurringOrderCustomFieldAddedMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .name("{name}")
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomFieldAddedMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String name; + + private java.lang.Object value; + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @param id value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @param version value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @param createdAt value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

      Value of createdAt.

      + * @param lastModifiedAt value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param lastModifiedBy value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param createdBy value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @param sequenceNumber value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param resource value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder resource( + final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param builder function to build the resource value + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @param resourceVersion value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

      Name of the Custom Field that was added.

      + * @param name value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *

      The added CustomFieldValue based on the FieldType.

      + * @param value value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessageBuilder value(final java.lang.Object value) { + this.value = value; + return this; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      Name of the Custom Field that was added.

      + * @return name + */ + + public String getName() { + return this.name; + } + + /** + *

      The added CustomFieldValue based on the FieldType.

      + * @return value + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + * builds RecurringOrderCustomFieldAddedMessage with checking for non-null required values + * @return RecurringOrderCustomFieldAddedMessage + */ + public RecurringOrderCustomFieldAddedMessage build() { + Objects.requireNonNull(id, RecurringOrderCustomFieldAddedMessage.class + ": id is missing"); + Objects.requireNonNull(version, RecurringOrderCustomFieldAddedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, RecurringOrderCustomFieldAddedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + RecurringOrderCustomFieldAddedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + RecurringOrderCustomFieldAddedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, RecurringOrderCustomFieldAddedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + RecurringOrderCustomFieldAddedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(name, RecurringOrderCustomFieldAddedMessage.class + ": name is missing"); + Objects.requireNonNull(value, RecurringOrderCustomFieldAddedMessage.class + ": value is missing"); + return new RecurringOrderCustomFieldAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, name, value); + } + + /** + * builds RecurringOrderCustomFieldAddedMessage without checking for non-null required values + * @return RecurringOrderCustomFieldAddedMessage + */ + public RecurringOrderCustomFieldAddedMessage buildUnchecked() { + return new RecurringOrderCustomFieldAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, name, value); + } + + /** + * factory method for an instance of RecurringOrderCustomFieldAddedMessageBuilder + * @return builder + */ + public static RecurringOrderCustomFieldAddedMessageBuilder of() { + return new RecurringOrderCustomFieldAddedMessageBuilder(); + } + + /** + * create builder for RecurringOrderCustomFieldAddedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomFieldAddedMessageBuilder of( + final RecurringOrderCustomFieldAddedMessage template) { + RecurringOrderCustomFieldAddedMessageBuilder builder = new RecurringOrderCustomFieldAddedMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.name = template.getName(); + builder.value = template.getValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessageImpl.java new file mode 100644 index 00000000000..9153b6bde22 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessageImpl.java @@ -0,0 +1,320 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after adding a Custom Field using the Set CustomField.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomFieldAddedMessageImpl implements RecurringOrderCustomFieldAddedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String name; + + private java.lang.Object value; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderCustomFieldAddedMessageImpl(@JsonProperty("id") final String id, + @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("name") final String name, @JsonProperty("value") final java.lang.Object value) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.name = name; + this.value = value; + this.type = RECURRING_ORDER_CUSTOM_FIELD_ADDED; + } + + /** + * create empty instance + */ + public RecurringOrderCustomFieldAddedMessageImpl() { + this.type = RECURRING_ORDER_CUSTOM_FIELD_ADDED; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      Message Type of the Message.

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

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      Name of the Custom Field that was added.

      + */ + + public String getName() { + return this.name; + } + + /** + *

      The added CustomFieldValue based on the FieldType.

      + */ + + public java.lang.Object getValue() { + return this.value; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setName(final String name) { + this.name = name; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderCustomFieldAddedMessageImpl that = (RecurringOrderCustomFieldAddedMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(name, that.name) + .append(value, that.value) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(name, that.name) + .append(value, that.value) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(name) + .append(value) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("name", name) + .append("value", value) + .build(); + } + + @Override + public RecurringOrderCustomFieldAddedMessage copyDeep() { + return RecurringOrderCustomFieldAddedMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessagePayload.java new file mode 100644 index 00000000000..2da81448ca5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessagePayload.java @@ -0,0 +1,151 @@ + +package com.commercetools.api.models.message; + +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; + +/** + *

      Generated after adding a Custom Field using the Set CustomField.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomFieldAddedMessagePayload recurringOrderCustomFieldAddedMessagePayload = RecurringOrderCustomFieldAddedMessagePayload.builder()
      + *             .name("{name}")
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderCustomFieldAdded") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderCustomFieldAddedMessagePayloadImpl.class) +public interface RecurringOrderCustomFieldAddedMessagePayload extends MessagePayload { + + /** + * discriminator value for RecurringOrderCustomFieldAddedMessagePayload + */ + String RECURRING_ORDER_CUSTOM_FIELD_ADDED = "RecurringOrderCustomFieldAdded"; + + /** + *

      Name of the Custom Field that was added.

      + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

      The added CustomFieldValue based on the FieldType.

      + * @return value + */ + @NotNull + @JsonProperty("value") + public Object getValue(); + + /** + *

      Name of the Custom Field that was added.

      + * @param name value to be set + */ + + public void setName(final String name); + + /** + *

      The added CustomFieldValue based on the FieldType.

      + * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * factory method + * @return instance of RecurringOrderCustomFieldAddedMessagePayload + */ + public static RecurringOrderCustomFieldAddedMessagePayload of() { + return new RecurringOrderCustomFieldAddedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderCustomFieldAddedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderCustomFieldAddedMessagePayload of( + final RecurringOrderCustomFieldAddedMessagePayload template) { + RecurringOrderCustomFieldAddedMessagePayloadImpl instance = new RecurringOrderCustomFieldAddedMessagePayloadImpl(); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + public RecurringOrderCustomFieldAddedMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderCustomFieldAddedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderCustomFieldAddedMessagePayload deepCopy( + @Nullable final RecurringOrderCustomFieldAddedMessagePayload template) { + if (template == null) { + return null; + } + RecurringOrderCustomFieldAddedMessagePayloadImpl instance = new RecurringOrderCustomFieldAddedMessagePayloadImpl(); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * builder factory method for RecurringOrderCustomFieldAddedMessagePayload + * @return builder + */ + public static RecurringOrderCustomFieldAddedMessagePayloadBuilder builder() { + return RecurringOrderCustomFieldAddedMessagePayloadBuilder.of(); + } + + /** + * create builder for RecurringOrderCustomFieldAddedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomFieldAddedMessagePayloadBuilder builder( + final RecurringOrderCustomFieldAddedMessagePayload template) { + return RecurringOrderCustomFieldAddedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderCustomFieldAddedMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessagePayloadBuilder.java new file mode 100644 index 00000000000..89ecf37d31a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessagePayloadBuilder.java @@ -0,0 +1,108 @@ + +package com.commercetools.api.models.message; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderCustomFieldAddedMessagePayloadBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomFieldAddedMessagePayload recurringOrderCustomFieldAddedMessagePayload = RecurringOrderCustomFieldAddedMessagePayload.builder()
      + *             .name("{name}")
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomFieldAddedMessagePayloadBuilder + implements Builder { + + private String name; + + private java.lang.Object value; + + /** + *

      Name of the Custom Field that was added.

      + * @param name value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessagePayloadBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *

      The added CustomFieldValue based on the FieldType.

      + * @param value value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldAddedMessagePayloadBuilder value(final java.lang.Object value) { + this.value = value; + return this; + } + + /** + *

      Name of the Custom Field that was added.

      + * @return name + */ + + public String getName() { + return this.name; + } + + /** + *

      The added CustomFieldValue based on the FieldType.

      + * @return value + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + * builds RecurringOrderCustomFieldAddedMessagePayload with checking for non-null required values + * @return RecurringOrderCustomFieldAddedMessagePayload + */ + public RecurringOrderCustomFieldAddedMessagePayload build() { + Objects.requireNonNull(name, RecurringOrderCustomFieldAddedMessagePayload.class + ": name is missing"); + Objects.requireNonNull(value, RecurringOrderCustomFieldAddedMessagePayload.class + ": value is missing"); + return new RecurringOrderCustomFieldAddedMessagePayloadImpl(name, value); + } + + /** + * builds RecurringOrderCustomFieldAddedMessagePayload without checking for non-null required values + * @return RecurringOrderCustomFieldAddedMessagePayload + */ + public RecurringOrderCustomFieldAddedMessagePayload buildUnchecked() { + return new RecurringOrderCustomFieldAddedMessagePayloadImpl(name, value); + } + + /** + * factory method for an instance of RecurringOrderCustomFieldAddedMessagePayloadBuilder + * @return builder + */ + public static RecurringOrderCustomFieldAddedMessagePayloadBuilder of() { + return new RecurringOrderCustomFieldAddedMessagePayloadBuilder(); + } + + /** + * create builder for RecurringOrderCustomFieldAddedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomFieldAddedMessagePayloadBuilder of( + final RecurringOrderCustomFieldAddedMessagePayload template) { + RecurringOrderCustomFieldAddedMessagePayloadBuilder builder = new RecurringOrderCustomFieldAddedMessagePayloadBuilder(); + builder.name = template.getName(); + builder.value = template.getValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessagePayloadImpl.java new file mode 100644 index 00000000000..6a5ee558f35 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessagePayloadImpl.java @@ -0,0 +1,118 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after adding a Custom Field using the Set CustomField.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomFieldAddedMessagePayloadImpl + implements RecurringOrderCustomFieldAddedMessagePayload, ModelBase { + + private String type; + + private String name; + + private java.lang.Object value; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderCustomFieldAddedMessagePayloadImpl(@JsonProperty("name") final String name, + @JsonProperty("value") final java.lang.Object value) { + this.name = name; + this.value = value; + this.type = RECURRING_ORDER_CUSTOM_FIELD_ADDED; + } + + /** + * create empty instance + */ + public RecurringOrderCustomFieldAddedMessagePayloadImpl() { + this.type = RECURRING_ORDER_CUSTOM_FIELD_ADDED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      Name of the Custom Field that was added.

      + */ + + public String getName() { + return this.name; + } + + /** + *

      The added CustomFieldValue based on the FieldType.

      + */ + + public java.lang.Object getValue() { + return this.value; + } + + public void setName(final String name) { + this.name = name; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderCustomFieldAddedMessagePayloadImpl that = (RecurringOrderCustomFieldAddedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(name, that.name) + .append(value, that.value) + .append(type, that.type) + .append(name, that.name) + .append(value, that.value) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(name).append(value).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("name", name) + .append("value", value) + .build(); + } + + @Override + public RecurringOrderCustomFieldAddedMessagePayload copyDeep() { + return RecurringOrderCustomFieldAddedMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessage.java new file mode 100644 index 00000000000..9e1076d7277 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessage.java @@ -0,0 +1,196 @@ + +package com.commercetools.api.models.message; + +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; + +/** + *

      Generated when an existing Custom Field has been changed using the Set CustomField action.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomFieldChangedMessage recurringOrderCustomFieldChangedMessage = RecurringOrderCustomFieldChangedMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .name("{name}")
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderCustomFieldChanged") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderCustomFieldChangedMessageImpl.class) +public interface RecurringOrderCustomFieldChangedMessage extends Message { + + /** + * discriminator value for RecurringOrderCustomFieldChangedMessage + */ + String RECURRING_ORDER_CUSTOM_FIELD_CHANGED = "RecurringOrderCustomFieldChanged"; + + /** + *

      Name of the Custom Field that changed.

      + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

      CustomFieldValue based on the FieldType after the Set CustomField update action.

      + * @return value + */ + @NotNull + @JsonProperty("value") + public Object getValue(); + + /** + *

      CustomFieldValue based on the FieldType before the Set CustomField update action. When there has not been a Custom Field with the name on the Order before, an Order Custom Field Added Message is generated instead.

      + * @return previousValue + */ + + @JsonProperty("previousValue") + public Object getPreviousValue(); + + /** + *

      Name of the Custom Field that changed.

      + * @param name value to be set + */ + + public void setName(final String name); + + /** + *

      CustomFieldValue based on the FieldType after the Set CustomField update action.

      + * @param value value to be set + */ + + public void setValue(final Object value); + + /** + *

      CustomFieldValue based on the FieldType before the Set CustomField update action. When there has not been a Custom Field with the name on the Order before, an Order Custom Field Added Message is generated instead.

      + * @param previousValue value to be set + */ + + public void setPreviousValue(final Object previousValue); + + /** + * factory method + * @return instance of RecurringOrderCustomFieldChangedMessage + */ + public static RecurringOrderCustomFieldChangedMessage of() { + return new RecurringOrderCustomFieldChangedMessageImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderCustomFieldChangedMessage + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderCustomFieldChangedMessage of(final RecurringOrderCustomFieldChangedMessage template) { + RecurringOrderCustomFieldChangedMessageImpl instance = new RecurringOrderCustomFieldChangedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + instance.setPreviousValue(template.getPreviousValue()); + return instance; + } + + public RecurringOrderCustomFieldChangedMessage copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderCustomFieldChangedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderCustomFieldChangedMessage deepCopy( + @Nullable final RecurringOrderCustomFieldChangedMessage template) { + if (template == null) { + return null; + } + RecurringOrderCustomFieldChangedMessageImpl instance = new RecurringOrderCustomFieldChangedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + instance.setPreviousValue(template.getPreviousValue()); + return instance; + } + + /** + * builder factory method for RecurringOrderCustomFieldChangedMessage + * @return builder + */ + public static RecurringOrderCustomFieldChangedMessageBuilder builder() { + return RecurringOrderCustomFieldChangedMessageBuilder.of(); + } + + /** + * create builder for RecurringOrderCustomFieldChangedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomFieldChangedMessageBuilder builder( + final RecurringOrderCustomFieldChangedMessage template) { + return RecurringOrderCustomFieldChangedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderCustomFieldChangedMessage( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessageBuilder.java new file mode 100644 index 00000000000..d30161f6939 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessageBuilder.java @@ -0,0 +1,485 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderCustomFieldChangedMessageBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomFieldChangedMessage recurringOrderCustomFieldChangedMessage = RecurringOrderCustomFieldChangedMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .name("{name}")
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomFieldChangedMessageBuilder + implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String name; + + private java.lang.Object value; + + @Nullable + private java.lang.Object previousValue; + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @param id value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @param version value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @param createdAt value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

      Value of createdAt.

      + * @param lastModifiedAt value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param lastModifiedBy value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param createdBy value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @param sequenceNumber value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param resource value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder resource( + final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param builder function to build the resource value + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @param resourceVersion value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

      Name of the Custom Field that changed.

      + * @param name value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *

      CustomFieldValue based on the FieldType after the Set CustomField update action.

      + * @param value value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder value(final java.lang.Object value) { + this.value = value; + return this; + } + + /** + *

      CustomFieldValue based on the FieldType before the Set CustomField update action. When there has not been a Custom Field with the name on the Order before, an Order Custom Field Added Message is generated instead.

      + * @param previousValue value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessageBuilder previousValue( + @Nullable final java.lang.Object previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      Name of the Custom Field that changed.

      + * @return name + */ + + public String getName() { + return this.name; + } + + /** + *

      CustomFieldValue based on the FieldType after the Set CustomField update action.

      + * @return value + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + *

      CustomFieldValue based on the FieldType before the Set CustomField update action. When there has not been a Custom Field with the name on the Order before, an Order Custom Field Added Message is generated instead.

      + * @return previousValue + */ + + @Nullable + public java.lang.Object getPreviousValue() { + return this.previousValue; + } + + /** + * builds RecurringOrderCustomFieldChangedMessage with checking for non-null required values + * @return RecurringOrderCustomFieldChangedMessage + */ + public RecurringOrderCustomFieldChangedMessage build() { + Objects.requireNonNull(id, RecurringOrderCustomFieldChangedMessage.class + ": id is missing"); + Objects.requireNonNull(version, RecurringOrderCustomFieldChangedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, RecurringOrderCustomFieldChangedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + RecurringOrderCustomFieldChangedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + RecurringOrderCustomFieldChangedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, RecurringOrderCustomFieldChangedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + RecurringOrderCustomFieldChangedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(name, RecurringOrderCustomFieldChangedMessage.class + ": name is missing"); + Objects.requireNonNull(value, RecurringOrderCustomFieldChangedMessage.class + ": value is missing"); + return new RecurringOrderCustomFieldChangedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, name, value, + previousValue); + } + + /** + * builds RecurringOrderCustomFieldChangedMessage without checking for non-null required values + * @return RecurringOrderCustomFieldChangedMessage + */ + public RecurringOrderCustomFieldChangedMessage buildUnchecked() { + return new RecurringOrderCustomFieldChangedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, name, value, + previousValue); + } + + /** + * factory method for an instance of RecurringOrderCustomFieldChangedMessageBuilder + * @return builder + */ + public static RecurringOrderCustomFieldChangedMessageBuilder of() { + return new RecurringOrderCustomFieldChangedMessageBuilder(); + } + + /** + * create builder for RecurringOrderCustomFieldChangedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomFieldChangedMessageBuilder of( + final RecurringOrderCustomFieldChangedMessage template) { + RecurringOrderCustomFieldChangedMessageBuilder builder = new RecurringOrderCustomFieldChangedMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.name = template.getName(); + builder.value = template.getValue(); + builder.previousValue = template.getPreviousValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessageImpl.java new file mode 100644 index 00000000000..a37c57c8444 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessageImpl.java @@ -0,0 +1,340 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated when an existing Custom Field has been changed using the Set CustomField action.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomFieldChangedMessageImpl implements RecurringOrderCustomFieldChangedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String name; + + private java.lang.Object value; + + private java.lang.Object previousValue; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderCustomFieldChangedMessageImpl(@JsonProperty("id") final String id, + @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("name") final String name, @JsonProperty("value") final java.lang.Object value, + @JsonProperty("previousValue") final java.lang.Object previousValue) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.name = name; + this.value = value; + this.previousValue = previousValue; + this.type = RECURRING_ORDER_CUSTOM_FIELD_CHANGED; + } + + /** + * create empty instance + */ + public RecurringOrderCustomFieldChangedMessageImpl() { + this.type = RECURRING_ORDER_CUSTOM_FIELD_CHANGED; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      Message Type of the Message.

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

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      Name of the Custom Field that changed.

      + */ + + public String getName() { + return this.name; + } + + /** + *

      CustomFieldValue based on the FieldType after the Set CustomField update action.

      + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + *

      CustomFieldValue based on the FieldType before the Set CustomField update action. When there has not been a Custom Field with the name on the Order before, an Order Custom Field Added Message is generated instead.

      + */ + + public java.lang.Object getPreviousValue() { + return this.previousValue; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setName(final String name) { + this.name = name; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + public void setPreviousValue(final java.lang.Object previousValue) { + this.previousValue = previousValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderCustomFieldChangedMessageImpl that = (RecurringOrderCustomFieldChangedMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(name, that.name) + .append(value, that.value) + .append(previousValue, that.previousValue) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(name, that.name) + .append(value, that.value) + .append(previousValue, that.previousValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(name) + .append(value) + .append(previousValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("name", name) + .append("value", value) + .append("previousValue", previousValue) + .build(); + } + + @Override + public RecurringOrderCustomFieldChangedMessage copyDeep() { + return RecurringOrderCustomFieldChangedMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessagePayload.java new file mode 100644 index 00000000000..7e2a865f812 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessagePayload.java @@ -0,0 +1,168 @@ + +package com.commercetools.api.models.message; + +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; + +/** + *

      Generated when an existing Custom Field has been changed using the Set CustomField action.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomFieldChangedMessagePayload recurringOrderCustomFieldChangedMessagePayload = RecurringOrderCustomFieldChangedMessagePayload.builder()
      + *             .name("{name}")
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderCustomFieldChanged") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderCustomFieldChangedMessagePayloadImpl.class) +public interface RecurringOrderCustomFieldChangedMessagePayload extends MessagePayload { + + /** + * discriminator value for RecurringOrderCustomFieldChangedMessagePayload + */ + String RECURRING_ORDER_CUSTOM_FIELD_CHANGED = "RecurringOrderCustomFieldChanged"; + + /** + *

      Name of the Custom Field that changed.

      + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

      CustomFieldValue based on the FieldType after the Set CustomField update action.

      + * @return value + */ + @NotNull + @JsonProperty("value") + public Object getValue(); + + /** + *

      CustomFieldValue based on the FieldType before the Set CustomField update action. When there has not been a Custom Field with the name on the Order before, an Order Custom Field Added Message is generated instead.

      + * @return previousValue + */ + + @JsonProperty("previousValue") + public Object getPreviousValue(); + + /** + *

      Name of the Custom Field that changed.

      + * @param name value to be set + */ + + public void setName(final String name); + + /** + *

      CustomFieldValue based on the FieldType after the Set CustomField update action.

      + * @param value value to be set + */ + + public void setValue(final Object value); + + /** + *

      CustomFieldValue based on the FieldType before the Set CustomField update action. When there has not been a Custom Field with the name on the Order before, an Order Custom Field Added Message is generated instead.

      + * @param previousValue value to be set + */ + + public void setPreviousValue(final Object previousValue); + + /** + * factory method + * @return instance of RecurringOrderCustomFieldChangedMessagePayload + */ + public static RecurringOrderCustomFieldChangedMessagePayload of() { + return new RecurringOrderCustomFieldChangedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderCustomFieldChangedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderCustomFieldChangedMessagePayload of( + final RecurringOrderCustomFieldChangedMessagePayload template) { + RecurringOrderCustomFieldChangedMessagePayloadImpl instance = new RecurringOrderCustomFieldChangedMessagePayloadImpl(); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + instance.setPreviousValue(template.getPreviousValue()); + return instance; + } + + public RecurringOrderCustomFieldChangedMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderCustomFieldChangedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderCustomFieldChangedMessagePayload deepCopy( + @Nullable final RecurringOrderCustomFieldChangedMessagePayload template) { + if (template == null) { + return null; + } + RecurringOrderCustomFieldChangedMessagePayloadImpl instance = new RecurringOrderCustomFieldChangedMessagePayloadImpl(); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + instance.setPreviousValue(template.getPreviousValue()); + return instance; + } + + /** + * builder factory method for RecurringOrderCustomFieldChangedMessagePayload + * @return builder + */ + public static RecurringOrderCustomFieldChangedMessagePayloadBuilder builder() { + return RecurringOrderCustomFieldChangedMessagePayloadBuilder.of(); + } + + /** + * create builder for RecurringOrderCustomFieldChangedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomFieldChangedMessagePayloadBuilder builder( + final RecurringOrderCustomFieldChangedMessagePayload template) { + return RecurringOrderCustomFieldChangedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderCustomFieldChangedMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessagePayloadBuilder.java new file mode 100644 index 00000000000..2fb152ff279 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessagePayloadBuilder.java @@ -0,0 +1,136 @@ + +package com.commercetools.api.models.message; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderCustomFieldChangedMessagePayloadBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomFieldChangedMessagePayload recurringOrderCustomFieldChangedMessagePayload = RecurringOrderCustomFieldChangedMessagePayload.builder()
      + *             .name("{name}")
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomFieldChangedMessagePayloadBuilder + implements Builder { + + private String name; + + private java.lang.Object value; + + @Nullable + private java.lang.Object previousValue; + + /** + *

      Name of the Custom Field that changed.

      + * @param name value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessagePayloadBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *

      CustomFieldValue based on the FieldType after the Set CustomField update action.

      + * @param value value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessagePayloadBuilder value(final java.lang.Object value) { + this.value = value; + return this; + } + + /** + *

      CustomFieldValue based on the FieldType before the Set CustomField update action. When there has not been a Custom Field with the name on the Order before, an Order Custom Field Added Message is generated instead.

      + * @param previousValue value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldChangedMessagePayloadBuilder previousValue( + @Nullable final java.lang.Object previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

      Name of the Custom Field that changed.

      + * @return name + */ + + public String getName() { + return this.name; + } + + /** + *

      CustomFieldValue based on the FieldType after the Set CustomField update action.

      + * @return value + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + *

      CustomFieldValue based on the FieldType before the Set CustomField update action. When there has not been a Custom Field with the name on the Order before, an Order Custom Field Added Message is generated instead.

      + * @return previousValue + */ + + @Nullable + public java.lang.Object getPreviousValue() { + return this.previousValue; + } + + /** + * builds RecurringOrderCustomFieldChangedMessagePayload with checking for non-null required values + * @return RecurringOrderCustomFieldChangedMessagePayload + */ + public RecurringOrderCustomFieldChangedMessagePayload build() { + Objects.requireNonNull(name, RecurringOrderCustomFieldChangedMessagePayload.class + ": name is missing"); + Objects.requireNonNull(value, RecurringOrderCustomFieldChangedMessagePayload.class + ": value is missing"); + return new RecurringOrderCustomFieldChangedMessagePayloadImpl(name, value, previousValue); + } + + /** + * builds RecurringOrderCustomFieldChangedMessagePayload without checking for non-null required values + * @return RecurringOrderCustomFieldChangedMessagePayload + */ + public RecurringOrderCustomFieldChangedMessagePayload buildUnchecked() { + return new RecurringOrderCustomFieldChangedMessagePayloadImpl(name, value, previousValue); + } + + /** + * factory method for an instance of RecurringOrderCustomFieldChangedMessagePayloadBuilder + * @return builder + */ + public static RecurringOrderCustomFieldChangedMessagePayloadBuilder of() { + return new RecurringOrderCustomFieldChangedMessagePayloadBuilder(); + } + + /** + * create builder for RecurringOrderCustomFieldChangedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomFieldChangedMessagePayloadBuilder of( + final RecurringOrderCustomFieldChangedMessagePayload template) { + RecurringOrderCustomFieldChangedMessagePayloadBuilder builder = new RecurringOrderCustomFieldChangedMessagePayloadBuilder(); + builder.name = template.getName(); + builder.value = template.getValue(); + builder.previousValue = template.getPreviousValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessagePayloadImpl.java new file mode 100644 index 00000000000..749b2439da4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessagePayloadImpl.java @@ -0,0 +1,137 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated when an existing Custom Field has been changed using the Set CustomField action.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomFieldChangedMessagePayloadImpl + implements RecurringOrderCustomFieldChangedMessagePayload, ModelBase { + + private String type; + + private String name; + + private java.lang.Object value; + + private java.lang.Object previousValue; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderCustomFieldChangedMessagePayloadImpl(@JsonProperty("name") final String name, + @JsonProperty("value") final java.lang.Object value, + @JsonProperty("previousValue") final java.lang.Object previousValue) { + this.name = name; + this.value = value; + this.previousValue = previousValue; + this.type = RECURRING_ORDER_CUSTOM_FIELD_CHANGED; + } + + /** + * create empty instance + */ + public RecurringOrderCustomFieldChangedMessagePayloadImpl() { + this.type = RECURRING_ORDER_CUSTOM_FIELD_CHANGED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      Name of the Custom Field that changed.

      + */ + + public String getName() { + return this.name; + } + + /** + *

      CustomFieldValue based on the FieldType after the Set CustomField update action.

      + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + *

      CustomFieldValue based on the FieldType before the Set CustomField update action. When there has not been a Custom Field with the name on the Order before, an Order Custom Field Added Message is generated instead.

      + */ + + public java.lang.Object getPreviousValue() { + return this.previousValue; + } + + public void setName(final String name) { + this.name = name; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + public void setPreviousValue(final java.lang.Object previousValue) { + this.previousValue = previousValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderCustomFieldChangedMessagePayloadImpl that = (RecurringOrderCustomFieldChangedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(name, that.name) + .append(value, that.value) + .append(previousValue, that.previousValue) + .append(type, that.type) + .append(name, that.name) + .append(value, that.value) + .append(previousValue, that.previousValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(name).append(value).append(previousValue).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("name", name) + .append("value", value) + .append("previousValue", previousValue) + .build(); + } + + @Override + public RecurringOrderCustomFieldChangedMessagePayload copyDeep() { + return RecurringOrderCustomFieldChangedMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessage.java new file mode 100644 index 00000000000..e501d1cf883 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessage.java @@ -0,0 +1,162 @@ + +package com.commercetools.api.models.message; + +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; + +/** + *

      Generated when a Custom Field has been removed from the Order using the Set CustomField action.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomFieldRemovedMessage recurringOrderCustomFieldRemovedMessage = RecurringOrderCustomFieldRemovedMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .name("{name}")
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderCustomFieldRemoved") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderCustomFieldRemovedMessageImpl.class) +public interface RecurringOrderCustomFieldRemovedMessage extends Message { + + /** + * discriminator value for RecurringOrderCustomFieldRemovedMessage + */ + String RECURRING_ORDER_CUSTOM_FIELD_REMOVED = "RecurringOrderCustomFieldRemoved"; + + /** + *

      Name of the Custom Field that was removed.

      + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

      Name of the Custom Field that was removed.

      + * @param name value to be set + */ + + public void setName(final String name); + + /** + * factory method + * @return instance of RecurringOrderCustomFieldRemovedMessage + */ + public static RecurringOrderCustomFieldRemovedMessage of() { + return new RecurringOrderCustomFieldRemovedMessageImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderCustomFieldRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderCustomFieldRemovedMessage of(final RecurringOrderCustomFieldRemovedMessage template) { + RecurringOrderCustomFieldRemovedMessageImpl instance = new RecurringOrderCustomFieldRemovedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setName(template.getName()); + return instance; + } + + public RecurringOrderCustomFieldRemovedMessage copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderCustomFieldRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderCustomFieldRemovedMessage deepCopy( + @Nullable final RecurringOrderCustomFieldRemovedMessage template) { + if (template == null) { + return null; + } + RecurringOrderCustomFieldRemovedMessageImpl instance = new RecurringOrderCustomFieldRemovedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setName(template.getName()); + return instance; + } + + /** + * builder factory method for RecurringOrderCustomFieldRemovedMessage + * @return builder + */ + public static RecurringOrderCustomFieldRemovedMessageBuilder builder() { + return RecurringOrderCustomFieldRemovedMessageBuilder.of(); + } + + /** + * create builder for RecurringOrderCustomFieldRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomFieldRemovedMessageBuilder builder( + final RecurringOrderCustomFieldRemovedMessage template) { + return RecurringOrderCustomFieldRemovedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderCustomFieldRemovedMessage( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessageBuilder.java new file mode 100644 index 00000000000..253bc77629e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessageBuilder.java @@ -0,0 +1,433 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderCustomFieldRemovedMessageBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomFieldRemovedMessage recurringOrderCustomFieldRemovedMessage = RecurringOrderCustomFieldRemovedMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .name("{name}")
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomFieldRemovedMessageBuilder + implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String name; + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @param id value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @param version value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @param createdAt value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

      Value of createdAt.

      + * @param lastModifiedAt value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param lastModifiedBy value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param createdBy value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @param sequenceNumber value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param resource value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder resource( + final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param builder function to build the resource value + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @param resourceVersion value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

      Name of the Custom Field that was removed.

      + * @param name value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessageBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      Name of the Custom Field that was removed.

      + * @return name + */ + + public String getName() { + return this.name; + } + + /** + * builds RecurringOrderCustomFieldRemovedMessage with checking for non-null required values + * @return RecurringOrderCustomFieldRemovedMessage + */ + public RecurringOrderCustomFieldRemovedMessage build() { + Objects.requireNonNull(id, RecurringOrderCustomFieldRemovedMessage.class + ": id is missing"); + Objects.requireNonNull(version, RecurringOrderCustomFieldRemovedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, RecurringOrderCustomFieldRemovedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + RecurringOrderCustomFieldRemovedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + RecurringOrderCustomFieldRemovedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, RecurringOrderCustomFieldRemovedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + RecurringOrderCustomFieldRemovedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(name, RecurringOrderCustomFieldRemovedMessage.class + ": name is missing"); + return new RecurringOrderCustomFieldRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, name); + } + + /** + * builds RecurringOrderCustomFieldRemovedMessage without checking for non-null required values + * @return RecurringOrderCustomFieldRemovedMessage + */ + public RecurringOrderCustomFieldRemovedMessage buildUnchecked() { + return new RecurringOrderCustomFieldRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, name); + } + + /** + * factory method for an instance of RecurringOrderCustomFieldRemovedMessageBuilder + * @return builder + */ + public static RecurringOrderCustomFieldRemovedMessageBuilder of() { + return new RecurringOrderCustomFieldRemovedMessageBuilder(); + } + + /** + * create builder for RecurringOrderCustomFieldRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomFieldRemovedMessageBuilder of( + final RecurringOrderCustomFieldRemovedMessage template) { + RecurringOrderCustomFieldRemovedMessageBuilder builder = new RecurringOrderCustomFieldRemovedMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.name = template.getName(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessageImpl.java new file mode 100644 index 00000000000..9d5150ffcc0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessageImpl.java @@ -0,0 +1,301 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated when a Custom Field has been removed from the Order using the Set CustomField action.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomFieldRemovedMessageImpl implements RecurringOrderCustomFieldRemovedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String name; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderCustomFieldRemovedMessageImpl(@JsonProperty("id") final String id, + @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("name") final String name) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.name = name; + this.type = RECURRING_ORDER_CUSTOM_FIELD_REMOVED; + } + + /** + * create empty instance + */ + public RecurringOrderCustomFieldRemovedMessageImpl() { + this.type = RECURRING_ORDER_CUSTOM_FIELD_REMOVED; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      Message Type of the Message.

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

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      Name of the Custom Field that was removed.

      + */ + + public String getName() { + return this.name; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setName(final String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderCustomFieldRemovedMessageImpl that = (RecurringOrderCustomFieldRemovedMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(name, that.name) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(name, that.name) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(name) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("name", name) + .build(); + } + + @Override + public RecurringOrderCustomFieldRemovedMessage copyDeep() { + return RecurringOrderCustomFieldRemovedMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessagePayload.java new file mode 100644 index 00000000000..7fc2aca68df --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessagePayload.java @@ -0,0 +1,134 @@ + +package com.commercetools.api.models.message; + +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; + +/** + *

      Generated when a Custom Field has been removed from the Order using the Set CustomField action.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomFieldRemovedMessagePayload recurringOrderCustomFieldRemovedMessagePayload = RecurringOrderCustomFieldRemovedMessagePayload.builder()
      + *             .name("{name}")
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderCustomFieldRemoved") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderCustomFieldRemovedMessagePayloadImpl.class) +public interface RecurringOrderCustomFieldRemovedMessagePayload extends MessagePayload { + + /** + * discriminator value for RecurringOrderCustomFieldRemovedMessagePayload + */ + String RECURRING_ORDER_CUSTOM_FIELD_REMOVED = "RecurringOrderCustomFieldRemoved"; + + /** + *

      Name of the Custom Field that was removed.

      + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

      Name of the Custom Field that was removed.

      + * @param name value to be set + */ + + public void setName(final String name); + + /** + * factory method + * @return instance of RecurringOrderCustomFieldRemovedMessagePayload + */ + public static RecurringOrderCustomFieldRemovedMessagePayload of() { + return new RecurringOrderCustomFieldRemovedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderCustomFieldRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderCustomFieldRemovedMessagePayload of( + final RecurringOrderCustomFieldRemovedMessagePayload template) { + RecurringOrderCustomFieldRemovedMessagePayloadImpl instance = new RecurringOrderCustomFieldRemovedMessagePayloadImpl(); + instance.setName(template.getName()); + return instance; + } + + public RecurringOrderCustomFieldRemovedMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderCustomFieldRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderCustomFieldRemovedMessagePayload deepCopy( + @Nullable final RecurringOrderCustomFieldRemovedMessagePayload template) { + if (template == null) { + return null; + } + RecurringOrderCustomFieldRemovedMessagePayloadImpl instance = new RecurringOrderCustomFieldRemovedMessagePayloadImpl(); + instance.setName(template.getName()); + return instance; + } + + /** + * builder factory method for RecurringOrderCustomFieldRemovedMessagePayload + * @return builder + */ + public static RecurringOrderCustomFieldRemovedMessagePayloadBuilder builder() { + return RecurringOrderCustomFieldRemovedMessagePayloadBuilder.of(); + } + + /** + * create builder for RecurringOrderCustomFieldRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomFieldRemovedMessagePayloadBuilder builder( + final RecurringOrderCustomFieldRemovedMessagePayload template) { + return RecurringOrderCustomFieldRemovedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderCustomFieldRemovedMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessagePayloadBuilder.java new file mode 100644 index 00000000000..8b1b190027b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessagePayloadBuilder.java @@ -0,0 +1,84 @@ + +package com.commercetools.api.models.message; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderCustomFieldRemovedMessagePayloadBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomFieldRemovedMessagePayload recurringOrderCustomFieldRemovedMessagePayload = RecurringOrderCustomFieldRemovedMessagePayload.builder()
      + *             .name("{name}")
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomFieldRemovedMessagePayloadBuilder + implements Builder { + + private String name; + + /** + *

      Name of the Custom Field that was removed.

      + * @param name value to be set + * @return Builder + */ + + public RecurringOrderCustomFieldRemovedMessagePayloadBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *

      Name of the Custom Field that was removed.

      + * @return name + */ + + public String getName() { + return this.name; + } + + /** + * builds RecurringOrderCustomFieldRemovedMessagePayload with checking for non-null required values + * @return RecurringOrderCustomFieldRemovedMessagePayload + */ + public RecurringOrderCustomFieldRemovedMessagePayload build() { + Objects.requireNonNull(name, RecurringOrderCustomFieldRemovedMessagePayload.class + ": name is missing"); + return new RecurringOrderCustomFieldRemovedMessagePayloadImpl(name); + } + + /** + * builds RecurringOrderCustomFieldRemovedMessagePayload without checking for non-null required values + * @return RecurringOrderCustomFieldRemovedMessagePayload + */ + public RecurringOrderCustomFieldRemovedMessagePayload buildUnchecked() { + return new RecurringOrderCustomFieldRemovedMessagePayloadImpl(name); + } + + /** + * factory method for an instance of RecurringOrderCustomFieldRemovedMessagePayloadBuilder + * @return builder + */ + public static RecurringOrderCustomFieldRemovedMessagePayloadBuilder of() { + return new RecurringOrderCustomFieldRemovedMessagePayloadBuilder(); + } + + /** + * create builder for RecurringOrderCustomFieldRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomFieldRemovedMessagePayloadBuilder of( + final RecurringOrderCustomFieldRemovedMessagePayload template) { + RecurringOrderCustomFieldRemovedMessagePayloadBuilder builder = new RecurringOrderCustomFieldRemovedMessagePayloadBuilder(); + builder.name = template.getName(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessagePayloadImpl.java new file mode 100644 index 00000000000..b9cf99b7b9c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessagePayloadImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated when a Custom Field has been removed from the Order using the Set CustomField action.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomFieldRemovedMessagePayloadImpl + implements RecurringOrderCustomFieldRemovedMessagePayload, ModelBase { + + private String type; + + private String name; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderCustomFieldRemovedMessagePayloadImpl(@JsonProperty("name") final String name) { + this.name = name; + this.type = RECURRING_ORDER_CUSTOM_FIELD_REMOVED; + } + + /** + * create empty instance + */ + public RecurringOrderCustomFieldRemovedMessagePayloadImpl() { + this.type = RECURRING_ORDER_CUSTOM_FIELD_REMOVED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      Name of the Custom Field that was removed.

      + */ + + public String getName() { + return this.name; + } + + public void setName(final String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderCustomFieldRemovedMessagePayloadImpl that = (RecurringOrderCustomFieldRemovedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(name, that.name) + .append(type, that.type) + .append(name, that.name) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(name).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("name", name) + .build(); + } + + @Override + public RecurringOrderCustomFieldRemovedMessagePayload copyDeep() { + return RecurringOrderCustomFieldRemovedMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessage.java new file mode 100644 index 00000000000..3d09819dcd7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessage.java @@ -0,0 +1,159 @@ + +package com.commercetools.api.models.message; + +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; + +/** + *

      Generated after a successful Set Custom Type with empty parameters.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomTypeRemovedMessage recurringOrderCustomTypeRemovedMessage = RecurringOrderCustomTypeRemovedMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderCustomTypeRemoved") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderCustomTypeRemovedMessageImpl.class) +public interface RecurringOrderCustomTypeRemovedMessage extends Message { + + /** + * discriminator value for RecurringOrderCustomTypeRemovedMessage + */ + String RECURRING_ORDER_CUSTOM_TYPE_REMOVED = "RecurringOrderCustomTypeRemoved"; + + /** + *

      id of the Custom Type that was removed. Absent if there was no previous Custom Type present.

      + * @return previousTypeId + */ + + @JsonProperty("previousTypeId") + public String getPreviousTypeId(); + + /** + *

      id of the Custom Type that was removed. Absent if there was no previous Custom Type present.

      + * @param previousTypeId value to be set + */ + + public void setPreviousTypeId(final String previousTypeId); + + /** + * factory method + * @return instance of RecurringOrderCustomTypeRemovedMessage + */ + public static RecurringOrderCustomTypeRemovedMessage of() { + return new RecurringOrderCustomTypeRemovedMessageImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderCustomTypeRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderCustomTypeRemovedMessage of(final RecurringOrderCustomTypeRemovedMessage template) { + RecurringOrderCustomTypeRemovedMessageImpl instance = new RecurringOrderCustomTypeRemovedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setPreviousTypeId(template.getPreviousTypeId()); + return instance; + } + + public RecurringOrderCustomTypeRemovedMessage copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderCustomTypeRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderCustomTypeRemovedMessage deepCopy( + @Nullable final RecurringOrderCustomTypeRemovedMessage template) { + if (template == null) { + return null; + } + RecurringOrderCustomTypeRemovedMessageImpl instance = new RecurringOrderCustomTypeRemovedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setPreviousTypeId(template.getPreviousTypeId()); + return instance; + } + + /** + * builder factory method for RecurringOrderCustomTypeRemovedMessage + * @return builder + */ + public static RecurringOrderCustomTypeRemovedMessageBuilder builder() { + return RecurringOrderCustomTypeRemovedMessageBuilder.of(); + } + + /** + * create builder for RecurringOrderCustomTypeRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomTypeRemovedMessageBuilder builder( + final RecurringOrderCustomTypeRemovedMessage template) { + return RecurringOrderCustomTypeRemovedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderCustomTypeRemovedMessage( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessageBuilder.java new file mode 100644 index 00000000000..68d765006c2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessageBuilder.java @@ -0,0 +1,432 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderCustomTypeRemovedMessageBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomTypeRemovedMessage recurringOrderCustomTypeRemovedMessage = RecurringOrderCustomTypeRemovedMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomTypeRemovedMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + @Nullable + private String previousTypeId; + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @param id value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @param version value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @param createdAt value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

      Value of createdAt.

      + * @param lastModifiedAt value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param lastModifiedBy value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param createdBy value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @param sequenceNumber value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param resource value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder resource( + final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param builder function to build the resource value + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @param resourceVersion value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

      id of the Custom Type that was removed. Absent if there was no previous Custom Type present.

      + * @param previousTypeId value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessageBuilder previousTypeId(@Nullable final String previousTypeId) { + this.previousTypeId = previousTypeId; + return this; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      id of the Custom Type that was removed. Absent if there was no previous Custom Type present.

      + * @return previousTypeId + */ + + @Nullable + public String getPreviousTypeId() { + return this.previousTypeId; + } + + /** + * builds RecurringOrderCustomTypeRemovedMessage with checking for non-null required values + * @return RecurringOrderCustomTypeRemovedMessage + */ + public RecurringOrderCustomTypeRemovedMessage build() { + Objects.requireNonNull(id, RecurringOrderCustomTypeRemovedMessage.class + ": id is missing"); + Objects.requireNonNull(version, RecurringOrderCustomTypeRemovedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, RecurringOrderCustomTypeRemovedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + RecurringOrderCustomTypeRemovedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + RecurringOrderCustomTypeRemovedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, RecurringOrderCustomTypeRemovedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + RecurringOrderCustomTypeRemovedMessage.class + ": resourceVersion is missing"); + return new RecurringOrderCustomTypeRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, previousTypeId); + } + + /** + * builds RecurringOrderCustomTypeRemovedMessage without checking for non-null required values + * @return RecurringOrderCustomTypeRemovedMessage + */ + public RecurringOrderCustomTypeRemovedMessage buildUnchecked() { + return new RecurringOrderCustomTypeRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, previousTypeId); + } + + /** + * factory method for an instance of RecurringOrderCustomTypeRemovedMessageBuilder + * @return builder + */ + public static RecurringOrderCustomTypeRemovedMessageBuilder of() { + return new RecurringOrderCustomTypeRemovedMessageBuilder(); + } + + /** + * create builder for RecurringOrderCustomTypeRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomTypeRemovedMessageBuilder of( + final RecurringOrderCustomTypeRemovedMessage template) { + RecurringOrderCustomTypeRemovedMessageBuilder builder = new RecurringOrderCustomTypeRemovedMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.previousTypeId = template.getPreviousTypeId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessageImpl.java new file mode 100644 index 00000000000..4ba550a63f8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessageImpl.java @@ -0,0 +1,301 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Set Custom Type with empty parameters.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomTypeRemovedMessageImpl implements RecurringOrderCustomTypeRemovedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String previousTypeId; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderCustomTypeRemovedMessageImpl(@JsonProperty("id") final String id, + @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("previousTypeId") final String previousTypeId) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.previousTypeId = previousTypeId; + this.type = RECURRING_ORDER_CUSTOM_TYPE_REMOVED; + } + + /** + * create empty instance + */ + public RecurringOrderCustomTypeRemovedMessageImpl() { + this.type = RECURRING_ORDER_CUSTOM_TYPE_REMOVED; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      Message Type of the Message.

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

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      id of the Custom Type that was removed. Absent if there was no previous Custom Type present.

      + */ + + public String getPreviousTypeId() { + return this.previousTypeId; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setPreviousTypeId(final String previousTypeId) { + this.previousTypeId = previousTypeId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderCustomTypeRemovedMessageImpl that = (RecurringOrderCustomTypeRemovedMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(previousTypeId, that.previousTypeId) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(previousTypeId, that.previousTypeId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(previousTypeId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("previousTypeId", previousTypeId) + .build(); + } + + @Override + public RecurringOrderCustomTypeRemovedMessage copyDeep() { + return RecurringOrderCustomTypeRemovedMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessagePayload.java new file mode 100644 index 00000000000..6794c86c526 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessagePayload.java @@ -0,0 +1,131 @@ + +package com.commercetools.api.models.message; + +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; + +/** + *

      Generated after a successful Set Custom Type with empty parameters.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomTypeRemovedMessagePayload recurringOrderCustomTypeRemovedMessagePayload = RecurringOrderCustomTypeRemovedMessagePayload.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderCustomTypeRemoved") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderCustomTypeRemovedMessagePayloadImpl.class) +public interface RecurringOrderCustomTypeRemovedMessagePayload extends MessagePayload { + + /** + * discriminator value for RecurringOrderCustomTypeRemovedMessagePayload + */ + String RECURRING_ORDER_CUSTOM_TYPE_REMOVED = "RecurringOrderCustomTypeRemoved"; + + /** + *

      id of the Custom Type that was removed. Absent if there was no previous Custom Type present.

      + * @return previousTypeId + */ + + @JsonProperty("previousTypeId") + public String getPreviousTypeId(); + + /** + *

      id of the Custom Type that was removed. Absent if there was no previous Custom Type present.

      + * @param previousTypeId value to be set + */ + + public void setPreviousTypeId(final String previousTypeId); + + /** + * factory method + * @return instance of RecurringOrderCustomTypeRemovedMessagePayload + */ + public static RecurringOrderCustomTypeRemovedMessagePayload of() { + return new RecurringOrderCustomTypeRemovedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderCustomTypeRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderCustomTypeRemovedMessagePayload of( + final RecurringOrderCustomTypeRemovedMessagePayload template) { + RecurringOrderCustomTypeRemovedMessagePayloadImpl instance = new RecurringOrderCustomTypeRemovedMessagePayloadImpl(); + instance.setPreviousTypeId(template.getPreviousTypeId()); + return instance; + } + + public RecurringOrderCustomTypeRemovedMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderCustomTypeRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderCustomTypeRemovedMessagePayload deepCopy( + @Nullable final RecurringOrderCustomTypeRemovedMessagePayload template) { + if (template == null) { + return null; + } + RecurringOrderCustomTypeRemovedMessagePayloadImpl instance = new RecurringOrderCustomTypeRemovedMessagePayloadImpl(); + instance.setPreviousTypeId(template.getPreviousTypeId()); + return instance; + } + + /** + * builder factory method for RecurringOrderCustomTypeRemovedMessagePayload + * @return builder + */ + public static RecurringOrderCustomTypeRemovedMessagePayloadBuilder builder() { + return RecurringOrderCustomTypeRemovedMessagePayloadBuilder.of(); + } + + /** + * create builder for RecurringOrderCustomTypeRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomTypeRemovedMessagePayloadBuilder builder( + final RecurringOrderCustomTypeRemovedMessagePayload template) { + return RecurringOrderCustomTypeRemovedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderCustomTypeRemovedMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessagePayloadBuilder.java new file mode 100644 index 00000000000..e425a05ef14 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessagePayloadBuilder.java @@ -0,0 +1,86 @@ + +package com.commercetools.api.models.message; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderCustomTypeRemovedMessagePayloadBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomTypeRemovedMessagePayload recurringOrderCustomTypeRemovedMessagePayload = RecurringOrderCustomTypeRemovedMessagePayload.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomTypeRemovedMessagePayloadBuilder + implements Builder { + + @Nullable + private String previousTypeId; + + /** + *

      id of the Custom Type that was removed. Absent if there was no previous Custom Type present.

      + * @param previousTypeId value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeRemovedMessagePayloadBuilder previousTypeId(@Nullable final String previousTypeId) { + this.previousTypeId = previousTypeId; + return this; + } + + /** + *

      id of the Custom Type that was removed. Absent if there was no previous Custom Type present.

      + * @return previousTypeId + */ + + @Nullable + public String getPreviousTypeId() { + return this.previousTypeId; + } + + /** + * builds RecurringOrderCustomTypeRemovedMessagePayload with checking for non-null required values + * @return RecurringOrderCustomTypeRemovedMessagePayload + */ + public RecurringOrderCustomTypeRemovedMessagePayload build() { + return new RecurringOrderCustomTypeRemovedMessagePayloadImpl(previousTypeId); + } + + /** + * builds RecurringOrderCustomTypeRemovedMessagePayload without checking for non-null required values + * @return RecurringOrderCustomTypeRemovedMessagePayload + */ + public RecurringOrderCustomTypeRemovedMessagePayload buildUnchecked() { + return new RecurringOrderCustomTypeRemovedMessagePayloadImpl(previousTypeId); + } + + /** + * factory method for an instance of RecurringOrderCustomTypeRemovedMessagePayloadBuilder + * @return builder + */ + public static RecurringOrderCustomTypeRemovedMessagePayloadBuilder of() { + return new RecurringOrderCustomTypeRemovedMessagePayloadBuilder(); + } + + /** + * create builder for RecurringOrderCustomTypeRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomTypeRemovedMessagePayloadBuilder of( + final RecurringOrderCustomTypeRemovedMessagePayload template) { + RecurringOrderCustomTypeRemovedMessagePayloadBuilder builder = new RecurringOrderCustomTypeRemovedMessagePayloadBuilder(); + builder.previousTypeId = template.getPreviousTypeId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessagePayloadImpl.java new file mode 100644 index 00000000000..2d40250cea0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessagePayloadImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Set Custom Type with empty parameters.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomTypeRemovedMessagePayloadImpl + implements RecurringOrderCustomTypeRemovedMessagePayload, ModelBase { + + private String type; + + private String previousTypeId; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderCustomTypeRemovedMessagePayloadImpl(@JsonProperty("previousTypeId") final String previousTypeId) { + this.previousTypeId = previousTypeId; + this.type = RECURRING_ORDER_CUSTOM_TYPE_REMOVED; + } + + /** + * create empty instance + */ + public RecurringOrderCustomTypeRemovedMessagePayloadImpl() { + this.type = RECURRING_ORDER_CUSTOM_TYPE_REMOVED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      id of the Custom Type that was removed. Absent if there was no previous Custom Type present.

      + */ + + public String getPreviousTypeId() { + return this.previousTypeId; + } + + public void setPreviousTypeId(final String previousTypeId) { + this.previousTypeId = previousTypeId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderCustomTypeRemovedMessagePayloadImpl that = (RecurringOrderCustomTypeRemovedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(previousTypeId, that.previousTypeId) + .append(type, that.type) + .append(previousTypeId, that.previousTypeId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(previousTypeId).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("previousTypeId", previousTypeId) + .build(); + } + + @Override + public RecurringOrderCustomTypeRemovedMessagePayload copyDeep() { + return RecurringOrderCustomTypeRemovedMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessage.java new file mode 100644 index 00000000000..ccd843e6a61 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessage.java @@ -0,0 +1,180 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.type.CustomFields; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Generated after a successful Set Custom Type.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomTypeSetMessage recurringOrderCustomTypeSetMessage = RecurringOrderCustomTypeSetMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .customFields(customFieldsBuilder -> customFieldsBuilder)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderCustomTypeSet") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderCustomTypeSetMessageImpl.class) +public interface RecurringOrderCustomTypeSetMessage extends Message { + + /** + * discriminator value for RecurringOrderCustomTypeSetMessage + */ + String RECURRING_ORDER_CUSTOM_TYPE_SET = "RecurringOrderCustomTypeSet"; + + /** + *

      The Custom Fields that have been set.

      + * @return customFields + */ + @NotNull + @Valid + @JsonProperty("customFields") + public CustomFields getCustomFields(); + + /** + *

      id of the previous Custom Type. Absent if there was no previous Custom Type present.

      + * @return previousTypeId + */ + + @JsonProperty("previousTypeId") + public String getPreviousTypeId(); + + /** + *

      The Custom Fields that have been set.

      + * @param customFields value to be set + */ + + public void setCustomFields(final CustomFields customFields); + + /** + *

      id of the previous Custom Type. Absent if there was no previous Custom Type present.

      + * @param previousTypeId value to be set + */ + + public void setPreviousTypeId(final String previousTypeId); + + /** + * factory method + * @return instance of RecurringOrderCustomTypeSetMessage + */ + public static RecurringOrderCustomTypeSetMessage of() { + return new RecurringOrderCustomTypeSetMessageImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderCustomTypeSetMessage + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderCustomTypeSetMessage of(final RecurringOrderCustomTypeSetMessage template) { + RecurringOrderCustomTypeSetMessageImpl instance = new RecurringOrderCustomTypeSetMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setCustomFields(template.getCustomFields()); + instance.setPreviousTypeId(template.getPreviousTypeId()); + return instance; + } + + public RecurringOrderCustomTypeSetMessage copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderCustomTypeSetMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderCustomTypeSetMessage deepCopy( + @Nullable final RecurringOrderCustomTypeSetMessage template) { + if (template == null) { + return null; + } + RecurringOrderCustomTypeSetMessageImpl instance = new RecurringOrderCustomTypeSetMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setCustomFields(com.commercetools.api.models.type.CustomFields.deepCopy(template.getCustomFields())); + instance.setPreviousTypeId(template.getPreviousTypeId()); + return instance; + } + + /** + * builder factory method for RecurringOrderCustomTypeSetMessage + * @return builder + */ + public static RecurringOrderCustomTypeSetMessageBuilder builder() { + return RecurringOrderCustomTypeSetMessageBuilder.of(); + } + + /** + * create builder for RecurringOrderCustomTypeSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomTypeSetMessageBuilder builder(final RecurringOrderCustomTypeSetMessage template) { + return RecurringOrderCustomTypeSetMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderCustomTypeSetMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessageBuilder.java new file mode 100644 index 00000000000..20a385d92d2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessageBuilder.java @@ -0,0 +1,483 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderCustomTypeSetMessageBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomTypeSetMessage recurringOrderCustomTypeSetMessage = RecurringOrderCustomTypeSetMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .customFields(customFieldsBuilder -> customFieldsBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomTypeSetMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.type.CustomFields customFields; + + @Nullable + private String previousTypeId; + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @param id value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @param version value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @param createdAt value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

      Value of createdAt.

      + * @param lastModifiedAt value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param lastModifiedBy value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param createdBy value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @param sequenceNumber value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param resource value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder resource( + final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param builder function to build the resource value + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @param resourceVersion value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

      The Custom Fields that have been set.

      + * @param builder function to build the customFields value + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder customFields( + Function builder) { + this.customFields = builder.apply(com.commercetools.api.models.type.CustomFieldsBuilder.of()).build(); + return this; + } + + /** + *

      The Custom Fields that have been set.

      + * @param builder function to build the customFields value + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder withCustomFields( + Function builder) { + this.customFields = builder.apply(com.commercetools.api.models.type.CustomFieldsBuilder.of()); + return this; + } + + /** + *

      The Custom Fields that have been set.

      + * @param customFields value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder customFields( + final com.commercetools.api.models.type.CustomFields customFields) { + this.customFields = customFields; + return this; + } + + /** + *

      id of the previous Custom Type. Absent if there was no previous Custom Type present.

      + * @param previousTypeId value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessageBuilder previousTypeId(@Nullable final String previousTypeId) { + this.previousTypeId = previousTypeId; + return this; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      The Custom Fields that have been set.

      + * @return customFields + */ + + public com.commercetools.api.models.type.CustomFields getCustomFields() { + return this.customFields; + } + + /** + *

      id of the previous Custom Type. Absent if there was no previous Custom Type present.

      + * @return previousTypeId + */ + + @Nullable + public String getPreviousTypeId() { + return this.previousTypeId; + } + + /** + * builds RecurringOrderCustomTypeSetMessage with checking for non-null required values + * @return RecurringOrderCustomTypeSetMessage + */ + public RecurringOrderCustomTypeSetMessage build() { + Objects.requireNonNull(id, RecurringOrderCustomTypeSetMessage.class + ": id is missing"); + Objects.requireNonNull(version, RecurringOrderCustomTypeSetMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, RecurringOrderCustomTypeSetMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + RecurringOrderCustomTypeSetMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + RecurringOrderCustomTypeSetMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, RecurringOrderCustomTypeSetMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + RecurringOrderCustomTypeSetMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(customFields, RecurringOrderCustomTypeSetMessage.class + ": customFields is missing"); + return new RecurringOrderCustomTypeSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, customFields, + previousTypeId); + } + + /** + * builds RecurringOrderCustomTypeSetMessage without checking for non-null required values + * @return RecurringOrderCustomTypeSetMessage + */ + public RecurringOrderCustomTypeSetMessage buildUnchecked() { + return new RecurringOrderCustomTypeSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, customFields, + previousTypeId); + } + + /** + * factory method for an instance of RecurringOrderCustomTypeSetMessageBuilder + * @return builder + */ + public static RecurringOrderCustomTypeSetMessageBuilder of() { + return new RecurringOrderCustomTypeSetMessageBuilder(); + } + + /** + * create builder for RecurringOrderCustomTypeSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomTypeSetMessageBuilder of(final RecurringOrderCustomTypeSetMessage template) { + RecurringOrderCustomTypeSetMessageBuilder builder = new RecurringOrderCustomTypeSetMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.customFields = template.getCustomFields(); + builder.previousTypeId = template.getPreviousTypeId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessageImpl.java new file mode 100644 index 00000000000..8e727b8120b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessageImpl.java @@ -0,0 +1,321 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Set Custom Type.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomTypeSetMessageImpl implements RecurringOrderCustomTypeSetMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.type.CustomFields customFields; + + private String previousTypeId; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderCustomTypeSetMessageImpl(@JsonProperty("id") final String id, + @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("customFields") final com.commercetools.api.models.type.CustomFields customFields, + @JsonProperty("previousTypeId") final String previousTypeId) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.customFields = customFields; + this.previousTypeId = previousTypeId; + this.type = RECURRING_ORDER_CUSTOM_TYPE_SET; + } + + /** + * create empty instance + */ + public RecurringOrderCustomTypeSetMessageImpl() { + this.type = RECURRING_ORDER_CUSTOM_TYPE_SET; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      Message Type of the Message.

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

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      The Custom Fields that have been set.

      + */ + + public com.commercetools.api.models.type.CustomFields getCustomFields() { + return this.customFields; + } + + /** + *

      id of the previous Custom Type. Absent if there was no previous Custom Type present.

      + */ + + public String getPreviousTypeId() { + return this.previousTypeId; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setCustomFields(final com.commercetools.api.models.type.CustomFields customFields) { + this.customFields = customFields; + } + + public void setPreviousTypeId(final String previousTypeId) { + this.previousTypeId = previousTypeId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderCustomTypeSetMessageImpl that = (RecurringOrderCustomTypeSetMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(customFields, that.customFields) + .append(previousTypeId, that.previousTypeId) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(customFields, that.customFields) + .append(previousTypeId, that.previousTypeId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(customFields) + .append(previousTypeId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("customFields", customFields) + .append("previousTypeId", previousTypeId) + .build(); + } + + @Override + public RecurringOrderCustomTypeSetMessage copyDeep() { + return RecurringOrderCustomTypeSetMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessagePayload.java new file mode 100644 index 00000000000..6a50b7e0abf --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessagePayload.java @@ -0,0 +1,154 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.type.CustomFields; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Generated after a successful Set Custom Type.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomTypeSetMessagePayload recurringOrderCustomTypeSetMessagePayload = RecurringOrderCustomTypeSetMessagePayload.builder()
      + *             .customFields(customFieldsBuilder -> customFieldsBuilder)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderCustomTypeSet") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderCustomTypeSetMessagePayloadImpl.class) +public interface RecurringOrderCustomTypeSetMessagePayload extends MessagePayload { + + /** + * discriminator value for RecurringOrderCustomTypeSetMessagePayload + */ + String RECURRING_ORDER_CUSTOM_TYPE_SET = "RecurringOrderCustomTypeSet"; + + /** + *

      The Custom Fields that have been set.

      + * @return customFields + */ + @NotNull + @Valid + @JsonProperty("customFields") + public CustomFields getCustomFields(); + + /** + *

      id of the previous Custom Type. Absent if there was no previous Custom Type present.

      + * @return previousTypeId + */ + + @JsonProperty("previousTypeId") + public String getPreviousTypeId(); + + /** + *

      The Custom Fields that have been set.

      + * @param customFields value to be set + */ + + public void setCustomFields(final CustomFields customFields); + + /** + *

      id of the previous Custom Type. Absent if there was no previous Custom Type present.

      + * @param previousTypeId value to be set + */ + + public void setPreviousTypeId(final String previousTypeId); + + /** + * factory method + * @return instance of RecurringOrderCustomTypeSetMessagePayload + */ + public static RecurringOrderCustomTypeSetMessagePayload of() { + return new RecurringOrderCustomTypeSetMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderCustomTypeSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderCustomTypeSetMessagePayload of( + final RecurringOrderCustomTypeSetMessagePayload template) { + RecurringOrderCustomTypeSetMessagePayloadImpl instance = new RecurringOrderCustomTypeSetMessagePayloadImpl(); + instance.setCustomFields(template.getCustomFields()); + instance.setPreviousTypeId(template.getPreviousTypeId()); + return instance; + } + + public RecurringOrderCustomTypeSetMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderCustomTypeSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderCustomTypeSetMessagePayload deepCopy( + @Nullable final RecurringOrderCustomTypeSetMessagePayload template) { + if (template == null) { + return null; + } + RecurringOrderCustomTypeSetMessagePayloadImpl instance = new RecurringOrderCustomTypeSetMessagePayloadImpl(); + instance.setCustomFields(com.commercetools.api.models.type.CustomFields.deepCopy(template.getCustomFields())); + instance.setPreviousTypeId(template.getPreviousTypeId()); + return instance; + } + + /** + * builder factory method for RecurringOrderCustomTypeSetMessagePayload + * @return builder + */ + public static RecurringOrderCustomTypeSetMessagePayloadBuilder builder() { + return RecurringOrderCustomTypeSetMessagePayloadBuilder.of(); + } + + /** + * create builder for RecurringOrderCustomTypeSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomTypeSetMessagePayloadBuilder builder( + final RecurringOrderCustomTypeSetMessagePayload template) { + return RecurringOrderCustomTypeSetMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderCustomTypeSetMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessagePayloadBuilder.java new file mode 100644 index 00000000000..884f48299b9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessagePayloadBuilder.java @@ -0,0 +1,138 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderCustomTypeSetMessagePayloadBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCustomTypeSetMessagePayload recurringOrderCustomTypeSetMessagePayload = RecurringOrderCustomTypeSetMessagePayload.builder()
      + *             .customFields(customFieldsBuilder -> customFieldsBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomTypeSetMessagePayloadBuilder + implements Builder { + + private com.commercetools.api.models.type.CustomFields customFields; + + @Nullable + private String previousTypeId; + + /** + *

      The Custom Fields that have been set.

      + * @param builder function to build the customFields value + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessagePayloadBuilder customFields( + Function builder) { + this.customFields = builder.apply(com.commercetools.api.models.type.CustomFieldsBuilder.of()).build(); + return this; + } + + /** + *

      The Custom Fields that have been set.

      + * @param builder function to build the customFields value + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessagePayloadBuilder withCustomFields( + Function builder) { + this.customFields = builder.apply(com.commercetools.api.models.type.CustomFieldsBuilder.of()); + return this; + } + + /** + *

      The Custom Fields that have been set.

      + * @param customFields value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessagePayloadBuilder customFields( + final com.commercetools.api.models.type.CustomFields customFields) { + this.customFields = customFields; + return this; + } + + /** + *

      id of the previous Custom Type. Absent if there was no previous Custom Type present.

      + * @param previousTypeId value to be set + * @return Builder + */ + + public RecurringOrderCustomTypeSetMessagePayloadBuilder previousTypeId(@Nullable final String previousTypeId) { + this.previousTypeId = previousTypeId; + return this; + } + + /** + *

      The Custom Fields that have been set.

      + * @return customFields + */ + + public com.commercetools.api.models.type.CustomFields getCustomFields() { + return this.customFields; + } + + /** + *

      id of the previous Custom Type. Absent if there was no previous Custom Type present.

      + * @return previousTypeId + */ + + @Nullable + public String getPreviousTypeId() { + return this.previousTypeId; + } + + /** + * builds RecurringOrderCustomTypeSetMessagePayload with checking for non-null required values + * @return RecurringOrderCustomTypeSetMessagePayload + */ + public RecurringOrderCustomTypeSetMessagePayload build() { + Objects.requireNonNull(customFields, + RecurringOrderCustomTypeSetMessagePayload.class + ": customFields is missing"); + return new RecurringOrderCustomTypeSetMessagePayloadImpl(customFields, previousTypeId); + } + + /** + * builds RecurringOrderCustomTypeSetMessagePayload without checking for non-null required values + * @return RecurringOrderCustomTypeSetMessagePayload + */ + public RecurringOrderCustomTypeSetMessagePayload buildUnchecked() { + return new RecurringOrderCustomTypeSetMessagePayloadImpl(customFields, previousTypeId); + } + + /** + * factory method for an instance of RecurringOrderCustomTypeSetMessagePayloadBuilder + * @return builder + */ + public static RecurringOrderCustomTypeSetMessagePayloadBuilder of() { + return new RecurringOrderCustomTypeSetMessagePayloadBuilder(); + } + + /** + * create builder for RecurringOrderCustomTypeSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCustomTypeSetMessagePayloadBuilder of( + final RecurringOrderCustomTypeSetMessagePayload template) { + RecurringOrderCustomTypeSetMessagePayloadBuilder builder = new RecurringOrderCustomTypeSetMessagePayloadBuilder(); + builder.customFields = template.getCustomFields(); + builder.previousTypeId = template.getPreviousTypeId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessagePayloadImpl.java new file mode 100644 index 00000000000..593bfb444e9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessagePayloadImpl.java @@ -0,0 +1,119 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Set Custom Type.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCustomTypeSetMessagePayloadImpl + implements RecurringOrderCustomTypeSetMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.type.CustomFields customFields; + + private String previousTypeId; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderCustomTypeSetMessagePayloadImpl( + @JsonProperty("customFields") final com.commercetools.api.models.type.CustomFields customFields, + @JsonProperty("previousTypeId") final String previousTypeId) { + this.customFields = customFields; + this.previousTypeId = previousTypeId; + this.type = RECURRING_ORDER_CUSTOM_TYPE_SET; + } + + /** + * create empty instance + */ + public RecurringOrderCustomTypeSetMessagePayloadImpl() { + this.type = RECURRING_ORDER_CUSTOM_TYPE_SET; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      The Custom Fields that have been set.

      + */ + + public com.commercetools.api.models.type.CustomFields getCustomFields() { + return this.customFields; + } + + /** + *

      id of the previous Custom Type. Absent if there was no previous Custom Type present.

      + */ + + public String getPreviousTypeId() { + return this.previousTypeId; + } + + public void setCustomFields(final com.commercetools.api.models.type.CustomFields customFields) { + this.customFields = customFields; + } + + public void setPreviousTypeId(final String previousTypeId) { + this.previousTypeId = previousTypeId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderCustomTypeSetMessagePayloadImpl that = (RecurringOrderCustomTypeSetMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(customFields, that.customFields) + .append(previousTypeId, that.previousTypeId) + .append(type, that.type) + .append(customFields, that.customFields) + .append(previousTypeId, that.previousTypeId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(customFields).append(previousTypeId).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("customFields", customFields) + .append("previousTypeId", previousTypeId) + .build(); + } + + @Override + public RecurringOrderCustomTypeSetMessagePayload copyDeep() { + return RecurringOrderCustomTypeSetMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessage.java new file mode 100644 index 00000000000..164c573a941 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessage.java @@ -0,0 +1,173 @@ + +package com.commercetools.api.models.message; + +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; + +/** + *

      Generated after a successful Set Key update action.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderKeySetMessage recurringOrderKeySetMessage = RecurringOrderKeySetMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderKeySet") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderKeySetMessageImpl.class) +public interface RecurringOrderKeySetMessage extends Message { + + /** + * discriminator value for RecurringOrderKeySetMessage + */ + String RECURRING_ORDER_KEY_SET = "RecurringOrderKeySet"; + + /** + *

      key value of the RecurringOrder after the Set Key update action.

      + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

      key value of the RecurringOrder before the Set Key update action.

      + * @return oldKey + */ + + @JsonProperty("oldKey") + public String getOldKey(); + + /** + *

      key value of the RecurringOrder after the Set Key update action.

      + * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

      key value of the RecurringOrder before the Set Key update action.

      + * @param oldKey value to be set + */ + + public void setOldKey(final String oldKey); + + /** + * factory method + * @return instance of RecurringOrderKeySetMessage + */ + public static RecurringOrderKeySetMessage of() { + return new RecurringOrderKeySetMessageImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderKeySetMessage + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderKeySetMessage of(final RecurringOrderKeySetMessage template) { + RecurringOrderKeySetMessageImpl instance = new RecurringOrderKeySetMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setKey(template.getKey()); + instance.setOldKey(template.getOldKey()); + return instance; + } + + public RecurringOrderKeySetMessage copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderKeySetMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderKeySetMessage deepCopy(@Nullable final RecurringOrderKeySetMessage template) { + if (template == null) { + return null; + } + RecurringOrderKeySetMessageImpl instance = new RecurringOrderKeySetMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setKey(template.getKey()); + instance.setOldKey(template.getOldKey()); + return instance; + } + + /** + * builder factory method for RecurringOrderKeySetMessage + * @return builder + */ + public static RecurringOrderKeySetMessageBuilder builder() { + return RecurringOrderKeySetMessageBuilder.of(); + } + + /** + * create builder for RecurringOrderKeySetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderKeySetMessageBuilder builder(final RecurringOrderKeySetMessage template) { + return RecurringOrderKeySetMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderKeySetMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessageBuilder.java new file mode 100644 index 00000000000..053b6bae2db --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessageBuilder.java @@ -0,0 +1,452 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderKeySetMessageBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderKeySetMessage recurringOrderKeySetMessage = RecurringOrderKeySetMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderKeySetMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + @Nullable + private String key; + + @Nullable + private String oldKey; + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @param id value to be set + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @param version value to be set + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @param createdAt value to be set + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

      Value of createdAt.

      + * @param lastModifiedAt value to be set + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param lastModifiedBy value to be set + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param createdBy value to be set + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @param sequenceNumber value to be set + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param resource value to be set + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder resource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param builder function to build the resource value + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @param resourceVersion value to be set + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

      key value of the RecurringOrder after the Set Key update action.

      + * @param key value to be set + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

      key value of the RecurringOrder before the Set Key update action.

      + * @param oldKey value to be set + * @return Builder + */ + + public RecurringOrderKeySetMessageBuilder oldKey(@Nullable final String oldKey) { + this.oldKey = oldKey; + return this; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      key value of the RecurringOrder after the Set Key update action.

      + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

      key value of the RecurringOrder before the Set Key update action.

      + * @return oldKey + */ + + @Nullable + public String getOldKey() { + return this.oldKey; + } + + /** + * builds RecurringOrderKeySetMessage with checking for non-null required values + * @return RecurringOrderKeySetMessage + */ + public RecurringOrderKeySetMessage build() { + Objects.requireNonNull(id, RecurringOrderKeySetMessage.class + ": id is missing"); + Objects.requireNonNull(version, RecurringOrderKeySetMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, RecurringOrderKeySetMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, RecurringOrderKeySetMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, RecurringOrderKeySetMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, RecurringOrderKeySetMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, RecurringOrderKeySetMessage.class + ": resourceVersion is missing"); + return new RecurringOrderKeySetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, key, oldKey); + } + + /** + * builds RecurringOrderKeySetMessage without checking for non-null required values + * @return RecurringOrderKeySetMessage + */ + public RecurringOrderKeySetMessage buildUnchecked() { + return new RecurringOrderKeySetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, key, oldKey); + } + + /** + * factory method for an instance of RecurringOrderKeySetMessageBuilder + * @return builder + */ + public static RecurringOrderKeySetMessageBuilder of() { + return new RecurringOrderKeySetMessageBuilder(); + } + + /** + * create builder for RecurringOrderKeySetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderKeySetMessageBuilder of(final RecurringOrderKeySetMessage template) { + RecurringOrderKeySetMessageBuilder builder = new RecurringOrderKeySetMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.key = template.getKey(); + builder.oldKey = template.getOldKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessageImpl.java new file mode 100644 index 00000000000..5610d1c1547 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessageImpl.java @@ -0,0 +1,319 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Set Key update action.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderKeySetMessageImpl implements RecurringOrderKeySetMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String key; + + private String oldKey; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderKeySetMessageImpl(@JsonProperty("id") final String id, @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("key") final String key, @JsonProperty("oldKey") final String oldKey) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.key = key; + this.oldKey = oldKey; + this.type = RECURRING_ORDER_KEY_SET; + } + + /** + * create empty instance + */ + public RecurringOrderKeySetMessageImpl() { + this.type = RECURRING_ORDER_KEY_SET; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      Message Type of the Message.

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

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      key value of the RecurringOrder after the Set Key update action.

      + */ + + public String getKey() { + return this.key; + } + + /** + *

      key value of the RecurringOrder before the Set Key update action.

      + */ + + public String getOldKey() { + return this.oldKey; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setOldKey(final String oldKey) { + this.oldKey = oldKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderKeySetMessageImpl that = (RecurringOrderKeySetMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(key, that.key) + .append(oldKey, that.oldKey) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(key, that.key) + .append(oldKey, that.oldKey) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(key) + .append(oldKey) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("key", key) + .append("oldKey", oldKey) + .build(); + } + + @Override + public RecurringOrderKeySetMessage copyDeep() { + return RecurringOrderKeySetMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessagePayload.java new file mode 100644 index 00000000000..31eabfed34b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessagePayload.java @@ -0,0 +1,145 @@ + +package com.commercetools.api.models.message; + +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; + +/** + *

      Generated after a successful Set Key update action.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderKeySetMessagePayload recurringOrderKeySetMessagePayload = RecurringOrderKeySetMessagePayload.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderKeySet") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderKeySetMessagePayloadImpl.class) +public interface RecurringOrderKeySetMessagePayload extends MessagePayload { + + /** + * discriminator value for RecurringOrderKeySetMessagePayload + */ + String RECURRING_ORDER_KEY_SET = "RecurringOrderKeySet"; + + /** + *

      key value of the RecurringOrder after the Set Key update action.

      + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

      key value of the RecurringOrder before the Set Key update action.

      + * @return oldKey + */ + + @JsonProperty("oldKey") + public String getOldKey(); + + /** + *

      key value of the RecurringOrder after the Set Key update action.

      + * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

      key value of the RecurringOrder before the Set Key update action.

      + * @param oldKey value to be set + */ + + public void setOldKey(final String oldKey); + + /** + * factory method + * @return instance of RecurringOrderKeySetMessagePayload + */ + public static RecurringOrderKeySetMessagePayload of() { + return new RecurringOrderKeySetMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderKeySetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderKeySetMessagePayload of(final RecurringOrderKeySetMessagePayload template) { + RecurringOrderKeySetMessagePayloadImpl instance = new RecurringOrderKeySetMessagePayloadImpl(); + instance.setKey(template.getKey()); + instance.setOldKey(template.getOldKey()); + return instance; + } + + public RecurringOrderKeySetMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderKeySetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderKeySetMessagePayload deepCopy( + @Nullable final RecurringOrderKeySetMessagePayload template) { + if (template == null) { + return null; + } + RecurringOrderKeySetMessagePayloadImpl instance = new RecurringOrderKeySetMessagePayloadImpl(); + instance.setKey(template.getKey()); + instance.setOldKey(template.getOldKey()); + return instance; + } + + /** + * builder factory method for RecurringOrderKeySetMessagePayload + * @return builder + */ + public static RecurringOrderKeySetMessagePayloadBuilder builder() { + return RecurringOrderKeySetMessagePayloadBuilder.of(); + } + + /** + * create builder for RecurringOrderKeySetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderKeySetMessagePayloadBuilder builder(final RecurringOrderKeySetMessagePayload template) { + return RecurringOrderKeySetMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderKeySetMessagePayload(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessagePayloadBuilder.java new file mode 100644 index 00000000000..2324801e940 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessagePayloadBuilder.java @@ -0,0 +1,109 @@ + +package com.commercetools.api.models.message; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderKeySetMessagePayloadBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderKeySetMessagePayload recurringOrderKeySetMessagePayload = RecurringOrderKeySetMessagePayload.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderKeySetMessagePayloadBuilder implements Builder { + + @Nullable + private String key; + + @Nullable + private String oldKey; + + /** + *

      key value of the RecurringOrder after the Set Key update action.

      + * @param key value to be set + * @return Builder + */ + + public RecurringOrderKeySetMessagePayloadBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

      key value of the RecurringOrder before the Set Key update action.

      + * @param oldKey value to be set + * @return Builder + */ + + public RecurringOrderKeySetMessagePayloadBuilder oldKey(@Nullable final String oldKey) { + this.oldKey = oldKey; + return this; + } + + /** + *

      key value of the RecurringOrder after the Set Key update action.

      + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

      key value of the RecurringOrder before the Set Key update action.

      + * @return oldKey + */ + + @Nullable + public String getOldKey() { + return this.oldKey; + } + + /** + * builds RecurringOrderKeySetMessagePayload with checking for non-null required values + * @return RecurringOrderKeySetMessagePayload + */ + public RecurringOrderKeySetMessagePayload build() { + return new RecurringOrderKeySetMessagePayloadImpl(key, oldKey); + } + + /** + * builds RecurringOrderKeySetMessagePayload without checking for non-null required values + * @return RecurringOrderKeySetMessagePayload + */ + public RecurringOrderKeySetMessagePayload buildUnchecked() { + return new RecurringOrderKeySetMessagePayloadImpl(key, oldKey); + } + + /** + * factory method for an instance of RecurringOrderKeySetMessagePayloadBuilder + * @return builder + */ + public static RecurringOrderKeySetMessagePayloadBuilder of() { + return new RecurringOrderKeySetMessagePayloadBuilder(); + } + + /** + * create builder for RecurringOrderKeySetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderKeySetMessagePayloadBuilder of(final RecurringOrderKeySetMessagePayload template) { + RecurringOrderKeySetMessagePayloadBuilder builder = new RecurringOrderKeySetMessagePayloadBuilder(); + builder.key = template.getKey(); + builder.oldKey = template.getOldKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessagePayloadImpl.java new file mode 100644 index 00000000000..1f6a8298439 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessagePayloadImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Set Key update action.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderKeySetMessagePayloadImpl implements RecurringOrderKeySetMessagePayload, ModelBase { + + private String type; + + private String key; + + private String oldKey; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderKeySetMessagePayloadImpl(@JsonProperty("key") final String key, + @JsonProperty("oldKey") final String oldKey) { + this.key = key; + this.oldKey = oldKey; + this.type = RECURRING_ORDER_KEY_SET; + } + + /** + * create empty instance + */ + public RecurringOrderKeySetMessagePayloadImpl() { + this.type = RECURRING_ORDER_KEY_SET; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      key value of the RecurringOrder after the Set Key update action.

      + */ + + public String getKey() { + return this.key; + } + + /** + *

      key value of the RecurringOrder before the Set Key update action.

      + */ + + public String getOldKey() { + return this.oldKey; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setOldKey(final String oldKey) { + this.oldKey = oldKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderKeySetMessagePayloadImpl that = (RecurringOrderKeySetMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(key, that.key) + .append(oldKey, that.oldKey) + .append(type, that.type) + .append(key, that.key) + .append(oldKey, that.oldKey) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(key).append(oldKey).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("key", key) + .append("oldKey", oldKey) + .build(); + } + + @Override + public RecurringOrderKeySetMessagePayload copyDeep() { + return RecurringOrderKeySetMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderMessagePayload.java new file mode 100644 index 00000000000..87d49c1d81f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderMessagePayload.java @@ -0,0 +1,68 @@ + +package com.commercetools.api.models.message; + +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; + +/** + * RecurringOrderMessagePayload + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderMessagePayload recurringOrderMessagePayload = RecurringOrderMessagePayload.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface RecurringOrderMessagePayload extends MessagePayload { + + public RecurringOrderMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderMessagePayload deepCopy(@Nullable final RecurringOrderMessagePayload template) { + if (template == null) { + return null; + } + RecurringOrderMessagePayloadImpl instance = new RecurringOrderMessagePayloadImpl(); + return instance; + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderMessagePayload(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderMessagePayloadImpl.java new file mode 100644 index 00000000000..c3bfabd7771 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderMessagePayloadImpl.java @@ -0,0 +1,76 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RecurringOrderMessagePayload + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderMessagePayloadImpl implements RecurringOrderMessagePayload, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderMessagePayloadImpl(@JsonProperty("type") final String type) { + this.type = type; + } + + /** + * create empty instance + */ + public RecurringOrderMessagePayloadImpl() { + } + + /** + * + */ + + public String getType() { + return this.type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderMessagePayloadImpl that = (RecurringOrderMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + + @Override + public RecurringOrderMessagePayload copyDeep() { + return RecurringOrderMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessage.java new file mode 100644 index 00000000000..675680c758c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessage.java @@ -0,0 +1,183 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Generated after a successful Set Schedule update action.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderScheduleSetMessage recurringOrderScheduleSetMessage = RecurringOrderScheduleSetMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .recurrencePolicySchedule(recurrencePolicyScheduleBuilder -> recurrencePolicyScheduleBuilder)
      + *             .oldRecurrencePolicySchedule(oldRecurrencePolicyScheduleBuilder -> oldRecurrencePolicyScheduleBuilder)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderScheduleSet") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderScheduleSetMessageImpl.class) +public interface RecurringOrderScheduleSetMessage extends Message { + + /** + * discriminator value for RecurringOrderScheduleSetMessage + */ + String RECURRING_ORDER_SCHEDULE_SET = "RecurringOrderScheduleSet"; + + /** + *

      Schedule of the Recurring Order after the Set Schedule update action.

      + * @return recurrencePolicySchedule + */ + @NotNull + @Valid + @JsonProperty("recurrencePolicySchedule") + public RecurrencePolicySchedule getRecurrencePolicySchedule(); + + /** + *

      Schedule of the Recurring Order before the Set Schedule update action.

      + * @return oldRecurrencePolicySchedule + */ + @NotNull + @Valid + @JsonProperty("oldRecurrencePolicySchedule") + public RecurrencePolicySchedule getOldRecurrencePolicySchedule(); + + /** + *

      Schedule of the Recurring Order after the Set Schedule update action.

      + * @param recurrencePolicySchedule value to be set + */ + + public void setRecurrencePolicySchedule(final RecurrencePolicySchedule recurrencePolicySchedule); + + /** + *

      Schedule of the Recurring Order before the Set Schedule update action.

      + * @param oldRecurrencePolicySchedule value to be set + */ + + public void setOldRecurrencePolicySchedule(final RecurrencePolicySchedule oldRecurrencePolicySchedule); + + /** + * factory method + * @return instance of RecurringOrderScheduleSetMessage + */ + public static RecurringOrderScheduleSetMessage of() { + return new RecurringOrderScheduleSetMessageImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderScheduleSetMessage + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderScheduleSetMessage of(final RecurringOrderScheduleSetMessage template) { + RecurringOrderScheduleSetMessageImpl instance = new RecurringOrderScheduleSetMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setRecurrencePolicySchedule(template.getRecurrencePolicySchedule()); + instance.setOldRecurrencePolicySchedule(template.getOldRecurrencePolicySchedule()); + return instance; + } + + public RecurringOrderScheduleSetMessage copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderScheduleSetMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderScheduleSetMessage deepCopy(@Nullable final RecurringOrderScheduleSetMessage template) { + if (template == null) { + return null; + } + RecurringOrderScheduleSetMessageImpl instance = new RecurringOrderScheduleSetMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setRecurrencePolicySchedule(com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule + .deepCopy(template.getRecurrencePolicySchedule())); + instance.setOldRecurrencePolicySchedule(com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule + .deepCopy(template.getOldRecurrencePolicySchedule())); + return instance; + } + + /** + * builder factory method for RecurringOrderScheduleSetMessage + * @return builder + */ + public static RecurringOrderScheduleSetMessageBuilder builder() { + return RecurringOrderScheduleSetMessageBuilder.of(); + } + + /** + * create builder for RecurringOrderScheduleSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderScheduleSetMessageBuilder builder(final RecurringOrderScheduleSetMessage template) { + return RecurringOrderScheduleSetMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderScheduleSetMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessageBuilder.java new file mode 100644 index 00000000000..8ec971a0d6a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessageBuilder.java @@ -0,0 +1,488 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderScheduleSetMessageBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderScheduleSetMessage recurringOrderScheduleSetMessage = RecurringOrderScheduleSetMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .recurrencePolicySchedule(recurrencePolicyScheduleBuilder -> recurrencePolicyScheduleBuilder)
      + *             .oldRecurrencePolicySchedule(oldRecurrencePolicyScheduleBuilder -> oldRecurrencePolicyScheduleBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderScheduleSetMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule recurrencePolicySchedule; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule oldRecurrencePolicySchedule; + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @param id value to be set + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @param version value to be set + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @param createdAt value to be set + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

      Value of createdAt.

      + * @param lastModifiedAt value to be set + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param lastModifiedBy value to be set + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param createdBy value to be set + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @param sequenceNumber value to be set + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param resource value to be set + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder resource( + final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param builder function to build the resource value + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @param resourceVersion value to be set + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

      Schedule of the Recurring Order after the Set Schedule update action.

      + * @param recurrencePolicySchedule value to be set + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder recurrencePolicySchedule( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule recurrencePolicySchedule) { + this.recurrencePolicySchedule = recurrencePolicySchedule; + return this; + } + + /** + *

      Schedule of the Recurring Order after the Set Schedule update action.

      + * @param builder function to build the recurrencePolicySchedule value + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder recurrencePolicySchedule( + Function> builder) { + this.recurrencePolicySchedule = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleBuilder.of()) + .build(); + return this; + } + + /** + *

      Schedule of the Recurring Order before the Set Schedule update action.

      + * @param oldRecurrencePolicySchedule value to be set + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder oldRecurrencePolicySchedule( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule oldRecurrencePolicySchedule) { + this.oldRecurrencePolicySchedule = oldRecurrencePolicySchedule; + return this; + } + + /** + *

      Schedule of the Recurring Order before the Set Schedule update action.

      + * @param builder function to build the oldRecurrencePolicySchedule value + * @return Builder + */ + + public RecurringOrderScheduleSetMessageBuilder oldRecurrencePolicySchedule( + Function> builder) { + this.oldRecurrencePolicySchedule = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleBuilder.of()) + .build(); + return this; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      Schedule of the Recurring Order after the Set Schedule update action.

      + * @return recurrencePolicySchedule + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule getRecurrencePolicySchedule() { + return this.recurrencePolicySchedule; + } + + /** + *

      Schedule of the Recurring Order before the Set Schedule update action.

      + * @return oldRecurrencePolicySchedule + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule getOldRecurrencePolicySchedule() { + return this.oldRecurrencePolicySchedule; + } + + /** + * builds RecurringOrderScheduleSetMessage with checking for non-null required values + * @return RecurringOrderScheduleSetMessage + */ + public RecurringOrderScheduleSetMessage build() { + Objects.requireNonNull(id, RecurringOrderScheduleSetMessage.class + ": id is missing"); + Objects.requireNonNull(version, RecurringOrderScheduleSetMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, RecurringOrderScheduleSetMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, RecurringOrderScheduleSetMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, RecurringOrderScheduleSetMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, RecurringOrderScheduleSetMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + RecurringOrderScheduleSetMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(recurrencePolicySchedule, + RecurringOrderScheduleSetMessage.class + ": recurrencePolicySchedule is missing"); + Objects.requireNonNull(oldRecurrencePolicySchedule, + RecurringOrderScheduleSetMessage.class + ": oldRecurrencePolicySchedule is missing"); + return new RecurringOrderScheduleSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, + recurrencePolicySchedule, oldRecurrencePolicySchedule); + } + + /** + * builds RecurringOrderScheduleSetMessage without checking for non-null required values + * @return RecurringOrderScheduleSetMessage + */ + public RecurringOrderScheduleSetMessage buildUnchecked() { + return new RecurringOrderScheduleSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, + recurrencePolicySchedule, oldRecurrencePolicySchedule); + } + + /** + * factory method for an instance of RecurringOrderScheduleSetMessageBuilder + * @return builder + */ + public static RecurringOrderScheduleSetMessageBuilder of() { + return new RecurringOrderScheduleSetMessageBuilder(); + } + + /** + * create builder for RecurringOrderScheduleSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderScheduleSetMessageBuilder of(final RecurringOrderScheduleSetMessage template) { + RecurringOrderScheduleSetMessageBuilder builder = new RecurringOrderScheduleSetMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.recurrencePolicySchedule = template.getRecurrencePolicySchedule(); + builder.oldRecurrencePolicySchedule = template.getOldRecurrencePolicySchedule(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessageImpl.java new file mode 100644 index 00000000000..1ba9404cc59 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessageImpl.java @@ -0,0 +1,323 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Set Schedule update action.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderScheduleSetMessageImpl implements RecurringOrderScheduleSetMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule recurrencePolicySchedule; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule oldRecurrencePolicySchedule; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderScheduleSetMessageImpl(@JsonProperty("id") final String id, + @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("recurrencePolicySchedule") final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule recurrencePolicySchedule, + @JsonProperty("oldRecurrencePolicySchedule") final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule oldRecurrencePolicySchedule) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.recurrencePolicySchedule = recurrencePolicySchedule; + this.oldRecurrencePolicySchedule = oldRecurrencePolicySchedule; + this.type = RECURRING_ORDER_SCHEDULE_SET; + } + + /** + * create empty instance + */ + public RecurringOrderScheduleSetMessageImpl() { + this.type = RECURRING_ORDER_SCHEDULE_SET; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      Message Type of the Message.

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

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      Schedule of the Recurring Order after the Set Schedule update action.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule getRecurrencePolicySchedule() { + return this.recurrencePolicySchedule; + } + + /** + *

      Schedule of the Recurring Order before the Set Schedule update action.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule getOldRecurrencePolicySchedule() { + return this.oldRecurrencePolicySchedule; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setRecurrencePolicySchedule( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule recurrencePolicySchedule) { + this.recurrencePolicySchedule = recurrencePolicySchedule; + } + + public void setOldRecurrencePolicySchedule( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule oldRecurrencePolicySchedule) { + this.oldRecurrencePolicySchedule = oldRecurrencePolicySchedule; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderScheduleSetMessageImpl that = (RecurringOrderScheduleSetMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(recurrencePolicySchedule, that.recurrencePolicySchedule) + .append(oldRecurrencePolicySchedule, that.oldRecurrencePolicySchedule) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(recurrencePolicySchedule, that.recurrencePolicySchedule) + .append(oldRecurrencePolicySchedule, that.oldRecurrencePolicySchedule) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(recurrencePolicySchedule) + .append(oldRecurrencePolicySchedule) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("recurrencePolicySchedule", recurrencePolicySchedule) + .append("oldRecurrencePolicySchedule", oldRecurrencePolicySchedule) + .build(); + } + + @Override + public RecurringOrderScheduleSetMessage copyDeep() { + return RecurringOrderScheduleSetMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessagePayload.java new file mode 100644 index 00000000000..ffe447718f3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessagePayload.java @@ -0,0 +1,157 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Generated after a successful Set Schedule update action.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderScheduleSetMessagePayload recurringOrderScheduleSetMessagePayload = RecurringOrderScheduleSetMessagePayload.builder()
      + *             .recurrencePolicySchedule(recurrencePolicyScheduleBuilder -> recurrencePolicyScheduleBuilder)
      + *             .oldRecurrencePolicySchedule(oldRecurrencePolicyScheduleBuilder -> oldRecurrencePolicyScheduleBuilder)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderScheduleSet") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderScheduleSetMessagePayloadImpl.class) +public interface RecurringOrderScheduleSetMessagePayload extends MessagePayload { + + /** + * discriminator value for RecurringOrderScheduleSetMessagePayload + */ + String RECURRING_ORDER_SCHEDULE_SET = "RecurringOrderScheduleSet"; + + /** + *

      Schedule of the Recurring Order after the Set Schedule update action.

      + * @return recurrencePolicySchedule + */ + @NotNull + @Valid + @JsonProperty("recurrencePolicySchedule") + public RecurrencePolicySchedule getRecurrencePolicySchedule(); + + /** + *

      Schedule of the Recurring Order before the Set Schedule update action.

      + * @return oldRecurrencePolicySchedule + */ + @NotNull + @Valid + @JsonProperty("oldRecurrencePolicySchedule") + public RecurrencePolicySchedule getOldRecurrencePolicySchedule(); + + /** + *

      Schedule of the Recurring Order after the Set Schedule update action.

      + * @param recurrencePolicySchedule value to be set + */ + + public void setRecurrencePolicySchedule(final RecurrencePolicySchedule recurrencePolicySchedule); + + /** + *

      Schedule of the Recurring Order before the Set Schedule update action.

      + * @param oldRecurrencePolicySchedule value to be set + */ + + public void setOldRecurrencePolicySchedule(final RecurrencePolicySchedule oldRecurrencePolicySchedule); + + /** + * factory method + * @return instance of RecurringOrderScheduleSetMessagePayload + */ + public static RecurringOrderScheduleSetMessagePayload of() { + return new RecurringOrderScheduleSetMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderScheduleSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderScheduleSetMessagePayload of(final RecurringOrderScheduleSetMessagePayload template) { + RecurringOrderScheduleSetMessagePayloadImpl instance = new RecurringOrderScheduleSetMessagePayloadImpl(); + instance.setRecurrencePolicySchedule(template.getRecurrencePolicySchedule()); + instance.setOldRecurrencePolicySchedule(template.getOldRecurrencePolicySchedule()); + return instance; + } + + public RecurringOrderScheduleSetMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderScheduleSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderScheduleSetMessagePayload deepCopy( + @Nullable final RecurringOrderScheduleSetMessagePayload template) { + if (template == null) { + return null; + } + RecurringOrderScheduleSetMessagePayloadImpl instance = new RecurringOrderScheduleSetMessagePayloadImpl(); + instance.setRecurrencePolicySchedule(com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule + .deepCopy(template.getRecurrencePolicySchedule())); + instance.setOldRecurrencePolicySchedule(com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule + .deepCopy(template.getOldRecurrencePolicySchedule())); + return instance; + } + + /** + * builder factory method for RecurringOrderScheduleSetMessagePayload + * @return builder + */ + public static RecurringOrderScheduleSetMessagePayloadBuilder builder() { + return RecurringOrderScheduleSetMessagePayloadBuilder.of(); + } + + /** + * create builder for RecurringOrderScheduleSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderScheduleSetMessagePayloadBuilder builder( + final RecurringOrderScheduleSetMessagePayload template) { + return RecurringOrderScheduleSetMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderScheduleSetMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessagePayloadBuilder.java new file mode 100644 index 00000000000..2d01a8cd3b0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessagePayloadBuilder.java @@ -0,0 +1,142 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderScheduleSetMessagePayloadBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderScheduleSetMessagePayload recurringOrderScheduleSetMessagePayload = RecurringOrderScheduleSetMessagePayload.builder()
      + *             .recurrencePolicySchedule(recurrencePolicyScheduleBuilder -> recurrencePolicyScheduleBuilder)
      + *             .oldRecurrencePolicySchedule(oldRecurrencePolicyScheduleBuilder -> oldRecurrencePolicyScheduleBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderScheduleSetMessagePayloadBuilder + implements Builder { + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule recurrencePolicySchedule; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule oldRecurrencePolicySchedule; + + /** + *

      Schedule of the Recurring Order after the Set Schedule update action.

      + * @param recurrencePolicySchedule value to be set + * @return Builder + */ + + public RecurringOrderScheduleSetMessagePayloadBuilder recurrencePolicySchedule( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule recurrencePolicySchedule) { + this.recurrencePolicySchedule = recurrencePolicySchedule; + return this; + } + + /** + *

      Schedule of the Recurring Order after the Set Schedule update action.

      + * @param builder function to build the recurrencePolicySchedule value + * @return Builder + */ + + public RecurringOrderScheduleSetMessagePayloadBuilder recurrencePolicySchedule( + Function> builder) { + this.recurrencePolicySchedule = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleBuilder.of()) + .build(); + return this; + } + + /** + *

      Schedule of the Recurring Order before the Set Schedule update action.

      + * @param oldRecurrencePolicySchedule value to be set + * @return Builder + */ + + public RecurringOrderScheduleSetMessagePayloadBuilder oldRecurrencePolicySchedule( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule oldRecurrencePolicySchedule) { + this.oldRecurrencePolicySchedule = oldRecurrencePolicySchedule; + return this; + } + + /** + *

      Schedule of the Recurring Order before the Set Schedule update action.

      + * @param builder function to build the oldRecurrencePolicySchedule value + * @return Builder + */ + + public RecurringOrderScheduleSetMessagePayloadBuilder oldRecurrencePolicySchedule( + Function> builder) { + this.oldRecurrencePolicySchedule = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleBuilder.of()) + .build(); + return this; + } + + /** + *

      Schedule of the Recurring Order after the Set Schedule update action.

      + * @return recurrencePolicySchedule + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule getRecurrencePolicySchedule() { + return this.recurrencePolicySchedule; + } + + /** + *

      Schedule of the Recurring Order before the Set Schedule update action.

      + * @return oldRecurrencePolicySchedule + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule getOldRecurrencePolicySchedule() { + return this.oldRecurrencePolicySchedule; + } + + /** + * builds RecurringOrderScheduleSetMessagePayload with checking for non-null required values + * @return RecurringOrderScheduleSetMessagePayload + */ + public RecurringOrderScheduleSetMessagePayload build() { + Objects.requireNonNull(recurrencePolicySchedule, + RecurringOrderScheduleSetMessagePayload.class + ": recurrencePolicySchedule is missing"); + Objects.requireNonNull(oldRecurrencePolicySchedule, + RecurringOrderScheduleSetMessagePayload.class + ": oldRecurrencePolicySchedule is missing"); + return new RecurringOrderScheduleSetMessagePayloadImpl(recurrencePolicySchedule, oldRecurrencePolicySchedule); + } + + /** + * builds RecurringOrderScheduleSetMessagePayload without checking for non-null required values + * @return RecurringOrderScheduleSetMessagePayload + */ + public RecurringOrderScheduleSetMessagePayload buildUnchecked() { + return new RecurringOrderScheduleSetMessagePayloadImpl(recurrencePolicySchedule, oldRecurrencePolicySchedule); + } + + /** + * factory method for an instance of RecurringOrderScheduleSetMessagePayloadBuilder + * @return builder + */ + public static RecurringOrderScheduleSetMessagePayloadBuilder of() { + return new RecurringOrderScheduleSetMessagePayloadBuilder(); + } + + /** + * create builder for RecurringOrderScheduleSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderScheduleSetMessagePayloadBuilder of( + final RecurringOrderScheduleSetMessagePayload template) { + RecurringOrderScheduleSetMessagePayloadBuilder builder = new RecurringOrderScheduleSetMessagePayloadBuilder(); + builder.recurrencePolicySchedule = template.getRecurrencePolicySchedule(); + builder.oldRecurrencePolicySchedule = template.getOldRecurrencePolicySchedule(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessagePayloadImpl.java new file mode 100644 index 00000000000..66587af0f44 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessagePayloadImpl.java @@ -0,0 +1,123 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Set Schedule update action.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderScheduleSetMessagePayloadImpl implements RecurringOrderScheduleSetMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule recurrencePolicySchedule; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule oldRecurrencePolicySchedule; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderScheduleSetMessagePayloadImpl( + @JsonProperty("recurrencePolicySchedule") final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule recurrencePolicySchedule, + @JsonProperty("oldRecurrencePolicySchedule") final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule oldRecurrencePolicySchedule) { + this.recurrencePolicySchedule = recurrencePolicySchedule; + this.oldRecurrencePolicySchedule = oldRecurrencePolicySchedule; + this.type = RECURRING_ORDER_SCHEDULE_SET; + } + + /** + * create empty instance + */ + public RecurringOrderScheduleSetMessagePayloadImpl() { + this.type = RECURRING_ORDER_SCHEDULE_SET; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      Schedule of the Recurring Order after the Set Schedule update action.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule getRecurrencePolicySchedule() { + return this.recurrencePolicySchedule; + } + + /** + *

      Schedule of the Recurring Order before the Set Schedule update action.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule getOldRecurrencePolicySchedule() { + return this.oldRecurrencePolicySchedule; + } + + public void setRecurrencePolicySchedule( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule recurrencePolicySchedule) { + this.recurrencePolicySchedule = recurrencePolicySchedule; + } + + public void setOldRecurrencePolicySchedule( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule oldRecurrencePolicySchedule) { + this.oldRecurrencePolicySchedule = oldRecurrencePolicySchedule; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderScheduleSetMessagePayloadImpl that = (RecurringOrderScheduleSetMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(recurrencePolicySchedule, that.recurrencePolicySchedule) + .append(oldRecurrencePolicySchedule, that.oldRecurrencePolicySchedule) + .append(type, that.type) + .append(recurrencePolicySchedule, that.recurrencePolicySchedule) + .append(oldRecurrencePolicySchedule, that.oldRecurrencePolicySchedule) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(recurrencePolicySchedule) + .append(oldRecurrencePolicySchedule) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("recurrencePolicySchedule", recurrencePolicySchedule) + .append("oldRecurrencePolicySchedule", oldRecurrencePolicySchedule) + .build(); + } + + @Override + public RecurringOrderScheduleSetMessagePayload copyDeep() { + return RecurringOrderScheduleSetMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessage.java new file mode 100644 index 00000000000..0eedee16861 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessage.java @@ -0,0 +1,178 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.time.ZonedDateTime; +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; + +/** + *

      Generated after a successful Set Starts At update action.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderStartsAtSetMessage recurringOrderStartsAtSetMessage = RecurringOrderStartsAtSetMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .startsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .oldStartsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderStartsAtSet") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderStartsAtSetMessageImpl.class) +public interface RecurringOrderStartsAtSetMessage extends Message { + + /** + * discriminator value for RecurringOrderStartsAtSetMessage + */ + String RECURRING_ORDER_STARTS_AT_SET = "RecurringOrderStartsAtSet"; + + /** + *

      Start date and time of the Recurring Order after the Set Starts At update action.

      + * @return startsAt + */ + @NotNull + @JsonProperty("startsAt") + public ZonedDateTime getStartsAt(); + + /** + *

      Start date and time of the Recurring Order before the Set Starts At update action.

      + * @return oldStartsAt + */ + @NotNull + @JsonProperty("oldStartsAt") + public ZonedDateTime getOldStartsAt(); + + /** + *

      Start date and time of the Recurring Order after the Set Starts At update action.

      + * @param startsAt value to be set + */ + + public void setStartsAt(final ZonedDateTime startsAt); + + /** + *

      Start date and time of the Recurring Order before the Set Starts At update action.

      + * @param oldStartsAt value to be set + */ + + public void setOldStartsAt(final ZonedDateTime oldStartsAt); + + /** + * factory method + * @return instance of RecurringOrderStartsAtSetMessage + */ + public static RecurringOrderStartsAtSetMessage of() { + return new RecurringOrderStartsAtSetMessageImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderStartsAtSetMessage + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderStartsAtSetMessage of(final RecurringOrderStartsAtSetMessage template) { + RecurringOrderStartsAtSetMessageImpl instance = new RecurringOrderStartsAtSetMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setStartsAt(template.getStartsAt()); + instance.setOldStartsAt(template.getOldStartsAt()); + return instance; + } + + public RecurringOrderStartsAtSetMessage copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderStartsAtSetMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderStartsAtSetMessage deepCopy(@Nullable final RecurringOrderStartsAtSetMessage template) { + if (template == null) { + return null; + } + RecurringOrderStartsAtSetMessageImpl instance = new RecurringOrderStartsAtSetMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setStartsAt(template.getStartsAt()); + instance.setOldStartsAt(template.getOldStartsAt()); + return instance; + } + + /** + * builder factory method for RecurringOrderStartsAtSetMessage + * @return builder + */ + public static RecurringOrderStartsAtSetMessageBuilder builder() { + return RecurringOrderStartsAtSetMessageBuilder.of(); + } + + /** + * create builder for RecurringOrderStartsAtSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderStartsAtSetMessageBuilder builder(final RecurringOrderStartsAtSetMessage template) { + return RecurringOrderStartsAtSetMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderStartsAtSetMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessageBuilder.java new file mode 100644 index 00000000000..60f0a8d49ca --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessageBuilder.java @@ -0,0 +1,456 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderStartsAtSetMessageBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderStartsAtSetMessage recurringOrderStartsAtSetMessage = RecurringOrderStartsAtSetMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .startsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .oldStartsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderStartsAtSetMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private java.time.ZonedDateTime startsAt; + + private java.time.ZonedDateTime oldStartsAt; + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @param id value to be set + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @param version value to be set + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @param createdAt value to be set + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

      Value of createdAt.

      + * @param lastModifiedAt value to be set + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param lastModifiedBy value to be set + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param createdBy value to be set + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @param sequenceNumber value to be set + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param resource value to be set + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder resource( + final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param builder function to build the resource value + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @param resourceVersion value to be set + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

      Start date and time of the Recurring Order after the Set Starts At update action.

      + * @param startsAt value to be set + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder startsAt(final java.time.ZonedDateTime startsAt) { + this.startsAt = startsAt; + return this; + } + + /** + *

      Start date and time of the Recurring Order before the Set Starts At update action.

      + * @param oldStartsAt value to be set + * @return Builder + */ + + public RecurringOrderStartsAtSetMessageBuilder oldStartsAt(final java.time.ZonedDateTime oldStartsAt) { + this.oldStartsAt = oldStartsAt; + return this; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      Start date and time of the Recurring Order after the Set Starts At update action.

      + * @return startsAt + */ + + public java.time.ZonedDateTime getStartsAt() { + return this.startsAt; + } + + /** + *

      Start date and time of the Recurring Order before the Set Starts At update action.

      + * @return oldStartsAt + */ + + public java.time.ZonedDateTime getOldStartsAt() { + return this.oldStartsAt; + } + + /** + * builds RecurringOrderStartsAtSetMessage with checking for non-null required values + * @return RecurringOrderStartsAtSetMessage + */ + public RecurringOrderStartsAtSetMessage build() { + Objects.requireNonNull(id, RecurringOrderStartsAtSetMessage.class + ": id is missing"); + Objects.requireNonNull(version, RecurringOrderStartsAtSetMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, RecurringOrderStartsAtSetMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, RecurringOrderStartsAtSetMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, RecurringOrderStartsAtSetMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, RecurringOrderStartsAtSetMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + RecurringOrderStartsAtSetMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(startsAt, RecurringOrderStartsAtSetMessage.class + ": startsAt is missing"); + Objects.requireNonNull(oldStartsAt, RecurringOrderStartsAtSetMessage.class + ": oldStartsAt is missing"); + return new RecurringOrderStartsAtSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, startsAt, + oldStartsAt); + } + + /** + * builds RecurringOrderStartsAtSetMessage without checking for non-null required values + * @return RecurringOrderStartsAtSetMessage + */ + public RecurringOrderStartsAtSetMessage buildUnchecked() { + return new RecurringOrderStartsAtSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, startsAt, + oldStartsAt); + } + + /** + * factory method for an instance of RecurringOrderStartsAtSetMessageBuilder + * @return builder + */ + public static RecurringOrderStartsAtSetMessageBuilder of() { + return new RecurringOrderStartsAtSetMessageBuilder(); + } + + /** + * create builder for RecurringOrderStartsAtSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderStartsAtSetMessageBuilder of(final RecurringOrderStartsAtSetMessage template) { + RecurringOrderStartsAtSetMessageBuilder builder = new RecurringOrderStartsAtSetMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.startsAt = template.getStartsAt(); + builder.oldStartsAt = template.getOldStartsAt(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessageImpl.java new file mode 100644 index 00000000000..85bfe4e23a3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessageImpl.java @@ -0,0 +1,321 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Set Starts At update action.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderStartsAtSetMessageImpl implements RecurringOrderStartsAtSetMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private java.time.ZonedDateTime startsAt; + + private java.time.ZonedDateTime oldStartsAt; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderStartsAtSetMessageImpl(@JsonProperty("id") final String id, + @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("startsAt") final java.time.ZonedDateTime startsAt, + @JsonProperty("oldStartsAt") final java.time.ZonedDateTime oldStartsAt) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.startsAt = startsAt; + this.oldStartsAt = oldStartsAt; + this.type = RECURRING_ORDER_STARTS_AT_SET; + } + + /** + * create empty instance + */ + public RecurringOrderStartsAtSetMessageImpl() { + this.type = RECURRING_ORDER_STARTS_AT_SET; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      Message Type of the Message.

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

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      Start date and time of the Recurring Order after the Set Starts At update action.

      + */ + + public java.time.ZonedDateTime getStartsAt() { + return this.startsAt; + } + + /** + *

      Start date and time of the Recurring Order before the Set Starts At update action.

      + */ + + public java.time.ZonedDateTime getOldStartsAt() { + return this.oldStartsAt; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setStartsAt(final java.time.ZonedDateTime startsAt) { + this.startsAt = startsAt; + } + + public void setOldStartsAt(final java.time.ZonedDateTime oldStartsAt) { + this.oldStartsAt = oldStartsAt; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderStartsAtSetMessageImpl that = (RecurringOrderStartsAtSetMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(startsAt, that.startsAt) + .append(oldStartsAt, that.oldStartsAt) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(startsAt, that.startsAt) + .append(oldStartsAt, that.oldStartsAt) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(startsAt) + .append(oldStartsAt) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("startsAt", startsAt) + .append("oldStartsAt", oldStartsAt) + .build(); + } + + @Override + public RecurringOrderStartsAtSetMessage copyDeep() { + return RecurringOrderStartsAtSetMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessagePayload.java new file mode 100644 index 00000000000..8c4c20ce27b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessagePayload.java @@ -0,0 +1,152 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.time.ZonedDateTime; +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; + +/** + *

      Generated after a successful Set Starts At update action.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderStartsAtSetMessagePayload recurringOrderStartsAtSetMessagePayload = RecurringOrderStartsAtSetMessagePayload.builder()
      + *             .startsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .oldStartsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderStartsAtSet") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderStartsAtSetMessagePayloadImpl.class) +public interface RecurringOrderStartsAtSetMessagePayload extends MessagePayload { + + /** + * discriminator value for RecurringOrderStartsAtSetMessagePayload + */ + String RECURRING_ORDER_STARTS_AT_SET = "RecurringOrderStartsAtSet"; + + /** + *

      Start date and time of the Recurring Order after the Set Starts At update action.

      + * @return startsAt + */ + @NotNull + @JsonProperty("startsAt") + public ZonedDateTime getStartsAt(); + + /** + *

      Start date and time of the Recurring Order before the Set Starts At update action.

      + * @return oldStartsAt + */ + @NotNull + @JsonProperty("oldStartsAt") + public ZonedDateTime getOldStartsAt(); + + /** + *

      Start date and time of the Recurring Order after the Set Starts At update action.

      + * @param startsAt value to be set + */ + + public void setStartsAt(final ZonedDateTime startsAt); + + /** + *

      Start date and time of the Recurring Order before the Set Starts At update action.

      + * @param oldStartsAt value to be set + */ + + public void setOldStartsAt(final ZonedDateTime oldStartsAt); + + /** + * factory method + * @return instance of RecurringOrderStartsAtSetMessagePayload + */ + public static RecurringOrderStartsAtSetMessagePayload of() { + return new RecurringOrderStartsAtSetMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderStartsAtSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderStartsAtSetMessagePayload of(final RecurringOrderStartsAtSetMessagePayload template) { + RecurringOrderStartsAtSetMessagePayloadImpl instance = new RecurringOrderStartsAtSetMessagePayloadImpl(); + instance.setStartsAt(template.getStartsAt()); + instance.setOldStartsAt(template.getOldStartsAt()); + return instance; + } + + public RecurringOrderStartsAtSetMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderStartsAtSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderStartsAtSetMessagePayload deepCopy( + @Nullable final RecurringOrderStartsAtSetMessagePayload template) { + if (template == null) { + return null; + } + RecurringOrderStartsAtSetMessagePayloadImpl instance = new RecurringOrderStartsAtSetMessagePayloadImpl(); + instance.setStartsAt(template.getStartsAt()); + instance.setOldStartsAt(template.getOldStartsAt()); + return instance; + } + + /** + * builder factory method for RecurringOrderStartsAtSetMessagePayload + * @return builder + */ + public static RecurringOrderStartsAtSetMessagePayloadBuilder builder() { + return RecurringOrderStartsAtSetMessagePayloadBuilder.of(); + } + + /** + * create builder for RecurringOrderStartsAtSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderStartsAtSetMessagePayloadBuilder builder( + final RecurringOrderStartsAtSetMessagePayload template) { + return RecurringOrderStartsAtSetMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderStartsAtSetMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessagePayloadBuilder.java new file mode 100644 index 00000000000..006da278d96 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessagePayloadBuilder.java @@ -0,0 +1,109 @@ + +package com.commercetools.api.models.message; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderStartsAtSetMessagePayloadBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderStartsAtSetMessagePayload recurringOrderStartsAtSetMessagePayload = RecurringOrderStartsAtSetMessagePayload.builder()
      + *             .startsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .oldStartsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderStartsAtSetMessagePayloadBuilder + implements Builder { + + private java.time.ZonedDateTime startsAt; + + private java.time.ZonedDateTime oldStartsAt; + + /** + *

      Start date and time of the Recurring Order after the Set Starts At update action.

      + * @param startsAt value to be set + * @return Builder + */ + + public RecurringOrderStartsAtSetMessagePayloadBuilder startsAt(final java.time.ZonedDateTime startsAt) { + this.startsAt = startsAt; + return this; + } + + /** + *

      Start date and time of the Recurring Order before the Set Starts At update action.

      + * @param oldStartsAt value to be set + * @return Builder + */ + + public RecurringOrderStartsAtSetMessagePayloadBuilder oldStartsAt(final java.time.ZonedDateTime oldStartsAt) { + this.oldStartsAt = oldStartsAt; + return this; + } + + /** + *

      Start date and time of the Recurring Order after the Set Starts At update action.

      + * @return startsAt + */ + + public java.time.ZonedDateTime getStartsAt() { + return this.startsAt; + } + + /** + *

      Start date and time of the Recurring Order before the Set Starts At update action.

      + * @return oldStartsAt + */ + + public java.time.ZonedDateTime getOldStartsAt() { + return this.oldStartsAt; + } + + /** + * builds RecurringOrderStartsAtSetMessagePayload with checking for non-null required values + * @return RecurringOrderStartsAtSetMessagePayload + */ + public RecurringOrderStartsAtSetMessagePayload build() { + Objects.requireNonNull(startsAt, RecurringOrderStartsAtSetMessagePayload.class + ": startsAt is missing"); + Objects.requireNonNull(oldStartsAt, RecurringOrderStartsAtSetMessagePayload.class + ": oldStartsAt is missing"); + return new RecurringOrderStartsAtSetMessagePayloadImpl(startsAt, oldStartsAt); + } + + /** + * builds RecurringOrderStartsAtSetMessagePayload without checking for non-null required values + * @return RecurringOrderStartsAtSetMessagePayload + */ + public RecurringOrderStartsAtSetMessagePayload buildUnchecked() { + return new RecurringOrderStartsAtSetMessagePayloadImpl(startsAt, oldStartsAt); + } + + /** + * factory method for an instance of RecurringOrderStartsAtSetMessagePayloadBuilder + * @return builder + */ + public static RecurringOrderStartsAtSetMessagePayloadBuilder of() { + return new RecurringOrderStartsAtSetMessagePayloadBuilder(); + } + + /** + * create builder for RecurringOrderStartsAtSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderStartsAtSetMessagePayloadBuilder of( + final RecurringOrderStartsAtSetMessagePayload template) { + RecurringOrderStartsAtSetMessagePayloadBuilder builder = new RecurringOrderStartsAtSetMessagePayloadBuilder(); + builder.startsAt = template.getStartsAt(); + builder.oldStartsAt = template.getOldStartsAt(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessagePayloadImpl.java new file mode 100644 index 00000000000..0015fa046a8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessagePayloadImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Set Starts At update action.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderStartsAtSetMessagePayloadImpl implements RecurringOrderStartsAtSetMessagePayload, ModelBase { + + private String type; + + private java.time.ZonedDateTime startsAt; + + private java.time.ZonedDateTime oldStartsAt; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderStartsAtSetMessagePayloadImpl(@JsonProperty("startsAt") final java.time.ZonedDateTime startsAt, + @JsonProperty("oldStartsAt") final java.time.ZonedDateTime oldStartsAt) { + this.startsAt = startsAt; + this.oldStartsAt = oldStartsAt; + this.type = RECURRING_ORDER_STARTS_AT_SET; + } + + /** + * create empty instance + */ + public RecurringOrderStartsAtSetMessagePayloadImpl() { + this.type = RECURRING_ORDER_STARTS_AT_SET; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      Start date and time of the Recurring Order after the Set Starts At update action.

      + */ + + public java.time.ZonedDateTime getStartsAt() { + return this.startsAt; + } + + /** + *

      Start date and time of the Recurring Order before the Set Starts At update action.

      + */ + + public java.time.ZonedDateTime getOldStartsAt() { + return this.oldStartsAt; + } + + public void setStartsAt(final java.time.ZonedDateTime startsAt) { + this.startsAt = startsAt; + } + + public void setOldStartsAt(final java.time.ZonedDateTime oldStartsAt) { + this.oldStartsAt = oldStartsAt; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderStartsAtSetMessagePayloadImpl that = (RecurringOrderStartsAtSetMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(startsAt, that.startsAt) + .append(oldStartsAt, that.oldStartsAt) + .append(type, that.type) + .append(startsAt, that.startsAt) + .append(oldStartsAt, that.oldStartsAt) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(startsAt).append(oldStartsAt).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("startsAt", startsAt) + .append("oldStartsAt", oldStartsAt) + .build(); + } + + @Override + public RecurringOrderStartsAtSetMessagePayload copyDeep() { + return RecurringOrderStartsAtSetMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessage.java new file mode 100644 index 00000000000..fe54cbea542 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessage.java @@ -0,0 +1,178 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.recurring_order.RecurringOrderState; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

      Generated after a successful Set RecurringOrderState update action.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderStateChangedMessage recurringOrderStateChangedMessage = RecurringOrderStateChangedMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .state(RecurringOrderState.ACTIVE)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderStateChanged") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderStateChangedMessageImpl.class) +public interface RecurringOrderStateChangedMessage extends Message { + + /** + * discriminator value for RecurringOrderStateChangedMessage + */ + String RECURRING_ORDER_STATE_CHANGED = "RecurringOrderStateChanged"; + + /** + *

      RecurringOrderState after the Set RecurringOrderState update action.

      + * @return state + */ + @NotNull + @JsonProperty("state") + public RecurringOrderState getState(); + + /** + *

      RecurringOrderState before the Set RecurringOrderState update action.

      + * @return oldState + */ + + @JsonProperty("oldState") + public RecurringOrderState getOldState(); + + /** + *

      RecurringOrderState after the Set RecurringOrderState update action.

      + * @param state value to be set + */ + + public void setState(final RecurringOrderState state); + + /** + *

      RecurringOrderState before the Set RecurringOrderState update action.

      + * @param oldState value to be set + */ + + public void setOldState(final RecurringOrderState oldState); + + /** + * factory method + * @return instance of RecurringOrderStateChangedMessage + */ + public static RecurringOrderStateChangedMessage of() { + return new RecurringOrderStateChangedMessageImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderStateChangedMessage + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderStateChangedMessage of(final RecurringOrderStateChangedMessage template) { + RecurringOrderStateChangedMessageImpl instance = new RecurringOrderStateChangedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setState(template.getState()); + instance.setOldState(template.getOldState()); + return instance; + } + + public RecurringOrderStateChangedMessage copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderStateChangedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderStateChangedMessage deepCopy( + @Nullable final RecurringOrderStateChangedMessage template) { + if (template == null) { + return null; + } + RecurringOrderStateChangedMessageImpl instance = new RecurringOrderStateChangedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setState(template.getState()); + instance.setOldState(template.getOldState()); + return instance; + } + + /** + * builder factory method for RecurringOrderStateChangedMessage + * @return builder + */ + public static RecurringOrderStateChangedMessageBuilder builder() { + return RecurringOrderStateChangedMessageBuilder.of(); + } + + /** + * create builder for RecurringOrderStateChangedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderStateChangedMessageBuilder builder(final RecurringOrderStateChangedMessage template) { + return RecurringOrderStateChangedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderStateChangedMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessageBuilder.java new file mode 100644 index 00000000000..d5f8dbbf47c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessageBuilder.java @@ -0,0 +1,456 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderStateChangedMessageBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderStateChangedMessage recurringOrderStateChangedMessage = RecurringOrderStateChangedMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .state(RecurringOrderState.ACTIVE)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderStateChangedMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.recurring_order.RecurringOrderState state; + + @Nullable + private com.commercetools.api.models.recurring_order.RecurringOrderState oldState; + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @param id value to be set + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @param version value to be set + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @param createdAt value to be set + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

      Value of createdAt.

      + * @param lastModifiedAt value to be set + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param lastModifiedBy value to be set + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param createdBy value to be set + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @param sequenceNumber value to be set + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param resource value to be set + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder resource( + final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param builder function to build the resource value + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @param resourceVersion value to be set + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

      RecurringOrderState after the Set RecurringOrderState update action.

      + * @param state value to be set + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder state( + final com.commercetools.api.models.recurring_order.RecurringOrderState state) { + this.state = state; + return this; + } + + /** + *

      RecurringOrderState before the Set RecurringOrderState update action.

      + * @param oldState value to be set + * @return Builder + */ + + public RecurringOrderStateChangedMessageBuilder oldState( + @Nullable final com.commercetools.api.models.recurring_order.RecurringOrderState oldState) { + this.oldState = oldState; + return this; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      RecurringOrderState after the Set RecurringOrderState update action.

      + * @return state + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderState getState() { + return this.state; + } + + /** + *

      RecurringOrderState before the Set RecurringOrderState update action.

      + * @return oldState + */ + + @Nullable + public com.commercetools.api.models.recurring_order.RecurringOrderState getOldState() { + return this.oldState; + } + + /** + * builds RecurringOrderStateChangedMessage with checking for non-null required values + * @return RecurringOrderStateChangedMessage + */ + public RecurringOrderStateChangedMessage build() { + Objects.requireNonNull(id, RecurringOrderStateChangedMessage.class + ": id is missing"); + Objects.requireNonNull(version, RecurringOrderStateChangedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, RecurringOrderStateChangedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, RecurringOrderStateChangedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, RecurringOrderStateChangedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, RecurringOrderStateChangedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + RecurringOrderStateChangedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(state, RecurringOrderStateChangedMessage.class + ": state is missing"); + return new RecurringOrderStateChangedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, state, oldState); + } + + /** + * builds RecurringOrderStateChangedMessage without checking for non-null required values + * @return RecurringOrderStateChangedMessage + */ + public RecurringOrderStateChangedMessage buildUnchecked() { + return new RecurringOrderStateChangedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, state, oldState); + } + + /** + * factory method for an instance of RecurringOrderStateChangedMessageBuilder + * @return builder + */ + public static RecurringOrderStateChangedMessageBuilder of() { + return new RecurringOrderStateChangedMessageBuilder(); + } + + /** + * create builder for RecurringOrderStateChangedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderStateChangedMessageBuilder of(final RecurringOrderStateChangedMessage template) { + RecurringOrderStateChangedMessageBuilder builder = new RecurringOrderStateChangedMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.state = template.getState(); + builder.oldState = template.getOldState(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessageImpl.java new file mode 100644 index 00000000000..84530aaa75c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessageImpl.java @@ -0,0 +1,321 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Set RecurringOrderState update action.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderStateChangedMessageImpl implements RecurringOrderStateChangedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.recurring_order.RecurringOrderState state; + + private com.commercetools.api.models.recurring_order.RecurringOrderState oldState; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderStateChangedMessageImpl(@JsonProperty("id") final String id, + @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("state") final com.commercetools.api.models.recurring_order.RecurringOrderState state, + @JsonProperty("oldState") final com.commercetools.api.models.recurring_order.RecurringOrderState oldState) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.state = state; + this.oldState = oldState; + this.type = RECURRING_ORDER_STATE_CHANGED; + } + + /** + * create empty instance + */ + public RecurringOrderStateChangedMessageImpl() { + this.type = RECURRING_ORDER_STATE_CHANGED; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      Message Type of the Message.

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

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      RecurringOrderState after the Set RecurringOrderState update action.

      + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderState getState() { + return this.state; + } + + /** + *

      RecurringOrderState before the Set RecurringOrderState update action.

      + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderState getOldState() { + return this.oldState; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setState(final com.commercetools.api.models.recurring_order.RecurringOrderState state) { + this.state = state; + } + + public void setOldState(final com.commercetools.api.models.recurring_order.RecurringOrderState oldState) { + this.oldState = oldState; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderStateChangedMessageImpl that = (RecurringOrderStateChangedMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(state, that.state) + .append(oldState, that.oldState) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(state, that.state) + .append(oldState, that.oldState) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(state) + .append(oldState) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("state", state) + .append("oldState", oldState) + .build(); + } + + @Override + public RecurringOrderStateChangedMessage copyDeep() { + return RecurringOrderStateChangedMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessagePayload.java new file mode 100644 index 00000000000..fd822ad4d5c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessagePayload.java @@ -0,0 +1,151 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.recurring_order.RecurringOrderState; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

      Generated after a successful Set RecurringOrderState update action.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderStateChangedMessagePayload recurringOrderStateChangedMessagePayload = RecurringOrderStateChangedMessagePayload.builder()
      + *             .state(RecurringOrderState.ACTIVE)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderStateChanged") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderStateChangedMessagePayloadImpl.class) +public interface RecurringOrderStateChangedMessagePayload extends MessagePayload { + + /** + * discriminator value for RecurringOrderStateChangedMessagePayload + */ + String RECURRING_ORDER_STATE_CHANGED = "RecurringOrderStateChanged"; + + /** + *

      RecurringOrderState after the Set RecurringOrderState update action.

      + * @return state + */ + @NotNull + @JsonProperty("state") + public RecurringOrderState getState(); + + /** + *

      RecurringOrderState before the Set RecurringOrderState update action.

      + * @return oldState + */ + + @JsonProperty("oldState") + public RecurringOrderState getOldState(); + + /** + *

      RecurringOrderState after the Set RecurringOrderState update action.

      + * @param state value to be set + */ + + public void setState(final RecurringOrderState state); + + /** + *

      RecurringOrderState before the Set RecurringOrderState update action.

      + * @param oldState value to be set + */ + + public void setOldState(final RecurringOrderState oldState); + + /** + * factory method + * @return instance of RecurringOrderStateChangedMessagePayload + */ + public static RecurringOrderStateChangedMessagePayload of() { + return new RecurringOrderStateChangedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderStateChangedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderStateChangedMessagePayload of(final RecurringOrderStateChangedMessagePayload template) { + RecurringOrderStateChangedMessagePayloadImpl instance = new RecurringOrderStateChangedMessagePayloadImpl(); + instance.setState(template.getState()); + instance.setOldState(template.getOldState()); + return instance; + } + + public RecurringOrderStateChangedMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderStateChangedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderStateChangedMessagePayload deepCopy( + @Nullable final RecurringOrderStateChangedMessagePayload template) { + if (template == null) { + return null; + } + RecurringOrderStateChangedMessagePayloadImpl instance = new RecurringOrderStateChangedMessagePayloadImpl(); + instance.setState(template.getState()); + instance.setOldState(template.getOldState()); + return instance; + } + + /** + * builder factory method for RecurringOrderStateChangedMessagePayload + * @return builder + */ + public static RecurringOrderStateChangedMessagePayloadBuilder builder() { + return RecurringOrderStateChangedMessagePayloadBuilder.of(); + } + + /** + * create builder for RecurringOrderStateChangedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderStateChangedMessagePayloadBuilder builder( + final RecurringOrderStateChangedMessagePayload template) { + return RecurringOrderStateChangedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderStateChangedMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessagePayloadBuilder.java new file mode 100644 index 00000000000..8868c7d7af2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessagePayloadBuilder.java @@ -0,0 +1,113 @@ + +package com.commercetools.api.models.message; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderStateChangedMessagePayloadBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderStateChangedMessagePayload recurringOrderStateChangedMessagePayload = RecurringOrderStateChangedMessagePayload.builder()
      + *             .state(RecurringOrderState.ACTIVE)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderStateChangedMessagePayloadBuilder + implements Builder { + + private com.commercetools.api.models.recurring_order.RecurringOrderState state; + + @Nullable + private com.commercetools.api.models.recurring_order.RecurringOrderState oldState; + + /** + *

      RecurringOrderState after the Set RecurringOrderState update action.

      + * @param state value to be set + * @return Builder + */ + + public RecurringOrderStateChangedMessagePayloadBuilder state( + final com.commercetools.api.models.recurring_order.RecurringOrderState state) { + this.state = state; + return this; + } + + /** + *

      RecurringOrderState before the Set RecurringOrderState update action.

      + * @param oldState value to be set + * @return Builder + */ + + public RecurringOrderStateChangedMessagePayloadBuilder oldState( + @Nullable final com.commercetools.api.models.recurring_order.RecurringOrderState oldState) { + this.oldState = oldState; + return this; + } + + /** + *

      RecurringOrderState after the Set RecurringOrderState update action.

      + * @return state + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderState getState() { + return this.state; + } + + /** + *

      RecurringOrderState before the Set RecurringOrderState update action.

      + * @return oldState + */ + + @Nullable + public com.commercetools.api.models.recurring_order.RecurringOrderState getOldState() { + return this.oldState; + } + + /** + * builds RecurringOrderStateChangedMessagePayload with checking for non-null required values + * @return RecurringOrderStateChangedMessagePayload + */ + public RecurringOrderStateChangedMessagePayload build() { + Objects.requireNonNull(state, RecurringOrderStateChangedMessagePayload.class + ": state is missing"); + return new RecurringOrderStateChangedMessagePayloadImpl(state, oldState); + } + + /** + * builds RecurringOrderStateChangedMessagePayload without checking for non-null required values + * @return RecurringOrderStateChangedMessagePayload + */ + public RecurringOrderStateChangedMessagePayload buildUnchecked() { + return new RecurringOrderStateChangedMessagePayloadImpl(state, oldState); + } + + /** + * factory method for an instance of RecurringOrderStateChangedMessagePayloadBuilder + * @return builder + */ + public static RecurringOrderStateChangedMessagePayloadBuilder of() { + return new RecurringOrderStateChangedMessagePayloadBuilder(); + } + + /** + * create builder for RecurringOrderStateChangedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderStateChangedMessagePayloadBuilder of( + final RecurringOrderStateChangedMessagePayload template) { + RecurringOrderStateChangedMessagePayloadBuilder builder = new RecurringOrderStateChangedMessagePayloadBuilder(); + builder.state = template.getState(); + builder.oldState = template.getOldState(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessagePayloadImpl.java new file mode 100644 index 00000000000..4b066f6f53f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessagePayloadImpl.java @@ -0,0 +1,119 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Set RecurringOrderState update action.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderStateChangedMessagePayloadImpl + implements RecurringOrderStateChangedMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.recurring_order.RecurringOrderState state; + + private com.commercetools.api.models.recurring_order.RecurringOrderState oldState; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderStateChangedMessagePayloadImpl( + @JsonProperty("state") final com.commercetools.api.models.recurring_order.RecurringOrderState state, + @JsonProperty("oldState") final com.commercetools.api.models.recurring_order.RecurringOrderState oldState) { + this.state = state; + this.oldState = oldState; + this.type = RECURRING_ORDER_STATE_CHANGED; + } + + /** + * create empty instance + */ + public RecurringOrderStateChangedMessagePayloadImpl() { + this.type = RECURRING_ORDER_STATE_CHANGED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      RecurringOrderState after the Set RecurringOrderState update action.

      + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderState getState() { + return this.state; + } + + /** + *

      RecurringOrderState before the Set RecurringOrderState update action.

      + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderState getOldState() { + return this.oldState; + } + + public void setState(final com.commercetools.api.models.recurring_order.RecurringOrderState state) { + this.state = state; + } + + public void setOldState(final com.commercetools.api.models.recurring_order.RecurringOrderState oldState) { + this.oldState = oldState; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderStateChangedMessagePayloadImpl that = (RecurringOrderStateChangedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(state, that.state) + .append(oldState, that.oldState) + .append(type, that.type) + .append(state, that.state) + .append(oldState, that.oldState) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(state).append(oldState).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("state", state) + .append("oldState", oldState) + .build(); + } + + @Override + public RecurringOrderStateChangedMessagePayload copyDeep() { + return RecurringOrderStateChangedMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessage.java new file mode 100644 index 00000000000..65dd149270c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessage.java @@ -0,0 +1,199 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.state.StateReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Generated after a successful Transition State update action.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderStateTransitionMessage recurringOrderStateTransitionMessage = RecurringOrderStateTransitionMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .state(stateBuilder -> stateBuilder)
      + *             .force(true)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderStateTransition") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderStateTransitionMessageImpl.class) +public interface RecurringOrderStateTransitionMessage extends Message { + + /** + * discriminator value for RecurringOrderStateTransitionMessage + */ + String RECURRING_ORDER_STATE_TRANSITION = "RecurringOrderStateTransition"; + + /** + *

      RecurringOrderState after the Transition State update action.

      + * @return state + */ + @NotNull + @Valid + @JsonProperty("state") + public StateReference getState(); + + /** + *

      RecurringOrderState before the Transition State update action.

      + * @return oldState + */ + @Valid + @JsonProperty("oldState") + public StateReference getOldState(); + + /** + *

      Whether State transition validations were turned off during the Transition State update action.

      + * @return force + */ + @NotNull + @JsonProperty("force") + public Boolean getForce(); + + /** + *

      RecurringOrderState after the Transition State update action.

      + * @param state value to be set + */ + + public void setState(final StateReference state); + + /** + *

      RecurringOrderState before the Transition State update action.

      + * @param oldState value to be set + */ + + public void setOldState(final StateReference oldState); + + /** + *

      Whether State transition validations were turned off during the Transition State update action.

      + * @param force value to be set + */ + + public void setForce(final Boolean force); + + /** + * factory method + * @return instance of RecurringOrderStateTransitionMessage + */ + public static RecurringOrderStateTransitionMessage of() { + return new RecurringOrderStateTransitionMessageImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderStateTransitionMessage + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderStateTransitionMessage of(final RecurringOrderStateTransitionMessage template) { + RecurringOrderStateTransitionMessageImpl instance = new RecurringOrderStateTransitionMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setState(template.getState()); + instance.setOldState(template.getOldState()); + instance.setForce(template.getForce()); + return instance; + } + + public RecurringOrderStateTransitionMessage copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderStateTransitionMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderStateTransitionMessage deepCopy( + @Nullable final RecurringOrderStateTransitionMessage template) { + if (template == null) { + return null; + } + RecurringOrderStateTransitionMessageImpl instance = new RecurringOrderStateTransitionMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setState(com.commercetools.api.models.state.StateReference.deepCopy(template.getState())); + instance.setOldState(com.commercetools.api.models.state.StateReference.deepCopy(template.getOldState())); + instance.setForce(template.getForce()); + return instance; + } + + /** + * builder factory method for RecurringOrderStateTransitionMessage + * @return builder + */ + public static RecurringOrderStateTransitionMessageBuilder builder() { + return RecurringOrderStateTransitionMessageBuilder.of(); + } + + /** + * create builder for RecurringOrderStateTransitionMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderStateTransitionMessageBuilder builder( + final RecurringOrderStateTransitionMessage template) { + return RecurringOrderStateTransitionMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderStateTransitionMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessageBuilder.java new file mode 100644 index 00000000000..ce928eeb878 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessageBuilder.java @@ -0,0 +1,533 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderStateTransitionMessageBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderStateTransitionMessage recurringOrderStateTransitionMessage = RecurringOrderStateTransitionMessage.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .sequenceNumber(0.3)
      + *             .resource(resourceBuilder -> resourceBuilder)
      + *             .resourceVersion(0.3)
      + *             .state(stateBuilder -> stateBuilder)
      + *             .force(true)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderStateTransitionMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.state.StateReference state; + + @Nullable + private com.commercetools.api.models.state.StateReference oldState; + + private Boolean force; + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @param id value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @param version value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @param createdAt value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

      Value of createdAt.

      + * @param lastModifiedAt value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that last modified the Message.

      + * @param lastModifiedBy value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that created the Message.

      + * @param createdBy value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @param sequenceNumber value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param resource value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder resource( + final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @param builder function to build the resource value + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @param resourceVersion value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

      RecurringOrderState after the Transition State update action.

      + * @param builder function to build the state value + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder state( + Function builder) { + this.state = builder.apply(com.commercetools.api.models.state.StateReferenceBuilder.of()).build(); + return this; + } + + /** + *

      RecurringOrderState after the Transition State update action.

      + * @param builder function to build the state value + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder withState( + Function builder) { + this.state = builder.apply(com.commercetools.api.models.state.StateReferenceBuilder.of()); + return this; + } + + /** + *

      RecurringOrderState after the Transition State update action.

      + * @param state value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder state( + final com.commercetools.api.models.state.StateReference state) { + this.state = state; + return this; + } + + /** + *

      RecurringOrderState before the Transition State update action.

      + * @param builder function to build the oldState value + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder oldState( + Function builder) { + this.oldState = builder.apply(com.commercetools.api.models.state.StateReferenceBuilder.of()).build(); + return this; + } + + /** + *

      RecurringOrderState before the Transition State update action.

      + * @param builder function to build the oldState value + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder withOldState( + Function builder) { + this.oldState = builder.apply(com.commercetools.api.models.state.StateReferenceBuilder.of()); + return this; + } + + /** + *

      RecurringOrderState before the Transition State update action.

      + * @param oldState value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder oldState( + @Nullable final com.commercetools.api.models.state.StateReference oldState) { + this.oldState = oldState; + return this; + } + + /** + *

      Whether State transition validations were turned off during the Transition State update action.

      + * @param force value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessageBuilder force(final Boolean force) { + this.force = force; + return this; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      RecurringOrderState after the Transition State update action.

      + * @return state + */ + + public com.commercetools.api.models.state.StateReference getState() { + return this.state; + } + + /** + *

      RecurringOrderState before the Transition State update action.

      + * @return oldState + */ + + @Nullable + public com.commercetools.api.models.state.StateReference getOldState() { + return this.oldState; + } + + /** + *

      Whether State transition validations were turned off during the Transition State update action.

      + * @return force + */ + + public Boolean getForce() { + return this.force; + } + + /** + * builds RecurringOrderStateTransitionMessage with checking for non-null required values + * @return RecurringOrderStateTransitionMessage + */ + public RecurringOrderStateTransitionMessage build() { + Objects.requireNonNull(id, RecurringOrderStateTransitionMessage.class + ": id is missing"); + Objects.requireNonNull(version, RecurringOrderStateTransitionMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, RecurringOrderStateTransitionMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + RecurringOrderStateTransitionMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + RecurringOrderStateTransitionMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, RecurringOrderStateTransitionMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + RecurringOrderStateTransitionMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(state, RecurringOrderStateTransitionMessage.class + ": state is missing"); + Objects.requireNonNull(force, RecurringOrderStateTransitionMessage.class + ": force is missing"); + return new RecurringOrderStateTransitionMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, state, oldState, + force); + } + + /** + * builds RecurringOrderStateTransitionMessage without checking for non-null required values + * @return RecurringOrderStateTransitionMessage + */ + public RecurringOrderStateTransitionMessage buildUnchecked() { + return new RecurringOrderStateTransitionMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, state, oldState, + force); + } + + /** + * factory method for an instance of RecurringOrderStateTransitionMessageBuilder + * @return builder + */ + public static RecurringOrderStateTransitionMessageBuilder of() { + return new RecurringOrderStateTransitionMessageBuilder(); + } + + /** + * create builder for RecurringOrderStateTransitionMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderStateTransitionMessageBuilder of(final RecurringOrderStateTransitionMessage template) { + RecurringOrderStateTransitionMessageBuilder builder = new RecurringOrderStateTransitionMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.state = template.getState(); + builder.oldState = template.getOldState(); + builder.force = template.getForce(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessageImpl.java new file mode 100644 index 00000000000..f39d445b074 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessageImpl.java @@ -0,0 +1,341 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Transition State update action.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderStateTransitionMessageImpl implements RecurringOrderStateTransitionMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.state.StateReference state; + + private com.commercetools.api.models.state.StateReference oldState; + + private Boolean force; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderStateTransitionMessageImpl(@JsonProperty("id") final String id, + @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("state") final com.commercetools.api.models.state.StateReference state, + @JsonProperty("oldState") final com.commercetools.api.models.state.StateReference oldState, + @JsonProperty("force") final Boolean force) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.state = state; + this.oldState = oldState; + this.force = force; + this.type = RECURRING_ORDER_STATE_TRANSITION; + } + + /** + * create empty instance + */ + public RecurringOrderStateTransitionMessageImpl() { + this.type = RECURRING_ORDER_STATE_TRANSITION; + } + + /** + *

      Unique identifier of the Message. Can be used to track which Messages have been processed.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Version of a resource. In case of Messages, this is always 1.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the Message was generated.

      + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Value of createdAt.

      + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      IDs and references that last modified the Message.

      + */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the Message.

      + */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

      + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

      Reference to the resource on which the change or action was performed.

      + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

      Version of the resource on which the change or action was performed.

      + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

      Message Type of the Message.

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

      User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

      + */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

      RecurringOrderState after the Transition State update action.

      + */ + + public com.commercetools.api.models.state.StateReference getState() { + return this.state; + } + + /** + *

      RecurringOrderState before the Transition State update action.

      + */ + + public com.commercetools.api.models.state.StateReference getOldState() { + return this.oldState; + } + + /** + *

      Whether State transition validations were turned off during the Transition State update action.

      + */ + + public Boolean getForce() { + return this.force; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setState(final com.commercetools.api.models.state.StateReference state) { + this.state = state; + } + + public void setOldState(final com.commercetools.api.models.state.StateReference oldState) { + this.oldState = oldState; + } + + public void setForce(final Boolean force) { + this.force = force; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderStateTransitionMessageImpl that = (RecurringOrderStateTransitionMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(state, that.state) + .append(oldState, that.oldState) + .append(force, that.force) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(state, that.state) + .append(oldState, that.oldState) + .append(force, that.force) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(state) + .append(oldState) + .append(force) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("state", state) + .append("oldState", oldState) + .append("force", force) + .build(); + } + + @Override + public RecurringOrderStateTransitionMessage copyDeep() { + return RecurringOrderStateTransitionMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessagePayload.java new file mode 100644 index 00000000000..5bf061e9149 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessagePayload.java @@ -0,0 +1,172 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.state.StateReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Generated after a successful Transition State update action.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderStateTransitionMessagePayload recurringOrderStateTransitionMessagePayload = RecurringOrderStateTransitionMessagePayload.builder()
      + *             .state(stateBuilder -> stateBuilder)
      + *             .force(true)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderStateTransition") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderStateTransitionMessagePayloadImpl.class) +public interface RecurringOrderStateTransitionMessagePayload extends MessagePayload { + + /** + * discriminator value for RecurringOrderStateTransitionMessagePayload + */ + String RECURRING_ORDER_STATE_TRANSITION = "RecurringOrderStateTransition"; + + /** + *

      RecurringOrderState after the Transition State update action.

      + * @return state + */ + @NotNull + @Valid + @JsonProperty("state") + public StateReference getState(); + + /** + *

      RecurringOrderState before the Transition State update action.

      + * @return oldState + */ + @Valid + @JsonProperty("oldState") + public StateReference getOldState(); + + /** + *

      Whether State transition validations were turned off during the Transition State update action.

      + * @return force + */ + @NotNull + @JsonProperty("force") + public Boolean getForce(); + + /** + *

      RecurringOrderState after the Transition State update action.

      + * @param state value to be set + */ + + public void setState(final StateReference state); + + /** + *

      RecurringOrderState before the Transition State update action.

      + * @param oldState value to be set + */ + + public void setOldState(final StateReference oldState); + + /** + *

      Whether State transition validations were turned off during the Transition State update action.

      + * @param force value to be set + */ + + public void setForce(final Boolean force); + + /** + * factory method + * @return instance of RecurringOrderStateTransitionMessagePayload + */ + public static RecurringOrderStateTransitionMessagePayload of() { + return new RecurringOrderStateTransitionMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderStateTransitionMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderStateTransitionMessagePayload of( + final RecurringOrderStateTransitionMessagePayload template) { + RecurringOrderStateTransitionMessagePayloadImpl instance = new RecurringOrderStateTransitionMessagePayloadImpl(); + instance.setState(template.getState()); + instance.setOldState(template.getOldState()); + instance.setForce(template.getForce()); + return instance; + } + + public RecurringOrderStateTransitionMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderStateTransitionMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderStateTransitionMessagePayload deepCopy( + @Nullable final RecurringOrderStateTransitionMessagePayload template) { + if (template == null) { + return null; + } + RecurringOrderStateTransitionMessagePayloadImpl instance = new RecurringOrderStateTransitionMessagePayloadImpl(); + instance.setState(com.commercetools.api.models.state.StateReference.deepCopy(template.getState())); + instance.setOldState(com.commercetools.api.models.state.StateReference.deepCopy(template.getOldState())); + instance.setForce(template.getForce()); + return instance; + } + + /** + * builder factory method for RecurringOrderStateTransitionMessagePayload + * @return builder + */ + public static RecurringOrderStateTransitionMessagePayloadBuilder builder() { + return RecurringOrderStateTransitionMessagePayloadBuilder.of(); + } + + /** + * create builder for RecurringOrderStateTransitionMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderStateTransitionMessagePayloadBuilder builder( + final RecurringOrderStateTransitionMessagePayload template) { + return RecurringOrderStateTransitionMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderStateTransitionMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessagePayloadBuilder.java new file mode 100644 index 00000000000..a4e2f3c400c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessagePayloadBuilder.java @@ -0,0 +1,187 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderStateTransitionMessagePayloadBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderStateTransitionMessagePayload recurringOrderStateTransitionMessagePayload = RecurringOrderStateTransitionMessagePayload.builder()
      + *             .state(stateBuilder -> stateBuilder)
      + *             .force(true)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderStateTransitionMessagePayloadBuilder + implements Builder { + + private com.commercetools.api.models.state.StateReference state; + + @Nullable + private com.commercetools.api.models.state.StateReference oldState; + + private Boolean force; + + /** + *

      RecurringOrderState after the Transition State update action.

      + * @param builder function to build the state value + * @return Builder + */ + + public RecurringOrderStateTransitionMessagePayloadBuilder state( + Function builder) { + this.state = builder.apply(com.commercetools.api.models.state.StateReferenceBuilder.of()).build(); + return this; + } + + /** + *

      RecurringOrderState after the Transition State update action.

      + * @param builder function to build the state value + * @return Builder + */ + + public RecurringOrderStateTransitionMessagePayloadBuilder withState( + Function builder) { + this.state = builder.apply(com.commercetools.api.models.state.StateReferenceBuilder.of()); + return this; + } + + /** + *

      RecurringOrderState after the Transition State update action.

      + * @param state value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessagePayloadBuilder state( + final com.commercetools.api.models.state.StateReference state) { + this.state = state; + return this; + } + + /** + *

      RecurringOrderState before the Transition State update action.

      + * @param builder function to build the oldState value + * @return Builder + */ + + public RecurringOrderStateTransitionMessagePayloadBuilder oldState( + Function builder) { + this.oldState = builder.apply(com.commercetools.api.models.state.StateReferenceBuilder.of()).build(); + return this; + } + + /** + *

      RecurringOrderState before the Transition State update action.

      + * @param builder function to build the oldState value + * @return Builder + */ + + public RecurringOrderStateTransitionMessagePayloadBuilder withOldState( + Function builder) { + this.oldState = builder.apply(com.commercetools.api.models.state.StateReferenceBuilder.of()); + return this; + } + + /** + *

      RecurringOrderState before the Transition State update action.

      + * @param oldState value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessagePayloadBuilder oldState( + @Nullable final com.commercetools.api.models.state.StateReference oldState) { + this.oldState = oldState; + return this; + } + + /** + *

      Whether State transition validations were turned off during the Transition State update action.

      + * @param force value to be set + * @return Builder + */ + + public RecurringOrderStateTransitionMessagePayloadBuilder force(final Boolean force) { + this.force = force; + return this; + } + + /** + *

      RecurringOrderState after the Transition State update action.

      + * @return state + */ + + public com.commercetools.api.models.state.StateReference getState() { + return this.state; + } + + /** + *

      RecurringOrderState before the Transition State update action.

      + * @return oldState + */ + + @Nullable + public com.commercetools.api.models.state.StateReference getOldState() { + return this.oldState; + } + + /** + *

      Whether State transition validations were turned off during the Transition State update action.

      + * @return force + */ + + public Boolean getForce() { + return this.force; + } + + /** + * builds RecurringOrderStateTransitionMessagePayload with checking for non-null required values + * @return RecurringOrderStateTransitionMessagePayload + */ + public RecurringOrderStateTransitionMessagePayload build() { + Objects.requireNonNull(state, RecurringOrderStateTransitionMessagePayload.class + ": state is missing"); + Objects.requireNonNull(force, RecurringOrderStateTransitionMessagePayload.class + ": force is missing"); + return new RecurringOrderStateTransitionMessagePayloadImpl(state, oldState, force); + } + + /** + * builds RecurringOrderStateTransitionMessagePayload without checking for non-null required values + * @return RecurringOrderStateTransitionMessagePayload + */ + public RecurringOrderStateTransitionMessagePayload buildUnchecked() { + return new RecurringOrderStateTransitionMessagePayloadImpl(state, oldState, force); + } + + /** + * factory method for an instance of RecurringOrderStateTransitionMessagePayloadBuilder + * @return builder + */ + public static RecurringOrderStateTransitionMessagePayloadBuilder of() { + return new RecurringOrderStateTransitionMessagePayloadBuilder(); + } + + /** + * create builder for RecurringOrderStateTransitionMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderStateTransitionMessagePayloadBuilder of( + final RecurringOrderStateTransitionMessagePayload template) { + RecurringOrderStateTransitionMessagePayloadBuilder builder = new RecurringOrderStateTransitionMessagePayloadBuilder(); + builder.state = template.getState(); + builder.oldState = template.getOldState(); + builder.force = template.getForce(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessagePayloadImpl.java new file mode 100644 index 00000000000..e5236f57936 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessagePayloadImpl.java @@ -0,0 +1,138 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Generated after a successful Transition State update action.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderStateTransitionMessagePayloadImpl + implements RecurringOrderStateTransitionMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.state.StateReference state; + + private com.commercetools.api.models.state.StateReference oldState; + + private Boolean force; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderStateTransitionMessagePayloadImpl( + @JsonProperty("state") final com.commercetools.api.models.state.StateReference state, + @JsonProperty("oldState") final com.commercetools.api.models.state.StateReference oldState, + @JsonProperty("force") final Boolean force) { + this.state = state; + this.oldState = oldState; + this.force = force; + this.type = RECURRING_ORDER_STATE_TRANSITION; + } + + /** + * create empty instance + */ + public RecurringOrderStateTransitionMessagePayloadImpl() { + this.type = RECURRING_ORDER_STATE_TRANSITION; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      RecurringOrderState after the Transition State update action.

      + */ + + public com.commercetools.api.models.state.StateReference getState() { + return this.state; + } + + /** + *

      RecurringOrderState before the Transition State update action.

      + */ + + public com.commercetools.api.models.state.StateReference getOldState() { + return this.oldState; + } + + /** + *

      Whether State transition validations were turned off during the Transition State update action.

      + */ + + public Boolean getForce() { + return this.force; + } + + public void setState(final com.commercetools.api.models.state.StateReference state) { + this.state = state; + } + + public void setOldState(final com.commercetools.api.models.state.StateReference oldState) { + this.oldState = oldState; + } + + public void setForce(final Boolean force) { + this.force = force; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderStateTransitionMessagePayloadImpl that = (RecurringOrderStateTransitionMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(state, that.state) + .append(oldState, that.oldState) + .append(force, that.force) + .append(type, that.type) + .append(state, that.state) + .append(oldState, that.oldState) + .append(force, that.force) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(state).append(oldState).append(force).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("state", state) + .append("oldState", oldState) + .append("force", force) + .build(); + } + + @Override + public RecurringOrderStateTransitionMessagePayload copyDeep() { + return RecurringOrderStateTransitionMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/Order.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/Order.java index a15220451c4..014780e995a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/Order.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/Order.java @@ -35,6 +35,7 @@ import com.commercetools.api.models.common.LastModifiedBy; import com.commercetools.api.models.customer_group.CustomerGroupReference; import com.commercetools.api.models.quote.QuoteReference; +import com.commercetools.api.models.recurring_order.RecurringOrderReference; import com.commercetools.api.models.state.StateReference; import com.commercetools.api.models.store.StoreKeyReference; import com.commercetools.api.models.type.CustomFields; @@ -406,6 +407,14 @@ public interface Order extends BaseResource, OrderMixin, com.commercetools.api.m @JsonProperty("quote") public QuoteReference getQuote(); + /** + *

      Reference to the RecurringOrder that generated this Order.

      + * @return recurringOrder + */ + @Valid + @JsonProperty("recurringOrder") + public RecurringOrderReference getRecurringOrder(); + /** *

      Current status of the Order.

      * @return orderState @@ -860,6 +869,13 @@ public interface Order extends BaseResource, OrderMixin, com.commercetools.api.m public void setQuote(final QuoteReference quote); + /** + *

      Reference to the RecurringOrder that generated this Order.

      + * @param recurringOrder value to be set + */ + + public void setRecurringOrder(final RecurringOrderReference recurringOrder); + /** *

      Current status of the Order.

      * @param orderState value to be set @@ -1030,6 +1046,7 @@ public static Order of(final Order template) { instance.setOrigin(template.getOrigin()); instance.setCart(template.getCart()); instance.setQuote(template.getQuote()); + instance.setRecurringOrder(template.getRecurringOrder()); instance.setOrderState(template.getOrderState()); instance.setShipmentState(template.getShipmentState()); instance.setPaymentState(template.getPaymentState()); @@ -1139,6 +1156,8 @@ public static Order deepCopy(@Nullable final Order template) { instance.setOrigin(template.getOrigin()); instance.setCart(com.commercetools.api.models.cart.CartReference.deepCopy(template.getCart())); instance.setQuote(com.commercetools.api.models.quote.QuoteReference.deepCopy(template.getQuote())); + instance.setRecurringOrder(com.commercetools.api.models.recurring_order.RecurringOrderReference + .deepCopy(template.getRecurringOrder())); instance.setOrderState(template.getOrderState()); instance.setShipmentState(template.getShipmentState()); instance.setPaymentState(template.getPaymentState()); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderBuilder.java index 99d3445cde6..d293d3fea2e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderBuilder.java @@ -148,6 +148,9 @@ public class OrderBuilder implements Builder { @Nullable private com.commercetools.api.models.quote.QuoteReference quote; + @Nullable + private com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrder; + private com.commercetools.api.models.order.OrderState orderState; @Nullable @@ -1569,6 +1572,45 @@ public OrderBuilder quote(@Nullable final com.commercetools.api.models.quote.Quo return this; } + /** + *

      Reference to the RecurringOrder that generated this Order.

      + * @param builder function to build the recurringOrder value + * @return Builder + */ + + public OrderBuilder recurringOrder( + Function builder) { + this.recurringOrder = builder + .apply(com.commercetools.api.models.recurring_order.RecurringOrderReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

      Reference to the RecurringOrder that generated this Order.

      + * @param builder function to build the recurringOrder value + * @return Builder + */ + + public OrderBuilder withRecurringOrder( + Function builder) { + this.recurringOrder = builder + .apply(com.commercetools.api.models.recurring_order.RecurringOrderReferenceBuilder.of()); + return this; + } + + /** + *

      Reference to the RecurringOrder that generated this Order.

      + * @param recurringOrder value to be set + * @return Builder + */ + + public OrderBuilder recurringOrder( + @Nullable final com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrder) { + this.recurringOrder = recurringOrder; + return this; + } + /** *

      Current status of the Order.

      * @param orderState value to be set @@ -2375,6 +2417,16 @@ public com.commercetools.api.models.quote.QuoteReference getQuote() { return this.quote; } + /** + *

      Reference to the RecurringOrder that generated this Order.

      + * @return recurringOrder + */ + + @Nullable + public com.commercetools.api.models.recurring_order.RecurringOrderReference getRecurringOrder() { + return this.recurringOrder; + } + /** *

      Current status of the Order.

      * @return orderState @@ -2516,9 +2568,9 @@ public Order build() { taxedPrice, taxedShippingPrice, discountOnTotalPrice, priceRoundingMode, taxMode, taxRoundingMode, taxCalculationMode, inventoryMode, billingAddress, shippingAddress, shippingMode, shippingKey, shippingInfo, shippingRateInput, shippingCustomFields, shipping, itemShippingAddresses, discountCodes, directDiscounts, - refusedGifts, paymentInfo, country, locale, origin, cart, quote, orderState, shipmentState, paymentState, - state, syncInfo, returnInfo, discountTypeCombination, lastMessageSequenceNumber, custom, completedAt, - lastModifiedBy, createdBy); + refusedGifts, paymentInfo, country, locale, origin, cart, quote, recurringOrder, orderState, shipmentState, + paymentState, state, syncInfo, returnInfo, discountTypeCombination, lastMessageSequenceNumber, custom, + completedAt, lastModifiedBy, createdBy); } /** @@ -2531,9 +2583,9 @@ public Order buildUnchecked() { taxedPrice, taxedShippingPrice, discountOnTotalPrice, priceRoundingMode, taxMode, taxRoundingMode, taxCalculationMode, inventoryMode, billingAddress, shippingAddress, shippingMode, shippingKey, shippingInfo, shippingRateInput, shippingCustomFields, shipping, itemShippingAddresses, discountCodes, directDiscounts, - refusedGifts, paymentInfo, country, locale, origin, cart, quote, orderState, shipmentState, paymentState, - state, syncInfo, returnInfo, discountTypeCombination, lastMessageSequenceNumber, custom, completedAt, - lastModifiedBy, createdBy); + refusedGifts, paymentInfo, country, locale, origin, cart, quote, recurringOrder, orderState, shipmentState, + paymentState, state, syncInfo, returnInfo, discountTypeCombination, lastMessageSequenceNumber, custom, + completedAt, lastModifiedBy, createdBy); } /** @@ -2592,6 +2644,7 @@ public static OrderBuilder of(final Order template) { builder.origin = template.getOrigin(); builder.cart = template.getCart(); builder.quote = template.getQuote(); + builder.recurringOrder = template.getRecurringOrder(); builder.orderState = template.getOrderState(); builder.shipmentState = template.getShipmentState(); builder.paymentState = template.getPaymentState(); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderImpl.java index d72ec42ed72..6b85d288c93 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderImpl.java @@ -104,6 +104,8 @@ public class OrderImpl implements Order, ModelBase { private com.commercetools.api.models.quote.QuoteReference quote; + private com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrder; + private com.commercetools.api.models.order.OrderState orderState; private com.commercetools.api.models.order.ShipmentState shipmentState; @@ -172,6 +174,7 @@ public class OrderImpl implements Order, ModelBase { @JsonProperty("origin") final com.commercetools.api.models.cart.CartOrigin origin, @JsonProperty("cart") final com.commercetools.api.models.cart.CartReference cart, @JsonProperty("quote") final com.commercetools.api.models.quote.QuoteReference quote, + @JsonProperty("recurringOrder") final com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrder, @JsonProperty("orderState") final com.commercetools.api.models.order.OrderState orderState, @JsonProperty("shipmentState") final com.commercetools.api.models.order.ShipmentState shipmentState, @JsonProperty("paymentState") final com.commercetools.api.models.order.PaymentState paymentState, @@ -225,6 +228,7 @@ public class OrderImpl implements Order, ModelBase { this.origin = origin; this.cart = cart; this.quote = quote; + this.recurringOrder = recurringOrder; this.orderState = orderState; this.shipmentState = shipmentState; this.paymentState = paymentState; @@ -585,6 +589,14 @@ public com.commercetools.api.models.quote.QuoteReference getQuote() { return this.quote; } + /** + *

      Reference to the RecurringOrder that generated this Order.

      + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderReference getRecurringOrder() { + return this.recurringOrder; + } + /** *

      Current status of the Order.

      */ @@ -882,6 +894,11 @@ public void setQuote(final com.commercetools.api.models.quote.QuoteReference quo this.quote = quote; } + public void setRecurringOrder( + final com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrder) { + this.recurringOrder = recurringOrder; + } + public void setOrderState(final com.commercetools.api.models.order.OrderState orderState) { this.orderState = orderState; } @@ -991,6 +1008,7 @@ public boolean equals(Object o) { .append(origin, that.origin) .append(cart, that.cart) .append(quote, that.quote) + .append(recurringOrder, that.recurringOrder) .append(orderState, that.orderState) .append(shipmentState, that.shipmentState) .append(paymentState, that.paymentState) @@ -1044,6 +1062,7 @@ public boolean equals(Object o) { .append(origin, that.origin) .append(cart, that.cart) .append(quote, that.quote) + .append(recurringOrder, that.recurringOrder) .append(orderState, that.orderState) .append(shipmentState, that.shipmentState) .append(paymentState, that.paymentState) @@ -1102,6 +1121,7 @@ public int hashCode() { .append(origin) .append(cart) .append(quote) + .append(recurringOrder) .append(orderState) .append(shipmentState) .append(paymentState) @@ -1160,6 +1180,7 @@ public String toString() { .append("origin", origin) .append("cart", cart) .append("quote", quote) + .append("recurringOrder", recurringOrder) .append("orderState", orderState) .append("shipmentState", shipmentState) .append("paymentState", paymentState) diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrder.java index ab0e58dead7..bfccdfd0e1d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrder.java @@ -99,6 +99,7 @@ public static StagedOrder of(final StagedOrder template) { instance.setOrigin(template.getOrigin()); instance.setCart(template.getCart()); instance.setQuote(template.getQuote()); + instance.setRecurringOrder(template.getRecurringOrder()); instance.setOrderState(template.getOrderState()); instance.setShipmentState(template.getShipmentState()); instance.setPaymentState(template.getPaymentState()); @@ -204,6 +205,8 @@ public static StagedOrder deepCopy(@Nullable final StagedOrder template) { instance.setOrigin(template.getOrigin()); instance.setCart(com.commercetools.api.models.cart.CartReference.deepCopy(template.getCart())); instance.setQuote(com.commercetools.api.models.quote.QuoteReference.deepCopy(template.getQuote())); + instance.setRecurringOrder(com.commercetools.api.models.recurring_order.RecurringOrderReference + .deepCopy(template.getRecurringOrder())); instance.setOrderState(template.getOrderState()); instance.setShipmentState(template.getShipmentState()); instance.setPaymentState(template.getPaymentState()); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemAction.java index 9ec3ae86d0e..3fab135074d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemAction.java @@ -13,6 +13,7 @@ import com.commercetools.api.models.common.LocalizedString; import com.commercetools.api.models.common.Money; import com.commercetools.api.models.order.StagedOrderUpdateAction; +import com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft; import com.commercetools.api.models.tax_category.TaxCategoryResourceIdentifier; import com.commercetools.api.models.type.CustomFieldsDraft; import com.fasterxml.jackson.annotation.*; @@ -136,6 +137,14 @@ public interface StagedOrderAddCustomLineItemAction extends StagedOrderUpdateAct @JsonProperty("custom") public CustomFieldsDraft getCustom(); + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public CustomLineItemRecurrenceInfoDraft getRecurrenceInfo(); + /** *

      Money value of the Custom Line Item. The value can be negative.

      * @param money value to be set @@ -209,6 +218,13 @@ public interface StagedOrderAddCustomLineItemAction extends StagedOrderUpdateAct public void setCustom(final CustomFieldsDraft custom); + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + */ + + public void setRecurrenceInfo(final CustomLineItemRecurrenceInfoDraft recurrenceInfo); + /** * factory method * @return instance of StagedOrderAddCustomLineItemAction @@ -234,6 +250,7 @@ public static StagedOrderAddCustomLineItemAction of(final StagedOrderAddCustomLi instance.setShippingDetails(template.getShippingDetails()); instance.setPriceMode(template.getPriceMode()); instance.setCustom(template.getCustom()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); return instance; } @@ -264,6 +281,8 @@ public static StagedOrderAddCustomLineItemAction deepCopy( com.commercetools.api.models.cart.ItemShippingDetailsDraft.deepCopy(template.getShippingDetails())); instance.setPriceMode(template.getPriceMode()); instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom())); + instance.setRecurrenceInfo(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft + .deepCopy(template.getRecurrenceInfo())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemActionBuilder.java index a40c1ac8eeb..93b8ec541f6 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemActionBuilder.java @@ -53,6 +53,9 @@ public class StagedOrderAddCustomLineItemActionBuilder implements BuilderMoney value of the Custom Line Item. The value can be negative.

      * @param builder function to build the money value @@ -321,6 +324,45 @@ public StagedOrderAddCustomLineItemActionBuilder custom( return this; } + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public StagedOrderAddCustomLineItemActionBuilder recurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public StagedOrderAddCustomLineItemActionBuilder withRecurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftBuilder.of()); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + * @return Builder + */ + + public StagedOrderAddCustomLineItemActionBuilder recurrenceInfo( + @Nullable final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + /** *

      Money value of the Custom Line Item. The value can be negative.

      * @return money @@ -421,6 +463,16 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { return this.custom; } + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + /** * builds StagedOrderAddCustomLineItemAction with checking for non-null required values * @return StagedOrderAddCustomLineItemAction @@ -430,7 +482,7 @@ public StagedOrderAddCustomLineItemAction build() { Objects.requireNonNull(name, StagedOrderAddCustomLineItemAction.class + ": name is missing"); Objects.requireNonNull(slug, StagedOrderAddCustomLineItemAction.class + ": slug is missing"); return new StagedOrderAddCustomLineItemActionImpl(money, name, key, quantity, slug, taxCategory, - externalTaxRate, shippingDetails, priceMode, custom); + externalTaxRate, shippingDetails, priceMode, custom, recurrenceInfo); } /** @@ -439,7 +491,7 @@ public StagedOrderAddCustomLineItemAction build() { */ public StagedOrderAddCustomLineItemAction buildUnchecked() { return new StagedOrderAddCustomLineItemActionImpl(money, name, key, quantity, slug, taxCategory, - externalTaxRate, shippingDetails, priceMode, custom); + externalTaxRate, shippingDetails, priceMode, custom, recurrenceInfo); } /** @@ -467,6 +519,7 @@ public static StagedOrderAddCustomLineItemActionBuilder of(final StagedOrderAddC builder.shippingDetails = template.getShippingDetails(); builder.priceMode = template.getPriceMode(); builder.custom = template.getCustom(); + builder.recurrenceInfo = template.getRecurrenceInfo(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemActionImpl.java index 7692c5e8bf8..1a4f381e8e0 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemActionImpl.java @@ -46,6 +46,8 @@ public class StagedOrderAddCustomLineItemActionImpl implements StagedOrderAddCus private com.commercetools.api.models.type.CustomFieldsDraft custom; + private com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo; + /** * create instance with all properties */ @@ -58,7 +60,8 @@ public class StagedOrderAddCustomLineItemActionImpl implements StagedOrderAddCus @JsonProperty("externalTaxRate") final com.commercetools.api.models.cart.ExternalTaxRateDraft externalTaxRate, @JsonProperty("shippingDetails") final com.commercetools.api.models.cart.ItemShippingDetailsDraft shippingDetails, @JsonProperty("priceMode") final com.commercetools.api.models.cart.CustomLineItemPriceMode priceMode, - @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom) { + @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom, + @JsonProperty("recurrenceInfo") final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo) { this.money = money; this.name = name; this.key = key; @@ -69,6 +72,7 @@ public class StagedOrderAddCustomLineItemActionImpl implements StagedOrderAddCus this.shippingDetails = shippingDetails; this.priceMode = priceMode; this.custom = custom; + this.recurrenceInfo = recurrenceInfo; this.action = ADD_CUSTOM_LINE_ITEM; } @@ -170,6 +174,14 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { return this.custom; } + /** + *

      Recurring Order and frequency data.

      + */ + + public com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + public void setMoney(final com.commercetools.api.models.common.Money money) { this.money = money; } @@ -211,6 +223,11 @@ public void setCustom(final com.commercetools.api.models.type.CustomFieldsDraft this.custom = custom; } + public void setRecurrenceInfo( + final com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + } + @Override public boolean equals(Object o) { if (this == o) @@ -232,6 +249,7 @@ public boolean equals(Object o) { .append(shippingDetails, that.shippingDetails) .append(priceMode, that.priceMode) .append(custom, that.custom) + .append(recurrenceInfo, that.recurrenceInfo) .append(action, that.action) .append(money, that.money) .append(name, that.name) @@ -243,6 +261,7 @@ public boolean equals(Object o) { .append(shippingDetails, that.shippingDetails) .append(priceMode, that.priceMode) .append(custom, that.custom) + .append(recurrenceInfo, that.recurrenceInfo) .isEquals(); } @@ -259,6 +278,7 @@ public int hashCode() { .append(shippingDetails) .append(priceMode) .append(custom) + .append(recurrenceInfo) .toHashCode(); } @@ -275,6 +295,7 @@ public String toString() { .append("shippingDetails", shippingDetails) .append("priceMode", priceMode) .append("custom", custom) + .append("recurrenceInfo", recurrenceInfo) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemAction.java index 396acaac6d5..9318346abe2 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemAction.java @@ -15,6 +15,7 @@ import com.commercetools.api.models.channel.ChannelResourceIdentifier; import com.commercetools.api.models.common.Money; import com.commercetools.api.models.order.StagedOrderUpdateAction; +import com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft; import com.commercetools.api.models.type.CustomFieldsDraft; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -164,6 +165,14 @@ public interface StagedOrderAddLineItemAction @JsonProperty("custom") public CustomFieldsDraft getCustom(); + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public LineItemRecurrenceInfoDraft getRecurrenceInfo(); + /** *

      User-defined unique identifier of the LineItem.

      * @param key value to be set @@ -266,6 +275,13 @@ public interface StagedOrderAddLineItemAction public void setCustom(final CustomFieldsDraft custom); + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + */ + + public void setRecurrenceInfo(final LineItemRecurrenceInfoDraft recurrenceInfo); + /** * factory method * @return instance of StagedOrderAddLineItemAction @@ -295,6 +311,7 @@ public static StagedOrderAddLineItemAction of(final StagedOrderAddLineItemAction instance.setInventoryMode(template.getInventoryMode()); instance.setShippingDetails(template.getShippingDetails()); instance.setCustom(template.getCustom()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); return instance; } @@ -330,6 +347,8 @@ public static StagedOrderAddLineItemAction deepCopy(@Nullable final StagedOrderA instance.setShippingDetails( com.commercetools.api.models.cart.ItemShippingDetailsDraft.deepCopy(template.getShippingDetails())); instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom())); + instance.setRecurrenceInfo(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft + .deepCopy(template.getRecurrenceInfo())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionBuilder.java index 5385ac2d4a6..88d2684e47b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionBuilder.java @@ -65,6 +65,9 @@ public class StagedOrderAddLineItemActionBuilder implements BuilderUser-defined unique identifier of the LineItem.

      * @param key value to be set @@ -408,6 +411,45 @@ public StagedOrderAddLineItemActionBuilder custom( return this; } + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public StagedOrderAddLineItemActionBuilder recurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public StagedOrderAddLineItemActionBuilder withRecurrenceInfo( + Function builder) { + this.recurrenceInfo = builder + .apply(com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftBuilder.of()); + return this; + } + + /** + *

      Recurring Order and frequency data.

      + * @param recurrenceInfo value to be set + * @return Builder + */ + + public StagedOrderAddLineItemActionBuilder recurrenceInfo( + @Nullable final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + /** *

      User-defined unique identifier of the LineItem.

      * @return key @@ -552,6 +594,16 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { return this.custom; } + /** + *

      Recurring Order and frequency data.

      + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + /** * builds StagedOrderAddLineItemAction with checking for non-null required values * @return StagedOrderAddLineItemAction @@ -559,7 +611,7 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { public StagedOrderAddLineItemAction build() { return new StagedOrderAddLineItemActionImpl(key, productId, variantId, sku, quantity, addedAt, distributionChannel, supplyChannel, externalPrice, externalTotalPrice, externalTaxRate, inventoryMode, - shippingDetails, custom); + shippingDetails, custom, recurrenceInfo); } /** @@ -569,7 +621,7 @@ public StagedOrderAddLineItemAction build() { public StagedOrderAddLineItemAction buildUnchecked() { return new StagedOrderAddLineItemActionImpl(key, productId, variantId, sku, quantity, addedAt, distributionChannel, supplyChannel, externalPrice, externalTotalPrice, externalTaxRate, inventoryMode, - shippingDetails, custom); + shippingDetails, custom, recurrenceInfo); } /** @@ -601,6 +653,7 @@ public static StagedOrderAddLineItemActionBuilder of(final StagedOrderAddLineIte builder.inventoryMode = template.getInventoryMode(); builder.shippingDetails = template.getShippingDetails(); builder.custom = template.getCustom(); + builder.recurrenceInfo = template.getRecurrenceInfo(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionImpl.java index b4f99f13e17..306487ce109 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionImpl.java @@ -54,6 +54,8 @@ public class StagedOrderAddLineItemActionImpl implements StagedOrderAddLineItemA private com.commercetools.api.models.type.CustomFieldsDraft custom; + private com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo; + /** * create instance with all properties */ @@ -69,7 +71,8 @@ public class StagedOrderAddLineItemActionImpl implements StagedOrderAddLineItemA @JsonProperty("externalTaxRate") final com.commercetools.api.models.cart.ExternalTaxRateDraft externalTaxRate, @JsonProperty("inventoryMode") final com.commercetools.api.models.cart.InventoryMode inventoryMode, @JsonProperty("shippingDetails") final com.commercetools.api.models.cart.ItemShippingDetailsDraft shippingDetails, - @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom) { + @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom, + @JsonProperty("recurrenceInfo") final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { this.key = key; this.productId = productId; this.variantId = variantId; @@ -84,6 +87,7 @@ public class StagedOrderAddLineItemActionImpl implements StagedOrderAddLineItemA this.inventoryMode = inventoryMode; this.shippingDetails = shippingDetails; this.custom = custom; + this.recurrenceInfo = recurrenceInfo; this.action = ADD_LINE_ITEM; } @@ -218,6 +222,14 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { return this.custom; } + /** + *

      Recurring Order and frequency data.

      + */ + + public com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft getRecurrenceInfo() { + return this.recurrenceInfo; + } + public void setKey(final String key) { this.key = key; } @@ -276,6 +288,11 @@ public void setCustom(final com.commercetools.api.models.type.CustomFieldsDraft this.custom = custom; } + public void setRecurrenceInfo( + final com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraft recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + } + @Override public boolean equals(Object o) { if (this == o) @@ -301,6 +318,7 @@ public boolean equals(Object o) { .append(inventoryMode, that.inventoryMode) .append(shippingDetails, that.shippingDetails) .append(custom, that.custom) + .append(recurrenceInfo, that.recurrenceInfo) .append(action, that.action) .append(key, that.key) .append(productId, that.productId) @@ -316,6 +334,7 @@ public boolean equals(Object o) { .append(inventoryMode, that.inventoryMode) .append(shippingDetails, that.shippingDetails) .append(custom, that.custom) + .append(recurrenceInfo, that.recurrenceInfo) .isEquals(); } @@ -336,6 +355,7 @@ public int hashCode() { .append(inventoryMode) .append(shippingDetails) .append(custom) + .append(recurrenceInfo) .toHashCode(); } @@ -356,6 +376,7 @@ public String toString() { .append("inventoryMode", inventoryMode) .append("shippingDetails", shippingDetails) .append("custom", custom) + .append("recurrenceInfo", recurrenceInfo) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderBuilder.java index 115d28ff127..1b975e1677a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderBuilder.java @@ -148,6 +148,9 @@ public class StagedOrderBuilder implements Builder { @Nullable private com.commercetools.api.models.quote.QuoteReference quote; + @Nullable + private com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrder; + private com.commercetools.api.models.order.OrderState orderState; @Nullable @@ -1575,6 +1578,45 @@ public StagedOrderBuilder quote(@Nullable final com.commercetools.api.models.quo return this; } + /** + *

      Reference to the RecurringOrder that generated this Order.

      + * @param builder function to build the recurringOrder value + * @return Builder + */ + + public StagedOrderBuilder recurringOrder( + Function builder) { + this.recurringOrder = builder + .apply(com.commercetools.api.models.recurring_order.RecurringOrderReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

      Reference to the RecurringOrder that generated this Order.

      + * @param builder function to build the recurringOrder value + * @return Builder + */ + + public StagedOrderBuilder withRecurringOrder( + Function builder) { + this.recurringOrder = builder + .apply(com.commercetools.api.models.recurring_order.RecurringOrderReferenceBuilder.of()); + return this; + } + + /** + *

      Reference to the RecurringOrder that generated this Order.

      + * @param recurringOrder value to be set + * @return Builder + */ + + public StagedOrderBuilder recurringOrder( + @Nullable final com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrder) { + this.recurringOrder = recurringOrder; + return this; + } + /** *

      Current status of the Order.

      * @param orderState value to be set @@ -2384,6 +2426,16 @@ public com.commercetools.api.models.quote.QuoteReference getQuote() { return this.quote; } + /** + *

      Reference to the RecurringOrder that generated this Order.

      + * @return recurringOrder + */ + + @Nullable + public com.commercetools.api.models.recurring_order.RecurringOrderReference getRecurringOrder() { + return this.recurringOrder; + } + /** *

      Current status of the Order.

      * @return orderState @@ -2525,9 +2577,9 @@ public StagedOrder build() { taxedPrice, taxedShippingPrice, discountOnTotalPrice, priceRoundingMode, taxMode, taxRoundingMode, taxCalculationMode, inventoryMode, billingAddress, shippingAddress, shippingMode, shippingKey, shippingInfo, shippingRateInput, shippingCustomFields, shipping, itemShippingAddresses, discountCodes, directDiscounts, - refusedGifts, paymentInfo, country, locale, origin, cart, quote, orderState, shipmentState, paymentState, - state, syncInfo, returnInfo, discountTypeCombination, lastMessageSequenceNumber, custom, completedAt, - lastModifiedBy, createdBy); + refusedGifts, paymentInfo, country, locale, origin, cart, quote, recurringOrder, orderState, shipmentState, + paymentState, state, syncInfo, returnInfo, discountTypeCombination, lastMessageSequenceNumber, custom, + completedAt, lastModifiedBy, createdBy); } /** @@ -2540,9 +2592,9 @@ public StagedOrder buildUnchecked() { taxedPrice, taxedShippingPrice, discountOnTotalPrice, priceRoundingMode, taxMode, taxRoundingMode, taxCalculationMode, inventoryMode, billingAddress, shippingAddress, shippingMode, shippingKey, shippingInfo, shippingRateInput, shippingCustomFields, shipping, itemShippingAddresses, discountCodes, directDiscounts, - refusedGifts, paymentInfo, country, locale, origin, cart, quote, orderState, shipmentState, paymentState, - state, syncInfo, returnInfo, discountTypeCombination, lastMessageSequenceNumber, custom, completedAt, - lastModifiedBy, createdBy); + refusedGifts, paymentInfo, country, locale, origin, cart, quote, recurringOrder, orderState, shipmentState, + paymentState, state, syncInfo, returnInfo, discountTypeCombination, lastMessageSequenceNumber, custom, + completedAt, lastModifiedBy, createdBy); } /** @@ -2601,6 +2653,7 @@ public static StagedOrderBuilder of(final StagedOrder template) { builder.origin = template.getOrigin(); builder.cart = template.getCart(); builder.quote = template.getQuote(); + builder.recurringOrder = template.getRecurringOrder(); builder.orderState = template.getOrderState(); builder.shipmentState = template.getShipmentState(); builder.paymentState = template.getPaymentState(); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderImpl.java index b21fd73c1d2..cfb0df79054 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderImpl.java @@ -104,6 +104,8 @@ public class StagedOrderImpl implements StagedOrder, ModelBase { private com.commercetools.api.models.quote.QuoteReference quote; + private com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrder; + private com.commercetools.api.models.order.OrderState orderState; private com.commercetools.api.models.order.ShipmentState shipmentState; @@ -172,6 +174,7 @@ public class StagedOrderImpl implements StagedOrder, ModelBase { @JsonProperty("origin") final com.commercetools.api.models.cart.CartOrigin origin, @JsonProperty("cart") final com.commercetools.api.models.cart.CartReference cart, @JsonProperty("quote") final com.commercetools.api.models.quote.QuoteReference quote, + @JsonProperty("recurringOrder") final com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrder, @JsonProperty("orderState") final com.commercetools.api.models.order.OrderState orderState, @JsonProperty("shipmentState") final com.commercetools.api.models.order.ShipmentState shipmentState, @JsonProperty("paymentState") final com.commercetools.api.models.order.PaymentState paymentState, @@ -225,6 +228,7 @@ public class StagedOrderImpl implements StagedOrder, ModelBase { this.origin = origin; this.cart = cart; this.quote = quote; + this.recurringOrder = recurringOrder; this.orderState = orderState; this.shipmentState = shipmentState; this.paymentState = paymentState; @@ -585,6 +589,14 @@ public com.commercetools.api.models.quote.QuoteReference getQuote() { return this.quote; } + /** + *

      Reference to the RecurringOrder that generated this Order.

      + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderReference getRecurringOrder() { + return this.recurringOrder; + } + /** *

      Current status of the Order.

      */ @@ -882,6 +894,11 @@ public void setQuote(final com.commercetools.api.models.quote.QuoteReference quo this.quote = quote; } + public void setRecurringOrder( + final com.commercetools.api.models.recurring_order.RecurringOrderReference recurringOrder) { + this.recurringOrder = recurringOrder; + } + public void setOrderState(final com.commercetools.api.models.order.OrderState orderState) { this.orderState = orderState; } @@ -991,6 +1008,7 @@ public boolean equals(Object o) { .append(origin, that.origin) .append(cart, that.cart) .append(quote, that.quote) + .append(recurringOrder, that.recurringOrder) .append(orderState, that.orderState) .append(shipmentState, that.shipmentState) .append(paymentState, that.paymentState) @@ -1044,6 +1062,7 @@ public boolean equals(Object o) { .append(origin, that.origin) .append(cart, that.cart) .append(quote, that.quote) + .append(recurringOrder, that.recurringOrder) .append(orderState, that.orderState) .append(shipmentState, that.shipmentState) .append(paymentState, that.paymentState) @@ -1102,6 +1121,7 @@ public int hashCode() { .append(origin) .append(cart) .append(quote) + .append(recurringOrder) .append(orderState) .append(shipmentState) .append(paymentState) @@ -1160,6 +1180,7 @@ public String toString() { .append("origin", origin) .append("cart", cart) .append("quote", quote) + .append("recurringOrder", recurringOrder) .append("orderState", orderState) .append("shipmentState", shipmentState) .append("paymentState", paymentState) diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariant.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariant.java index f1f53ce0897..232e14aeb15 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariant.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariant.java @@ -134,6 +134,14 @@ public interface ProductVariant extends AttributeContainer, com.commercetools.ap @JsonProperty("scopedPriceDiscounted") public Boolean getScopedPriceDiscounted(); + /** + *

      Only available when Product price selection is used. Cannot be used in a Query Predicate.

      + * @return recurrencePrices + */ + @Valid + @JsonProperty("recurrencePrices") + public List getRecurrencePrices(); + /** *

      A unique, sequential identifier of the Product Variant within the Product.

      * @param id value to be set @@ -251,6 +259,21 @@ public interface ProductVariant extends AttributeContainer, com.commercetools.ap public void setScopedPriceDiscounted(final Boolean scopedPriceDiscounted); + /** + *

      Only available when Product price selection is used. Cannot be used in a Query Predicate.

      + * @param recurrencePrices values to be set + */ + + @JsonIgnore + public void setRecurrencePrices(final Price... recurrencePrices); + + /** + *

      Only available when Product price selection is used. Cannot be used in a Query Predicate.

      + * @param recurrencePrices values to be set + */ + + public void setRecurrencePrices(final List recurrencePrices); + /** * factory method * @return instance of ProductVariant @@ -278,6 +301,7 @@ public static ProductVariant of(final ProductVariant template) { instance.setIsMatchingVariant(template.getIsMatchingVariant()); instance.setScopedPrice(template.getScopedPrice()); instance.setScopedPriceDiscounted(template.getScopedPriceDiscounted()); + instance.setRecurrencePrices(template.getRecurrencePrices()); return instance; } @@ -323,6 +347,11 @@ public static ProductVariant deepCopy(@Nullable final ProductVariant template) { instance.setIsMatchingVariant(template.getIsMatchingVariant()); instance.setScopedPrice(com.commercetools.api.models.common.ScopedPrice.deepCopy(template.getScopedPrice())); instance.setScopedPriceDiscounted(template.getScopedPriceDiscounted()); + instance.setRecurrencePrices(Optional.ofNullable(template.getRecurrencePrices()) + .map(t -> t.stream() + .map(com.commercetools.api.models.common.Price::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantBuilder.java index 1efa72b5b61..578856df4bb 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantBuilder.java @@ -59,6 +59,9 @@ public class ProductVariantBuilder implements Builder { @Nullable private Boolean scopedPriceDiscounted; + @Nullable + private java.util.List recurrencePrices; + /** *

      A unique, sequential identifier of the Product Variant within the Product.

      * @param id value to be set @@ -573,6 +576,95 @@ public ProductVariantBuilder scopedPriceDiscounted(@Nullable final Boolean scope return this; } + /** + *

      Only available when Product price selection is used. Cannot be used in a Query Predicate.

      + * @param recurrencePrices value to be set + * @return Builder + */ + + public ProductVariantBuilder recurrencePrices( + @Nullable final com.commercetools.api.models.common.Price... recurrencePrices) { + this.recurrencePrices = new ArrayList<>(Arrays.asList(recurrencePrices)); + return this; + } + + /** + *

      Only available when Product price selection is used. Cannot be used in a Query Predicate.

      + * @param recurrencePrices value to be set + * @return Builder + */ + + public ProductVariantBuilder recurrencePrices( + @Nullable final java.util.List recurrencePrices) { + this.recurrencePrices = recurrencePrices; + return this; + } + + /** + *

      Only available when Product price selection is used. Cannot be used in a Query Predicate.

      + * @param recurrencePrices value to be set + * @return Builder + */ + + public ProductVariantBuilder plusRecurrencePrices( + @Nullable final com.commercetools.api.models.common.Price... recurrencePrices) { + if (this.recurrencePrices == null) { + this.recurrencePrices = new ArrayList<>(); + } + this.recurrencePrices.addAll(Arrays.asList(recurrencePrices)); + return this; + } + + /** + *

      Only available when Product price selection is used. Cannot be used in a Query Predicate.

      + * @param builder function to build the recurrencePrices value + * @return Builder + */ + + public ProductVariantBuilder plusRecurrencePrices( + Function builder) { + if (this.recurrencePrices == null) { + this.recurrencePrices = new ArrayList<>(); + } + this.recurrencePrices.add(builder.apply(com.commercetools.api.models.common.PriceBuilder.of()).build()); + return this; + } + + /** + *

      Only available when Product price selection is used. Cannot be used in a Query Predicate.

      + * @param builder function to build the recurrencePrices value + * @return Builder + */ + + public ProductVariantBuilder withRecurrencePrices( + Function builder) { + this.recurrencePrices = new ArrayList<>(); + this.recurrencePrices.add(builder.apply(com.commercetools.api.models.common.PriceBuilder.of()).build()); + return this; + } + + /** + *

      Only available when Product price selection is used. Cannot be used in a Query Predicate.

      + * @param builder function to build the recurrencePrices value + * @return Builder + */ + + public ProductVariantBuilder addRecurrencePrices( + Function builder) { + return plusRecurrencePrices(builder.apply(com.commercetools.api.models.common.PriceBuilder.of())); + } + + /** + *

      Only available when Product price selection is used. Cannot be used in a Query Predicate.

      + * @param builder function to build the recurrencePrices value + * @return Builder + */ + + public ProductVariantBuilder setRecurrencePrices( + Function builder) { + return recurrencePrices(builder.apply(com.commercetools.api.models.common.PriceBuilder.of())); + } + /** *

      A unique, sequential identifier of the Product Variant within the Product.

      * @return id @@ -693,6 +785,16 @@ public Boolean getScopedPriceDiscounted() { return this.scopedPriceDiscounted; } + /** + *

      Only available when Product price selection is used. Cannot be used in a Query Predicate.

      + * @return recurrencePrices + */ + + @Nullable + public java.util.List getRecurrencePrices() { + return this.recurrencePrices; + } + /** * builds ProductVariant with checking for non-null required values * @return ProductVariant @@ -700,7 +802,7 @@ public Boolean getScopedPriceDiscounted() { public ProductVariant build() { Objects.requireNonNull(id, ProductVariant.class + ": id is missing"); return new ProductVariantImpl(id, sku, key, prices, attributes, price, images, assets, availability, - isMatchingVariant, scopedPrice, scopedPriceDiscounted); + isMatchingVariant, scopedPrice, scopedPriceDiscounted, recurrencePrices); } /** @@ -709,7 +811,7 @@ public ProductVariant build() { */ public ProductVariant buildUnchecked() { return new ProductVariantImpl(id, sku, key, prices, attributes, price, images, assets, availability, - isMatchingVariant, scopedPrice, scopedPriceDiscounted); + isMatchingVariant, scopedPrice, scopedPriceDiscounted, recurrencePrices); } /** @@ -739,6 +841,7 @@ public static ProductVariantBuilder of(final ProductVariant template) { builder.isMatchingVariant = template.getIsMatchingVariant(); builder.scopedPrice = template.getScopedPrice(); builder.scopedPriceDiscounted = template.getScopedPriceDiscounted(); + builder.recurrencePrices = template.getRecurrencePrices(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantImpl.java index eea2cd52583..e2dedd542e5 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product/ProductVariantImpl.java @@ -46,6 +46,8 @@ public class ProductVariantImpl implements ProductVariant, ModelBase { private Boolean scopedPriceDiscounted; + private java.util.List recurrencePrices; + /** * create instance with all properties */ @@ -60,7 +62,8 @@ public class ProductVariantImpl implements ProductVariant, ModelBase { @JsonProperty("availability") final com.commercetools.api.models.product.ProductVariantAvailability availability, @JsonProperty("isMatchingVariant") final Boolean isMatchingVariant, @JsonProperty("scopedPrice") final com.commercetools.api.models.common.ScopedPrice scopedPrice, - @JsonProperty("scopedPriceDiscounted") final Boolean scopedPriceDiscounted) { + @JsonProperty("scopedPriceDiscounted") final Boolean scopedPriceDiscounted, + @JsonProperty("recurrencePrices") final java.util.List recurrencePrices) { this.id = id; this.sku = sku; this.key = key; @@ -73,6 +76,7 @@ public class ProductVariantImpl implements ProductVariant, ModelBase { this.isMatchingVariant = isMatchingVariant; this.scopedPrice = scopedPrice; this.scopedPriceDiscounted = scopedPriceDiscounted; + this.recurrencePrices = recurrencePrices; } /** @@ -178,6 +182,14 @@ public Boolean getScopedPriceDiscounted() { return this.scopedPriceDiscounted; } + /** + *

      Only available when Product price selection is used. Cannot be used in a Query Predicate.

      + */ + + public java.util.List getRecurrencePrices() { + return this.recurrencePrices; + } + public void setId(final Long id) { this.id = id; } @@ -242,6 +254,14 @@ public void setScopedPriceDiscounted(final Boolean scopedPriceDiscounted) { this.scopedPriceDiscounted = scopedPriceDiscounted; } + public void setRecurrencePrices(final com.commercetools.api.models.common.Price... recurrencePrices) { + this.recurrencePrices = new ArrayList<>(Arrays.asList(recurrencePrices)); + } + + public void setRecurrencePrices(final java.util.List recurrencePrices) { + this.recurrencePrices = recurrencePrices; + } + @Override public boolean equals(Object o) { if (this == o) @@ -264,6 +284,7 @@ public boolean equals(Object o) { .append(isMatchingVariant, that.isMatchingVariant) .append(scopedPrice, that.scopedPrice) .append(scopedPriceDiscounted, that.scopedPriceDiscounted) + .append(recurrencePrices, that.recurrencePrices) .append(id, that.id) .append(sku, that.sku) .append(key, that.key) @@ -276,6 +297,7 @@ public boolean equals(Object o) { .append(isMatchingVariant, that.isMatchingVariant) .append(scopedPrice, that.scopedPrice) .append(scopedPriceDiscounted, that.scopedPriceDiscounted) + .append(recurrencePrices, that.recurrencePrices) .isEquals(); } @@ -293,6 +315,7 @@ public int hashCode() { .append(isMatchingVariant) .append(scopedPrice) .append(scopedPriceDiscounted) + .append(recurrencePrices) .toHashCode(); } @@ -310,6 +333,7 @@ public String toString() { .append("isMatchingVariant", isMatchingVariant) .append("scopedPrice", scopedPrice) .append("scopedPriceDiscounted", scopedPriceDiscounted) + .append("recurrencePrices", recurrencePrices) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthSchedule.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthSchedule.java new file mode 100644 index 00000000000..ef997bf8374 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthSchedule.java @@ -0,0 +1,138 @@ + +package com.commercetools.api.models.recurrence_policy; + +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; + +/** + *

      Schedule of a Recurring Order that occurs on a specific day of each month. This type is returned in the RecurrencePolicy for an active Recurring Order.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     DayOfMonthSchedule dayOfMonthSchedule = DayOfMonthSchedule.builder()
      + *             .day(1)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("dayOfMonth") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = DayOfMonthScheduleImpl.class) +public interface DayOfMonthSchedule extends RecurrencePolicySchedule { + + /** + * discriminator value for DayOfMonthSchedule + */ + String DAY_OF_MONTH = "dayOfMonth"; + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

      The day of the month when the Recurring Order is created. If the value is greater than the number of days in a given month, the order is created on the last day of the month.

      + * @return day + */ + @NotNull + @JsonProperty("day") + public Integer getDay(); + + /** + *

      The day of the month when the Recurring Order is created. If the value is greater than the number of days in a given month, the order is created on the last day of the month.

      + * @param day value to be set + */ + + public void setDay(final Integer day); + + /** + * factory method + * @return instance of DayOfMonthSchedule + */ + public static DayOfMonthSchedule of() { + return new DayOfMonthScheduleImpl(); + } + + /** + * factory method to create a shallow copy DayOfMonthSchedule + * @param template instance to be copied + * @return copy instance + */ + public static DayOfMonthSchedule of(final DayOfMonthSchedule template) { + DayOfMonthScheduleImpl instance = new DayOfMonthScheduleImpl(); + instance.setDay(template.getDay()); + return instance; + } + + public DayOfMonthSchedule copyDeep(); + + /** + * factory method to create a deep copy of DayOfMonthSchedule + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DayOfMonthSchedule deepCopy(@Nullable final DayOfMonthSchedule template) { + if (template == null) { + return null; + } + DayOfMonthScheduleImpl instance = new DayOfMonthScheduleImpl(); + instance.setDay(template.getDay()); + return instance; + } + + /** + * builder factory method for DayOfMonthSchedule + * @return builder + */ + public static DayOfMonthScheduleBuilder builder() { + return DayOfMonthScheduleBuilder.of(); + } + + /** + * create builder for DayOfMonthSchedule instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DayOfMonthScheduleBuilder builder(final DayOfMonthSchedule template) { + return DayOfMonthScheduleBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withDayOfMonthSchedule(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleBuilder.java new file mode 100644 index 00000000000..cb96d1f9b90 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * DayOfMonthScheduleBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     DayOfMonthSchedule dayOfMonthSchedule = DayOfMonthSchedule.builder()
      + *             .day(1)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DayOfMonthScheduleBuilder implements Builder { + + private Integer day; + + /** + *

      The day of the month when the Recurring Order is created. If the value is greater than the number of days in a given month, the order is created on the last day of the month.

      + * @param day value to be set + * @return Builder + */ + + public DayOfMonthScheduleBuilder day(final Integer day) { + this.day = day; + return this; + } + + /** + *

      The day of the month when the Recurring Order is created. If the value is greater than the number of days in a given month, the order is created on the last day of the month.

      + * @return day + */ + + public Integer getDay() { + return this.day; + } + + /** + * builds DayOfMonthSchedule with checking for non-null required values + * @return DayOfMonthSchedule + */ + public DayOfMonthSchedule build() { + Objects.requireNonNull(day, DayOfMonthSchedule.class + ": day is missing"); + return new DayOfMonthScheduleImpl(day); + } + + /** + * builds DayOfMonthSchedule without checking for non-null required values + * @return DayOfMonthSchedule + */ + public DayOfMonthSchedule buildUnchecked() { + return new DayOfMonthScheduleImpl(day); + } + + /** + * factory method for an instance of DayOfMonthScheduleBuilder + * @return builder + */ + public static DayOfMonthScheduleBuilder of() { + return new DayOfMonthScheduleBuilder(); + } + + /** + * create builder for DayOfMonthSchedule instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DayOfMonthScheduleBuilder of(final DayOfMonthSchedule template) { + DayOfMonthScheduleBuilder builder = new DayOfMonthScheduleBuilder(); + builder.day = template.getDay(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleDraft.java new file mode 100644 index 00000000000..d946665b91c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleDraft.java @@ -0,0 +1,100 @@ + +package com.commercetools.api.models.recurrence_policy; + +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; + +/** + *

      Determines the schedule for a Recurring Order to occur on a specific day of each month.

      + *
        + *
      • Orders will be created even if the specified day is a weekend or holiday.
      • + *
      • To place orders on different dates within the same month (for example, the 1st and 15th), create separate Recurring Orders—each with its own schedule.
      • + *
      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     DayOfMonthScheduleDraft dayOfMonthScheduleDraft = DayOfMonthScheduleDraft.builder()
      + *             .day(1)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface DayOfMonthScheduleDraft + extends RecurrencePolicyScheduleDraft, io.vrap.rmf.base.client.Draft { + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

      The day of the month when the Recurring Order should be created. If the value is greater than the number of days in a given month, the order will be created on the last day of the month.

      + * @return day + */ + @NotNull + @JsonProperty("day") + public Integer getDay(); + + /** + *

      The day of the month when the Recurring Order should be created. If the value is greater than the number of days in a given month, the order will be created on the last day of the month.

      + * @param day value to be set + */ + + public void setDay(final Integer day); + + public DayOfMonthScheduleDraft copyDeep(); + + /** + * factory method to create a deep copy of DayOfMonthScheduleDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DayOfMonthScheduleDraft deepCopy(@Nullable final DayOfMonthScheduleDraft template) { + if (template == null) { + return null; + } + DayOfMonthScheduleDraftImpl instance = new DayOfMonthScheduleDraftImpl(); + instance.setDay(template.getDay()); + return instance; + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withDayOfMonthScheduleDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleDraftImpl.java new file mode 100644 index 00000000000..0f444252adc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleDraftImpl.java @@ -0,0 +1,101 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Determines the schedule for a Recurring Order to occur on a specific day of each month.

      + *
        + *
      • Orders will be created even if the specified day is a weekend or holiday.
      • + *
      • To place orders on different dates within the same month (for example, the 1st and 15th), create separate Recurring Orders—each with its own schedule.
      • + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DayOfMonthScheduleDraftImpl implements DayOfMonthScheduleDraft, ModelBase { + + private String type; + + private Integer day; + + /** + * create instance with all properties + */ + @JsonCreator + DayOfMonthScheduleDraftImpl(@JsonProperty("type") final String type, @JsonProperty("day") final Integer day) { + this.type = type; + this.day = day; + } + + /** + * create empty instance + */ + public DayOfMonthScheduleDraftImpl() { + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      The day of the month when the Recurring Order should be created. If the value is greater than the number of days in a given month, the order will be created on the last day of the month.

      + */ + + public Integer getDay() { + return this.day; + } + + public void setDay(final Integer day) { + this.day = day; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DayOfMonthScheduleDraftImpl that = (DayOfMonthScheduleDraftImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(day, that.day) + .append(type, that.type) + .append(day, that.day) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(day).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("day", day) + .build(); + } + + @Override + public DayOfMonthScheduleDraft copyDeep() { + return DayOfMonthScheduleDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleImpl.java new file mode 100644 index 00000000000..f8952960773 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Schedule of a Recurring Order that occurs on a specific day of each month. This type is returned in the RecurrencePolicy for an active Recurring Order.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DayOfMonthScheduleImpl implements DayOfMonthSchedule, ModelBase { + + private String type; + + private Integer day; + + /** + * create instance with all properties + */ + @JsonCreator + DayOfMonthScheduleImpl(@JsonProperty("day") final Integer day) { + this.day = day; + this.type = DAY_OF_MONTH; + } + + /** + * create empty instance + */ + public DayOfMonthScheduleImpl() { + this.type = DAY_OF_MONTH; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      The day of the month when the Recurring Order is created. If the value is greater than the number of days in a given month, the order is created on the last day of the month.

      + */ + + public Integer getDay() { + return this.day; + } + + public void setDay(final Integer day) { + this.day = day; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DayOfMonthScheduleImpl that = (DayOfMonthScheduleImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(day, that.day) + .append(type, that.type) + .append(day, that.day) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(day).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("day", day) + .build(); + } + + @Override + public DayOfMonthSchedule copyDeep() { + return DayOfMonthSchedule.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/IntervalUnit.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/IntervalUnit.java new file mode 100644 index 00000000000..336f3d0b52e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/IntervalUnit.java @@ -0,0 +1,123 @@ + +package com.commercetools.api.models.recurrence_policy; + +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; + +/** + *

      Supported interval units for Recurrence Policies which are used in Recurring Orders.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface IntervalUnit extends JsonEnum { + + /** +

      Use to set a daily schedule.

      */ + IntervalUnit DAYS = IntervalUnitEnum.DAYS; + /** +

      Use to set a weekly schedule.

      */ + IntervalUnit WEEKS = IntervalUnitEnum.WEEKS; + /** +

      Use to set a monthly schedule.

      */ + IntervalUnit MONTHS = IntervalUnitEnum.MONTHS; + + /** + * possible values of IntervalUnit + */ + enum IntervalUnitEnum implements IntervalUnit { + /** + * Days + */ + DAYS("Days"), + + /** + * Weeks + */ + WEEKS("Weeks"), + + /** + * Months + */ + MONTHS("Months"); + private final String jsonName; + + private IntervalUnitEnum(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 IntervalUnit + * 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 IntervalUnit findEnum(String value) { + return findEnumViaJsonName(value).orElse(new IntervalUnit() { + @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 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 IntervalUnit[] values() { + return IntervalUnitEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicy.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicy.java new file mode 100644 index 00000000000..ecfa3395256 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicy.java @@ -0,0 +1,292 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.time.ZonedDateTime; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.BaseResource; +import com.commercetools.api.models.common.CreatedBy; +import com.commercetools.api.models.common.LastModifiedBy; +import com.commercetools.api.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * RecurrencePolicy + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicy recurrencePolicy = RecurrencePolicy.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .key("{key}")
      + *             .schedule(scheduleBuilder -> scheduleBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurrencePolicyImpl.class) +public interface RecurrencePolicy extends BaseResource { + + /** + *

      Unique identifier of the RecurrencePolicy.

      + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

      Current version of the RecurrencePolicy.

      + * @return version + */ + @NotNull + @JsonProperty("version") + public Long getVersion(); + + /** + *

      User-defined unique identifier of the RecurrencePolicy.

      + * @return key + */ + @NotNull + @JsonProperty("key") + public String getKey(); + + /** + *

      Name of the RecurrencePolicy.

      + * @return name + */ + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

      Description of the RecurrencePolicy.

      + * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

      Schedule of the RecurrencePolicy.

      + * @return schedule + */ + @NotNull + @Valid + @JsonProperty("schedule") + public RecurrencePolicySchedule getSchedule(); + + /** + *

      Date and time (UTC) the RecurrencePolicy was initially created.

      + * @return createdAt + */ + @NotNull + @JsonProperty("createdAt") + public ZonedDateTime getCreatedAt(); + + /** + *

      IDs and references that created the RecurrencePolicy.

      + * @return createdBy + */ + @Valid + @JsonProperty("createdBy") + public CreatedBy getCreatedBy(); + + /** + *

      Date and time (UTC) the RecurrencePolicy was last updated.

      + * @return lastModifiedAt + */ + @NotNull + @JsonProperty("lastModifiedAt") + public ZonedDateTime getLastModifiedAt(); + + /** + *

      IDs and references that last modified the RecurrencePolicy.

      + * @return lastModifiedBy + */ + @Valid + @JsonProperty("lastModifiedBy") + public LastModifiedBy getLastModifiedBy(); + + /** + *

      Unique identifier of the RecurrencePolicy.

      + * @param id value to be set + */ + + public void setId(final String id); + + /** + *

      Current version of the RecurrencePolicy.

      + * @param version value to be set + */ + + public void setVersion(final Long version); + + /** + *

      User-defined unique identifier of the RecurrencePolicy.

      + * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

      Name of the RecurrencePolicy.

      + * @param name value to be set + */ + + public void setName(final LocalizedString name); + + /** + *

      Description of the RecurrencePolicy.

      + * @param description value to be set + */ + + public void setDescription(final LocalizedString description); + + /** + *

      Schedule of the RecurrencePolicy.

      + * @param schedule value to be set + */ + + public void setSchedule(final RecurrencePolicySchedule schedule); + + /** + *

      Date and time (UTC) the RecurrencePolicy was initially created.

      + * @param createdAt value to be set + */ + + public void setCreatedAt(final ZonedDateTime createdAt); + + /** + *

      IDs and references that created the RecurrencePolicy.

      + * @param createdBy value to be set + */ + + public void setCreatedBy(final CreatedBy createdBy); + + /** + *

      Date and time (UTC) the RecurrencePolicy was last updated.

      + * @param lastModifiedAt value to be set + */ + + public void setLastModifiedAt(final ZonedDateTime lastModifiedAt); + + /** + *

      IDs and references that last modified the RecurrencePolicy.

      + * @param lastModifiedBy value to be set + */ + + public void setLastModifiedBy(final LastModifiedBy lastModifiedBy); + + /** + * factory method + * @return instance of RecurrencePolicy + */ + public static RecurrencePolicy of() { + return new RecurrencePolicyImpl(); + } + + /** + * factory method to create a shallow copy RecurrencePolicy + * @param template instance to be copied + * @return copy instance + */ + public static RecurrencePolicy of(final RecurrencePolicy template) { + RecurrencePolicyImpl instance = new RecurrencePolicyImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setKey(template.getKey()); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setSchedule(template.getSchedule()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + return instance; + } + + public RecurrencePolicy copyDeep(); + + /** + * factory method to create a deep copy of RecurrencePolicy + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurrencePolicy deepCopy(@Nullable final RecurrencePolicy template) { + if (template == null) { + return null; + } + RecurrencePolicyImpl instance = new RecurrencePolicyImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setKey(template.getKey()); + instance.setName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getName())); + instance.setDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getDescription())); + instance.setSchedule( + com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule.deepCopy(template.getSchedule())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + return instance; + } + + /** + * builder factory method for RecurrencePolicy + * @return builder + */ + public static RecurrencePolicyBuilder builder() { + return RecurrencePolicyBuilder.of(); + } + + /** + * create builder for RecurrencePolicy instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicyBuilder builder(final RecurrencePolicy template) { + return RecurrencePolicyBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurrencePolicy(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyBuilder.java new file mode 100644 index 00000000000..dda58e3048d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyBuilder.java @@ -0,0 +1,425 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurrencePolicyBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicy recurrencePolicy = RecurrencePolicy.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .key("{key}")
      + *             .schedule(scheduleBuilder -> scheduleBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private String key; + + @Nullable + private com.commercetools.api.models.common.LocalizedString name; + + @Nullable + private com.commercetools.api.models.common.LocalizedString description; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule schedule; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + /** + *

      Unique identifier of the RecurrencePolicy.

      + * @param id value to be set + * @return Builder + */ + + public RecurrencePolicyBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Current version of the RecurrencePolicy.

      + * @param version value to be set + * @return Builder + */ + + public RecurrencePolicyBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Date and time (UTC) the RecurrencePolicy was initially created.

      + * @param createdAt value to be set + * @return Builder + */ + + public RecurrencePolicyBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

      Date and time (UTC) the RecurrencePolicy was last updated.

      + * @param lastModifiedAt value to be set + * @return Builder + */ + + public RecurrencePolicyBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

      User-defined unique identifier of the RecurrencePolicy.

      + * @param key value to be set + * @return Builder + */ + + public RecurrencePolicyBuilder key(final String key) { + this.key = key; + return this; + } + + /** + *

      Name of the RecurrencePolicy.

      + * @param builder function to build the name value + * @return Builder + */ + + public RecurrencePolicyBuilder name( + Function builder) { + this.name = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

      Name of the RecurrencePolicy.

      + * @param builder function to build the name value + * @return Builder + */ + + public RecurrencePolicyBuilder withName( + Function builder) { + this.name = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

      Name of the RecurrencePolicy.

      + * @param name value to be set + * @return Builder + */ + + public RecurrencePolicyBuilder name(@Nullable final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + return this; + } + + /** + *

      Description of the RecurrencePolicy.

      + * @param builder function to build the description value + * @return Builder + */ + + public RecurrencePolicyBuilder description( + Function builder) { + this.description = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

      Description of the RecurrencePolicy.

      + * @param builder function to build the description value + * @return Builder + */ + + public RecurrencePolicyBuilder withDescription( + Function builder) { + this.description = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

      Description of the RecurrencePolicy.

      + * @param description value to be set + * @return Builder + */ + + public RecurrencePolicyBuilder description( + @Nullable final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + return this; + } + + /** + *

      Schedule of the RecurrencePolicy.

      + * @param schedule value to be set + * @return Builder + */ + + public RecurrencePolicyBuilder schedule( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule schedule) { + this.schedule = schedule; + return this; + } + + /** + *

      Schedule of the RecurrencePolicy.

      + * @param builder function to build the schedule value + * @return Builder + */ + + public RecurrencePolicyBuilder schedule( + Function> builder) { + this.schedule = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleBuilder.of()) + .build(); + return this; + } + + /** + *

      IDs and references that created the RecurrencePolicy.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurrencePolicyBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that created the RecurrencePolicy.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurrencePolicyBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that created the RecurrencePolicy.

      + * @param createdBy value to be set + * @return Builder + */ + + public RecurrencePolicyBuilder createdBy(@Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

      IDs and references that last modified the RecurrencePolicy.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurrencePolicyBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that last modified the RecurrencePolicy.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurrencePolicyBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that last modified the RecurrencePolicy.

      + * @param lastModifiedBy value to be set + * @return Builder + */ + + public RecurrencePolicyBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

      Unique identifier of the RecurrencePolicy.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Current version of the RecurrencePolicy.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the RecurrencePolicy was initially created.

      + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Date and time (UTC) the RecurrencePolicy was last updated.

      + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      User-defined unique identifier of the RecurrencePolicy.

      + * @return key + */ + + public String getKey() { + return this.key; + } + + /** + *

      Name of the RecurrencePolicy.

      + * @return name + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getName() { + return this.name; + } + + /** + *

      Description of the RecurrencePolicy.

      + * @return description + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + *

      Schedule of the RecurrencePolicy.

      + * @return schedule + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule getSchedule() { + return this.schedule; + } + + /** + *

      IDs and references that created the RecurrencePolicy.

      + * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      IDs and references that last modified the RecurrencePolicy.

      + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + * builds RecurrencePolicy with checking for non-null required values + * @return RecurrencePolicy + */ + public RecurrencePolicy build() { + Objects.requireNonNull(id, RecurrencePolicy.class + ": id is missing"); + Objects.requireNonNull(version, RecurrencePolicy.class + ": version is missing"); + Objects.requireNonNull(createdAt, RecurrencePolicy.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, RecurrencePolicy.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(key, RecurrencePolicy.class + ": key is missing"); + Objects.requireNonNull(schedule, RecurrencePolicy.class + ": schedule is missing"); + return new RecurrencePolicyImpl(id, version, createdAt, lastModifiedAt, key, name, description, schedule, + createdBy, lastModifiedBy); + } + + /** + * builds RecurrencePolicy without checking for non-null required values + * @return RecurrencePolicy + */ + public RecurrencePolicy buildUnchecked() { + return new RecurrencePolicyImpl(id, version, createdAt, lastModifiedAt, key, name, description, schedule, + createdBy, lastModifiedBy); + } + + /** + * factory method for an instance of RecurrencePolicyBuilder + * @return builder + */ + public static RecurrencePolicyBuilder of() { + return new RecurrencePolicyBuilder(); + } + + /** + * create builder for RecurrencePolicy instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicyBuilder of(final RecurrencePolicy template) { + RecurrencePolicyBuilder builder = new RecurrencePolicyBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.key = template.getKey(); + builder.name = template.getName(); + builder.description = template.getDescription(); + builder.schedule = template.getSchedule(); + builder.createdBy = template.getCreatedBy(); + builder.lastModifiedBy = template.getLastModifiedBy(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyDraft.java new file mode 100644 index 00000000000..76c4576fdb6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyDraft.java @@ -0,0 +1,181 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * RecurrencePolicyDraft + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicyDraft recurrencePolicyDraft = RecurrencePolicyDraft.builder()
      + *             .key("{key}")
      + *             .schedule(scheduleBuilder -> scheduleBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurrencePolicyDraftImpl.class) +public interface RecurrencePolicyDraft extends io.vrap.rmf.base.client.Draft { + + /** + *

      User-defined unique identifier for the RecurrencePolicy.

      + * @return key + */ + @NotNull + @JsonProperty("key") + public String getKey(); + + /** + *

      Name of the RecurrencePolicy.

      + * @return name + */ + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

      Description of the RecurrencePolicy.

      + * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

      Schedule where the recurrence is defined.

      + * @return schedule + */ + @NotNull + @Valid + @JsonProperty("schedule") + public RecurrencePolicyScheduleDraft getSchedule(); + + /** + *

      User-defined unique identifier for the RecurrencePolicy.

      + * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

      Name of the RecurrencePolicy.

      + * @param name value to be set + */ + + public void setName(final LocalizedString name); + + /** + *

      Description of the RecurrencePolicy.

      + * @param description value to be set + */ + + public void setDescription(final LocalizedString description); + + /** + *

      Schedule where the recurrence is defined.

      + * @param schedule value to be set + */ + + public void setSchedule(final RecurrencePolicyScheduleDraft schedule); + + /** + * factory method + * @return instance of RecurrencePolicyDraft + */ + public static RecurrencePolicyDraft of() { + return new RecurrencePolicyDraftImpl(); + } + + /** + * factory method to create a shallow copy RecurrencePolicyDraft + * @param template instance to be copied + * @return copy instance + */ + public static RecurrencePolicyDraft of(final RecurrencePolicyDraft template) { + RecurrencePolicyDraftImpl instance = new RecurrencePolicyDraftImpl(); + instance.setKey(template.getKey()); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setSchedule(template.getSchedule()); + return instance; + } + + public RecurrencePolicyDraft copyDeep(); + + /** + * factory method to create a deep copy of RecurrencePolicyDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurrencePolicyDraft deepCopy(@Nullable final RecurrencePolicyDraft template) { + if (template == null) { + return null; + } + RecurrencePolicyDraftImpl instance = new RecurrencePolicyDraftImpl(); + instance.setKey(template.getKey()); + instance.setName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getName())); + instance.setDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getDescription())); + instance.setSchedule(com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft + .deepCopy(template.getSchedule())); + return instance; + } + + /** + * builder factory method for RecurrencePolicyDraft + * @return builder + */ + public static RecurrencePolicyDraftBuilder builder() { + return RecurrencePolicyDraftBuilder.of(); + } + + /** + * create builder for RecurrencePolicyDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicyDraftBuilder builder(final RecurrencePolicyDraft template) { + return RecurrencePolicyDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurrencePolicyDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyDraftBuilder.java new file mode 100644 index 00000000000..52281db74a8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyDraftBuilder.java @@ -0,0 +1,224 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurrencePolicyDraftBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicyDraft recurrencePolicyDraft = RecurrencePolicyDraft.builder()
      + *             .key("{key}")
      + *             .schedule(scheduleBuilder -> scheduleBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyDraftBuilder implements Builder { + + private String key; + + @Nullable + private com.commercetools.api.models.common.LocalizedString name; + + @Nullable + private com.commercetools.api.models.common.LocalizedString description; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft schedule; + + /** + *

      User-defined unique identifier for the RecurrencePolicy.

      + * @param key value to be set + * @return Builder + */ + + public RecurrencePolicyDraftBuilder key(final String key) { + this.key = key; + return this; + } + + /** + *

      Name of the RecurrencePolicy.

      + * @param builder function to build the name value + * @return Builder + */ + + public RecurrencePolicyDraftBuilder name( + Function builder) { + this.name = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

      Name of the RecurrencePolicy.

      + * @param builder function to build the name value + * @return Builder + */ + + public RecurrencePolicyDraftBuilder withName( + Function builder) { + this.name = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

      Name of the RecurrencePolicy.

      + * @param name value to be set + * @return Builder + */ + + public RecurrencePolicyDraftBuilder name(@Nullable final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + return this; + } + + /** + *

      Description of the RecurrencePolicy.

      + * @param builder function to build the description value + * @return Builder + */ + + public RecurrencePolicyDraftBuilder description( + Function builder) { + this.description = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

      Description of the RecurrencePolicy.

      + * @param builder function to build the description value + * @return Builder + */ + + public RecurrencePolicyDraftBuilder withDescription( + Function builder) { + this.description = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

      Description of the RecurrencePolicy.

      + * @param description value to be set + * @return Builder + */ + + public RecurrencePolicyDraftBuilder description( + @Nullable final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + return this; + } + + /** + *

      Schedule where the recurrence is defined.

      + * @param schedule value to be set + * @return Builder + */ + + public RecurrencePolicyDraftBuilder schedule( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft schedule) { + this.schedule = schedule; + return this; + } + + /** + *

      Schedule where the recurrence is defined.

      + * @param builder function to build the schedule value + * @return Builder + */ + + public RecurrencePolicyDraftBuilder schedule( + Function> builder) { + this.schedule = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      User-defined unique identifier for the RecurrencePolicy.

      + * @return key + */ + + public String getKey() { + return this.key; + } + + /** + *

      Name of the RecurrencePolicy.

      + * @return name + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getName() { + return this.name; + } + + /** + *

      Description of the RecurrencePolicy.

      + * @return description + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + *

      Schedule where the recurrence is defined.

      + * @return schedule + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft getSchedule() { + return this.schedule; + } + + /** + * builds RecurrencePolicyDraft with checking for non-null required values + * @return RecurrencePolicyDraft + */ + public RecurrencePolicyDraft build() { + Objects.requireNonNull(key, RecurrencePolicyDraft.class + ": key is missing"); + Objects.requireNonNull(schedule, RecurrencePolicyDraft.class + ": schedule is missing"); + return new RecurrencePolicyDraftImpl(key, name, description, schedule); + } + + /** + * builds RecurrencePolicyDraft without checking for non-null required values + * @return RecurrencePolicyDraft + */ + public RecurrencePolicyDraft buildUnchecked() { + return new RecurrencePolicyDraftImpl(key, name, description, schedule); + } + + /** + * factory method for an instance of RecurrencePolicyDraftBuilder + * @return builder + */ + public static RecurrencePolicyDraftBuilder of() { + return new RecurrencePolicyDraftBuilder(); + } + + /** + * create builder for RecurrencePolicyDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicyDraftBuilder of(final RecurrencePolicyDraft template) { + RecurrencePolicyDraftBuilder builder = new RecurrencePolicyDraftBuilder(); + builder.key = template.getKey(); + builder.name = template.getName(); + builder.description = template.getDescription(); + builder.schedule = template.getSchedule(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyDraftImpl.java new file mode 100644 index 00000000000..8801266f74d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyDraftImpl.java @@ -0,0 +1,141 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RecurrencePolicyDraft + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyDraftImpl implements RecurrencePolicyDraft, ModelBase { + + private String key; + + private com.commercetools.api.models.common.LocalizedString name; + + private com.commercetools.api.models.common.LocalizedString description; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft schedule; + + /** + * create instance with all properties + */ + @JsonCreator + RecurrencePolicyDraftImpl(@JsonProperty("key") final String key, + @JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name, + @JsonProperty("description") final com.commercetools.api.models.common.LocalizedString description, + @JsonProperty("schedule") final com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft schedule) { + this.key = key; + this.name = name; + this.description = description; + this.schedule = schedule; + } + + /** + * create empty instance + */ + public RecurrencePolicyDraftImpl() { + } + + /** + *

      User-defined unique identifier for the RecurrencePolicy.

      + */ + + public String getKey() { + return this.key; + } + + /** + *

      Name of the RecurrencePolicy.

      + */ + + public com.commercetools.api.models.common.LocalizedString getName() { + return this.name; + } + + /** + *

      Description of the RecurrencePolicy.

      + */ + + public com.commercetools.api.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + *

      Schedule where the recurrence is defined.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft getSchedule() { + return this.schedule; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setName(final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + } + + public void setDescription(final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + } + + public void setSchedule( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft schedule) { + this.schedule = schedule; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurrencePolicyDraftImpl that = (RecurrencePolicyDraftImpl) o; + + return new EqualsBuilder().append(key, that.key) + .append(name, that.name) + .append(description, that.description) + .append(schedule, that.schedule) + .append(key, that.key) + .append(name, that.name) + .append(description, that.description) + .append(schedule, that.schedule) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(key).append(name).append(description).append(schedule).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("key", key) + .append("name", name) + .append("description", description) + .append("schedule", schedule) + .build(); + } + + @Override + public RecurrencePolicyDraft copyDeep() { + return RecurrencePolicyDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyImpl.java new file mode 100644 index 00000000000..add36d086d2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyImpl.java @@ -0,0 +1,263 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RecurrencePolicy + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyImpl implements RecurrencePolicy, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private String key; + + private com.commercetools.api.models.common.LocalizedString name; + + private com.commercetools.api.models.common.LocalizedString description; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule schedule; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + /** + * create instance with all properties + */ + @JsonCreator + RecurrencePolicyImpl(@JsonProperty("id") final String id, @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("key") final String key, + @JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name, + @JsonProperty("description") final com.commercetools.api.models.common.LocalizedString description, + @JsonProperty("schedule") final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule schedule, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.key = key; + this.name = name; + this.description = description; + this.schedule = schedule; + this.createdBy = createdBy; + this.lastModifiedBy = lastModifiedBy; + } + + /** + * create empty instance + */ + public RecurrencePolicyImpl() { + } + + /** + *

      Unique identifier of the RecurrencePolicy.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Current version of the RecurrencePolicy.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) the RecurrencePolicy was initially created.

      + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Date and time (UTC) the RecurrencePolicy was last updated.

      + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      User-defined unique identifier of the RecurrencePolicy.

      + */ + + public String getKey() { + return this.key; + } + + /** + *

      Name of the RecurrencePolicy.

      + */ + + public com.commercetools.api.models.common.LocalizedString getName() { + return this.name; + } + + /** + *

      Description of the RecurrencePolicy.

      + */ + + public com.commercetools.api.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + *

      Schedule of the RecurrencePolicy.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule getSchedule() { + return this.schedule; + } + + /** + *

      IDs and references that created the RecurrencePolicy.

      + */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

      IDs and references that last modified the RecurrencePolicy.

      + */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setName(final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + } + + public void setDescription(final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + } + + public void setSchedule(final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule schedule) { + this.schedule = schedule; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurrencePolicyImpl that = (RecurrencePolicyImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(key, that.key) + .append(name, that.name) + .append(description, that.description) + .append(schedule, that.schedule) + .append(createdBy, that.createdBy) + .append(lastModifiedBy, that.lastModifiedBy) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(key, that.key) + .append(name, that.name) + .append(description, that.description) + .append(schedule, that.schedule) + .append(createdBy, that.createdBy) + .append(lastModifiedBy, that.lastModifiedBy) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(key) + .append(name) + .append(description) + .append(schedule) + .append(createdBy) + .append(lastModifiedBy) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("key", key) + .append("name", name) + .append("description", description) + .append("schedule", schedule) + .append("createdBy", createdBy) + .append("lastModifiedBy", lastModifiedBy) + .build(); + } + + @Override + public RecurrencePolicy copyDeep() { + return RecurrencePolicy.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyPagedQueryResponse.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyPagedQueryResponse.java new file mode 100644 index 00000000000..14635eb5740 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyPagedQueryResponse.java @@ -0,0 +1,211 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +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.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      PagedQueryResult with results containing an array of RecurrencePolicy.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicyPagedQueryResponse recurrencePolicyPagedQueryResponse = RecurrencePolicyPagedQueryResponse.builder()
      + *             .limit(0.3)
      + *             .offset(0.3)
      + *             .count(0.3)
      + *             .plusResults(resultsBuilder -> resultsBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurrencePolicyPagedQueryResponseImpl.class) +public interface RecurrencePolicyPagedQueryResponse { + + /** + *

      Number of results requested.

      + * @return limit + */ + @NotNull + @JsonProperty("limit") + public Long getLimit(); + + /** + *

      Number of elements skipped.

      + * @return offset + */ + @NotNull + @JsonProperty("offset") + public Long getOffset(); + + /** + *

      Actual number of results returned.

      + * @return count + */ + @NotNull + @JsonProperty("count") + public Long getCount(); + + /** + *

      Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

      + * @return total + */ + + @JsonProperty("total") + public Long getTotal(); + + /** + *

      RecurrencePolicies matching the query.

      + * @return results + */ + @NotNull + @Valid + @JsonProperty("results") + public List getResults(); + + /** + *

      Number of results requested.

      + * @param limit value to be set + */ + + public void setLimit(final Long limit); + + /** + *

      Number of elements skipped.

      + * @param offset value to be set + */ + + public void setOffset(final Long offset); + + /** + *

      Actual number of results returned.

      + * @param count value to be set + */ + + public void setCount(final Long count); + + /** + *

      Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

      + * @param total value to be set + */ + + public void setTotal(final Long total); + + /** + *

      RecurrencePolicies matching the query.

      + * @param results values to be set + */ + + @JsonIgnore + public void setResults(final RecurrencePolicy... results); + + /** + *

      RecurrencePolicies matching the query.

      + * @param results values to be set + */ + + public void setResults(final List results); + + /** + * factory method + * @return instance of RecurrencePolicyPagedQueryResponse + */ + public static RecurrencePolicyPagedQueryResponse of() { + return new RecurrencePolicyPagedQueryResponseImpl(); + } + + /** + * factory method to create a shallow copy RecurrencePolicyPagedQueryResponse + * @param template instance to be copied + * @return copy instance + */ + public static RecurrencePolicyPagedQueryResponse of(final RecurrencePolicyPagedQueryResponse template) { + RecurrencePolicyPagedQueryResponseImpl instance = new RecurrencePolicyPagedQueryResponseImpl(); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + instance.setCount(template.getCount()); + instance.setTotal(template.getTotal()); + instance.setResults(template.getResults()); + return instance; + } + + public RecurrencePolicyPagedQueryResponse copyDeep(); + + /** + * factory method to create a deep copy of RecurrencePolicyPagedQueryResponse + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurrencePolicyPagedQueryResponse deepCopy( + @Nullable final RecurrencePolicyPagedQueryResponse template) { + if (template == null) { + return null; + } + RecurrencePolicyPagedQueryResponseImpl instance = new RecurrencePolicyPagedQueryResponseImpl(); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + instance.setCount(template.getCount()); + instance.setTotal(template.getTotal()); + instance.setResults(Optional.ofNullable(template.getResults()) + .map(t -> t.stream() + .map(com.commercetools.api.models.recurrence_policy.RecurrencePolicy::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for RecurrencePolicyPagedQueryResponse + * @return builder + */ + public static RecurrencePolicyPagedQueryResponseBuilder builder() { + return RecurrencePolicyPagedQueryResponseBuilder.of(); + } + + /** + * create builder for RecurrencePolicyPagedQueryResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicyPagedQueryResponseBuilder builder(final RecurrencePolicyPagedQueryResponse template) { + return RecurrencePolicyPagedQueryResponseBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurrencePolicyPagedQueryResponse(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyPagedQueryResponseBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyPagedQueryResponseBuilder.java new file mode 100644 index 00000000000..107cd822597 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyPagedQueryResponseBuilder.java @@ -0,0 +1,265 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurrencePolicyPagedQueryResponseBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicyPagedQueryResponse recurrencePolicyPagedQueryResponse = RecurrencePolicyPagedQueryResponse.builder()
      + *             .limit(0.3)
      + *             .offset(0.3)
      + *             .count(0.3)
      + *             .plusResults(resultsBuilder -> resultsBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyPagedQueryResponseBuilder implements Builder { + + private Long limit; + + private Long offset; + + private Long count; + + @Nullable + private Long total; + + private java.util.List results; + + /** + *

      Number of results requested.

      + * @param limit value to be set + * @return Builder + */ + + public RecurrencePolicyPagedQueryResponseBuilder limit(final Long limit) { + this.limit = limit; + return this; + } + + /** + *

      Number of elements skipped.

      + * @param offset value to be set + * @return Builder + */ + + public RecurrencePolicyPagedQueryResponseBuilder offset(final Long offset) { + this.offset = offset; + return this; + } + + /** + *

      Actual number of results returned.

      + * @param count value to be set + * @return Builder + */ + + public RecurrencePolicyPagedQueryResponseBuilder count(final Long count) { + this.count = count; + return this; + } + + /** + *

      Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

      + * @param total value to be set + * @return Builder + */ + + public RecurrencePolicyPagedQueryResponseBuilder total(@Nullable final Long total) { + this.total = total; + return this; + } + + /** + *

      RecurrencePolicies matching the query.

      + * @param results value to be set + * @return Builder + */ + + public RecurrencePolicyPagedQueryResponseBuilder results( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicy... results) { + this.results = new ArrayList<>(Arrays.asList(results)); + return this; + } + + /** + *

      RecurrencePolicies matching the query.

      + * @param results value to be set + * @return Builder + */ + + public RecurrencePolicyPagedQueryResponseBuilder results( + final java.util.List results) { + this.results = results; + return this; + } + + /** + *

      RecurrencePolicies matching the query.

      + * @param results value to be set + * @return Builder + */ + + public RecurrencePolicyPagedQueryResponseBuilder plusResults( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicy... results) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.addAll(Arrays.asList(results)); + return this; + } + + /** + *

      RecurrencePolicies matching the query.

      + * @param builder function to build the results value + * @return Builder + */ + + public RecurrencePolicyPagedQueryResponseBuilder plusResults( + Function builder) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add( + builder.apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyBuilder.of()).build()); + return this; + } + + /** + *

      RecurrencePolicies matching the query.

      + * @param builder function to build the results value + * @return Builder + */ + + public RecurrencePolicyPagedQueryResponseBuilder withResults( + Function builder) { + this.results = new ArrayList<>(); + this.results.add( + builder.apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyBuilder.of()).build()); + return this; + } + + /** + *

      RecurrencePolicies matching the query.

      + * @param builder function to build the results value + * @return Builder + */ + + public RecurrencePolicyPagedQueryResponseBuilder addResults( + Function builder) { + return plusResults(builder.apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyBuilder.of())); + } + + /** + *

      RecurrencePolicies matching the query.

      + * @param builder function to build the results value + * @return Builder + */ + + public RecurrencePolicyPagedQueryResponseBuilder setResults( + Function builder) { + return results(builder.apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyBuilder.of())); + } + + /** + *

      Number of results requested.

      + * @return limit + */ + + public Long getLimit() { + return this.limit; + } + + /** + *

      Number of elements skipped.

      + * @return offset + */ + + public Long getOffset() { + return this.offset; + } + + /** + *

      Actual number of results returned.

      + * @return count + */ + + public Long getCount() { + return this.count; + } + + /** + *

      Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

      + * @return total + */ + + @Nullable + public Long getTotal() { + return this.total; + } + + /** + *

      RecurrencePolicies matching the query.

      + * @return results + */ + + public java.util.List getResults() { + return this.results; + } + + /** + * builds RecurrencePolicyPagedQueryResponse with checking for non-null required values + * @return RecurrencePolicyPagedQueryResponse + */ + public RecurrencePolicyPagedQueryResponse build() { + Objects.requireNonNull(limit, RecurrencePolicyPagedQueryResponse.class + ": limit is missing"); + Objects.requireNonNull(offset, RecurrencePolicyPagedQueryResponse.class + ": offset is missing"); + Objects.requireNonNull(count, RecurrencePolicyPagedQueryResponse.class + ": count is missing"); + Objects.requireNonNull(results, RecurrencePolicyPagedQueryResponse.class + ": results is missing"); + return new RecurrencePolicyPagedQueryResponseImpl(limit, offset, count, total, results); + } + + /** + * builds RecurrencePolicyPagedQueryResponse without checking for non-null required values + * @return RecurrencePolicyPagedQueryResponse + */ + public RecurrencePolicyPagedQueryResponse buildUnchecked() { + return new RecurrencePolicyPagedQueryResponseImpl(limit, offset, count, total, results); + } + + /** + * factory method for an instance of RecurrencePolicyPagedQueryResponseBuilder + * @return builder + */ + public static RecurrencePolicyPagedQueryResponseBuilder of() { + return new RecurrencePolicyPagedQueryResponseBuilder(); + } + + /** + * create builder for RecurrencePolicyPagedQueryResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicyPagedQueryResponseBuilder of(final RecurrencePolicyPagedQueryResponse template) { + RecurrencePolicyPagedQueryResponseBuilder builder = new RecurrencePolicyPagedQueryResponseBuilder(); + builder.limit = template.getLimit(); + builder.offset = template.getOffset(); + builder.count = template.getCount(); + builder.total = template.getTotal(); + builder.results = template.getResults(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyPagedQueryResponseImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyPagedQueryResponseImpl.java new file mode 100644 index 00000000000..91f7d9c5f7b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyPagedQueryResponseImpl.java @@ -0,0 +1,168 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      PagedQueryResult with results containing an array of RecurrencePolicy.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyPagedQueryResponseImpl implements RecurrencePolicyPagedQueryResponse, ModelBase { + + private Long limit; + + private Long offset; + + private Long count; + + private Long total; + + private java.util.List results; + + /** + * create instance with all properties + */ + @JsonCreator + RecurrencePolicyPagedQueryResponseImpl(@JsonProperty("limit") final Long limit, + @JsonProperty("offset") final Long offset, @JsonProperty("count") final Long count, + @JsonProperty("total") final Long total, + @JsonProperty("results") final java.util.List results) { + this.limit = limit; + this.offset = offset; + this.count = count; + this.total = total; + this.results = results; + } + + /** + * create empty instance + */ + public RecurrencePolicyPagedQueryResponseImpl() { + } + + /** + *

      Number of results requested.

      + */ + + public Long getLimit() { + return this.limit; + } + + /** + *

      Number of elements skipped.

      + */ + + public Long getOffset() { + return this.offset; + } + + /** + *

      Actual number of results returned.

      + */ + + public Long getCount() { + return this.count; + } + + /** + *

      Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

      + */ + + public Long getTotal() { + return this.total; + } + + /** + *

      RecurrencePolicies matching the query.

      + */ + + public java.util.List getResults() { + return this.results; + } + + public void setLimit(final Long limit) { + this.limit = limit; + } + + public void setOffset(final Long offset) { + this.offset = offset; + } + + public void setCount(final Long count) { + this.count = count; + } + + public void setTotal(final Long total) { + this.total = total; + } + + public void setResults(final com.commercetools.api.models.recurrence_policy.RecurrencePolicy... results) { + this.results = new ArrayList<>(Arrays.asList(results)); + } + + public void setResults( + final java.util.List results) { + this.results = results; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurrencePolicyPagedQueryResponseImpl that = (RecurrencePolicyPagedQueryResponseImpl) o; + + return new EqualsBuilder().append(limit, that.limit) + .append(offset, that.offset) + .append(count, that.count) + .append(total, that.total) + .append(results, that.results) + .append(limit, that.limit) + .append(offset, that.offset) + .append(count, that.count) + .append(total, that.total) + .append(results, that.results) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(limit) + .append(offset) + .append(count) + .append(total) + .append(results) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("limit", limit) + .append("offset", offset) + .append("count", count) + .append("total", total) + .append("results", results) + .build(); + } + + @Override + public RecurrencePolicyPagedQueryResponse copyDeep() { + return RecurrencePolicyPagedQueryResponse.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyReference.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyReference.java new file mode 100644 index 00000000000..8b176fd54f9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyReference.java @@ -0,0 +1,149 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.Reference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Reference to a RecurrencePolicy.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicyReference recurrencePolicyReference = RecurrencePolicyReference.builder()
      + *             .id("{id}")
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("recurrence-policy") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurrencePolicyReferenceImpl.class) +public interface RecurrencePolicyReference extends Reference { + + /** + * discriminator value for RecurrencePolicyReference + */ + String RECURRENCE_POLICY = "recurrence-policy"; + + /** + *

      Contains the representation of the expanded RecurrencePolicy. Only present in responses to requests with Reference Expansion for RecurrencePolicies.

      + * @return obj + */ + @Valid + @JsonProperty("obj") + public RecurrencePolicy getObj(); + + /** + *

      Unique identifier of the referenced RecurrencePolicy.

      + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

      Contains the representation of the expanded RecurrencePolicy. Only present in responses to requests with Reference Expansion for RecurrencePolicies.

      + * @param obj value to be set + */ + + public void setObj(final RecurrencePolicy obj); + + /** + *

      Unique identifier of the referenced RecurrencePolicy.

      + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of RecurrencePolicyReference + */ + public static RecurrencePolicyReference of() { + return new RecurrencePolicyReferenceImpl(); + } + + /** + * factory method to create a shallow copy RecurrencePolicyReference + * @param template instance to be copied + * @return copy instance + */ + public static RecurrencePolicyReference of(final RecurrencePolicyReference template) { + RecurrencePolicyReferenceImpl instance = new RecurrencePolicyReferenceImpl(); + instance.setId(template.getId()); + instance.setObj(template.getObj()); + return instance; + } + + public RecurrencePolicyReference copyDeep(); + + /** + * factory method to create a deep copy of RecurrencePolicyReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurrencePolicyReference deepCopy(@Nullable final RecurrencePolicyReference template) { + if (template == null) { + return null; + } + RecurrencePolicyReferenceImpl instance = new RecurrencePolicyReferenceImpl(); + instance.setId(template.getId()); + instance.setObj(com.commercetools.api.models.recurrence_policy.RecurrencePolicy.deepCopy(template.getObj())); + return instance; + } + + /** + * builder factory method for RecurrencePolicyReference + * @return builder + */ + public static RecurrencePolicyReferenceBuilder builder() { + return RecurrencePolicyReferenceBuilder.of(); + } + + /** + * create builder for RecurrencePolicyReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicyReferenceBuilder builder(final RecurrencePolicyReference template) { + return RecurrencePolicyReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurrencePolicyReference(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyReferenceBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyReferenceBuilder.java new file mode 100644 index 00000000000..bdc99f29cf6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyReferenceBuilder.java @@ -0,0 +1,135 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurrencePolicyReferenceBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicyReference recurrencePolicyReference = RecurrencePolicyReference.builder()
      + *             .id("{id}")
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyReferenceBuilder implements Builder { + + private String id; + + @Nullable + private com.commercetools.api.models.recurrence_policy.RecurrencePolicy obj; + + /** + *

      Unique identifier of the referenced RecurrencePolicy.

      + * @param id value to be set + * @return Builder + */ + + public RecurrencePolicyReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Contains the representation of the expanded RecurrencePolicy. Only present in responses to requests with Reference Expansion for RecurrencePolicies.

      + * @param builder function to build the obj value + * @return Builder + */ + + public RecurrencePolicyReferenceBuilder obj( + Function builder) { + this.obj = builder.apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyBuilder.of()).build(); + return this; + } + + /** + *

      Contains the representation of the expanded RecurrencePolicy. Only present in responses to requests with Reference Expansion for RecurrencePolicies.

      + * @param builder function to build the obj value + * @return Builder + */ + + public RecurrencePolicyReferenceBuilder withObj( + Function builder) { + this.obj = builder.apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyBuilder.of()); + return this; + } + + /** + *

      Contains the representation of the expanded RecurrencePolicy. Only present in responses to requests with Reference Expansion for RecurrencePolicies.

      + * @param obj value to be set + * @return Builder + */ + + public RecurrencePolicyReferenceBuilder obj( + @Nullable final com.commercetools.api.models.recurrence_policy.RecurrencePolicy obj) { + this.obj = obj; + return this; + } + + /** + *

      Unique identifier of the referenced RecurrencePolicy.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Contains the representation of the expanded RecurrencePolicy. Only present in responses to requests with Reference Expansion for RecurrencePolicies.

      + * @return obj + */ + + @Nullable + public com.commercetools.api.models.recurrence_policy.RecurrencePolicy getObj() { + return this.obj; + } + + /** + * builds RecurrencePolicyReference with checking for non-null required values + * @return RecurrencePolicyReference + */ + public RecurrencePolicyReference build() { + Objects.requireNonNull(id, RecurrencePolicyReference.class + ": id is missing"); + return new RecurrencePolicyReferenceImpl(id, obj); + } + + /** + * builds RecurrencePolicyReference without checking for non-null required values + * @return RecurrencePolicyReference + */ + public RecurrencePolicyReference buildUnchecked() { + return new RecurrencePolicyReferenceImpl(id, obj); + } + + /** + * factory method for an instance of RecurrencePolicyReferenceBuilder + * @return builder + */ + public static RecurrencePolicyReferenceBuilder of() { + return new RecurrencePolicyReferenceBuilder(); + } + + /** + * create builder for RecurrencePolicyReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicyReferenceBuilder of(final RecurrencePolicyReference template) { + RecurrencePolicyReferenceBuilder builder = new RecurrencePolicyReferenceBuilder(); + builder.id = template.getId(); + builder.obj = template.getObj(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyReferenceImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyReferenceImpl.java new file mode 100644 index 00000000000..2e2b10eaff9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyReferenceImpl.java @@ -0,0 +1,118 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.commercetools.api.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Reference to a RecurrencePolicy.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyReferenceImpl implements RecurrencePolicyReference, ModelBase { + + private com.commercetools.api.models.common.ReferenceTypeId typeId; + + private String id; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicy obj; + + /** + * create instance with all properties + */ + @JsonCreator + RecurrencePolicyReferenceImpl(@JsonProperty("id") final String id, + @JsonProperty("obj") final com.commercetools.api.models.recurrence_policy.RecurrencePolicy obj) { + this.id = id; + this.obj = obj; + this.typeId = ReferenceTypeId.findEnum("recurrence-policy"); + } + + /** + * create empty instance + */ + public RecurrencePolicyReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("recurrence-policy"); + } + + /** + *

      Type of referenced resource.

      + */ + + public com.commercetools.api.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

      Unique identifier of the referenced RecurrencePolicy.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Contains the representation of the expanded RecurrencePolicy. Only present in responses to requests with Reference Expansion for RecurrencePolicies.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicy getObj() { + return this.obj; + } + + public void setId(final String id) { + this.id = id; + } + + public void setObj(final com.commercetools.api.models.recurrence_policy.RecurrencePolicy obj) { + this.obj = obj; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurrencePolicyReferenceImpl that = (RecurrencePolicyReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(obj, that.obj) + .append(typeId, that.typeId) + .append(id, that.id) + .append(obj, that.obj) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).append(obj).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .append("obj", obj) + .build(); + } + + @Override + public RecurrencePolicyReference copyDeep() { + return RecurrencePolicyReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyResourceIdentifier.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyResourceIdentifier.java new file mode 100644 index 00000000000..83276195445 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyResourceIdentifier.java @@ -0,0 +1,146 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.ResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

      ResourceIdentifier to a RecurrencePolicy. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicyResourceIdentifier recurrencePolicyResourceIdentifier = RecurrencePolicyResourceIdentifier.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("recurrence-policy") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurrencePolicyResourceIdentifierImpl.class) +public interface RecurrencePolicyResourceIdentifier extends ResourceIdentifier { + + /** + * discriminator value for RecurrencePolicyResourceIdentifier + */ + String RECURRENCE_POLICY = "recurrence-policy"; + + /** + *

      Unique identifier of the referenced RecurrencePolicy. Required if key is absent.

      + * @return id + */ + + @JsonProperty("id") + public String getId(); + + /** + *

      User-defined unique identifier of the referenced RecurrencePolicy. Required if id is absent.

      + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

      Unique identifier of the referenced RecurrencePolicy. Required if key is absent.

      + * @param id value to be set + */ + + public void setId(final String id); + + /** + *

      User-defined unique identifier of the referenced RecurrencePolicy. Required if id is absent.

      + * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of RecurrencePolicyResourceIdentifier + */ + public static RecurrencePolicyResourceIdentifier of() { + return new RecurrencePolicyResourceIdentifierImpl(); + } + + /** + * factory method to create a shallow copy RecurrencePolicyResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + public static RecurrencePolicyResourceIdentifier of(final RecurrencePolicyResourceIdentifier template) { + RecurrencePolicyResourceIdentifierImpl instance = new RecurrencePolicyResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + public RecurrencePolicyResourceIdentifier copyDeep(); + + /** + * factory method to create a deep copy of RecurrencePolicyResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurrencePolicyResourceIdentifier deepCopy( + @Nullable final RecurrencePolicyResourceIdentifier template) { + if (template == null) { + return null; + } + RecurrencePolicyResourceIdentifierImpl instance = new RecurrencePolicyResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for RecurrencePolicyResourceIdentifier + * @return builder + */ + public static RecurrencePolicyResourceIdentifierBuilder builder() { + return RecurrencePolicyResourceIdentifierBuilder.of(); + } + + /** + * create builder for RecurrencePolicyResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicyResourceIdentifierBuilder builder(final RecurrencePolicyResourceIdentifier template) { + return RecurrencePolicyResourceIdentifierBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurrencePolicyResourceIdentifier(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyResourceIdentifierBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyResourceIdentifierBuilder.java new file mode 100644 index 00000000000..7169e2f4cd9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyResourceIdentifierBuilder.java @@ -0,0 +1,109 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurrencePolicyResourceIdentifierBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicyResourceIdentifier recurrencePolicyResourceIdentifier = RecurrencePolicyResourceIdentifier.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyResourceIdentifierBuilder implements Builder { + + @Nullable + private String id; + + @Nullable + private String key; + + /** + *

      Unique identifier of the referenced RecurrencePolicy. Required if key is absent.

      + * @param id value to be set + * @return Builder + */ + + public RecurrencePolicyResourceIdentifierBuilder id(@Nullable final String id) { + this.id = id; + return this; + } + + /** + *

      User-defined unique identifier of the referenced RecurrencePolicy. Required if id is absent.

      + * @param key value to be set + * @return Builder + */ + + public RecurrencePolicyResourceIdentifierBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

      Unique identifier of the referenced RecurrencePolicy. Required if key is absent.

      + * @return id + */ + + @Nullable + public String getId() { + return this.id; + } + + /** + *

      User-defined unique identifier of the referenced RecurrencePolicy. Required if id is absent.

      + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + * builds RecurrencePolicyResourceIdentifier with checking for non-null required values + * @return RecurrencePolicyResourceIdentifier + */ + public RecurrencePolicyResourceIdentifier build() { + return new RecurrencePolicyResourceIdentifierImpl(id, key); + } + + /** + * builds RecurrencePolicyResourceIdentifier without checking for non-null required values + * @return RecurrencePolicyResourceIdentifier + */ + public RecurrencePolicyResourceIdentifier buildUnchecked() { + return new RecurrencePolicyResourceIdentifierImpl(id, key); + } + + /** + * factory method for an instance of RecurrencePolicyResourceIdentifierBuilder + * @return builder + */ + public static RecurrencePolicyResourceIdentifierBuilder of() { + return new RecurrencePolicyResourceIdentifierBuilder(); + } + + /** + * create builder for RecurrencePolicyResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicyResourceIdentifierBuilder of(final RecurrencePolicyResourceIdentifier template) { + RecurrencePolicyResourceIdentifierBuilder builder = new RecurrencePolicyResourceIdentifierBuilder(); + builder.id = template.getId(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyResourceIdentifierImpl.java new file mode 100644 index 00000000000..97192b4a6a7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyResourceIdentifierImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.commercetools.api.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      ResourceIdentifier to a RecurrencePolicy. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyResourceIdentifierImpl implements RecurrencePolicyResourceIdentifier, ModelBase { + + private com.commercetools.api.models.common.ReferenceTypeId typeId; + + private String id; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + RecurrencePolicyResourceIdentifierImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key) { + this.id = id; + this.key = key; + this.typeId = ReferenceTypeId.findEnum("recurrence-policy"); + } + + /** + * create empty instance + */ + public RecurrencePolicyResourceIdentifierImpl() { + this.typeId = ReferenceTypeId.findEnum("recurrence-policy"); + } + + /** + *

      Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

      + */ + + public com.commercetools.api.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

      Unique identifier of the referenced RecurrencePolicy. Required if key is absent.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      User-defined unique identifier of the referenced RecurrencePolicy. Required if id is absent.

      + */ + + public String getKey() { + return this.key; + } + + public void setId(final String id) { + this.id = id; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurrencePolicyResourceIdentifierImpl that = (RecurrencePolicyResourceIdentifierImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .append("key", key) + .build(); + } + + @Override + public RecurrencePolicyResourceIdentifier copyDeep() { + return RecurrencePolicyResourceIdentifier.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySchedule.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySchedule.java new file mode 100644 index 00000000000..a337e63d59e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySchedule.java @@ -0,0 +1,101 @@ + +package com.commercetools.api.models.recurrence_policy; + +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; + +/** + * RecurrencePolicySchedule + * + *
      + * Example to create a subtype instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicySchedule recurrencePolicySchedule = RecurrencePolicySchedule.dayOfMonthBuilder()
      + *             day(1)
      + *             .build()
      + * 
      + *
      + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", defaultImpl = RecurrencePolicyScheduleImpl.class, visible = true) +@JsonDeserialize(as = RecurrencePolicyScheduleImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface RecurrencePolicySchedule { + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + public RecurrencePolicySchedule copyDeep(); + + /** + * factory method to create a deep copy of RecurrencePolicySchedule + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurrencePolicySchedule deepCopy(@Nullable final RecurrencePolicySchedule template) { + if (template == null) { + return null; + } + + if (!(template instanceof RecurrencePolicyScheduleImpl)) { + return template.copyDeep(); + } + RecurrencePolicyScheduleImpl instance = new RecurrencePolicyScheduleImpl(); + return instance; + } + + /** + * builder for dayOfMonth subtype + * @return builder + */ + public static com.commercetools.api.models.recurrence_policy.DayOfMonthScheduleBuilder dayOfMonthBuilder() { + return com.commercetools.api.models.recurrence_policy.DayOfMonthScheduleBuilder.of(); + } + + /** + * builder for standard subtype + * @return builder + */ + public static com.commercetools.api.models.recurrence_policy.StandardScheduleBuilder standardBuilder() { + return com.commercetools.api.models.recurrence_policy.StandardScheduleBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurrencePolicySchedule(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleBuilder.java new file mode 100644 index 00000000000..a96fb39c179 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleBuilder.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurrencePolicyScheduleBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyScheduleBuilder { + + public com.commercetools.api.models.recurrence_policy.DayOfMonthScheduleBuilder dayOfMonthBuilder() { + return com.commercetools.api.models.recurrence_policy.DayOfMonthScheduleBuilder.of(); + } + + public com.commercetools.api.models.recurrence_policy.StandardScheduleBuilder standardBuilder() { + return com.commercetools.api.models.recurrence_policy.StandardScheduleBuilder.of(); + } + + /** + * factory method for an instance of RecurrencePolicyScheduleBuilder + * @return builder + */ + public static RecurrencePolicyScheduleBuilder of() { + return new RecurrencePolicyScheduleBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleDraft.java new file mode 100644 index 00000000000..afeb85f0d2e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleDraft.java @@ -0,0 +1,94 @@ + +package com.commercetools.api.models.recurrence_policy; + +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; + +/** + * RecurrencePolicyScheduleDraft + * + *
      + * Example to create a subtype instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicyScheduleDraft recurrencePolicyScheduleDraft = RecurrencePolicyScheduleDraft.standardBuilder()
      + *             value(0.3)
      + *             intervalUnit(IntervalUnit.DAYS)
      + *             .build()
      + * 
      + *
      + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", defaultImpl = RecurrencePolicyScheduleDraftImpl.class, visible = true) +@JsonDeserialize(as = RecurrencePolicyScheduleDraftImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface RecurrencePolicyScheduleDraft { + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + public RecurrencePolicyScheduleDraft copyDeep(); + + /** + * factory method to create a deep copy of RecurrencePolicyScheduleDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurrencePolicyScheduleDraft deepCopy(@Nullable final RecurrencePolicyScheduleDraft template) { + if (template == null) { + return null; + } + + if (!(template instanceof RecurrencePolicyScheduleDraftImpl)) { + return template.copyDeep(); + } + RecurrencePolicyScheduleDraftImpl instance = new RecurrencePolicyScheduleDraftImpl(); + return instance; + } + + /** + * builder for standard subtype + * @return builder + */ + public static com.commercetools.api.models.recurrence_policy.StandardScheduleDraftBuilder standardBuilder() { + return com.commercetools.api.models.recurrence_policy.StandardScheduleDraftBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurrencePolicyScheduleDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleDraftBuilder.java new file mode 100644 index 00000000000..e52b6ea54fc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleDraftBuilder.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurrencePolicyScheduleDraftBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyScheduleDraftBuilder { + + public com.commercetools.api.models.recurrence_policy.StandardScheduleDraftBuilder standardBuilder() { + return com.commercetools.api.models.recurrence_policy.StandardScheduleDraftBuilder.of(); + } + + /** + * factory method for an instance of RecurrencePolicyScheduleDraftBuilder + * @return builder + */ + public static RecurrencePolicyScheduleDraftBuilder of() { + return new RecurrencePolicyScheduleDraftBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleDraftImpl.java new file mode 100644 index 00000000000..e1a86963716 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleDraftImpl.java @@ -0,0 +1,76 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RecurrencePolicyScheduleDraft + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyScheduleDraftImpl implements RecurrencePolicyScheduleDraft, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + RecurrencePolicyScheduleDraftImpl(@JsonProperty("type") final String type) { + this.type = type; + } + + /** + * create empty instance + */ + public RecurrencePolicyScheduleDraftImpl() { + } + + /** + * + */ + + public String getType() { + return this.type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurrencePolicyScheduleDraftImpl that = (RecurrencePolicyScheduleDraftImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + + @Override + public RecurrencePolicyScheduleDraft copyDeep() { + return RecurrencePolicyScheduleDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleImpl.java new file mode 100644 index 00000000000..15764a5fbae --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleImpl.java @@ -0,0 +1,76 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RecurrencePolicySchedule + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyScheduleImpl implements RecurrencePolicySchedule, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + RecurrencePolicyScheduleImpl(@JsonProperty("type") final String type) { + this.type = type; + } + + /** + * create empty instance + */ + public RecurrencePolicyScheduleImpl() { + } + + /** + * + */ + + public String getType() { + return this.type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurrencePolicyScheduleImpl that = (RecurrencePolicyScheduleImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + + @Override + public RecurrencePolicySchedule copyDeep() { + return RecurrencePolicySchedule.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetDescriptionAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetDescriptionAction.java new file mode 100644 index 00000000000..69115e79f4f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetDescriptionAction.java @@ -0,0 +1,133 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + * RecurrencePolicySetDescriptionAction + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicySetDescriptionAction recurrencePolicySetDescriptionAction = RecurrencePolicySetDescriptionAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("setDescription") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurrencePolicySetDescriptionActionImpl.class) +public interface RecurrencePolicySetDescriptionAction extends RecurrencePolicyUpdateAction { + + /** + * discriminator value for RecurrencePolicySetDescriptionAction + */ + String SET_DESCRIPTION = "setDescription"; + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param description value to be set + */ + + public void setDescription(final LocalizedString description); + + /** + * factory method + * @return instance of RecurrencePolicySetDescriptionAction + */ + public static RecurrencePolicySetDescriptionAction of() { + return new RecurrencePolicySetDescriptionActionImpl(); + } + + /** + * factory method to create a shallow copy RecurrencePolicySetDescriptionAction + * @param template instance to be copied + * @return copy instance + */ + public static RecurrencePolicySetDescriptionAction of(final RecurrencePolicySetDescriptionAction template) { + RecurrencePolicySetDescriptionActionImpl instance = new RecurrencePolicySetDescriptionActionImpl(); + instance.setDescription(template.getDescription()); + return instance; + } + + public RecurrencePolicySetDescriptionAction copyDeep(); + + /** + * factory method to create a deep copy of RecurrencePolicySetDescriptionAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurrencePolicySetDescriptionAction deepCopy( + @Nullable final RecurrencePolicySetDescriptionAction template) { + if (template == null) { + return null; + } + RecurrencePolicySetDescriptionActionImpl instance = new RecurrencePolicySetDescriptionActionImpl(); + instance.setDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getDescription())); + return instance; + } + + /** + * builder factory method for RecurrencePolicySetDescriptionAction + * @return builder + */ + public static RecurrencePolicySetDescriptionActionBuilder builder() { + return RecurrencePolicySetDescriptionActionBuilder.of(); + } + + /** + * create builder for RecurrencePolicySetDescriptionAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicySetDescriptionActionBuilder builder( + final RecurrencePolicySetDescriptionAction template) { + return RecurrencePolicySetDescriptionActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurrencePolicySetDescriptionAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetDescriptionActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetDescriptionActionBuilder.java new file mode 100644 index 00000000000..21190628fdb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetDescriptionActionBuilder.java @@ -0,0 +1,110 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurrencePolicySetDescriptionActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicySetDescriptionAction recurrencePolicySetDescriptionAction = RecurrencePolicySetDescriptionAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicySetDescriptionActionBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.common.LocalizedString description; + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param builder function to build the description value + * @return Builder + */ + + public RecurrencePolicySetDescriptionActionBuilder description( + Function builder) { + this.description = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param builder function to build the description value + * @return Builder + */ + + public RecurrencePolicySetDescriptionActionBuilder withDescription( + Function builder) { + this.description = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param description value to be set + * @return Builder + */ + + public RecurrencePolicySetDescriptionActionBuilder description( + @Nullable final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @return description + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + * builds RecurrencePolicySetDescriptionAction with checking for non-null required values + * @return RecurrencePolicySetDescriptionAction + */ + public RecurrencePolicySetDescriptionAction build() { + return new RecurrencePolicySetDescriptionActionImpl(description); + } + + /** + * builds RecurrencePolicySetDescriptionAction without checking for non-null required values + * @return RecurrencePolicySetDescriptionAction + */ + public RecurrencePolicySetDescriptionAction buildUnchecked() { + return new RecurrencePolicySetDescriptionActionImpl(description); + } + + /** + * factory method for an instance of RecurrencePolicySetDescriptionActionBuilder + * @return builder + */ + public static RecurrencePolicySetDescriptionActionBuilder of() { + return new RecurrencePolicySetDescriptionActionBuilder(); + } + + /** + * create builder for RecurrencePolicySetDescriptionAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicySetDescriptionActionBuilder of(final RecurrencePolicySetDescriptionAction template) { + RecurrencePolicySetDescriptionActionBuilder builder = new RecurrencePolicySetDescriptionActionBuilder(); + builder.description = template.getDescription(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetDescriptionActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetDescriptionActionImpl.java new file mode 100644 index 00000000000..8fd90dfc28d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetDescriptionActionImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RecurrencePolicySetDescriptionAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicySetDescriptionActionImpl implements RecurrencePolicySetDescriptionAction, ModelBase { + + private String action; + + private com.commercetools.api.models.common.LocalizedString description; + + /** + * create instance with all properties + */ + @JsonCreator + RecurrencePolicySetDescriptionActionImpl( + @JsonProperty("description") final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + this.action = SET_DESCRIPTION; + } + + /** + * create empty instance + */ + public RecurrencePolicySetDescriptionActionImpl() { + this.action = SET_DESCRIPTION; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + */ + + public com.commercetools.api.models.common.LocalizedString getDescription() { + return this.description; + } + + public void setDescription(final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurrencePolicySetDescriptionActionImpl that = (RecurrencePolicySetDescriptionActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(description, that.description) + .append(action, that.action) + .append(description, that.description) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(description).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("description", description) + .build(); + } + + @Override + public RecurrencePolicySetDescriptionAction copyDeep() { + return RecurrencePolicySetDescriptionAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetKeyAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetKeyAction.java new file mode 100644 index 00000000000..e115f62ef09 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetKeyAction.java @@ -0,0 +1,127 @@ + +package com.commercetools.api.models.recurrence_policy; + +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; + +/** + * RecurrencePolicySetKeyAction + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicySetKeyAction recurrencePolicySetKeyAction = RecurrencePolicySetKeyAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("setKey") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurrencePolicySetKeyActionImpl.class) +public interface RecurrencePolicySetKeyAction extends RecurrencePolicyUpdateAction { + + /** + * discriminator value for RecurrencePolicySetKeyAction + */ + String SET_KEY = "setKey"; + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of RecurrencePolicySetKeyAction + */ + public static RecurrencePolicySetKeyAction of() { + return new RecurrencePolicySetKeyActionImpl(); + } + + /** + * factory method to create a shallow copy RecurrencePolicySetKeyAction + * @param template instance to be copied + * @return copy instance + */ + public static RecurrencePolicySetKeyAction of(final RecurrencePolicySetKeyAction template) { + RecurrencePolicySetKeyActionImpl instance = new RecurrencePolicySetKeyActionImpl(); + instance.setKey(template.getKey()); + return instance; + } + + public RecurrencePolicySetKeyAction copyDeep(); + + /** + * factory method to create a deep copy of RecurrencePolicySetKeyAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurrencePolicySetKeyAction deepCopy(@Nullable final RecurrencePolicySetKeyAction template) { + if (template == null) { + return null; + } + RecurrencePolicySetKeyActionImpl instance = new RecurrencePolicySetKeyActionImpl(); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for RecurrencePolicySetKeyAction + * @return builder + */ + public static RecurrencePolicySetKeyActionBuilder builder() { + return RecurrencePolicySetKeyActionBuilder.of(); + } + + /** + * create builder for RecurrencePolicySetKeyAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicySetKeyActionBuilder builder(final RecurrencePolicySetKeyAction template) { + return RecurrencePolicySetKeyActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurrencePolicySetKeyAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetKeyActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetKeyActionBuilder.java new file mode 100644 index 00000000000..41af55fe730 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetKeyActionBuilder.java @@ -0,0 +1,84 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurrencePolicySetKeyActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicySetKeyAction recurrencePolicySetKeyAction = RecurrencePolicySetKeyAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicySetKeyActionBuilder implements Builder { + + @Nullable + private String key; + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param key value to be set + * @return Builder + */ + + public RecurrencePolicySetKeyActionBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + * builds RecurrencePolicySetKeyAction with checking for non-null required values + * @return RecurrencePolicySetKeyAction + */ + public RecurrencePolicySetKeyAction build() { + return new RecurrencePolicySetKeyActionImpl(key); + } + + /** + * builds RecurrencePolicySetKeyAction without checking for non-null required values + * @return RecurrencePolicySetKeyAction + */ + public RecurrencePolicySetKeyAction buildUnchecked() { + return new RecurrencePolicySetKeyActionImpl(key); + } + + /** + * factory method for an instance of RecurrencePolicySetKeyActionBuilder + * @return builder + */ + public static RecurrencePolicySetKeyActionBuilder of() { + return new RecurrencePolicySetKeyActionBuilder(); + } + + /** + * create builder for RecurrencePolicySetKeyAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicySetKeyActionBuilder of(final RecurrencePolicySetKeyAction template) { + RecurrencePolicySetKeyActionBuilder builder = new RecurrencePolicySetKeyActionBuilder(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetKeyActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetKeyActionImpl.java new file mode 100644 index 00000000000..0dbd4f4a068 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetKeyActionImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RecurrencePolicySetKeyAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicySetKeyActionImpl implements RecurrencePolicySetKeyAction, ModelBase { + + private String action; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + RecurrencePolicySetKeyActionImpl(@JsonProperty("key") final String key) { + this.key = key; + this.action = SET_KEY; + } + + /** + * create empty instance + */ + public RecurrencePolicySetKeyActionImpl() { + this.action = SET_KEY; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + */ + + public String getKey() { + return this.key; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurrencePolicySetKeyActionImpl that = (RecurrencePolicySetKeyActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(key, that.key) + .append(action, that.action) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("key", key) + .build(); + } + + @Override + public RecurrencePolicySetKeyAction copyDeep() { + return RecurrencePolicySetKeyAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetNameAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetNameAction.java new file mode 100644 index 00000000000..589f3bff448 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetNameAction.java @@ -0,0 +1,130 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + * RecurrencePolicySetNameAction + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicySetNameAction recurrencePolicySetNameAction = RecurrencePolicySetNameAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("setName") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurrencePolicySetNameActionImpl.class) +public interface RecurrencePolicySetNameAction extends RecurrencePolicyUpdateAction { + + /** + * discriminator value for RecurrencePolicySetNameAction + */ + String SET_NAME = "setName"; + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @return name + */ + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param name value to be set + */ + + public void setName(final LocalizedString name); + + /** + * factory method + * @return instance of RecurrencePolicySetNameAction + */ + public static RecurrencePolicySetNameAction of() { + return new RecurrencePolicySetNameActionImpl(); + } + + /** + * factory method to create a shallow copy RecurrencePolicySetNameAction + * @param template instance to be copied + * @return copy instance + */ + public static RecurrencePolicySetNameAction of(final RecurrencePolicySetNameAction template) { + RecurrencePolicySetNameActionImpl instance = new RecurrencePolicySetNameActionImpl(); + instance.setName(template.getName()); + return instance; + } + + public RecurrencePolicySetNameAction copyDeep(); + + /** + * factory method to create a deep copy of RecurrencePolicySetNameAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurrencePolicySetNameAction deepCopy(@Nullable final RecurrencePolicySetNameAction template) { + if (template == null) { + return null; + } + RecurrencePolicySetNameActionImpl instance = new RecurrencePolicySetNameActionImpl(); + instance.setName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getName())); + return instance; + } + + /** + * builder factory method for RecurrencePolicySetNameAction + * @return builder + */ + public static RecurrencePolicySetNameActionBuilder builder() { + return RecurrencePolicySetNameActionBuilder.of(); + } + + /** + * create builder for RecurrencePolicySetNameAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicySetNameActionBuilder builder(final RecurrencePolicySetNameAction template) { + return RecurrencePolicySetNameActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurrencePolicySetNameAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetNameActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetNameActionBuilder.java new file mode 100644 index 00000000000..2aaece57645 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetNameActionBuilder.java @@ -0,0 +1,110 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurrencePolicySetNameActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicySetNameAction recurrencePolicySetNameAction = RecurrencePolicySetNameAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicySetNameActionBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.common.LocalizedString name; + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param builder function to build the name value + * @return Builder + */ + + public RecurrencePolicySetNameActionBuilder name( + Function builder) { + this.name = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param builder function to build the name value + * @return Builder + */ + + public RecurrencePolicySetNameActionBuilder withName( + Function builder) { + this.name = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @param name value to be set + * @return Builder + */ + + public RecurrencePolicySetNameActionBuilder name( + @Nullable final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + return this; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + * @return name + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getName() { + return this.name; + } + + /** + * builds RecurrencePolicySetNameAction with checking for non-null required values + * @return RecurrencePolicySetNameAction + */ + public RecurrencePolicySetNameAction build() { + return new RecurrencePolicySetNameActionImpl(name); + } + + /** + * builds RecurrencePolicySetNameAction without checking for non-null required values + * @return RecurrencePolicySetNameAction + */ + public RecurrencePolicySetNameAction buildUnchecked() { + return new RecurrencePolicySetNameActionImpl(name); + } + + /** + * factory method for an instance of RecurrencePolicySetNameActionBuilder + * @return builder + */ + public static RecurrencePolicySetNameActionBuilder of() { + return new RecurrencePolicySetNameActionBuilder(); + } + + /** + * create builder for RecurrencePolicySetNameAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicySetNameActionBuilder of(final RecurrencePolicySetNameAction template) { + RecurrencePolicySetNameActionBuilder builder = new RecurrencePolicySetNameActionBuilder(); + builder.name = template.getName(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetNameActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetNameActionImpl.java new file mode 100644 index 00000000000..c98352e71a3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetNameActionImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RecurrencePolicySetNameAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicySetNameActionImpl implements RecurrencePolicySetNameAction, ModelBase { + + private String action; + + private com.commercetools.api.models.common.LocalizedString name; + + /** + * create instance with all properties + */ + @JsonCreator + RecurrencePolicySetNameActionImpl( + @JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + this.action = SET_NAME; + } + + /** + * create empty instance + */ + public RecurrencePolicySetNameActionImpl() { + this.action = SET_NAME; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      Value to set. If empty, any existing value will be removed.

      + */ + + public com.commercetools.api.models.common.LocalizedString getName() { + return this.name; + } + + public void setName(final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurrencePolicySetNameActionImpl that = (RecurrencePolicySetNameActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(name, that.name) + .append(action, that.action) + .append(name, that.name) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(name).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("name", name) + .build(); + } + + @Override + public RecurrencePolicySetNameAction copyDeep() { + return RecurrencePolicySetNameAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetScheduleAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetScheduleAction.java new file mode 100644 index 00000000000..2b228328485 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetScheduleAction.java @@ -0,0 +1,134 @@ + +package com.commercetools.api.models.recurrence_policy; + +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.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * RecurrencePolicySetScheduleAction + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicySetScheduleAction recurrencePolicySetScheduleAction = RecurrencePolicySetScheduleAction.builder()
      + *             .schedule(scheduleBuilder -> scheduleBuilder)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("setSchedule") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurrencePolicySetScheduleActionImpl.class) +public interface RecurrencePolicySetScheduleAction extends RecurrencePolicyUpdateAction { + + /** + * discriminator value for RecurrencePolicySetScheduleAction + */ + String SET_SCHEDULE = "setSchedule"; + + /** + *

      Schedule where the recurrence is defined.

      + * @return schedule + */ + @NotNull + @Valid + @JsonProperty("schedule") + public RecurrencePolicyScheduleDraft getSchedule(); + + /** + *

      Schedule where the recurrence is defined.

      + * @param schedule value to be set + */ + + public void setSchedule(final RecurrencePolicyScheduleDraft schedule); + + /** + * factory method + * @return instance of RecurrencePolicySetScheduleAction + */ + public static RecurrencePolicySetScheduleAction of() { + return new RecurrencePolicySetScheduleActionImpl(); + } + + /** + * factory method to create a shallow copy RecurrencePolicySetScheduleAction + * @param template instance to be copied + * @return copy instance + */ + public static RecurrencePolicySetScheduleAction of(final RecurrencePolicySetScheduleAction template) { + RecurrencePolicySetScheduleActionImpl instance = new RecurrencePolicySetScheduleActionImpl(); + instance.setSchedule(template.getSchedule()); + return instance; + } + + public RecurrencePolicySetScheduleAction copyDeep(); + + /** + * factory method to create a deep copy of RecurrencePolicySetScheduleAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurrencePolicySetScheduleAction deepCopy( + @Nullable final RecurrencePolicySetScheduleAction template) { + if (template == null) { + return null; + } + RecurrencePolicySetScheduleActionImpl instance = new RecurrencePolicySetScheduleActionImpl(); + instance.setSchedule(com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft + .deepCopy(template.getSchedule())); + return instance; + } + + /** + * builder factory method for RecurrencePolicySetScheduleAction + * @return builder + */ + public static RecurrencePolicySetScheduleActionBuilder builder() { + return RecurrencePolicySetScheduleActionBuilder.of(); + } + + /** + * create builder for RecurrencePolicySetScheduleAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicySetScheduleActionBuilder builder(final RecurrencePolicySetScheduleAction template) { + return RecurrencePolicySetScheduleActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurrencePolicySetScheduleAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetScheduleActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetScheduleActionBuilder.java new file mode 100644 index 00000000000..b502508f83f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetScheduleActionBuilder.java @@ -0,0 +1,98 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurrencePolicySetScheduleActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicySetScheduleAction recurrencePolicySetScheduleAction = RecurrencePolicySetScheduleAction.builder()
      + *             .schedule(scheduleBuilder -> scheduleBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicySetScheduleActionBuilder implements Builder { + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft schedule; + + /** + *

      Schedule where the recurrence is defined.

      + * @param schedule value to be set + * @return Builder + */ + + public RecurrencePolicySetScheduleActionBuilder schedule( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft schedule) { + this.schedule = schedule; + return this; + } + + /** + *

      Schedule where the recurrence is defined.

      + * @param builder function to build the schedule value + * @return Builder + */ + + public RecurrencePolicySetScheduleActionBuilder schedule( + Function> builder) { + this.schedule = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      Schedule where the recurrence is defined.

      + * @return schedule + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft getSchedule() { + return this.schedule; + } + + /** + * builds RecurrencePolicySetScheduleAction with checking for non-null required values + * @return RecurrencePolicySetScheduleAction + */ + public RecurrencePolicySetScheduleAction build() { + Objects.requireNonNull(schedule, RecurrencePolicySetScheduleAction.class + ": schedule is missing"); + return new RecurrencePolicySetScheduleActionImpl(schedule); + } + + /** + * builds RecurrencePolicySetScheduleAction without checking for non-null required values + * @return RecurrencePolicySetScheduleAction + */ + public RecurrencePolicySetScheduleAction buildUnchecked() { + return new RecurrencePolicySetScheduleActionImpl(schedule); + } + + /** + * factory method for an instance of RecurrencePolicySetScheduleActionBuilder + * @return builder + */ + public static RecurrencePolicySetScheduleActionBuilder of() { + return new RecurrencePolicySetScheduleActionBuilder(); + } + + /** + * create builder for RecurrencePolicySetScheduleAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicySetScheduleActionBuilder of(final RecurrencePolicySetScheduleAction template) { + RecurrencePolicySetScheduleActionBuilder builder = new RecurrencePolicySetScheduleActionBuilder(); + builder.schedule = template.getSchedule(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetScheduleActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetScheduleActionImpl.java new file mode 100644 index 00000000000..83ebf0f4e38 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetScheduleActionImpl.java @@ -0,0 +1,100 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RecurrencePolicySetScheduleAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicySetScheduleActionImpl implements RecurrencePolicySetScheduleAction, ModelBase { + + private String action; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft schedule; + + /** + * create instance with all properties + */ + @JsonCreator + RecurrencePolicySetScheduleActionImpl( + @JsonProperty("schedule") final com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft schedule) { + this.schedule = schedule; + this.action = SET_SCHEDULE; + } + + /** + * create empty instance + */ + public RecurrencePolicySetScheduleActionImpl() { + this.action = SET_SCHEDULE; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      Schedule where the recurrence is defined.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft getSchedule() { + return this.schedule; + } + + public void setSchedule( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraft schedule) { + this.schedule = schedule; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurrencePolicySetScheduleActionImpl that = (RecurrencePolicySetScheduleActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(schedule, that.schedule) + .append(action, that.action) + .append(schedule, that.schedule) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(schedule).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("schedule", schedule) + .build(); + } + + @Override + public RecurrencePolicySetScheduleAction copyDeep() { + return RecurrencePolicySetScheduleAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdate.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdate.java new file mode 100644 index 00000000000..08ae30a838c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdate.java @@ -0,0 +1,157 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +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.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * RecurrencePolicyUpdate + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicyUpdate recurrencePolicyUpdate = RecurrencePolicyUpdate.builder()
      + *             .version(0.3)
      + *             .plusActions(actionsBuilder -> actionsBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurrencePolicyUpdateImpl.class) +public interface RecurrencePolicyUpdate { + + /** + *

      Expected version of the RecurrencePolicy on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      + * @return version + */ + @NotNull + @JsonProperty("version") + public Long getVersion(); + + /** + *

      Update actions to be performed on the RecurrencePolicy.

      + * @return actions + */ + @NotNull + @Valid + @JsonProperty("actions") + public List getActions(); + + /** + *

      Expected version of the RecurrencePolicy on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      + * @param version value to be set + */ + + public void setVersion(final Long version); + + /** + *

      Update actions to be performed on the RecurrencePolicy.

      + * @param actions values to be set + */ + + @JsonIgnore + public void setActions(final RecurrencePolicyUpdateAction... actions); + + /** + *

      Update actions to be performed on the RecurrencePolicy.

      + * @param actions values to be set + */ + + public void setActions(final List actions); + + /** + * factory method + * @return instance of RecurrencePolicyUpdate + */ + public static RecurrencePolicyUpdate of() { + return new RecurrencePolicyUpdateImpl(); + } + + /** + * factory method to create a shallow copy RecurrencePolicyUpdate + * @param template instance to be copied + * @return copy instance + */ + public static RecurrencePolicyUpdate of(final RecurrencePolicyUpdate template) { + RecurrencePolicyUpdateImpl instance = new RecurrencePolicyUpdateImpl(); + instance.setVersion(template.getVersion()); + instance.setActions(template.getActions()); + return instance; + } + + public RecurrencePolicyUpdate copyDeep(); + + /** + * factory method to create a deep copy of RecurrencePolicyUpdate + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurrencePolicyUpdate deepCopy(@Nullable final RecurrencePolicyUpdate template) { + if (template == null) { + return null; + } + RecurrencePolicyUpdateImpl instance = new RecurrencePolicyUpdateImpl(); + instance.setVersion(template.getVersion()); + instance.setActions(Optional.ofNullable(template.getActions()) + .map(t -> t.stream() + .map(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdateAction::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for RecurrencePolicyUpdate + * @return builder + */ + public static RecurrencePolicyUpdateBuilder builder() { + return RecurrencePolicyUpdateBuilder.of(); + } + + /** + * create builder for RecurrencePolicyUpdate instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicyUpdateBuilder builder(final RecurrencePolicyUpdate template) { + return RecurrencePolicyUpdateBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurrencePolicyUpdate(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateAction.java new file mode 100644 index 00000000000..6f85526c79b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateAction.java @@ -0,0 +1,116 @@ + +package com.commercetools.api.models.recurrence_policy; + +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; + +/** + * RecurrencePolicyUpdateAction + * + *
      + * Example to create a subtype instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicyUpdateAction recurrencePolicyUpdateAction = RecurrencePolicyUpdateAction.setDescriptionBuilder()
      + *             .build()
      + * 
      + *
      + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "action", defaultImpl = RecurrencePolicyUpdateActionImpl.class, visible = true) +@JsonDeserialize(as = RecurrencePolicyUpdateActionImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface RecurrencePolicyUpdateAction { + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + public RecurrencePolicyUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of RecurrencePolicyUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurrencePolicyUpdateAction deepCopy(@Nullable final RecurrencePolicyUpdateAction template) { + if (template == null) { + return null; + } + + if (!(template instanceof RecurrencePolicyUpdateActionImpl)) { + return template.copyDeep(); + } + RecurrencePolicyUpdateActionImpl instance = new RecurrencePolicyUpdateActionImpl(); + return instance; + } + + /** + * builder for setDescription subtype + * @return builder + */ + public static com.commercetools.api.models.recurrence_policy.RecurrencePolicySetDescriptionActionBuilder setDescriptionBuilder() { + return com.commercetools.api.models.recurrence_policy.RecurrencePolicySetDescriptionActionBuilder.of(); + } + + /** + * builder for setKey subtype + * @return builder + */ + public static com.commercetools.api.models.recurrence_policy.RecurrencePolicySetKeyActionBuilder setKeyBuilder() { + return com.commercetools.api.models.recurrence_policy.RecurrencePolicySetKeyActionBuilder.of(); + } + + /** + * builder for setName subtype + * @return builder + */ + public static com.commercetools.api.models.recurrence_policy.RecurrencePolicySetNameActionBuilder setNameBuilder() { + return com.commercetools.api.models.recurrence_policy.RecurrencePolicySetNameActionBuilder.of(); + } + + /** + * builder for setSchedule subtype + * @return builder + */ + public static com.commercetools.api.models.recurrence_policy.RecurrencePolicySetScheduleActionBuilder setScheduleBuilder() { + return com.commercetools.api.models.recurrence_policy.RecurrencePolicySetScheduleActionBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurrencePolicyUpdateAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateActionBuilder.java new file mode 100644 index 00000000000..418072a299c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateActionBuilder.java @@ -0,0 +1,38 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurrencePolicyUpdateActionBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyUpdateActionBuilder { + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySetDescriptionActionBuilder setDescriptionBuilder() { + return com.commercetools.api.models.recurrence_policy.RecurrencePolicySetDescriptionActionBuilder.of(); + } + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySetKeyActionBuilder setKeyBuilder() { + return com.commercetools.api.models.recurrence_policy.RecurrencePolicySetKeyActionBuilder.of(); + } + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySetNameActionBuilder setNameBuilder() { + return com.commercetools.api.models.recurrence_policy.RecurrencePolicySetNameActionBuilder.of(); + } + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySetScheduleActionBuilder setScheduleBuilder() { + return com.commercetools.api.models.recurrence_policy.RecurrencePolicySetScheduleActionBuilder.of(); + } + + /** + * factory method for an instance of RecurrencePolicyUpdateActionBuilder + * @return builder + */ + public static RecurrencePolicyUpdateActionBuilder of() { + return new RecurrencePolicyUpdateActionBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateActionImpl.java new file mode 100644 index 00000000000..d48f42a8aea --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateActionImpl.java @@ -0,0 +1,76 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RecurrencePolicyUpdateAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyUpdateActionImpl implements RecurrencePolicyUpdateAction, ModelBase { + + private String action; + + /** + * create instance with all properties + */ + @JsonCreator + RecurrencePolicyUpdateActionImpl(@JsonProperty("action") final String action) { + this.action = action; + } + + /** + * create empty instance + */ + public RecurrencePolicyUpdateActionImpl() { + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurrencePolicyUpdateActionImpl that = (RecurrencePolicyUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action).append(action, that.action).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action).build(); + } + + @Override + public RecurrencePolicyUpdateAction copyDeep() { + return RecurrencePolicyUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateBuilder.java new file mode 100644 index 00000000000..b81d01a6c7a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateBuilder.java @@ -0,0 +1,168 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurrencePolicyUpdateBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurrencePolicyUpdate recurrencePolicyUpdate = RecurrencePolicyUpdate.builder()
      + *             .version(0.3)
      + *             .plusActions(actionsBuilder -> actionsBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyUpdateBuilder implements Builder { + + private Long version; + + private java.util.List actions; + + /** + *

      Expected version of the RecurrencePolicy on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      + * @param version value to be set + * @return Builder + */ + + public RecurrencePolicyUpdateBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Update actions to be performed on the RecurrencePolicy.

      + * @param actions value to be set + * @return Builder + */ + + public RecurrencePolicyUpdateBuilder actions( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdateAction... actions) { + this.actions = new ArrayList<>(Arrays.asList(actions)); + return this; + } + + /** + *

      Update actions to be performed on the RecurrencePolicy.

      + * @param actions value to be set + * @return Builder + */ + + public RecurrencePolicyUpdateBuilder actions( + final java.util.List actions) { + this.actions = actions; + return this; + } + + /** + *

      Update actions to be performed on the RecurrencePolicy.

      + * @param actions value to be set + * @return Builder + */ + + public RecurrencePolicyUpdateBuilder plusActions( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdateAction... actions) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions.addAll(Arrays.asList(actions)); + return this; + } + + /** + *

      Update actions to be performed on the RecurrencePolicy.

      + * @param builder function to build the actions value + * @return Builder + */ + + public RecurrencePolicyUpdateBuilder plusActions( + Function> builder) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions.add( + builder.apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdateActionBuilder.of()) + .build()); + return this; + } + + /** + *

      Update actions to be performed on the RecurrencePolicy.

      + * @param builder function to build the actions value + * @return Builder + */ + + public RecurrencePolicyUpdateBuilder withActions( + Function> builder) { + this.actions = new ArrayList<>(); + this.actions.add( + builder.apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdateActionBuilder.of()) + .build()); + return this; + } + + /** + *

      Expected version of the RecurrencePolicy on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Update actions to be performed on the RecurrencePolicy.

      + * @return actions + */ + + public java.util.List getActions() { + return this.actions; + } + + /** + * builds RecurrencePolicyUpdate with checking for non-null required values + * @return RecurrencePolicyUpdate + */ + public RecurrencePolicyUpdate build() { + Objects.requireNonNull(version, RecurrencePolicyUpdate.class + ": version is missing"); + Objects.requireNonNull(actions, RecurrencePolicyUpdate.class + ": actions is missing"); + return new RecurrencePolicyUpdateImpl(version, actions); + } + + /** + * builds RecurrencePolicyUpdate without checking for non-null required values + * @return RecurrencePolicyUpdate + */ + public RecurrencePolicyUpdate buildUnchecked() { + return new RecurrencePolicyUpdateImpl(version, actions); + } + + /** + * factory method for an instance of RecurrencePolicyUpdateBuilder + * @return builder + */ + public static RecurrencePolicyUpdateBuilder of() { + return new RecurrencePolicyUpdateBuilder(); + } + + /** + * create builder for RecurrencePolicyUpdate instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicyUpdateBuilder of(final RecurrencePolicyUpdate template) { + RecurrencePolicyUpdateBuilder builder = new RecurrencePolicyUpdateBuilder(); + builder.version = template.getVersion(); + builder.actions = template.getActions(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateImpl.java new file mode 100644 index 00000000000..005b25e44ea --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateImpl.java @@ -0,0 +1,108 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RecurrencePolicyUpdate + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyUpdateImpl implements RecurrencePolicyUpdate, ModelBase { + + private Long version; + + private java.util.List actions; + + /** + * create instance with all properties + */ + @JsonCreator + RecurrencePolicyUpdateImpl(@JsonProperty("version") final Long version, + @JsonProperty("actions") final java.util.List actions) { + this.version = version; + this.actions = actions; + } + + /** + * create empty instance + */ + public RecurrencePolicyUpdateImpl() { + } + + /** + *

      Expected version of the RecurrencePolicy on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Update actions to be performed on the RecurrencePolicy.

      + */ + + public java.util.List getActions() { + return this.actions; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setActions( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdateAction... actions) { + this.actions = new ArrayList<>(Arrays.asList(actions)); + } + + public void setActions( + final java.util.List actions) { + this.actions = actions; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurrencePolicyUpdateImpl that = (RecurrencePolicyUpdateImpl) o; + + return new EqualsBuilder().append(version, that.version) + .append(actions, that.actions) + .append(version, that.version) + .append(actions, that.actions) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(version).append(actions).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("version", version) + .append("actions", actions) + .build(); + } + + @Override + public RecurrencePolicyUpdate copyDeep() { + return RecurrencePolicyUpdate.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardSchedule.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardSchedule.java new file mode 100644 index 00000000000..42c0b330355 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardSchedule.java @@ -0,0 +1,148 @@ + +package com.commercetools.api.models.recurrence_policy; + +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; + +/** + *

      Schedule of a RecurringOrder that occurs at a fixed interval—for example, every two weeks or every month.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     StandardSchedule standardSchedule = StandardSchedule.builder()
      + *             .value(0.3)
      + *             .intervalUnit(IntervalUnit.DAYS)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("standard") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = StandardScheduleImpl.class) +public interface StandardSchedule extends RecurrencePolicySchedule { + + /** + * discriminator value for StandardSchedule + */ + String STANDARD = "standard"; + + /** + *

      Number of intervals between orders.

      + * @return value + */ + @NotNull + @JsonProperty("value") + public Long getValue(); + + /** + *

      Interval of this schedule.

      + * @return intervalUnit + */ + @NotNull + @JsonProperty("intervalUnit") + public IntervalUnit getIntervalUnit(); + + /** + *

      Number of intervals between orders.

      + * @param value value to be set + */ + + public void setValue(final Long value); + + /** + *

      Interval of this schedule.

      + * @param intervalUnit value to be set + */ + + public void setIntervalUnit(final IntervalUnit intervalUnit); + + /** + * factory method + * @return instance of StandardSchedule + */ + public static StandardSchedule of() { + return new StandardScheduleImpl(); + } + + /** + * factory method to create a shallow copy StandardSchedule + * @param template instance to be copied + * @return copy instance + */ + public static StandardSchedule of(final StandardSchedule template) { + StandardScheduleImpl instance = new StandardScheduleImpl(); + instance.setValue(template.getValue()); + instance.setIntervalUnit(template.getIntervalUnit()); + return instance; + } + + public StandardSchedule copyDeep(); + + /** + * factory method to create a deep copy of StandardSchedule + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static StandardSchedule deepCopy(@Nullable final StandardSchedule template) { + if (template == null) { + return null; + } + StandardScheduleImpl instance = new StandardScheduleImpl(); + instance.setValue(template.getValue()); + instance.setIntervalUnit(template.getIntervalUnit()); + return instance; + } + + /** + * builder factory method for StandardSchedule + * @return builder + */ + public static StandardScheduleBuilder builder() { + return StandardScheduleBuilder.of(); + } + + /** + * create builder for StandardSchedule instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static StandardScheduleBuilder builder(final StandardSchedule template) { + return StandardScheduleBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withStandardSchedule(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleBuilder.java new file mode 100644 index 00000000000..f0af59489b8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleBuilder.java @@ -0,0 +1,108 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * StandardScheduleBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     StandardSchedule standardSchedule = StandardSchedule.builder()
      + *             .value(0.3)
      + *             .intervalUnit(IntervalUnit.DAYS)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class StandardScheduleBuilder implements Builder { + + private Long value; + + private com.commercetools.api.models.recurrence_policy.IntervalUnit intervalUnit; + + /** + *

      Number of intervals between orders.

      + * @param value value to be set + * @return Builder + */ + + public StandardScheduleBuilder value(final Long value) { + this.value = value; + return this; + } + + /** + *

      Interval of this schedule.

      + * @param intervalUnit value to be set + * @return Builder + */ + + public StandardScheduleBuilder intervalUnit( + final com.commercetools.api.models.recurrence_policy.IntervalUnit intervalUnit) { + this.intervalUnit = intervalUnit; + return this; + } + + /** + *

      Number of intervals between orders.

      + * @return value + */ + + public Long getValue() { + return this.value; + } + + /** + *

      Interval of this schedule.

      + * @return intervalUnit + */ + + public com.commercetools.api.models.recurrence_policy.IntervalUnit getIntervalUnit() { + return this.intervalUnit; + } + + /** + * builds StandardSchedule with checking for non-null required values + * @return StandardSchedule + */ + public StandardSchedule build() { + Objects.requireNonNull(value, StandardSchedule.class + ": value is missing"); + Objects.requireNonNull(intervalUnit, StandardSchedule.class + ": intervalUnit is missing"); + return new StandardScheduleImpl(value, intervalUnit); + } + + /** + * builds StandardSchedule without checking for non-null required values + * @return StandardSchedule + */ + public StandardSchedule buildUnchecked() { + return new StandardScheduleImpl(value, intervalUnit); + } + + /** + * factory method for an instance of StandardScheduleBuilder + * @return builder + */ + public static StandardScheduleBuilder of() { + return new StandardScheduleBuilder(); + } + + /** + * create builder for StandardSchedule instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static StandardScheduleBuilder of(final StandardSchedule template) { + StandardScheduleBuilder builder = new StandardScheduleBuilder(); + builder.value = template.getValue(); + builder.intervalUnit = template.getIntervalUnit(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleDraft.java new file mode 100644 index 00000000000..8f118bf2da9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleDraft.java @@ -0,0 +1,149 @@ + +package com.commercetools.api.models.recurrence_policy; + +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; + +/** + *

      Determines the schedule for a Recurring Order to occur at a fixed interval—for example, every two weeks or every month.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     StandardScheduleDraft standardScheduleDraft = StandardScheduleDraft.builder()
      + *             .value(0.3)
      + *             .intervalUnit(IntervalUnit.DAYS)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("standard") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = StandardScheduleDraftImpl.class) +public interface StandardScheduleDraft + extends RecurrencePolicyScheduleDraft, io.vrap.rmf.base.client.Draft { + + /** + * discriminator value for StandardScheduleDraft + */ + String STANDARD = "standard"; + + /** + *

      Number of intervals between orders.

      + * @return value + */ + @NotNull + @JsonProperty("value") + public Long getValue(); + + /** + *

      Interval for this schedule.

      + * @return intervalUnit + */ + @NotNull + @JsonProperty("intervalUnit") + public IntervalUnit getIntervalUnit(); + + /** + *

      Number of intervals between orders.

      + * @param value value to be set + */ + + public void setValue(final Long value); + + /** + *

      Interval for this schedule.

      + * @param intervalUnit value to be set + */ + + public void setIntervalUnit(final IntervalUnit intervalUnit); + + /** + * factory method + * @return instance of StandardScheduleDraft + */ + public static StandardScheduleDraft of() { + return new StandardScheduleDraftImpl(); + } + + /** + * factory method to create a shallow copy StandardScheduleDraft + * @param template instance to be copied + * @return copy instance + */ + public static StandardScheduleDraft of(final StandardScheduleDraft template) { + StandardScheduleDraftImpl instance = new StandardScheduleDraftImpl(); + instance.setValue(template.getValue()); + instance.setIntervalUnit(template.getIntervalUnit()); + return instance; + } + + public StandardScheduleDraft copyDeep(); + + /** + * factory method to create a deep copy of StandardScheduleDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static StandardScheduleDraft deepCopy(@Nullable final StandardScheduleDraft template) { + if (template == null) { + return null; + } + StandardScheduleDraftImpl instance = new StandardScheduleDraftImpl(); + instance.setValue(template.getValue()); + instance.setIntervalUnit(template.getIntervalUnit()); + return instance; + } + + /** + * builder factory method for StandardScheduleDraft + * @return builder + */ + public static StandardScheduleDraftBuilder builder() { + return StandardScheduleDraftBuilder.of(); + } + + /** + * create builder for StandardScheduleDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static StandardScheduleDraftBuilder builder(final StandardScheduleDraft template) { + return StandardScheduleDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withStandardScheduleDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleDraftBuilder.java new file mode 100644 index 00000000000..93a2f5a0c93 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleDraftBuilder.java @@ -0,0 +1,108 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * StandardScheduleDraftBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     StandardScheduleDraft standardScheduleDraft = StandardScheduleDraft.builder()
      + *             .value(0.3)
      + *             .intervalUnit(IntervalUnit.DAYS)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class StandardScheduleDraftBuilder implements Builder { + + private Long value; + + private com.commercetools.api.models.recurrence_policy.IntervalUnit intervalUnit; + + /** + *

      Number of intervals between orders.

      + * @param value value to be set + * @return Builder + */ + + public StandardScheduleDraftBuilder value(final Long value) { + this.value = value; + return this; + } + + /** + *

      Interval for this schedule.

      + * @param intervalUnit value to be set + * @return Builder + */ + + public StandardScheduleDraftBuilder intervalUnit( + final com.commercetools.api.models.recurrence_policy.IntervalUnit intervalUnit) { + this.intervalUnit = intervalUnit; + return this; + } + + /** + *

      Number of intervals between orders.

      + * @return value + */ + + public Long getValue() { + return this.value; + } + + /** + *

      Interval for this schedule.

      + * @return intervalUnit + */ + + public com.commercetools.api.models.recurrence_policy.IntervalUnit getIntervalUnit() { + return this.intervalUnit; + } + + /** + * builds StandardScheduleDraft with checking for non-null required values + * @return StandardScheduleDraft + */ + public StandardScheduleDraft build() { + Objects.requireNonNull(value, StandardScheduleDraft.class + ": value is missing"); + Objects.requireNonNull(intervalUnit, StandardScheduleDraft.class + ": intervalUnit is missing"); + return new StandardScheduleDraftImpl(value, intervalUnit); + } + + /** + * builds StandardScheduleDraft without checking for non-null required values + * @return StandardScheduleDraft + */ + public StandardScheduleDraft buildUnchecked() { + return new StandardScheduleDraftImpl(value, intervalUnit); + } + + /** + * factory method for an instance of StandardScheduleDraftBuilder + * @return builder + */ + public static StandardScheduleDraftBuilder of() { + return new StandardScheduleDraftBuilder(); + } + + /** + * create builder for StandardScheduleDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static StandardScheduleDraftBuilder of(final StandardScheduleDraft template) { + StandardScheduleDraftBuilder builder = new StandardScheduleDraftBuilder(); + builder.value = template.getValue(); + builder.intervalUnit = template.getIntervalUnit(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleDraftImpl.java new file mode 100644 index 00000000000..d523b3fbb3f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleDraftImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Determines the schedule for a Recurring Order to occur at a fixed interval—for example, every two weeks or every month.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class StandardScheduleDraftImpl implements StandardScheduleDraft, ModelBase { + + private String type; + + private Long value; + + private com.commercetools.api.models.recurrence_policy.IntervalUnit intervalUnit; + + /** + * create instance with all properties + */ + @JsonCreator + StandardScheduleDraftImpl(@JsonProperty("value") final Long value, + @JsonProperty("intervalUnit") final com.commercetools.api.models.recurrence_policy.IntervalUnit intervalUnit) { + this.value = value; + this.intervalUnit = intervalUnit; + this.type = STANDARD; + } + + /** + * create empty instance + */ + public StandardScheduleDraftImpl() { + this.type = STANDARD; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      Number of intervals between orders.

      + */ + + public Long getValue() { + return this.value; + } + + /** + *

      Interval for this schedule.

      + */ + + public com.commercetools.api.models.recurrence_policy.IntervalUnit getIntervalUnit() { + return this.intervalUnit; + } + + public void setValue(final Long value) { + this.value = value; + } + + public void setIntervalUnit(final com.commercetools.api.models.recurrence_policy.IntervalUnit intervalUnit) { + this.intervalUnit = intervalUnit; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + StandardScheduleDraftImpl that = (StandardScheduleDraftImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(value, that.value) + .append(intervalUnit, that.intervalUnit) + .append(type, that.type) + .append(value, that.value) + .append(intervalUnit, that.intervalUnit) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(value).append(intervalUnit).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("value", value) + .append("intervalUnit", intervalUnit) + .build(); + } + + @Override + public StandardScheduleDraft copyDeep() { + return StandardScheduleDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleImpl.java new file mode 100644 index 00000000000..59cdc363cc4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Schedule of a RecurringOrder that occurs at a fixed interval—for example, every two weeks or every month.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class StandardScheduleImpl implements StandardSchedule, ModelBase { + + private String type; + + private Long value; + + private com.commercetools.api.models.recurrence_policy.IntervalUnit intervalUnit; + + /** + * create instance with all properties + */ + @JsonCreator + StandardScheduleImpl(@JsonProperty("value") final Long value, + @JsonProperty("intervalUnit") final com.commercetools.api.models.recurrence_policy.IntervalUnit intervalUnit) { + this.value = value; + this.intervalUnit = intervalUnit; + this.type = STANDARD; + } + + /** + * create empty instance + */ + public StandardScheduleImpl() { + this.type = STANDARD; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      Number of intervals between orders.

      + */ + + public Long getValue() { + return this.value; + } + + /** + *

      Interval of this schedule.

      + */ + + public com.commercetools.api.models.recurrence_policy.IntervalUnit getIntervalUnit() { + return this.intervalUnit; + } + + public void setValue(final Long value) { + this.value = value; + } + + public void setIntervalUnit(final com.commercetools.api.models.recurrence_policy.IntervalUnit intervalUnit) { + this.intervalUnit = intervalUnit; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + StandardScheduleImpl that = (StandardScheduleImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(value, that.value) + .append(intervalUnit, that.intervalUnit) + .append(type, that.type) + .append(value, that.value) + .append(intervalUnit, that.intervalUnit) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(value).append(intervalUnit).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("value", value) + .append("intervalUnit", intervalUnit) + .build(); + } + + @Override + public StandardSchedule copyDeep() { + return StandardSchedule.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/Counter.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/Counter.java new file mode 100644 index 00000000000..0fb72097495 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/Counter.java @@ -0,0 +1,166 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.time.ZonedDateTime; +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; + +/** + *

      Configuration to track skips for a RecurringOrder.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     Counter counter = Counter.builder()
      + *             .totalToSkip(1)
      + *             .skipped(1)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("counter") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CounterImpl.class) +public interface Counter extends SkipConfiguration { + + /** + * discriminator value for Counter + */ + String COUNTER = "counter"; + + /** + *

      Number of Orders that will be skipped.

      + * @return totalToSkip + */ + @NotNull + @JsonProperty("totalToSkip") + public Integer getTotalToSkip(); + + /** + *

      Number of Orders that were already skipped.

      + * @return skipped + */ + @NotNull + @JsonProperty("skipped") + public Integer getSkipped(); + + /** + *

      Date and time (UTC) when the last Order creation was skipped.

      + * @return lastSkippedAt + */ + + @JsonProperty("lastSkippedAt") + public ZonedDateTime getLastSkippedAt(); + + /** + *

      Number of Orders that will be skipped.

      + * @param totalToSkip value to be set + */ + + public void setTotalToSkip(final Integer totalToSkip); + + /** + *

      Number of Orders that were already skipped.

      + * @param skipped value to be set + */ + + public void setSkipped(final Integer skipped); + + /** + *

      Date and time (UTC) when the last Order creation was skipped.

      + * @param lastSkippedAt value to be set + */ + + public void setLastSkippedAt(final ZonedDateTime lastSkippedAt); + + /** + * factory method + * @return instance of Counter + */ + public static Counter of() { + return new CounterImpl(); + } + + /** + * factory method to create a shallow copy Counter + * @param template instance to be copied + * @return copy instance + */ + public static Counter of(final Counter template) { + CounterImpl instance = new CounterImpl(); + instance.setTotalToSkip(template.getTotalToSkip()); + instance.setSkipped(template.getSkipped()); + instance.setLastSkippedAt(template.getLastSkippedAt()); + return instance; + } + + public Counter copyDeep(); + + /** + * factory method to create a deep copy of Counter + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static Counter deepCopy(@Nullable final Counter template) { + if (template == null) { + return null; + } + CounterImpl instance = new CounterImpl(); + instance.setTotalToSkip(template.getTotalToSkip()); + instance.setSkipped(template.getSkipped()); + instance.setLastSkippedAt(template.getLastSkippedAt()); + return instance; + } + + /** + * builder factory method for Counter + * @return builder + */ + public static CounterBuilder builder() { + return CounterBuilder.of(); + } + + /** + * create builder for Counter instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CounterBuilder builder(final Counter template) { + return CounterBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCounter(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CounterBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CounterBuilder.java new file mode 100644 index 00000000000..503dead2c3e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CounterBuilder.java @@ -0,0 +1,134 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CounterBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     Counter counter = Counter.builder()
      + *             .totalToSkip(1)
      + *             .skipped(1)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CounterBuilder implements Builder { + + private Integer totalToSkip; + + private Integer skipped; + + @Nullable + private java.time.ZonedDateTime lastSkippedAt; + + /** + *

      Number of Orders that will be skipped.

      + * @param totalToSkip value to be set + * @return Builder + */ + + public CounterBuilder totalToSkip(final Integer totalToSkip) { + this.totalToSkip = totalToSkip; + return this; + } + + /** + *

      Number of Orders that were already skipped.

      + * @param skipped value to be set + * @return Builder + */ + + public CounterBuilder skipped(final Integer skipped) { + this.skipped = skipped; + return this; + } + + /** + *

      Date and time (UTC) when the last Order creation was skipped.

      + * @param lastSkippedAt value to be set + * @return Builder + */ + + public CounterBuilder lastSkippedAt(@Nullable final java.time.ZonedDateTime lastSkippedAt) { + this.lastSkippedAt = lastSkippedAt; + return this; + } + + /** + *

      Number of Orders that will be skipped.

      + * @return totalToSkip + */ + + public Integer getTotalToSkip() { + return this.totalToSkip; + } + + /** + *

      Number of Orders that were already skipped.

      + * @return skipped + */ + + public Integer getSkipped() { + return this.skipped; + } + + /** + *

      Date and time (UTC) when the last Order creation was skipped.

      + * @return lastSkippedAt + */ + + @Nullable + public java.time.ZonedDateTime getLastSkippedAt() { + return this.lastSkippedAt; + } + + /** + * builds Counter with checking for non-null required values + * @return Counter + */ + public Counter build() { + Objects.requireNonNull(totalToSkip, Counter.class + ": totalToSkip is missing"); + Objects.requireNonNull(skipped, Counter.class + ": skipped is missing"); + return new CounterImpl(totalToSkip, skipped, lastSkippedAt); + } + + /** + * builds Counter without checking for non-null required values + * @return Counter + */ + public Counter buildUnchecked() { + return new CounterImpl(totalToSkip, skipped, lastSkippedAt); + } + + /** + * factory method for an instance of CounterBuilder + * @return builder + */ + public static CounterBuilder of() { + return new CounterBuilder(); + } + + /** + * create builder for Counter instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CounterBuilder of(final Counter template) { + CounterBuilder builder = new CounterBuilder(); + builder.totalToSkip = template.getTotalToSkip(); + builder.skipped = template.getSkipped(); + builder.lastSkippedAt = template.getLastSkippedAt(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CounterDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CounterDraft.java new file mode 100644 index 00000000000..4aac128713d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CounterDraft.java @@ -0,0 +1,130 @@ + +package com.commercetools.api.models.recurring_order; + +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; + +/** + *

      Configuration that uses a counter to track the number of Orders that will be skipped.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     CounterDraft counterDraft = CounterDraft.builder()
      + *             .totalToSkip(1)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("counter") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CounterDraftImpl.class) +public interface CounterDraft extends SkipConfigurationDraft, io.vrap.rmf.base.client.Draft { + + /** + * discriminator value for CounterDraft + */ + String COUNTER = "counter"; + + /** + *

      Number of Orders that will be skipped.

      + * @return totalToSkip + */ + @NotNull + @JsonProperty("totalToSkip") + public Integer getTotalToSkip(); + + /** + *

      Number of Orders that will be skipped.

      + * @param totalToSkip value to be set + */ + + public void setTotalToSkip(final Integer totalToSkip); + + /** + * factory method + * @return instance of CounterDraft + */ + public static CounterDraft of() { + return new CounterDraftImpl(); + } + + /** + * factory method to create a shallow copy CounterDraft + * @param template instance to be copied + * @return copy instance + */ + public static CounterDraft of(final CounterDraft template) { + CounterDraftImpl instance = new CounterDraftImpl(); + instance.setTotalToSkip(template.getTotalToSkip()); + return instance; + } + + public CounterDraft copyDeep(); + + /** + * factory method to create a deep copy of CounterDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CounterDraft deepCopy(@Nullable final CounterDraft template) { + if (template == null) { + return null; + } + CounterDraftImpl instance = new CounterDraftImpl(); + instance.setTotalToSkip(template.getTotalToSkip()); + return instance; + } + + /** + * builder factory method for CounterDraft + * @return builder + */ + public static CounterDraftBuilder builder() { + return CounterDraftBuilder.of(); + } + + /** + * create builder for CounterDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CounterDraftBuilder builder(final CounterDraft template) { + return CounterDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCounterDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CounterDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CounterDraftBuilder.java new file mode 100644 index 00000000000..00f3d0f8b1c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CounterDraftBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CounterDraftBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     CounterDraft counterDraft = CounterDraft.builder()
      + *             .totalToSkip(1)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CounterDraftBuilder implements Builder { + + private Integer totalToSkip; + + /** + *

      Number of Orders that will be skipped.

      + * @param totalToSkip value to be set + * @return Builder + */ + + public CounterDraftBuilder totalToSkip(final Integer totalToSkip) { + this.totalToSkip = totalToSkip; + return this; + } + + /** + *

      Number of Orders that will be skipped.

      + * @return totalToSkip + */ + + public Integer getTotalToSkip() { + return this.totalToSkip; + } + + /** + * builds CounterDraft with checking for non-null required values + * @return CounterDraft + */ + public CounterDraft build() { + Objects.requireNonNull(totalToSkip, CounterDraft.class + ": totalToSkip is missing"); + return new CounterDraftImpl(totalToSkip); + } + + /** + * builds CounterDraft without checking for non-null required values + * @return CounterDraft + */ + public CounterDraft buildUnchecked() { + return new CounterDraftImpl(totalToSkip); + } + + /** + * factory method for an instance of CounterDraftBuilder + * @return builder + */ + public static CounterDraftBuilder of() { + return new CounterDraftBuilder(); + } + + /** + * create builder for CounterDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CounterDraftBuilder of(final CounterDraft template) { + CounterDraftBuilder builder = new CounterDraftBuilder(); + builder.totalToSkip = template.getTotalToSkip(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CounterDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CounterDraftImpl.java new file mode 100644 index 00000000000..f902409dece --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CounterDraftImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Configuration that uses a counter to track the number of Orders that will be skipped.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CounterDraftImpl implements CounterDraft, ModelBase { + + private String type; + + private Integer totalToSkip; + + /** + * create instance with all properties + */ + @JsonCreator + CounterDraftImpl(@JsonProperty("totalToSkip") final Integer totalToSkip) { + this.totalToSkip = totalToSkip; + this.type = COUNTER; + } + + /** + * create empty instance + */ + public CounterDraftImpl() { + this.type = COUNTER; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      Number of Orders that will be skipped.

      + */ + + public Integer getTotalToSkip() { + return this.totalToSkip; + } + + public void setTotalToSkip(final Integer totalToSkip) { + this.totalToSkip = totalToSkip; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CounterDraftImpl that = (CounterDraftImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(totalToSkip, that.totalToSkip) + .append(type, that.type) + .append(totalToSkip, that.totalToSkip) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(totalToSkip).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("totalToSkip", totalToSkip) + .build(); + } + + @Override + public CounterDraft copyDeep() { + return CounterDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CounterImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CounterImpl.java new file mode 100644 index 00000000000..88498998467 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CounterImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Configuration to track skips for a RecurringOrder.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CounterImpl implements Counter, ModelBase { + + private String type; + + private Integer totalToSkip; + + private Integer skipped; + + private java.time.ZonedDateTime lastSkippedAt; + + /** + * create instance with all properties + */ + @JsonCreator + CounterImpl(@JsonProperty("totalToSkip") final Integer totalToSkip, @JsonProperty("skipped") final Integer skipped, + @JsonProperty("lastSkippedAt") final java.time.ZonedDateTime lastSkippedAt) { + this.totalToSkip = totalToSkip; + this.skipped = skipped; + this.lastSkippedAt = lastSkippedAt; + this.type = COUNTER; + } + + /** + * create empty instance + */ + public CounterImpl() { + this.type = COUNTER; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      Number of Orders that will be skipped.

      + */ + + public Integer getTotalToSkip() { + return this.totalToSkip; + } + + /** + *

      Number of Orders that were already skipped.

      + */ + + public Integer getSkipped() { + return this.skipped; + } + + /** + *

      Date and time (UTC) when the last Order creation was skipped.

      + */ + + public java.time.ZonedDateTime getLastSkippedAt() { + return this.lastSkippedAt; + } + + public void setTotalToSkip(final Integer totalToSkip) { + this.totalToSkip = totalToSkip; + } + + public void setSkipped(final Integer skipped) { + this.skipped = skipped; + } + + public void setLastSkippedAt(final java.time.ZonedDateTime lastSkippedAt) { + this.lastSkippedAt = lastSkippedAt; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CounterImpl that = (CounterImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(totalToSkip, that.totalToSkip) + .append(skipped, that.skipped) + .append(lastSkippedAt, that.lastSkippedAt) + .append(type, that.type) + .append(totalToSkip, that.totalToSkip) + .append(skipped, that.skipped) + .append(lastSkippedAt, that.lastSkippedAt) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(totalToSkip) + .append(skipped) + .append(lastSkippedAt) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("totalToSkip", totalToSkip) + .append("skipped", skipped) + .append("lastSkippedAt", lastSkippedAt) + .build(); + } + + @Override + public Counter copyDeep() { + return Counter.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfo.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfo.java new file mode 100644 index 00000000000..0cfe8ad0b87 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfo.java @@ -0,0 +1,128 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Information about recurring orders and frequencies.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     CustomLineItemRecurrenceInfo customLineItemRecurrenceInfo = CustomLineItemRecurrenceInfo.builder()
      + *             .recurrencePolicy(recurrencePolicyBuilder -> recurrencePolicyBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomLineItemRecurrenceInfoImpl.class) +public interface CustomLineItemRecurrenceInfo { + + /** + *

      Reference to a RecurrencePolicy.

      + * @return recurrencePolicy + */ + @NotNull + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyReference getRecurrencePolicy(); + + /** + *

      Reference to a RecurrencePolicy.

      + * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyReference recurrencePolicy); + + /** + * factory method + * @return instance of CustomLineItemRecurrenceInfo + */ + public static CustomLineItemRecurrenceInfo of() { + return new CustomLineItemRecurrenceInfoImpl(); + } + + /** + * factory method to create a shallow copy CustomLineItemRecurrenceInfo + * @param template instance to be copied + * @return copy instance + */ + public static CustomLineItemRecurrenceInfo of(final CustomLineItemRecurrenceInfo template) { + CustomLineItemRecurrenceInfoImpl instance = new CustomLineItemRecurrenceInfoImpl(); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); + return instance; + } + + public CustomLineItemRecurrenceInfo copyDeep(); + + /** + * factory method to create a deep copy of CustomLineItemRecurrenceInfo + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomLineItemRecurrenceInfo deepCopy(@Nullable final CustomLineItemRecurrenceInfo template) { + if (template == null) { + return null; + } + CustomLineItemRecurrenceInfoImpl instance = new CustomLineItemRecurrenceInfoImpl(); + instance.setRecurrencePolicy(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference + .deepCopy(template.getRecurrencePolicy())); + return instance; + } + + /** + * builder factory method for CustomLineItemRecurrenceInfo + * @return builder + */ + public static CustomLineItemRecurrenceInfoBuilder builder() { + return CustomLineItemRecurrenceInfoBuilder.of(); + } + + /** + * create builder for CustomLineItemRecurrenceInfo instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomLineItemRecurrenceInfoBuilder builder(final CustomLineItemRecurrenceInfo template) { + return CustomLineItemRecurrenceInfoBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomLineItemRecurrenceInfo(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoBuilder.java new file mode 100644 index 00000000000..b3ca1c50a64 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoBuilder.java @@ -0,0 +1,111 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CustomLineItemRecurrenceInfoBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     CustomLineItemRecurrenceInfo customLineItemRecurrenceInfo = CustomLineItemRecurrenceInfo.builder()
      + *             .recurrencePolicy(recurrencePolicyBuilder -> recurrencePolicyBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomLineItemRecurrenceInfoBuilder implements Builder { + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy; + + /** + *

      Reference to a RecurrencePolicy.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public CustomLineItemRecurrenceInfoBuilder recurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

      Reference to a RecurrencePolicy.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public CustomLineItemRecurrenceInfoBuilder withRecurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder.of()); + return this; + } + + /** + *

      Reference to a RecurrencePolicy.

      + * @param recurrencePolicy value to be set + * @return Builder + */ + + public CustomLineItemRecurrenceInfoBuilder recurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + return this; + } + + /** + *

      Reference to a RecurrencePolicy.

      + * @return recurrencePolicy + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + + /** + * builds CustomLineItemRecurrenceInfo with checking for non-null required values + * @return CustomLineItemRecurrenceInfo + */ + public CustomLineItemRecurrenceInfo build() { + Objects.requireNonNull(recurrencePolicy, CustomLineItemRecurrenceInfo.class + ": recurrencePolicy is missing"); + return new CustomLineItemRecurrenceInfoImpl(recurrencePolicy); + } + + /** + * builds CustomLineItemRecurrenceInfo without checking for non-null required values + * @return CustomLineItemRecurrenceInfo + */ + public CustomLineItemRecurrenceInfo buildUnchecked() { + return new CustomLineItemRecurrenceInfoImpl(recurrencePolicy); + } + + /** + * factory method for an instance of CustomLineItemRecurrenceInfoBuilder + * @return builder + */ + public static CustomLineItemRecurrenceInfoBuilder of() { + return new CustomLineItemRecurrenceInfoBuilder(); + } + + /** + * create builder for CustomLineItemRecurrenceInfo instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomLineItemRecurrenceInfoBuilder of(final CustomLineItemRecurrenceInfo template) { + CustomLineItemRecurrenceInfoBuilder builder = new CustomLineItemRecurrenceInfoBuilder(); + builder.recurrencePolicy = template.getRecurrencePolicy(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoDraft.java new file mode 100644 index 00000000000..418846f1cf3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoDraft.java @@ -0,0 +1,130 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Information about recurring orders and frequencies.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     CustomLineItemRecurrenceInfoDraft customLineItemRecurrenceInfoDraft = CustomLineItemRecurrenceInfoDraft.builder()
      + *             .recurrencePolicy(recurrencePolicyBuilder -> recurrencePolicyBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomLineItemRecurrenceInfoDraftImpl.class) +public interface CustomLineItemRecurrenceInfoDraft + extends io.vrap.rmf.base.client.Draft { + + /** + *

      ResourceIdentifier to a RecurrencePolicy.

      + * @return recurrencePolicy + */ + @NotNull + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyResourceIdentifier getRecurrencePolicy(); + + /** + *

      ResourceIdentifier to a RecurrencePolicy.

      + * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyResourceIdentifier recurrencePolicy); + + /** + * factory method + * @return instance of CustomLineItemRecurrenceInfoDraft + */ + public static CustomLineItemRecurrenceInfoDraft of() { + return new CustomLineItemRecurrenceInfoDraftImpl(); + } + + /** + * factory method to create a shallow copy CustomLineItemRecurrenceInfoDraft + * @param template instance to be copied + * @return copy instance + */ + public static CustomLineItemRecurrenceInfoDraft of(final CustomLineItemRecurrenceInfoDraft template) { + CustomLineItemRecurrenceInfoDraftImpl instance = new CustomLineItemRecurrenceInfoDraftImpl(); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); + return instance; + } + + public CustomLineItemRecurrenceInfoDraft copyDeep(); + + /** + * factory method to create a deep copy of CustomLineItemRecurrenceInfoDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomLineItemRecurrenceInfoDraft deepCopy( + @Nullable final CustomLineItemRecurrenceInfoDraft template) { + if (template == null) { + return null; + } + CustomLineItemRecurrenceInfoDraftImpl instance = new CustomLineItemRecurrenceInfoDraftImpl(); + instance.setRecurrencePolicy(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier + .deepCopy(template.getRecurrencePolicy())); + return instance; + } + + /** + * builder factory method for CustomLineItemRecurrenceInfoDraft + * @return builder + */ + public static CustomLineItemRecurrenceInfoDraftBuilder builder() { + return CustomLineItemRecurrenceInfoDraftBuilder.of(); + } + + /** + * create builder for CustomLineItemRecurrenceInfoDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomLineItemRecurrenceInfoDraftBuilder builder(final CustomLineItemRecurrenceInfoDraft template) { + return CustomLineItemRecurrenceInfoDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomLineItemRecurrenceInfoDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoDraftBuilder.java new file mode 100644 index 00000000000..dc9415de944 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoDraftBuilder.java @@ -0,0 +1,112 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CustomLineItemRecurrenceInfoDraftBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     CustomLineItemRecurrenceInfoDraft customLineItemRecurrenceInfoDraft = CustomLineItemRecurrenceInfoDraft.builder()
      + *             .recurrencePolicy(recurrencePolicyBuilder -> recurrencePolicyBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomLineItemRecurrenceInfoDraftBuilder implements Builder { + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy; + + /** + *

      ResourceIdentifier to a RecurrencePolicy.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public CustomLineItemRecurrenceInfoDraftBuilder recurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

      ResourceIdentifier to a RecurrencePolicy.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public CustomLineItemRecurrenceInfoDraftBuilder withRecurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of()); + return this; + } + + /** + *

      ResourceIdentifier to a RecurrencePolicy.

      + * @param recurrencePolicy value to be set + * @return Builder + */ + + public CustomLineItemRecurrenceInfoDraftBuilder recurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + return this; + } + + /** + *

      ResourceIdentifier to a RecurrencePolicy.

      + * @return recurrencePolicy + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier getRecurrencePolicy() { + return this.recurrencePolicy; + } + + /** + * builds CustomLineItemRecurrenceInfoDraft with checking for non-null required values + * @return CustomLineItemRecurrenceInfoDraft + */ + public CustomLineItemRecurrenceInfoDraft build() { + Objects.requireNonNull(recurrencePolicy, + CustomLineItemRecurrenceInfoDraft.class + ": recurrencePolicy is missing"); + return new CustomLineItemRecurrenceInfoDraftImpl(recurrencePolicy); + } + + /** + * builds CustomLineItemRecurrenceInfoDraft without checking for non-null required values + * @return CustomLineItemRecurrenceInfoDraft + */ + public CustomLineItemRecurrenceInfoDraft buildUnchecked() { + return new CustomLineItemRecurrenceInfoDraftImpl(recurrencePolicy); + } + + /** + * factory method for an instance of CustomLineItemRecurrenceInfoDraftBuilder + * @return builder + */ + public static CustomLineItemRecurrenceInfoDraftBuilder of() { + return new CustomLineItemRecurrenceInfoDraftBuilder(); + } + + /** + * create builder for CustomLineItemRecurrenceInfoDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomLineItemRecurrenceInfoDraftBuilder of(final CustomLineItemRecurrenceInfoDraft template) { + CustomLineItemRecurrenceInfoDraftBuilder builder = new CustomLineItemRecurrenceInfoDraftBuilder(); + builder.recurrencePolicy = template.getRecurrencePolicy(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoDraftImpl.java new file mode 100644 index 00000000000..fb24f0c62f6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoDraftImpl.java @@ -0,0 +1,85 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Information about recurring orders and frequencies.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomLineItemRecurrenceInfoDraftImpl implements CustomLineItemRecurrenceInfoDraft, ModelBase { + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy; + + /** + * create instance with all properties + */ + @JsonCreator + CustomLineItemRecurrenceInfoDraftImpl( + @JsonProperty("recurrencePolicy") final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + + /** + * create empty instance + */ + public CustomLineItemRecurrenceInfoDraftImpl() { + } + + /** + *

      ResourceIdentifier to a RecurrencePolicy.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier getRecurrencePolicy() { + return this.recurrencePolicy; + } + + public void setRecurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomLineItemRecurrenceInfoDraftImpl that = (CustomLineItemRecurrenceInfoDraftImpl) o; + + return new EqualsBuilder().append(recurrencePolicy, that.recurrencePolicy) + .append(recurrencePolicy, that.recurrencePolicy) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(recurrencePolicy).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("recurrencePolicy", recurrencePolicy) + .build(); + } + + @Override + public CustomLineItemRecurrenceInfoDraft copyDeep() { + return CustomLineItemRecurrenceInfoDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoImpl.java new file mode 100644 index 00000000000..ea8e44693b1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoImpl.java @@ -0,0 +1,85 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Information about recurring orders and frequencies.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomLineItemRecurrenceInfoImpl implements CustomLineItemRecurrenceInfo, ModelBase { + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy; + + /** + * create instance with all properties + */ + @JsonCreator + CustomLineItemRecurrenceInfoImpl( + @JsonProperty("recurrencePolicy") final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + + /** + * create empty instance + */ + public CustomLineItemRecurrenceInfoImpl() { + } + + /** + *

      Reference to a RecurrencePolicy.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + + public void setRecurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomLineItemRecurrenceInfoImpl that = (CustomLineItemRecurrenceInfoImpl) o; + + return new EqualsBuilder().append(recurrencePolicy, that.recurrencePolicy) + .append(recurrencePolicy, that.recurrencePolicy) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(recurrencePolicy).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("recurrencePolicy", recurrencePolicy) + .build(); + } + + @Override + public CustomLineItemRecurrenceInfo copyDeep() { + return CustomLineItemRecurrenceInfo.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfo.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfo.java new file mode 100644 index 00000000000..48cd819df76 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfo.java @@ -0,0 +1,146 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Information about recurring orders and frequencies.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     LineItemRecurrenceInfo lineItemRecurrenceInfo = LineItemRecurrenceInfo.builder()
      + *             .recurrencePolicy(recurrencePolicyBuilder -> recurrencePolicyBuilder)
      + *             .priceSelectionMode(PriceSelectionMode.FIXED)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = LineItemRecurrenceInfoImpl.class) +public interface LineItemRecurrenceInfo { + + /** + *

      Reference to a RecurrencePolicy.

      + * @return recurrencePolicy + */ + @NotNull + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyReference getRecurrencePolicy(); + + /** + *

      Indicates how the price of a line item will be selected during order creation.

      + * @return priceSelectionMode + */ + @NotNull + @JsonProperty("priceSelectionMode") + public PriceSelectionMode getPriceSelectionMode(); + + /** + *

      Reference to a RecurrencePolicy.

      + * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyReference recurrencePolicy); + + /** + *

      Indicates how the price of a line item will be selected during order creation.

      + * @param priceSelectionMode value to be set + */ + + public void setPriceSelectionMode(final PriceSelectionMode priceSelectionMode); + + /** + * factory method + * @return instance of LineItemRecurrenceInfo + */ + public static LineItemRecurrenceInfo of() { + return new LineItemRecurrenceInfoImpl(); + } + + /** + * factory method to create a shallow copy LineItemRecurrenceInfo + * @param template instance to be copied + * @return copy instance + */ + public static LineItemRecurrenceInfo of(final LineItemRecurrenceInfo template) { + LineItemRecurrenceInfoImpl instance = new LineItemRecurrenceInfoImpl(); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); + instance.setPriceSelectionMode(template.getPriceSelectionMode()); + return instance; + } + + public LineItemRecurrenceInfo copyDeep(); + + /** + * factory method to create a deep copy of LineItemRecurrenceInfo + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static LineItemRecurrenceInfo deepCopy(@Nullable final LineItemRecurrenceInfo template) { + if (template == null) { + return null; + } + LineItemRecurrenceInfoImpl instance = new LineItemRecurrenceInfoImpl(); + instance.setRecurrencePolicy(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference + .deepCopy(template.getRecurrencePolicy())); + instance.setPriceSelectionMode(template.getPriceSelectionMode()); + return instance; + } + + /** + * builder factory method for LineItemRecurrenceInfo + * @return builder + */ + public static LineItemRecurrenceInfoBuilder builder() { + return LineItemRecurrenceInfoBuilder.of(); + } + + /** + * create builder for LineItemRecurrenceInfo instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static LineItemRecurrenceInfoBuilder builder(final LineItemRecurrenceInfo template) { + return LineItemRecurrenceInfoBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withLineItemRecurrenceInfo(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoBuilder.java new file mode 100644 index 00000000000..502277afc12 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoBuilder.java @@ -0,0 +1,137 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * LineItemRecurrenceInfoBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     LineItemRecurrenceInfo lineItemRecurrenceInfo = LineItemRecurrenceInfo.builder()
      + *             .recurrencePolicy(recurrencePolicyBuilder -> recurrencePolicyBuilder)
      + *             .priceSelectionMode(PriceSelectionMode.FIXED)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class LineItemRecurrenceInfoBuilder implements Builder { + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy; + + private com.commercetools.api.models.recurring_order.PriceSelectionMode priceSelectionMode; + + /** + *

      Reference to a RecurrencePolicy.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public LineItemRecurrenceInfoBuilder recurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

      Reference to a RecurrencePolicy.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public LineItemRecurrenceInfoBuilder withRecurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder.of()); + return this; + } + + /** + *

      Reference to a RecurrencePolicy.

      + * @param recurrencePolicy value to be set + * @return Builder + */ + + public LineItemRecurrenceInfoBuilder recurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + return this; + } + + /** + *

      Indicates how the price of a line item will be selected during order creation.

      + * @param priceSelectionMode value to be set + * @return Builder + */ + + public LineItemRecurrenceInfoBuilder priceSelectionMode( + final com.commercetools.api.models.recurring_order.PriceSelectionMode priceSelectionMode) { + this.priceSelectionMode = priceSelectionMode; + return this; + } + + /** + *

      Reference to a RecurrencePolicy.

      + * @return recurrencePolicy + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + + /** + *

      Indicates how the price of a line item will be selected during order creation.

      + * @return priceSelectionMode + */ + + public com.commercetools.api.models.recurring_order.PriceSelectionMode getPriceSelectionMode() { + return this.priceSelectionMode; + } + + /** + * builds LineItemRecurrenceInfo with checking for non-null required values + * @return LineItemRecurrenceInfo + */ + public LineItemRecurrenceInfo build() { + Objects.requireNonNull(recurrencePolicy, LineItemRecurrenceInfo.class + ": recurrencePolicy is missing"); + Objects.requireNonNull(priceSelectionMode, LineItemRecurrenceInfo.class + ": priceSelectionMode is missing"); + return new LineItemRecurrenceInfoImpl(recurrencePolicy, priceSelectionMode); + } + + /** + * builds LineItemRecurrenceInfo without checking for non-null required values + * @return LineItemRecurrenceInfo + */ + public LineItemRecurrenceInfo buildUnchecked() { + return new LineItemRecurrenceInfoImpl(recurrencePolicy, priceSelectionMode); + } + + /** + * factory method for an instance of LineItemRecurrenceInfoBuilder + * @return builder + */ + public static LineItemRecurrenceInfoBuilder of() { + return new LineItemRecurrenceInfoBuilder(); + } + + /** + * create builder for LineItemRecurrenceInfo instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static LineItemRecurrenceInfoBuilder of(final LineItemRecurrenceInfo template) { + LineItemRecurrenceInfoBuilder builder = new LineItemRecurrenceInfoBuilder(); + builder.recurrencePolicy = template.getRecurrencePolicy(); + builder.priceSelectionMode = template.getPriceSelectionMode(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoDraft.java new file mode 100644 index 00000000000..4b15849fbaf --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoDraft.java @@ -0,0 +1,146 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Information about recurring orders and frequencies.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     LineItemRecurrenceInfoDraft lineItemRecurrenceInfoDraft = LineItemRecurrenceInfoDraft.builder()
      + *             .recurrencePolicy(recurrencePolicyBuilder -> recurrencePolicyBuilder)
      + *             .priceSelectionMode(PriceSelectionMode.FIXED)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = LineItemRecurrenceInfoDraftImpl.class) +public interface LineItemRecurrenceInfoDraft extends io.vrap.rmf.base.client.Draft { + + /** + *

      ResourceIdentifier to a RecurrencePolicy.

      + * @return recurrencePolicy + */ + @NotNull + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyResourceIdentifier getRecurrencePolicy(); + + /** + *

      Determines how the price of a line item will be selected during order creation.

      + * @return priceSelectionMode + */ + @NotNull + @JsonProperty("priceSelectionMode") + public PriceSelectionMode getPriceSelectionMode(); + + /** + *

      ResourceIdentifier to a RecurrencePolicy.

      + * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyResourceIdentifier recurrencePolicy); + + /** + *

      Determines how the price of a line item will be selected during order creation.

      + * @param priceSelectionMode value to be set + */ + + public void setPriceSelectionMode(final PriceSelectionMode priceSelectionMode); + + /** + * factory method + * @return instance of LineItemRecurrenceInfoDraft + */ + public static LineItemRecurrenceInfoDraft of() { + return new LineItemRecurrenceInfoDraftImpl(); + } + + /** + * factory method to create a shallow copy LineItemRecurrenceInfoDraft + * @param template instance to be copied + * @return copy instance + */ + public static LineItemRecurrenceInfoDraft of(final LineItemRecurrenceInfoDraft template) { + LineItemRecurrenceInfoDraftImpl instance = new LineItemRecurrenceInfoDraftImpl(); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); + instance.setPriceSelectionMode(template.getPriceSelectionMode()); + return instance; + } + + public LineItemRecurrenceInfoDraft copyDeep(); + + /** + * factory method to create a deep copy of LineItemRecurrenceInfoDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static LineItemRecurrenceInfoDraft deepCopy(@Nullable final LineItemRecurrenceInfoDraft template) { + if (template == null) { + return null; + } + LineItemRecurrenceInfoDraftImpl instance = new LineItemRecurrenceInfoDraftImpl(); + instance.setRecurrencePolicy(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier + .deepCopy(template.getRecurrencePolicy())); + instance.setPriceSelectionMode(template.getPriceSelectionMode()); + return instance; + } + + /** + * builder factory method for LineItemRecurrenceInfoDraft + * @return builder + */ + public static LineItemRecurrenceInfoDraftBuilder builder() { + return LineItemRecurrenceInfoDraftBuilder.of(); + } + + /** + * create builder for LineItemRecurrenceInfoDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static LineItemRecurrenceInfoDraftBuilder builder(final LineItemRecurrenceInfoDraft template) { + return LineItemRecurrenceInfoDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withLineItemRecurrenceInfoDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoDraftBuilder.java new file mode 100644 index 00000000000..fc7f085cf2f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoDraftBuilder.java @@ -0,0 +1,138 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * LineItemRecurrenceInfoDraftBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     LineItemRecurrenceInfoDraft lineItemRecurrenceInfoDraft = LineItemRecurrenceInfoDraft.builder()
      + *             .recurrencePolicy(recurrencePolicyBuilder -> recurrencePolicyBuilder)
      + *             .priceSelectionMode(PriceSelectionMode.FIXED)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class LineItemRecurrenceInfoDraftBuilder implements Builder { + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy; + + private com.commercetools.api.models.recurring_order.PriceSelectionMode priceSelectionMode; + + /** + *

      ResourceIdentifier to a RecurrencePolicy.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public LineItemRecurrenceInfoDraftBuilder recurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

      ResourceIdentifier to a RecurrencePolicy.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public LineItemRecurrenceInfoDraftBuilder withRecurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of()); + return this; + } + + /** + *

      ResourceIdentifier to a RecurrencePolicy.

      + * @param recurrencePolicy value to be set + * @return Builder + */ + + public LineItemRecurrenceInfoDraftBuilder recurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + return this; + } + + /** + *

      Determines how the price of a line item will be selected during order creation.

      + * @param priceSelectionMode value to be set + * @return Builder + */ + + public LineItemRecurrenceInfoDraftBuilder priceSelectionMode( + final com.commercetools.api.models.recurring_order.PriceSelectionMode priceSelectionMode) { + this.priceSelectionMode = priceSelectionMode; + return this; + } + + /** + *

      ResourceIdentifier to a RecurrencePolicy.

      + * @return recurrencePolicy + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier getRecurrencePolicy() { + return this.recurrencePolicy; + } + + /** + *

      Determines how the price of a line item will be selected during order creation.

      + * @return priceSelectionMode + */ + + public com.commercetools.api.models.recurring_order.PriceSelectionMode getPriceSelectionMode() { + return this.priceSelectionMode; + } + + /** + * builds LineItemRecurrenceInfoDraft with checking for non-null required values + * @return LineItemRecurrenceInfoDraft + */ + public LineItemRecurrenceInfoDraft build() { + Objects.requireNonNull(recurrencePolicy, LineItemRecurrenceInfoDraft.class + ": recurrencePolicy is missing"); + Objects.requireNonNull(priceSelectionMode, + LineItemRecurrenceInfoDraft.class + ": priceSelectionMode is missing"); + return new LineItemRecurrenceInfoDraftImpl(recurrencePolicy, priceSelectionMode); + } + + /** + * builds LineItemRecurrenceInfoDraft without checking for non-null required values + * @return LineItemRecurrenceInfoDraft + */ + public LineItemRecurrenceInfoDraft buildUnchecked() { + return new LineItemRecurrenceInfoDraftImpl(recurrencePolicy, priceSelectionMode); + } + + /** + * factory method for an instance of LineItemRecurrenceInfoDraftBuilder + * @return builder + */ + public static LineItemRecurrenceInfoDraftBuilder of() { + return new LineItemRecurrenceInfoDraftBuilder(); + } + + /** + * create builder for LineItemRecurrenceInfoDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static LineItemRecurrenceInfoDraftBuilder of(final LineItemRecurrenceInfoDraft template) { + LineItemRecurrenceInfoDraftBuilder builder = new LineItemRecurrenceInfoDraftBuilder(); + builder.recurrencePolicy = template.getRecurrencePolicy(); + builder.priceSelectionMode = template.getPriceSelectionMode(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoDraftImpl.java new file mode 100644 index 00000000000..0f3ef593086 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoDraftImpl.java @@ -0,0 +1,105 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Information about recurring orders and frequencies.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class LineItemRecurrenceInfoDraftImpl implements LineItemRecurrenceInfoDraft, ModelBase { + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy; + + private com.commercetools.api.models.recurring_order.PriceSelectionMode priceSelectionMode; + + /** + * create instance with all properties + */ + @JsonCreator + LineItemRecurrenceInfoDraftImpl( + @JsonProperty("recurrencePolicy") final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy, + @JsonProperty("priceSelectionMode") final com.commercetools.api.models.recurring_order.PriceSelectionMode priceSelectionMode) { + this.recurrencePolicy = recurrencePolicy; + this.priceSelectionMode = priceSelectionMode; + } + + /** + * create empty instance + */ + public LineItemRecurrenceInfoDraftImpl() { + } + + /** + *

      ResourceIdentifier to a RecurrencePolicy.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier getRecurrencePolicy() { + return this.recurrencePolicy; + } + + /** + *

      Determines how the price of a line item will be selected during order creation.

      + */ + + public com.commercetools.api.models.recurring_order.PriceSelectionMode getPriceSelectionMode() { + return this.priceSelectionMode; + } + + public void setRecurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + + public void setPriceSelectionMode( + final com.commercetools.api.models.recurring_order.PriceSelectionMode priceSelectionMode) { + this.priceSelectionMode = priceSelectionMode; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + LineItemRecurrenceInfoDraftImpl that = (LineItemRecurrenceInfoDraftImpl) o; + + return new EqualsBuilder().append(recurrencePolicy, that.recurrencePolicy) + .append(priceSelectionMode, that.priceSelectionMode) + .append(recurrencePolicy, that.recurrencePolicy) + .append(priceSelectionMode, that.priceSelectionMode) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(recurrencePolicy).append(priceSelectionMode).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("recurrencePolicy", recurrencePolicy) + .append("priceSelectionMode", priceSelectionMode) + .build(); + } + + @Override + public LineItemRecurrenceInfoDraft copyDeep() { + return LineItemRecurrenceInfoDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoImpl.java new file mode 100644 index 00000000000..b544d658204 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoImpl.java @@ -0,0 +1,105 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Information about recurring orders and frequencies.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class LineItemRecurrenceInfoImpl implements LineItemRecurrenceInfo, ModelBase { + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy; + + private com.commercetools.api.models.recurring_order.PriceSelectionMode priceSelectionMode; + + /** + * create instance with all properties + */ + @JsonCreator + LineItemRecurrenceInfoImpl( + @JsonProperty("recurrencePolicy") final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy, + @JsonProperty("priceSelectionMode") final com.commercetools.api.models.recurring_order.PriceSelectionMode priceSelectionMode) { + this.recurrencePolicy = recurrencePolicy; + this.priceSelectionMode = priceSelectionMode; + } + + /** + * create empty instance + */ + public LineItemRecurrenceInfoImpl() { + } + + /** + *

      Reference to a RecurrencePolicy.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + + /** + *

      Indicates how the price of a line item will be selected during order creation.

      + */ + + public com.commercetools.api.models.recurring_order.PriceSelectionMode getPriceSelectionMode() { + return this.priceSelectionMode; + } + + public void setRecurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + + public void setPriceSelectionMode( + final com.commercetools.api.models.recurring_order.PriceSelectionMode priceSelectionMode) { + this.priceSelectionMode = priceSelectionMode; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + LineItemRecurrenceInfoImpl that = (LineItemRecurrenceInfoImpl) o; + + return new EqualsBuilder().append(recurrencePolicy, that.recurrencePolicy) + .append(priceSelectionMode, that.priceSelectionMode) + .append(recurrencePolicy, that.recurrencePolicy) + .append(priceSelectionMode, that.priceSelectionMode) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(recurrencePolicy).append(priceSelectionMode).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("recurrencePolicy", recurrencePolicy) + .append("priceSelectionMode", priceSelectionMode) + .build(); + } + + @Override + public LineItemRecurrenceInfo copyDeep() { + return LineItemRecurrenceInfo.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/PriceSelectionMode.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/PriceSelectionMode.java new file mode 100644 index 00000000000..46203ca97f9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/PriceSelectionMode.java @@ -0,0 +1,115 @@ + +package com.commercetools.api.models.recurring_order; + +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; + +/** + *

      Indicates how the price of a Line Item or Custom Line Item is selected during Order creation.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface PriceSelectionMode extends JsonEnum { + + /** +

      The price set when the Recurring Order was created is used for each subsequent order.

      */ + PriceSelectionMode FIXED = PriceSelectionModeEnum.FIXED; + /** +

      The price is updated each time a new Order is created.

      */ + PriceSelectionMode DYNAMIC = PriceSelectionModeEnum.DYNAMIC; + + /** + * possible values of PriceSelectionMode + */ + enum PriceSelectionModeEnum implements PriceSelectionMode { + /** + * Fixed + */ + FIXED("Fixed"), + + /** + * Dynamic + */ + DYNAMIC("Dynamic"); + private final String jsonName; + + private PriceSelectionModeEnum(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 PriceSelectionMode + * 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 PriceSelectionMode findEnum(String value) { + return findEnumViaJsonName(value).orElse(new PriceSelectionMode() { + @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 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 PriceSelectionMode[] values() { + return PriceSelectionModeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrder.java new file mode 100644 index 00000000000..7e8699472f1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrder.java @@ -0,0 +1,526 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.time.ZonedDateTime; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.business_unit.BusinessUnitKeyReference; +import com.commercetools.api.models.cart.CartReference; +import com.commercetools.api.models.common.BaseResource; +import com.commercetools.api.models.common.CreatedBy; +import com.commercetools.api.models.common.LastModifiedBy; +import com.commercetools.api.models.customer.CustomerReference; +import com.commercetools.api.models.order.OrderReference; +import com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule; +import com.commercetools.api.models.state.StateReference; +import com.commercetools.api.models.store.StoreKeyReference; +import com.commercetools.api.models.type.CustomFields; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * RecurringOrder + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrder recurringOrder = RecurringOrder.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .cart(cartBuilder -> cartBuilder)
      + *             .originOrder(originOrderBuilder -> originOrderBuilder)
      + *             .startsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .recurringOrderState(RecurringOrderState.ACTIVE)
      + *             .schedule(scheduleBuilder -> scheduleBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderImpl.class) +public interface RecurringOrder extends BaseResource { + + /** + *

      Unique identifier of the RecurringOrder.

      + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

      User-defined unique identifier of the RecurringOrder.

      + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

      Current version of the RecurringOrder.

      + * @return version + */ + @NotNull + @JsonProperty("version") + public Long getVersion(); + + /** + *

      Reference to the Cart for a RecurringOrder. The referenced Cart will have the RecurringOrder CartOrigin.

      + * @return cart + */ + @NotNull + @Valid + @JsonProperty("cart") + public CartReference getCart(); + + /** + *

      Reference to the original Order that generated this RecurringOrder.

      + * @return originOrder + */ + @NotNull + @Valid + @JsonProperty("originOrder") + public OrderReference getOriginOrder(); + + /** + *

      Date and time (UTC) when the RecurringOrder starts creating new Orders.

      + * @return startsAt + */ + @NotNull + @JsonProperty("startsAt") + public ZonedDateTime getStartsAt(); + + /** + *

      Date and time (UTC) when the RecurringOrder resumes creating Orders after being unpaused.

      + * @return resumesAt + */ + + @JsonProperty("resumesAt") + public ZonedDateTime getResumesAt(); + + /** + *

      Date and time (UTC) when the RecurringOrder expires.

      + * @return expiresAt + */ + + @JsonProperty("expiresAt") + public ZonedDateTime getExpiresAt(); + + /** + *

      Date and time (UTC) when the last Order was created from this RecurringOrder.

      + * @return lastOrderAt + */ + + @JsonProperty("lastOrderAt") + public ZonedDateTime getLastOrderAt(); + + /** + *

      Date and time (UTC) when the next Order will be created from this RecurringOrder.

      + * @return nextOrderAt + */ + + @JsonProperty("nextOrderAt") + public ZonedDateTime getNextOrderAt(); + + /** + *

      Information about current and future skips for this RecurringOrder.

      + * @return skipConfiguration + */ + @Valid + @JsonProperty("skipConfiguration") + public SkipConfiguration getSkipConfiguration(); + + /** + *

      Reference to a Store.

      + * @return store + */ + @Valid + @JsonProperty("store") + public StoreKeyReference getStore(); + + /** + *

      Reference to the Business Unit that the RecurringOrder belongs to.

      + * @return businessUnit + */ + @Valid + @JsonProperty("businessUnit") + public BusinessUnitKeyReference getBusinessUnit(); + + /** + *

      State of the RecurringOrder in a custom workflow.

      + * @return state + */ + @Valid + @JsonProperty("state") + public StateReference getState(); + + /** + *

      Current state of the RecurringOrder.

      + * @return recurringOrderState + */ + @NotNull + @JsonProperty("recurringOrderState") + public RecurringOrderState getRecurringOrderState(); + + /** + *

      Schedule of the RecurringOrder.

      + * @return schedule + */ + @NotNull + @Valid + @JsonProperty("schedule") + public RecurrencePolicySchedule getSchedule(); + + /** + *

      The Customer that the RecurringOrder belongs to.

      + * @return customer + */ + @Valid + @JsonProperty("customer") + public CustomerReference getCustomer(); + + /** + *

      Email address of the Customer that the RecurringOrder belongs to.

      + * @return customerEmail + */ + + @JsonProperty("customerEmail") + public String getCustomerEmail(); + + /** + *

      Custom Fields of the RecurringOrder.

      + * @return custom + */ + @Valid + @JsonProperty("custom") + public CustomFields getCustom(); + + /** + *

      Date and time (UTC) when the RecurringOrder was created.

      + * @return createdAt + */ + @NotNull + @JsonProperty("createdAt") + public ZonedDateTime getCreatedAt(); + + /** + *

      Date and time (UTC) when the RecurringOrder was last updated.

      + * @return lastModifiedAt + */ + @NotNull + @JsonProperty("lastModifiedAt") + public ZonedDateTime getLastModifiedAt(); + + /** + *

      IDs and references that last modified the RecurringOrder.

      + * @return lastModifiedBy + */ + @Valid + @JsonProperty("lastModifiedBy") + public LastModifiedBy getLastModifiedBy(); + + /** + *

      IDs and references that created the RecurringOrder.

      + * @return createdBy + */ + @Valid + @JsonProperty("createdBy") + public CreatedBy getCreatedBy(); + + /** + *

      Unique identifier of the RecurringOrder.

      + * @param id value to be set + */ + + public void setId(final String id); + + /** + *

      User-defined unique identifier of the RecurringOrder.

      + * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

      Current version of the RecurringOrder.

      + * @param version value to be set + */ + + public void setVersion(final Long version); + + /** + *

      Reference to the Cart for a RecurringOrder. The referenced Cart will have the RecurringOrder CartOrigin.

      + * @param cart value to be set + */ + + public void setCart(final CartReference cart); + + /** + *

      Reference to the original Order that generated this RecurringOrder.

      + * @param originOrder value to be set + */ + + public void setOriginOrder(final OrderReference originOrder); + + /** + *

      Date and time (UTC) when the RecurringOrder starts creating new Orders.

      + * @param startsAt value to be set + */ + + public void setStartsAt(final ZonedDateTime startsAt); + + /** + *

      Date and time (UTC) when the RecurringOrder resumes creating Orders after being unpaused.

      + * @param resumesAt value to be set + */ + + public void setResumesAt(final ZonedDateTime resumesAt); + + /** + *

      Date and time (UTC) when the RecurringOrder expires.

      + * @param expiresAt value to be set + */ + + public void setExpiresAt(final ZonedDateTime expiresAt); + + /** + *

      Date and time (UTC) when the last Order was created from this RecurringOrder.

      + * @param lastOrderAt value to be set + */ + + public void setLastOrderAt(final ZonedDateTime lastOrderAt); + + /** + *

      Date and time (UTC) when the next Order will be created from this RecurringOrder.

      + * @param nextOrderAt value to be set + */ + + public void setNextOrderAt(final ZonedDateTime nextOrderAt); + + /** + *

      Information about current and future skips for this RecurringOrder.

      + * @param skipConfiguration value to be set + */ + + public void setSkipConfiguration(final SkipConfiguration skipConfiguration); + + /** + *

      Reference to a Store.

      + * @param store value to be set + */ + + public void setStore(final StoreKeyReference store); + + /** + *

      Reference to the Business Unit that the RecurringOrder belongs to.

      + * @param businessUnit value to be set + */ + + public void setBusinessUnit(final BusinessUnitKeyReference businessUnit); + + /** + *

      State of the RecurringOrder in a custom workflow.

      + * @param state value to be set + */ + + public void setState(final StateReference state); + + /** + *

      Current state of the RecurringOrder.

      + * @param recurringOrderState value to be set + */ + + public void setRecurringOrderState(final RecurringOrderState recurringOrderState); + + /** + *

      Schedule of the RecurringOrder.

      + * @param schedule value to be set + */ + + public void setSchedule(final RecurrencePolicySchedule schedule); + + /** + *

      The Customer that the RecurringOrder belongs to.

      + * @param customer value to be set + */ + + public void setCustomer(final CustomerReference customer); + + /** + *

      Email address of the Customer that the RecurringOrder belongs to.

      + * @param customerEmail value to be set + */ + + public void setCustomerEmail(final String customerEmail); + + /** + *

      Custom Fields of the RecurringOrder.

      + * @param custom value to be set + */ + + public void setCustom(final CustomFields custom); + + /** + *

      Date and time (UTC) when the RecurringOrder was created.

      + * @param createdAt value to be set + */ + + public void setCreatedAt(final ZonedDateTime createdAt); + + /** + *

      Date and time (UTC) when the RecurringOrder was last updated.

      + * @param lastModifiedAt value to be set + */ + + public void setLastModifiedAt(final ZonedDateTime lastModifiedAt); + + /** + *

      IDs and references that last modified the RecurringOrder.

      + * @param lastModifiedBy value to be set + */ + + public void setLastModifiedBy(final LastModifiedBy lastModifiedBy); + + /** + *

      IDs and references that created the RecurringOrder.

      + * @param createdBy value to be set + */ + + public void setCreatedBy(final CreatedBy createdBy); + + /** + * factory method + * @return instance of RecurringOrder + */ + public static RecurringOrder of() { + return new RecurringOrderImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrder + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrder of(final RecurringOrder template) { + RecurringOrderImpl instance = new RecurringOrderImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setKey(template.getKey()); + instance.setCart(template.getCart()); + instance.setOriginOrder(template.getOriginOrder()); + instance.setStartsAt(template.getStartsAt()); + instance.setResumesAt(template.getResumesAt()); + instance.setExpiresAt(template.getExpiresAt()); + instance.setLastOrderAt(template.getLastOrderAt()); + instance.setNextOrderAt(template.getNextOrderAt()); + instance.setSkipConfiguration(template.getSkipConfiguration()); + instance.setStore(template.getStore()); + instance.setBusinessUnit(template.getBusinessUnit()); + instance.setState(template.getState()); + instance.setRecurringOrderState(template.getRecurringOrderState()); + instance.setSchedule(template.getSchedule()); + instance.setCustomer(template.getCustomer()); + instance.setCustomerEmail(template.getCustomerEmail()); + instance.setCustom(template.getCustom()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + return instance; + } + + public RecurringOrder copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrder + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrder deepCopy(@Nullable final RecurringOrder template) { + if (template == null) { + return null; + } + RecurringOrderImpl instance = new RecurringOrderImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setKey(template.getKey()); + instance.setCart(com.commercetools.api.models.cart.CartReference.deepCopy(template.getCart())); + instance.setOriginOrder(com.commercetools.api.models.order.OrderReference.deepCopy(template.getOriginOrder())); + instance.setStartsAt(template.getStartsAt()); + instance.setResumesAt(template.getResumesAt()); + instance.setExpiresAt(template.getExpiresAt()); + instance.setLastOrderAt(template.getLastOrderAt()); + instance.setNextOrderAt(template.getNextOrderAt()); + instance.setSkipConfiguration( + com.commercetools.api.models.recurring_order.SkipConfiguration.deepCopy(template.getSkipConfiguration())); + instance.setStore(com.commercetools.api.models.store.StoreKeyReference.deepCopy(template.getStore())); + instance.setBusinessUnit( + com.commercetools.api.models.business_unit.BusinessUnitKeyReference.deepCopy(template.getBusinessUnit())); + instance.setState(com.commercetools.api.models.state.StateReference.deepCopy(template.getState())); + instance.setRecurringOrderState(template.getRecurringOrderState()); + instance.setSchedule( + com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule.deepCopy(template.getSchedule())); + instance.setCustomer(com.commercetools.api.models.customer.CustomerReference.deepCopy(template.getCustomer())); + instance.setCustomerEmail(template.getCustomerEmail()); + instance.setCustom(com.commercetools.api.models.type.CustomFields.deepCopy(template.getCustom())); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + return instance; + } + + /** + * builder factory method for RecurringOrder + * @return builder + */ + public static RecurringOrderBuilder builder() { + return RecurringOrderBuilder.of(); + } + + /** + * create builder for RecurringOrder instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderBuilder builder(final RecurringOrder template) { + return RecurringOrderBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrder(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderActive.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderActive.java new file mode 100644 index 00000000000..afc021f94fe --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderActive.java @@ -0,0 +1,128 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.time.ZonedDateTime; +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; + +/** + *

      Changes the Recurring Order state to active.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderActive recurringOrderActive = RecurringOrderActive.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("active") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderActiveImpl.class) +public interface RecurringOrderActive extends RecurringOrderStateDraft { + + /** + * discriminator value for RecurringOrderActive + */ + String ACTIVE = "active"; + + /** + *

      If set, the Recurring Order will automatically resume at the date and time (UTC) specified.

      + * @return resumesAt + */ + + @JsonProperty("resumesAt") + public ZonedDateTime getResumesAt(); + + /** + *

      If set, the Recurring Order will automatically resume at the date and time (UTC) specified.

      + * @param resumesAt value to be set + */ + + public void setResumesAt(final ZonedDateTime resumesAt); + + /** + * factory method + * @return instance of RecurringOrderActive + */ + public static RecurringOrderActive of() { + return new RecurringOrderActiveImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderActive + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderActive of(final RecurringOrderActive template) { + RecurringOrderActiveImpl instance = new RecurringOrderActiveImpl(); + instance.setResumesAt(template.getResumesAt()); + return instance; + } + + public RecurringOrderActive copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderActive + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderActive deepCopy(@Nullable final RecurringOrderActive template) { + if (template == null) { + return null; + } + RecurringOrderActiveImpl instance = new RecurringOrderActiveImpl(); + instance.setResumesAt(template.getResumesAt()); + return instance; + } + + /** + * builder factory method for RecurringOrderActive + * @return builder + */ + public static RecurringOrderActiveBuilder builder() { + return RecurringOrderActiveBuilder.of(); + } + + /** + * create builder for RecurringOrderActive instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderActiveBuilder builder(final RecurringOrderActive template) { + return RecurringOrderActiveBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderActive(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderActiveBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderActiveBuilder.java new file mode 100644 index 00000000000..a68ad2d8111 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderActiveBuilder.java @@ -0,0 +1,84 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderActiveBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderActive recurringOrderActive = RecurringOrderActive.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderActiveBuilder implements Builder { + + @Nullable + private java.time.ZonedDateTime resumesAt; + + /** + *

      If set, the Recurring Order will automatically resume at the date and time (UTC) specified.

      + * @param resumesAt value to be set + * @return Builder + */ + + public RecurringOrderActiveBuilder resumesAt(@Nullable final java.time.ZonedDateTime resumesAt) { + this.resumesAt = resumesAt; + return this; + } + + /** + *

      If set, the Recurring Order will automatically resume at the date and time (UTC) specified.

      + * @return resumesAt + */ + + @Nullable + public java.time.ZonedDateTime getResumesAt() { + return this.resumesAt; + } + + /** + * builds RecurringOrderActive with checking for non-null required values + * @return RecurringOrderActive + */ + public RecurringOrderActive build() { + return new RecurringOrderActiveImpl(resumesAt); + } + + /** + * builds RecurringOrderActive without checking for non-null required values + * @return RecurringOrderActive + */ + public RecurringOrderActive buildUnchecked() { + return new RecurringOrderActiveImpl(resumesAt); + } + + /** + * factory method for an instance of RecurringOrderActiveBuilder + * @return builder + */ + public static RecurringOrderActiveBuilder of() { + return new RecurringOrderActiveBuilder(); + } + + /** + * create builder for RecurringOrderActive instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderActiveBuilder of(final RecurringOrderActive template) { + RecurringOrderActiveBuilder builder = new RecurringOrderActiveBuilder(); + builder.resumesAt = template.getResumesAt(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderActiveImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderActiveImpl.java new file mode 100644 index 00000000000..418af928722 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderActiveImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Changes the Recurring Order state to active.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderActiveImpl implements RecurringOrderActive, ModelBase { + + private String type; + + private java.time.ZonedDateTime resumesAt; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderActiveImpl(@JsonProperty("resumesAt") final java.time.ZonedDateTime resumesAt) { + this.resumesAt = resumesAt; + this.type = ACTIVE; + } + + /** + * create empty instance + */ + public RecurringOrderActiveImpl() { + this.type = ACTIVE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      If set, the Recurring Order will automatically resume at the date and time (UTC) specified.

      + */ + + public java.time.ZonedDateTime getResumesAt() { + return this.resumesAt; + } + + public void setResumesAt(final java.time.ZonedDateTime resumesAt) { + this.resumesAt = resumesAt; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderActiveImpl that = (RecurringOrderActiveImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(resumesAt, that.resumesAt) + .append(type, that.type) + .append(resumesAt, that.resumesAt) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(resumesAt).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("resumesAt", resumesAt) + .build(); + } + + @Override + public RecurringOrderActive copyDeep() { + return RecurringOrderActive.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderBuilder.java new file mode 100644 index 00000000000..b4f3e1f1ef1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderBuilder.java @@ -0,0 +1,892 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrder recurringOrder = RecurringOrder.builder()
      + *             .id("{id}")
      + *             .version(0.3)
      + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .cart(cartBuilder -> cartBuilder)
      + *             .originOrder(originOrderBuilder -> originOrderBuilder)
      + *             .startsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .recurringOrderState(RecurringOrderState.ACTIVE)
      + *             .schedule(scheduleBuilder -> scheduleBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private String key; + + private com.commercetools.api.models.cart.CartReference cart; + + private com.commercetools.api.models.order.OrderReference originOrder; + + private java.time.ZonedDateTime startsAt; + + @Nullable + private java.time.ZonedDateTime resumesAt; + + @Nullable + private java.time.ZonedDateTime expiresAt; + + @Nullable + private java.time.ZonedDateTime lastOrderAt; + + @Nullable + private java.time.ZonedDateTime nextOrderAt; + + @Nullable + private com.commercetools.api.models.recurring_order.SkipConfiguration skipConfiguration; + + @Nullable + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private com.commercetools.api.models.business_unit.BusinessUnitKeyReference businessUnit; + + @Nullable + private com.commercetools.api.models.state.StateReference state; + + private com.commercetools.api.models.recurring_order.RecurringOrderState recurringOrderState; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule schedule; + + @Nullable + private com.commercetools.api.models.customer.CustomerReference customer; + + @Nullable + private String customerEmail; + + @Nullable + private com.commercetools.api.models.type.CustomFields custom; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + /** + *

      Unique identifier of the RecurringOrder.

      + * @param id value to be set + * @return Builder + */ + + public RecurringOrderBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Current version of the RecurringOrder.

      + * @param version value to be set + * @return Builder + */ + + public RecurringOrderBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Date and time (UTC) when the RecurringOrder was created.

      + * @param createdAt value to be set + * @return Builder + */ + + public RecurringOrderBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

      Date and time (UTC) when the RecurringOrder was last updated.

      + * @param lastModifiedAt value to be set + * @return Builder + */ + + public RecurringOrderBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

      User-defined unique identifier of the RecurringOrder.

      + * @param key value to be set + * @return Builder + */ + + public RecurringOrderBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

      Reference to the Cart for a RecurringOrder. The referenced Cart will have the RecurringOrder CartOrigin.

      + * @param builder function to build the cart value + * @return Builder + */ + + public RecurringOrderBuilder cart( + Function builder) { + this.cart = builder.apply(com.commercetools.api.models.cart.CartReferenceBuilder.of()).build(); + return this; + } + + /** + *

      Reference to the Cart for a RecurringOrder. The referenced Cart will have the RecurringOrder CartOrigin.

      + * @param builder function to build the cart value + * @return Builder + */ + + public RecurringOrderBuilder withCart( + Function builder) { + this.cart = builder.apply(com.commercetools.api.models.cart.CartReferenceBuilder.of()); + return this; + } + + /** + *

      Reference to the Cart for a RecurringOrder. The referenced Cart will have the RecurringOrder CartOrigin.

      + * @param cart value to be set + * @return Builder + */ + + public RecurringOrderBuilder cart(final com.commercetools.api.models.cart.CartReference cart) { + this.cart = cart; + return this; + } + + /** + *

      Reference to the original Order that generated this RecurringOrder.

      + * @param builder function to build the originOrder value + * @return Builder + */ + + public RecurringOrderBuilder originOrder( + Function builder) { + this.originOrder = builder.apply(com.commercetools.api.models.order.OrderReferenceBuilder.of()).build(); + return this; + } + + /** + *

      Reference to the original Order that generated this RecurringOrder.

      + * @param builder function to build the originOrder value + * @return Builder + */ + + public RecurringOrderBuilder withOriginOrder( + Function builder) { + this.originOrder = builder.apply(com.commercetools.api.models.order.OrderReferenceBuilder.of()); + return this; + } + + /** + *

      Reference to the original Order that generated this RecurringOrder.

      + * @param originOrder value to be set + * @return Builder + */ + + public RecurringOrderBuilder originOrder(final com.commercetools.api.models.order.OrderReference originOrder) { + this.originOrder = originOrder; + return this; + } + + /** + *

      Date and time (UTC) when the RecurringOrder starts creating new Orders.

      + * @param startsAt value to be set + * @return Builder + */ + + public RecurringOrderBuilder startsAt(final java.time.ZonedDateTime startsAt) { + this.startsAt = startsAt; + return this; + } + + /** + *

      Date and time (UTC) when the RecurringOrder resumes creating Orders after being unpaused.

      + * @param resumesAt value to be set + * @return Builder + */ + + public RecurringOrderBuilder resumesAt(@Nullable final java.time.ZonedDateTime resumesAt) { + this.resumesAt = resumesAt; + return this; + } + + /** + *

      Date and time (UTC) when the RecurringOrder expires.

      + * @param expiresAt value to be set + * @return Builder + */ + + public RecurringOrderBuilder expiresAt(@Nullable final java.time.ZonedDateTime expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + *

      Date and time (UTC) when the last Order was created from this RecurringOrder.

      + * @param lastOrderAt value to be set + * @return Builder + */ + + public RecurringOrderBuilder lastOrderAt(@Nullable final java.time.ZonedDateTime lastOrderAt) { + this.lastOrderAt = lastOrderAt; + return this; + } + + /** + *

      Date and time (UTC) when the next Order will be created from this RecurringOrder.

      + * @param nextOrderAt value to be set + * @return Builder + */ + + public RecurringOrderBuilder nextOrderAt(@Nullable final java.time.ZonedDateTime nextOrderAt) { + this.nextOrderAt = nextOrderAt; + return this; + } + + /** + *

      Information about current and future skips for this RecurringOrder.

      + * @param skipConfiguration value to be set + * @return Builder + */ + + public RecurringOrderBuilder skipConfiguration( + @Nullable final com.commercetools.api.models.recurring_order.SkipConfiguration skipConfiguration) { + this.skipConfiguration = skipConfiguration; + return this; + } + + /** + *

      Information about current and future skips for this RecurringOrder.

      + * @param builder function to build the skipConfiguration value + * @return Builder + */ + + public RecurringOrderBuilder skipConfiguration( + Function> builder) { + this.skipConfiguration = builder + .apply(com.commercetools.api.models.recurring_order.SkipConfigurationBuilder.of()) + .build(); + return this; + } + + /** + *

      Reference to a Store.

      + * @param builder function to build the store value + * @return Builder + */ + + public RecurringOrderBuilder store( + Function builder) { + this.store = builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()).build(); + return this; + } + + /** + *

      Reference to a Store.

      + * @param builder function to build the store value + * @return Builder + */ + + public RecurringOrderBuilder withStore( + Function builder) { + this.store = builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()); + return this; + } + + /** + *

      Reference to a Store.

      + * @param store value to be set + * @return Builder + */ + + public RecurringOrderBuilder store(@Nullable final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

      Reference to the Business Unit that the RecurringOrder belongs to.

      + * @param builder function to build the businessUnit value + * @return Builder + */ + + public RecurringOrderBuilder businessUnit( + Function builder) { + this.businessUnit = builder + .apply(com.commercetools.api.models.business_unit.BusinessUnitKeyReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

      Reference to the Business Unit that the RecurringOrder belongs to.

      + * @param builder function to build the businessUnit value + * @return Builder + */ + + public RecurringOrderBuilder withBusinessUnit( + Function builder) { + this.businessUnit = builder + .apply(com.commercetools.api.models.business_unit.BusinessUnitKeyReferenceBuilder.of()); + return this; + } + + /** + *

      Reference to the Business Unit that the RecurringOrder belongs to.

      + * @param businessUnit value to be set + * @return Builder + */ + + public RecurringOrderBuilder businessUnit( + @Nullable final com.commercetools.api.models.business_unit.BusinessUnitKeyReference businessUnit) { + this.businessUnit = businessUnit; + return this; + } + + /** + *

      State of the RecurringOrder in a custom workflow.

      + * @param builder function to build the state value + * @return Builder + */ + + public RecurringOrderBuilder state( + Function builder) { + this.state = builder.apply(com.commercetools.api.models.state.StateReferenceBuilder.of()).build(); + return this; + } + + /** + *

      State of the RecurringOrder in a custom workflow.

      + * @param builder function to build the state value + * @return Builder + */ + + public RecurringOrderBuilder withState( + Function builder) { + this.state = builder.apply(com.commercetools.api.models.state.StateReferenceBuilder.of()); + return this; + } + + /** + *

      State of the RecurringOrder in a custom workflow.

      + * @param state value to be set + * @return Builder + */ + + public RecurringOrderBuilder state(@Nullable final com.commercetools.api.models.state.StateReference state) { + this.state = state; + return this; + } + + /** + *

      Current state of the RecurringOrder.

      + * @param recurringOrderState value to be set + * @return Builder + */ + + public RecurringOrderBuilder recurringOrderState( + final com.commercetools.api.models.recurring_order.RecurringOrderState recurringOrderState) { + this.recurringOrderState = recurringOrderState; + return this; + } + + /** + *

      Schedule of the RecurringOrder.

      + * @param schedule value to be set + * @return Builder + */ + + public RecurringOrderBuilder schedule( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule schedule) { + this.schedule = schedule; + return this; + } + + /** + *

      Schedule of the RecurringOrder.

      + * @param builder function to build the schedule value + * @return Builder + */ + + public RecurringOrderBuilder schedule( + Function> builder) { + this.schedule = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleBuilder.of()) + .build(); + return this; + } + + /** + *

      The Customer that the RecurringOrder belongs to.

      + * @param builder function to build the customer value + * @return Builder + */ + + public RecurringOrderBuilder customer( + Function builder) { + this.customer = builder.apply(com.commercetools.api.models.customer.CustomerReferenceBuilder.of()).build(); + return this; + } + + /** + *

      The Customer that the RecurringOrder belongs to.

      + * @param builder function to build the customer value + * @return Builder + */ + + public RecurringOrderBuilder withCustomer( + Function builder) { + this.customer = builder.apply(com.commercetools.api.models.customer.CustomerReferenceBuilder.of()); + return this; + } + + /** + *

      The Customer that the RecurringOrder belongs to.

      + * @param customer value to be set + * @return Builder + */ + + public RecurringOrderBuilder customer( + @Nullable final com.commercetools.api.models.customer.CustomerReference customer) { + this.customer = customer; + return this; + } + + /** + *

      Email address of the Customer that the RecurringOrder belongs to.

      + * @param customerEmail value to be set + * @return Builder + */ + + public RecurringOrderBuilder customerEmail(@Nullable final String customerEmail) { + this.customerEmail = customerEmail; + return this; + } + + /** + *

      Custom Fields of the RecurringOrder.

      + * @param builder function to build the custom value + * @return Builder + */ + + public RecurringOrderBuilder custom( + Function builder) { + this.custom = builder.apply(com.commercetools.api.models.type.CustomFieldsBuilder.of()).build(); + return this; + } + + /** + *

      Custom Fields of the RecurringOrder.

      + * @param builder function to build the custom value + * @return Builder + */ + + public RecurringOrderBuilder withCustom( + Function builder) { + this.custom = builder.apply(com.commercetools.api.models.type.CustomFieldsBuilder.of()); + return this; + } + + /** + *

      Custom Fields of the RecurringOrder.

      + * @param custom value to be set + * @return Builder + */ + + public RecurringOrderBuilder custom(@Nullable final com.commercetools.api.models.type.CustomFields custom) { + this.custom = custom; + return this; + } + + /** + *

      IDs and references that last modified the RecurringOrder.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that last modified the RecurringOrder.

      + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that last modified the RecurringOrder.

      + * @param lastModifiedBy value to be set + * @return Builder + */ + + public RecurringOrderBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

      IDs and references that created the RecurringOrder.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

      IDs and references that created the RecurringOrder.

      + * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

      IDs and references that created the RecurringOrder.

      + * @param createdBy value to be set + * @return Builder + */ + + public RecurringOrderBuilder createdBy(@Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

      Unique identifier of the RecurringOrder.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Current version of the RecurringOrder.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) when the RecurringOrder was created.

      + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Date and time (UTC) when the RecurringOrder was last updated.

      + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      User-defined unique identifier of the RecurringOrder.

      + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

      Reference to the Cart for a RecurringOrder. The referenced Cart will have the RecurringOrder CartOrigin.

      + * @return cart + */ + + public com.commercetools.api.models.cart.CartReference getCart() { + return this.cart; + } + + /** + *

      Reference to the original Order that generated this RecurringOrder.

      + * @return originOrder + */ + + public com.commercetools.api.models.order.OrderReference getOriginOrder() { + return this.originOrder; + } + + /** + *

      Date and time (UTC) when the RecurringOrder starts creating new Orders.

      + * @return startsAt + */ + + public java.time.ZonedDateTime getStartsAt() { + return this.startsAt; + } + + /** + *

      Date and time (UTC) when the RecurringOrder resumes creating Orders after being unpaused.

      + * @return resumesAt + */ + + @Nullable + public java.time.ZonedDateTime getResumesAt() { + return this.resumesAt; + } + + /** + *

      Date and time (UTC) when the RecurringOrder expires.

      + * @return expiresAt + */ + + @Nullable + public java.time.ZonedDateTime getExpiresAt() { + return this.expiresAt; + } + + /** + *

      Date and time (UTC) when the last Order was created from this RecurringOrder.

      + * @return lastOrderAt + */ + + @Nullable + public java.time.ZonedDateTime getLastOrderAt() { + return this.lastOrderAt; + } + + /** + *

      Date and time (UTC) when the next Order will be created from this RecurringOrder.

      + * @return nextOrderAt + */ + + @Nullable + public java.time.ZonedDateTime getNextOrderAt() { + return this.nextOrderAt; + } + + /** + *

      Information about current and future skips for this RecurringOrder.

      + * @return skipConfiguration + */ + + @Nullable + public com.commercetools.api.models.recurring_order.SkipConfiguration getSkipConfiguration() { + return this.skipConfiguration; + } + + /** + *

      Reference to a Store.

      + * @return store + */ + + @Nullable + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

      Reference to the Business Unit that the RecurringOrder belongs to.

      + * @return businessUnit + */ + + @Nullable + public com.commercetools.api.models.business_unit.BusinessUnitKeyReference getBusinessUnit() { + return this.businessUnit; + } + + /** + *

      State of the RecurringOrder in a custom workflow.

      + * @return state + */ + + @Nullable + public com.commercetools.api.models.state.StateReference getState() { + return this.state; + } + + /** + *

      Current state of the RecurringOrder.

      + * @return recurringOrderState + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderState getRecurringOrderState() { + return this.recurringOrderState; + } + + /** + *

      Schedule of the RecurringOrder.

      + * @return schedule + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule getSchedule() { + return this.schedule; + } + + /** + *

      The Customer that the RecurringOrder belongs to.

      + * @return customer + */ + + @Nullable + public com.commercetools.api.models.customer.CustomerReference getCustomer() { + return this.customer; + } + + /** + *

      Email address of the Customer that the RecurringOrder belongs to.

      + * @return customerEmail + */ + + @Nullable + public String getCustomerEmail() { + return this.customerEmail; + } + + /** + *

      Custom Fields of the RecurringOrder.

      + * @return custom + */ + + @Nullable + public com.commercetools.api.models.type.CustomFields getCustom() { + return this.custom; + } + + /** + *

      IDs and references that last modified the RecurringOrder.

      + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the RecurringOrder.

      + * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + * builds RecurringOrder with checking for non-null required values + * @return RecurringOrder + */ + public RecurringOrder build() { + Objects.requireNonNull(id, RecurringOrder.class + ": id is missing"); + Objects.requireNonNull(version, RecurringOrder.class + ": version is missing"); + Objects.requireNonNull(createdAt, RecurringOrder.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, RecurringOrder.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(cart, RecurringOrder.class + ": cart is missing"); + Objects.requireNonNull(originOrder, RecurringOrder.class + ": originOrder is missing"); + Objects.requireNonNull(startsAt, RecurringOrder.class + ": startsAt is missing"); + Objects.requireNonNull(recurringOrderState, RecurringOrder.class + ": recurringOrderState is missing"); + Objects.requireNonNull(schedule, RecurringOrder.class + ": schedule is missing"); + return new RecurringOrderImpl(id, version, createdAt, lastModifiedAt, key, cart, originOrder, startsAt, + resumesAt, expiresAt, lastOrderAt, nextOrderAt, skipConfiguration, store, businessUnit, state, + recurringOrderState, schedule, customer, customerEmail, custom, lastModifiedBy, createdBy); + } + + /** + * builds RecurringOrder without checking for non-null required values + * @return RecurringOrder + */ + public RecurringOrder buildUnchecked() { + return new RecurringOrderImpl(id, version, createdAt, lastModifiedAt, key, cart, originOrder, startsAt, + resumesAt, expiresAt, lastOrderAt, nextOrderAt, skipConfiguration, store, businessUnit, state, + recurringOrderState, schedule, customer, customerEmail, custom, lastModifiedBy, createdBy); + } + + /** + * factory method for an instance of RecurringOrderBuilder + * @return builder + */ + public static RecurringOrderBuilder of() { + return new RecurringOrderBuilder(); + } + + /** + * create builder for RecurringOrder instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderBuilder of(final RecurringOrder template) { + RecurringOrderBuilder builder = new RecurringOrderBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.key = template.getKey(); + builder.cart = template.getCart(); + builder.originOrder = template.getOriginOrder(); + builder.startsAt = template.getStartsAt(); + builder.resumesAt = template.getResumesAt(); + builder.expiresAt = template.getExpiresAt(); + builder.lastOrderAt = template.getLastOrderAt(); + builder.nextOrderAt = template.getNextOrderAt(); + builder.skipConfiguration = template.getSkipConfiguration(); + builder.store = template.getStore(); + builder.businessUnit = template.getBusinessUnit(); + builder.state = template.getState(); + builder.recurringOrderState = template.getRecurringOrderState(); + builder.schedule = template.getSchedule(); + builder.customer = template.getCustomer(); + builder.customerEmail = template.getCustomerEmail(); + builder.custom = template.getCustom(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderCanceled.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderCanceled.java new file mode 100644 index 00000000000..1d43ee752f6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderCanceled.java @@ -0,0 +1,127 @@ + +package com.commercetools.api.models.recurring_order; + +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; + +/** + *

      Changes the Recurring Order state to canceled.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCanceled recurringOrderCanceled = RecurringOrderCanceled.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("canceled") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderCanceledImpl.class) +public interface RecurringOrderCanceled extends RecurringOrderStateDraft { + + /** + * discriminator value for RecurringOrderCanceled + */ + String CANCELED = "canceled"; + + /** + *

      The reason for the cancelation.

      + * @return reason + */ + + @JsonProperty("reason") + public String getReason(); + + /** + *

      The reason for the cancelation.

      + * @param reason value to be set + */ + + public void setReason(final String reason); + + /** + * factory method + * @return instance of RecurringOrderCanceled + */ + public static RecurringOrderCanceled of() { + return new RecurringOrderCanceledImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderCanceled + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderCanceled of(final RecurringOrderCanceled template) { + RecurringOrderCanceledImpl instance = new RecurringOrderCanceledImpl(); + instance.setReason(template.getReason()); + return instance; + } + + public RecurringOrderCanceled copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderCanceled + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderCanceled deepCopy(@Nullable final RecurringOrderCanceled template) { + if (template == null) { + return null; + } + RecurringOrderCanceledImpl instance = new RecurringOrderCanceledImpl(); + instance.setReason(template.getReason()); + return instance; + } + + /** + * builder factory method for RecurringOrderCanceled + * @return builder + */ + public static RecurringOrderCanceledBuilder builder() { + return RecurringOrderCanceledBuilder.of(); + } + + /** + * create builder for RecurringOrderCanceled instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCanceledBuilder builder(final RecurringOrderCanceled template) { + return RecurringOrderCanceledBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderCanceled(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderCanceledBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderCanceledBuilder.java new file mode 100644 index 00000000000..4f91989fd62 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderCanceledBuilder.java @@ -0,0 +1,84 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderCanceledBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderCanceled recurringOrderCanceled = RecurringOrderCanceled.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCanceledBuilder implements Builder { + + @Nullable + private String reason; + + /** + *

      The reason for the cancelation.

      + * @param reason value to be set + * @return Builder + */ + + public RecurringOrderCanceledBuilder reason(@Nullable final String reason) { + this.reason = reason; + return this; + } + + /** + *

      The reason for the cancelation.

      + * @return reason + */ + + @Nullable + public String getReason() { + return this.reason; + } + + /** + * builds RecurringOrderCanceled with checking for non-null required values + * @return RecurringOrderCanceled + */ + public RecurringOrderCanceled build() { + return new RecurringOrderCanceledImpl(reason); + } + + /** + * builds RecurringOrderCanceled without checking for non-null required values + * @return RecurringOrderCanceled + */ + public RecurringOrderCanceled buildUnchecked() { + return new RecurringOrderCanceledImpl(reason); + } + + /** + * factory method for an instance of RecurringOrderCanceledBuilder + * @return builder + */ + public static RecurringOrderCanceledBuilder of() { + return new RecurringOrderCanceledBuilder(); + } + + /** + * create builder for RecurringOrderCanceled instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderCanceledBuilder of(final RecurringOrderCanceled template) { + RecurringOrderCanceledBuilder builder = new RecurringOrderCanceledBuilder(); + builder.reason = template.getReason(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderCanceledImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderCanceledImpl.java new file mode 100644 index 00000000000..224496e7c25 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderCanceledImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Changes the Recurring Order state to canceled.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderCanceledImpl implements RecurringOrderCanceled, ModelBase { + + private String type; + + private String reason; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderCanceledImpl(@JsonProperty("reason") final String reason) { + this.reason = reason; + this.type = CANCELED; + } + + /** + * create empty instance + */ + public RecurringOrderCanceledImpl() { + this.type = CANCELED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

      The reason for the cancelation.

      + */ + + public String getReason() { + return this.reason; + } + + public void setReason(final String reason) { + this.reason = reason; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderCanceledImpl that = (RecurringOrderCanceledImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(reason, that.reason) + .append(type, that.type) + .append(reason, that.reason) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(reason).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("reason", reason) + .build(); + } + + @Override + public RecurringOrderCanceled copyDeep() { + return RecurringOrderCanceled.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderDraft.java new file mode 100644 index 00000000000..83e344c567a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderDraft.java @@ -0,0 +1,217 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.time.ZonedDateTime; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.cart.CartResourceIdentifier; +import com.commercetools.api.models.state.StateResourceIdentifier; +import com.commercetools.api.models.type.CustomFieldsDraft; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Recurring Orders are automatically assigned the Store and/or Business Unit from the associated Cart.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderDraft recurringOrderDraft = RecurringOrderDraft.builder()
      + *             .cart(cartBuilder -> cartBuilder)
      + *             .cartVersion(0.3)
      + *             .startsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderDraftImpl.class) +public interface RecurringOrderDraft extends io.vrap.rmf.base.client.Draft { + + /** + *

      User-defined unique identifier of the RecurringOrder.

      + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

      ResourceIdentifier to the Cart from which the RecurringOrder is created.

      + * @return cart + */ + @NotNull + @Valid + @JsonProperty("cart") + public CartResourceIdentifier getCart(); + + /** + *

      Current version of the referenced Cart.

      + * @return cartVersion + */ + @NotNull + @JsonProperty("cartVersion") + public Long getCartVersion(); + + /** + *

      Date and time (UTC) when the RecurringOrder will start.

      + * @return startsAt + */ + @NotNull + @JsonProperty("startsAt") + public ZonedDateTime getStartsAt(); + + /** + *

      State for the RecurringOrder in a custom workflow.

      + * @return state + */ + @Valid + @JsonProperty("state") + public StateResourceIdentifier getState(); + + /** + *

      Custom Fields for the RecurringOrder.

      + * @return custom + */ + @Valid + @JsonProperty("custom") + public CustomFieldsDraft getCustom(); + + /** + *

      User-defined unique identifier of the RecurringOrder.

      + * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

      ResourceIdentifier to the Cart from which the RecurringOrder is created.

      + * @param cart value to be set + */ + + public void setCart(final CartResourceIdentifier cart); + + /** + *

      Current version of the referenced Cart.

      + * @param cartVersion value to be set + */ + + public void setCartVersion(final Long cartVersion); + + /** + *

      Date and time (UTC) when the RecurringOrder will start.

      + * @param startsAt value to be set + */ + + public void setStartsAt(final ZonedDateTime startsAt); + + /** + *

      State for the RecurringOrder in a custom workflow.

      + * @param state value to be set + */ + + public void setState(final StateResourceIdentifier state); + + /** + *

      Custom Fields for the RecurringOrder.

      + * @param custom value to be set + */ + + public void setCustom(final CustomFieldsDraft custom); + + /** + * factory method + * @return instance of RecurringOrderDraft + */ + public static RecurringOrderDraft of() { + return new RecurringOrderDraftImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderDraft + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderDraft of(final RecurringOrderDraft template) { + RecurringOrderDraftImpl instance = new RecurringOrderDraftImpl(); + instance.setKey(template.getKey()); + instance.setCart(template.getCart()); + instance.setCartVersion(template.getCartVersion()); + instance.setStartsAt(template.getStartsAt()); + instance.setState(template.getState()); + instance.setCustom(template.getCustom()); + return instance; + } + + public RecurringOrderDraft copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderDraft deepCopy(@Nullable final RecurringOrderDraft template) { + if (template == null) { + return null; + } + RecurringOrderDraftImpl instance = new RecurringOrderDraftImpl(); + instance.setKey(template.getKey()); + instance.setCart(com.commercetools.api.models.cart.CartResourceIdentifier.deepCopy(template.getCart())); + instance.setCartVersion(template.getCartVersion()); + instance.setStartsAt(template.getStartsAt()); + instance.setState(com.commercetools.api.models.state.StateResourceIdentifier.deepCopy(template.getState())); + instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom())); + return instance; + } + + /** + * builder factory method for RecurringOrderDraft + * @return builder + */ + public static RecurringOrderDraftBuilder builder() { + return RecurringOrderDraftBuilder.of(); + } + + /** + * create builder for RecurringOrderDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderDraftBuilder builder(final RecurringOrderDraft template) { + return RecurringOrderDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderDraftBuilder.java new file mode 100644 index 00000000000..903fbd70ec9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderDraftBuilder.java @@ -0,0 +1,284 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderDraftBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderDraft recurringOrderDraft = RecurringOrderDraft.builder()
      + *             .cart(cartBuilder -> cartBuilder)
      + *             .cartVersion(0.3)
      + *             .startsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderDraftBuilder implements Builder { + + @Nullable + private String key; + + private com.commercetools.api.models.cart.CartResourceIdentifier cart; + + private Long cartVersion; + + private java.time.ZonedDateTime startsAt; + + @Nullable + private com.commercetools.api.models.state.StateResourceIdentifier state; + + @Nullable + private com.commercetools.api.models.type.CustomFieldsDraft custom; + + /** + *

      User-defined unique identifier of the RecurringOrder.

      + * @param key value to be set + * @return Builder + */ + + public RecurringOrderDraftBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

      ResourceIdentifier to the Cart from which the RecurringOrder is created.

      + * @param builder function to build the cart value + * @return Builder + */ + + public RecurringOrderDraftBuilder cart( + Function builder) { + this.cart = builder.apply(com.commercetools.api.models.cart.CartResourceIdentifierBuilder.of()).build(); + return this; + } + + /** + *

      ResourceIdentifier to the Cart from which the RecurringOrder is created.

      + * @param builder function to build the cart value + * @return Builder + */ + + public RecurringOrderDraftBuilder withCart( + Function builder) { + this.cart = builder.apply(com.commercetools.api.models.cart.CartResourceIdentifierBuilder.of()); + return this; + } + + /** + *

      ResourceIdentifier to the Cart from which the RecurringOrder is created.

      + * @param cart value to be set + * @return Builder + */ + + public RecurringOrderDraftBuilder cart(final com.commercetools.api.models.cart.CartResourceIdentifier cart) { + this.cart = cart; + return this; + } + + /** + *

      Current version of the referenced Cart.

      + * @param cartVersion value to be set + * @return Builder + */ + + public RecurringOrderDraftBuilder cartVersion(final Long cartVersion) { + this.cartVersion = cartVersion; + return this; + } + + /** + *

      Date and time (UTC) when the RecurringOrder will start.

      + * @param startsAt value to be set + * @return Builder + */ + + public RecurringOrderDraftBuilder startsAt(final java.time.ZonedDateTime startsAt) { + this.startsAt = startsAt; + return this; + } + + /** + *

      State for the RecurringOrder in a custom workflow.

      + * @param builder function to build the state value + * @return Builder + */ + + public RecurringOrderDraftBuilder state( + Function builder) { + this.state = builder.apply(com.commercetools.api.models.state.StateResourceIdentifierBuilder.of()).build(); + return this; + } + + /** + *

      State for the RecurringOrder in a custom workflow.

      + * @param builder function to build the state value + * @return Builder + */ + + public RecurringOrderDraftBuilder withState( + Function builder) { + this.state = builder.apply(com.commercetools.api.models.state.StateResourceIdentifierBuilder.of()); + return this; + } + + /** + *

      State for the RecurringOrder in a custom workflow.

      + * @param state value to be set + * @return Builder + */ + + public RecurringOrderDraftBuilder state( + @Nullable final com.commercetools.api.models.state.StateResourceIdentifier state) { + this.state = state; + return this; + } + + /** + *

      Custom Fields for the RecurringOrder.

      + * @param builder function to build the custom value + * @return Builder + */ + + public RecurringOrderDraftBuilder custom( + Function builder) { + this.custom = builder.apply(com.commercetools.api.models.type.CustomFieldsDraftBuilder.of()).build(); + return this; + } + + /** + *

      Custom Fields for the RecurringOrder.

      + * @param builder function to build the custom value + * @return Builder + */ + + public RecurringOrderDraftBuilder withCustom( + Function builder) { + this.custom = builder.apply(com.commercetools.api.models.type.CustomFieldsDraftBuilder.of()); + return this; + } + + /** + *

      Custom Fields for the RecurringOrder.

      + * @param custom value to be set + * @return Builder + */ + + public RecurringOrderDraftBuilder custom( + @Nullable final com.commercetools.api.models.type.CustomFieldsDraft custom) { + this.custom = custom; + return this; + } + + /** + *

      User-defined unique identifier of the RecurringOrder.

      + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

      ResourceIdentifier to the Cart from which the RecurringOrder is created.

      + * @return cart + */ + + public com.commercetools.api.models.cart.CartResourceIdentifier getCart() { + return this.cart; + } + + /** + *

      Current version of the referenced Cart.

      + * @return cartVersion + */ + + public Long getCartVersion() { + return this.cartVersion; + } + + /** + *

      Date and time (UTC) when the RecurringOrder will start.

      + * @return startsAt + */ + + public java.time.ZonedDateTime getStartsAt() { + return this.startsAt; + } + + /** + *

      State for the RecurringOrder in a custom workflow.

      + * @return state + */ + + @Nullable + public com.commercetools.api.models.state.StateResourceIdentifier getState() { + return this.state; + } + + /** + *

      Custom Fields for the RecurringOrder.

      + * @return custom + */ + + @Nullable + public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { + return this.custom; + } + + /** + * builds RecurringOrderDraft with checking for non-null required values + * @return RecurringOrderDraft + */ + public RecurringOrderDraft build() { + Objects.requireNonNull(cart, RecurringOrderDraft.class + ": cart is missing"); + Objects.requireNonNull(cartVersion, RecurringOrderDraft.class + ": cartVersion is missing"); + Objects.requireNonNull(startsAt, RecurringOrderDraft.class + ": startsAt is missing"); + return new RecurringOrderDraftImpl(key, cart, cartVersion, startsAt, state, custom); + } + + /** + * builds RecurringOrderDraft without checking for non-null required values + * @return RecurringOrderDraft + */ + public RecurringOrderDraft buildUnchecked() { + return new RecurringOrderDraftImpl(key, cart, cartVersion, startsAt, state, custom); + } + + /** + * factory method for an instance of RecurringOrderDraftBuilder + * @return builder + */ + public static RecurringOrderDraftBuilder of() { + return new RecurringOrderDraftBuilder(); + } + + /** + * create builder for RecurringOrderDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderDraftBuilder of(final RecurringOrderDraft template) { + RecurringOrderDraftBuilder builder = new RecurringOrderDraftBuilder(); + builder.key = template.getKey(); + builder.cart = template.getCart(); + builder.cartVersion = template.getCartVersion(); + builder.startsAt = template.getStartsAt(); + builder.state = template.getState(); + builder.custom = template.getCustom(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderDraftImpl.java new file mode 100644 index 00000000000..fcbe9eec603 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderDraftImpl.java @@ -0,0 +1,184 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Recurring Orders are automatically assigned the Store and/or Business Unit from the associated Cart.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderDraftImpl implements RecurringOrderDraft, ModelBase { + + private String key; + + private com.commercetools.api.models.cart.CartResourceIdentifier cart; + + private Long cartVersion; + + private java.time.ZonedDateTime startsAt; + + private com.commercetools.api.models.state.StateResourceIdentifier state; + + private com.commercetools.api.models.type.CustomFieldsDraft custom; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderDraftImpl(@JsonProperty("key") final String key, + @JsonProperty("cart") final com.commercetools.api.models.cart.CartResourceIdentifier cart, + @JsonProperty("cartVersion") final Long cartVersion, + @JsonProperty("startsAt") final java.time.ZonedDateTime startsAt, + @JsonProperty("state") final com.commercetools.api.models.state.StateResourceIdentifier state, + @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom) { + this.key = key; + this.cart = cart; + this.cartVersion = cartVersion; + this.startsAt = startsAt; + this.state = state; + this.custom = custom; + } + + /** + * create empty instance + */ + public RecurringOrderDraftImpl() { + } + + /** + *

      User-defined unique identifier of the RecurringOrder.

      + */ + + public String getKey() { + return this.key; + } + + /** + *

      ResourceIdentifier to the Cart from which the RecurringOrder is created.

      + */ + + public com.commercetools.api.models.cart.CartResourceIdentifier getCart() { + return this.cart; + } + + /** + *

      Current version of the referenced Cart.

      + */ + + public Long getCartVersion() { + return this.cartVersion; + } + + /** + *

      Date and time (UTC) when the RecurringOrder will start.

      + */ + + public java.time.ZonedDateTime getStartsAt() { + return this.startsAt; + } + + /** + *

      State for the RecurringOrder in a custom workflow.

      + */ + + public com.commercetools.api.models.state.StateResourceIdentifier getState() { + return this.state; + } + + /** + *

      Custom Fields for the RecurringOrder.

      + */ + + public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { + return this.custom; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setCart(final com.commercetools.api.models.cart.CartResourceIdentifier cart) { + this.cart = cart; + } + + public void setCartVersion(final Long cartVersion) { + this.cartVersion = cartVersion; + } + + public void setStartsAt(final java.time.ZonedDateTime startsAt) { + this.startsAt = startsAt; + } + + public void setState(final com.commercetools.api.models.state.StateResourceIdentifier state) { + this.state = state; + } + + public void setCustom(final com.commercetools.api.models.type.CustomFieldsDraft custom) { + this.custom = custom; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderDraftImpl that = (RecurringOrderDraftImpl) o; + + return new EqualsBuilder().append(key, that.key) + .append(cart, that.cart) + .append(cartVersion, that.cartVersion) + .append(startsAt, that.startsAt) + .append(state, that.state) + .append(custom, that.custom) + .append(key, that.key) + .append(cart, that.cart) + .append(cartVersion, that.cartVersion) + .append(startsAt, that.startsAt) + .append(state, that.state) + .append(custom, that.custom) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(key) + .append(cart) + .append(cartVersion) + .append(startsAt) + .append(state) + .append(custom) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("key", key) + .append("cart", cart) + .append("cartVersion", cartVersion) + .append("startsAt", startsAt) + .append("state", state) + .append("custom", custom) + .build(); + } + + @Override + public RecurringOrderDraft copyDeep() { + return RecurringOrderDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderExpired.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderExpired.java new file mode 100644 index 00000000000..10107fbece9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderExpired.java @@ -0,0 +1,110 @@ + +package com.commercetools.api.models.recurring_order; + +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; + +/** + *

      Changes the Recurring Order state to expired.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderExpired recurringOrderExpired = RecurringOrderExpired.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("expired") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderExpiredImpl.class) +public interface RecurringOrderExpired extends RecurringOrderStateDraft { + + /** + * discriminator value for RecurringOrderExpired + */ + String EXPIRED = "expired"; + + /** + * factory method + * @return instance of RecurringOrderExpired + */ + public static RecurringOrderExpired of() { + return new RecurringOrderExpiredImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderExpired + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderExpired of(final RecurringOrderExpired template) { + RecurringOrderExpiredImpl instance = new RecurringOrderExpiredImpl(); + return instance; + } + + public RecurringOrderExpired copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderExpired + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderExpired deepCopy(@Nullable final RecurringOrderExpired template) { + if (template == null) { + return null; + } + RecurringOrderExpiredImpl instance = new RecurringOrderExpiredImpl(); + return instance; + } + + /** + * builder factory method for RecurringOrderExpired + * @return builder + */ + public static RecurringOrderExpiredBuilder builder() { + return RecurringOrderExpiredBuilder.of(); + } + + /** + * create builder for RecurringOrderExpired instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderExpiredBuilder builder(final RecurringOrderExpired template) { + return RecurringOrderExpiredBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderExpired(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderExpiredBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderExpiredBuilder.java new file mode 100644 index 00000000000..06a490ee9b1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderExpiredBuilder.java @@ -0,0 +1,57 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderExpiredBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderExpired recurringOrderExpired = RecurringOrderExpired.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderExpiredBuilder implements Builder { + + /** + * builds RecurringOrderExpired with checking for non-null required values + * @return RecurringOrderExpired + */ + public RecurringOrderExpired build() { + return new RecurringOrderExpiredImpl(); + } + + /** + * builds RecurringOrderExpired without checking for non-null required values + * @return RecurringOrderExpired + */ + public RecurringOrderExpired buildUnchecked() { + return new RecurringOrderExpiredImpl(); + } + + /** + * factory method for an instance of RecurringOrderExpiredBuilder + * @return builder + */ + public static RecurringOrderExpiredBuilder of() { + return new RecurringOrderExpiredBuilder(); + } + + /** + * create builder for RecurringOrderExpired instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderExpiredBuilder of(final RecurringOrderExpired template) { + RecurringOrderExpiredBuilder builder = new RecurringOrderExpiredBuilder(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderExpiredImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderExpiredImpl.java new file mode 100644 index 00000000000..4d99179330a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderExpiredImpl.java @@ -0,0 +1,69 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Changes the Recurring Order state to expired.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderExpiredImpl implements RecurringOrderExpired, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + public RecurringOrderExpiredImpl() { + this.type = EXPIRED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderExpiredImpl that = (RecurringOrderExpiredImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + + @Override + public RecurringOrderExpired copyDeep() { + return RecurringOrderExpired.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderImpl.java new file mode 100644 index 00000000000..503fb6dc9f0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderImpl.java @@ -0,0 +1,526 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RecurringOrder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderImpl implements RecurringOrder, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private String key; + + private com.commercetools.api.models.cart.CartReference cart; + + private com.commercetools.api.models.order.OrderReference originOrder; + + private java.time.ZonedDateTime startsAt; + + private java.time.ZonedDateTime resumesAt; + + private java.time.ZonedDateTime expiresAt; + + private java.time.ZonedDateTime lastOrderAt; + + private java.time.ZonedDateTime nextOrderAt; + + private com.commercetools.api.models.recurring_order.SkipConfiguration skipConfiguration; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private com.commercetools.api.models.business_unit.BusinessUnitKeyReference businessUnit; + + private com.commercetools.api.models.state.StateReference state; + + private com.commercetools.api.models.recurring_order.RecurringOrderState recurringOrderState; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule schedule; + + private com.commercetools.api.models.customer.CustomerReference customer; + + private String customerEmail; + + private com.commercetools.api.models.type.CustomFields custom; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderImpl(@JsonProperty("id") final String id, @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("key") final String key, + @JsonProperty("cart") final com.commercetools.api.models.cart.CartReference cart, + @JsonProperty("originOrder") final com.commercetools.api.models.order.OrderReference originOrder, + @JsonProperty("startsAt") final java.time.ZonedDateTime startsAt, + @JsonProperty("resumesAt") final java.time.ZonedDateTime resumesAt, + @JsonProperty("expiresAt") final java.time.ZonedDateTime expiresAt, + @JsonProperty("lastOrderAt") final java.time.ZonedDateTime lastOrderAt, + @JsonProperty("nextOrderAt") final java.time.ZonedDateTime nextOrderAt, + @JsonProperty("skipConfiguration") final com.commercetools.api.models.recurring_order.SkipConfiguration skipConfiguration, + @JsonProperty("store") final com.commercetools.api.models.store.StoreKeyReference store, + @JsonProperty("businessUnit") final com.commercetools.api.models.business_unit.BusinessUnitKeyReference businessUnit, + @JsonProperty("state") final com.commercetools.api.models.state.StateReference state, + @JsonProperty("recurringOrderState") final com.commercetools.api.models.recurring_order.RecurringOrderState recurringOrderState, + @JsonProperty("schedule") final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule schedule, + @JsonProperty("customer") final com.commercetools.api.models.customer.CustomerReference customer, + @JsonProperty("customerEmail") final String customerEmail, + @JsonProperty("custom") final com.commercetools.api.models.type.CustomFields custom, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.key = key; + this.cart = cart; + this.originOrder = originOrder; + this.startsAt = startsAt; + this.resumesAt = resumesAt; + this.expiresAt = expiresAt; + this.lastOrderAt = lastOrderAt; + this.nextOrderAt = nextOrderAt; + this.skipConfiguration = skipConfiguration; + this.store = store; + this.businessUnit = businessUnit; + this.state = state; + this.recurringOrderState = recurringOrderState; + this.schedule = schedule; + this.customer = customer; + this.customerEmail = customerEmail; + this.custom = custom; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + } + + /** + * create empty instance + */ + public RecurringOrderImpl() { + } + + /** + *

      Unique identifier of the RecurringOrder.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Current version of the RecurringOrder.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Date and time (UTC) when the RecurringOrder was created.

      + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

      Date and time (UTC) when the RecurringOrder was last updated.

      + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

      User-defined unique identifier of the RecurringOrder.

      + */ + + public String getKey() { + return this.key; + } + + /** + *

      Reference to the Cart for a RecurringOrder. The referenced Cart will have the RecurringOrder CartOrigin.

      + */ + + public com.commercetools.api.models.cart.CartReference getCart() { + return this.cart; + } + + /** + *

      Reference to the original Order that generated this RecurringOrder.

      + */ + + public com.commercetools.api.models.order.OrderReference getOriginOrder() { + return this.originOrder; + } + + /** + *

      Date and time (UTC) when the RecurringOrder starts creating new Orders.

      + */ + + public java.time.ZonedDateTime getStartsAt() { + return this.startsAt; + } + + /** + *

      Date and time (UTC) when the RecurringOrder resumes creating Orders after being unpaused.

      + */ + + public java.time.ZonedDateTime getResumesAt() { + return this.resumesAt; + } + + /** + *

      Date and time (UTC) when the RecurringOrder expires.

      + */ + + public java.time.ZonedDateTime getExpiresAt() { + return this.expiresAt; + } + + /** + *

      Date and time (UTC) when the last Order was created from this RecurringOrder.

      + */ + + public java.time.ZonedDateTime getLastOrderAt() { + return this.lastOrderAt; + } + + /** + *

      Date and time (UTC) when the next Order will be created from this RecurringOrder.

      + */ + + public java.time.ZonedDateTime getNextOrderAt() { + return this.nextOrderAt; + } + + /** + *

      Information about current and future skips for this RecurringOrder.

      + */ + + public com.commercetools.api.models.recurring_order.SkipConfiguration getSkipConfiguration() { + return this.skipConfiguration; + } + + /** + *

      Reference to a Store.

      + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

      Reference to the Business Unit that the RecurringOrder belongs to.

      + */ + + public com.commercetools.api.models.business_unit.BusinessUnitKeyReference getBusinessUnit() { + return this.businessUnit; + } + + /** + *

      State of the RecurringOrder in a custom workflow.

      + */ + + public com.commercetools.api.models.state.StateReference getState() { + return this.state; + } + + /** + *

      Current state of the RecurringOrder.

      + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderState getRecurringOrderState() { + return this.recurringOrderState; + } + + /** + *

      Schedule of the RecurringOrder.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule getSchedule() { + return this.schedule; + } + + /** + *

      The Customer that the RecurringOrder belongs to.

      + */ + + public com.commercetools.api.models.customer.CustomerReference getCustomer() { + return this.customer; + } + + /** + *

      Email address of the Customer that the RecurringOrder belongs to.

      + */ + + public String getCustomerEmail() { + return this.customerEmail; + } + + /** + *

      Custom Fields of the RecurringOrder.

      + */ + + public com.commercetools.api.models.type.CustomFields getCustom() { + return this.custom; + } + + /** + *

      IDs and references that last modified the RecurringOrder.

      + */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

      IDs and references that created the RecurringOrder.

      + */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setCart(final com.commercetools.api.models.cart.CartReference cart) { + this.cart = cart; + } + + public void setOriginOrder(final com.commercetools.api.models.order.OrderReference originOrder) { + this.originOrder = originOrder; + } + + public void setStartsAt(final java.time.ZonedDateTime startsAt) { + this.startsAt = startsAt; + } + + public void setResumesAt(final java.time.ZonedDateTime resumesAt) { + this.resumesAt = resumesAt; + } + + public void setExpiresAt(final java.time.ZonedDateTime expiresAt) { + this.expiresAt = expiresAt; + } + + public void setLastOrderAt(final java.time.ZonedDateTime lastOrderAt) { + this.lastOrderAt = lastOrderAt; + } + + public void setNextOrderAt(final java.time.ZonedDateTime nextOrderAt) { + this.nextOrderAt = nextOrderAt; + } + + public void setSkipConfiguration( + final com.commercetools.api.models.recurring_order.SkipConfiguration skipConfiguration) { + this.skipConfiguration = skipConfiguration; + } + + public void setStore(final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + } + + public void setBusinessUnit( + final com.commercetools.api.models.business_unit.BusinessUnitKeyReference businessUnit) { + this.businessUnit = businessUnit; + } + + public void setState(final com.commercetools.api.models.state.StateReference state) { + this.state = state; + } + + public void setRecurringOrderState( + final com.commercetools.api.models.recurring_order.RecurringOrderState recurringOrderState) { + this.recurringOrderState = recurringOrderState; + } + + public void setSchedule(final com.commercetools.api.models.recurrence_policy.RecurrencePolicySchedule schedule) { + this.schedule = schedule; + } + + public void setCustomer(final com.commercetools.api.models.customer.CustomerReference customer) { + this.customer = customer; + } + + public void setCustomerEmail(final String customerEmail) { + this.customerEmail = customerEmail; + } + + public void setCustom(final com.commercetools.api.models.type.CustomFields custom) { + this.custom = custom; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderImpl that = (RecurringOrderImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(key, that.key) + .append(cart, that.cart) + .append(originOrder, that.originOrder) + .append(startsAt, that.startsAt) + .append(resumesAt, that.resumesAt) + .append(expiresAt, that.expiresAt) + .append(lastOrderAt, that.lastOrderAt) + .append(nextOrderAt, that.nextOrderAt) + .append(skipConfiguration, that.skipConfiguration) + .append(store, that.store) + .append(businessUnit, that.businessUnit) + .append(state, that.state) + .append(recurringOrderState, that.recurringOrderState) + .append(schedule, that.schedule) + .append(customer, that.customer) + .append(customerEmail, that.customerEmail) + .append(custom, that.custom) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(key, that.key) + .append(cart, that.cart) + .append(originOrder, that.originOrder) + .append(startsAt, that.startsAt) + .append(resumesAt, that.resumesAt) + .append(expiresAt, that.expiresAt) + .append(lastOrderAt, that.lastOrderAt) + .append(nextOrderAt, that.nextOrderAt) + .append(skipConfiguration, that.skipConfiguration) + .append(store, that.store) + .append(businessUnit, that.businessUnit) + .append(state, that.state) + .append(recurringOrderState, that.recurringOrderState) + .append(schedule, that.schedule) + .append(customer, that.customer) + .append(customerEmail, that.customerEmail) + .append(custom, that.custom) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(key) + .append(cart) + .append(originOrder) + .append(startsAt) + .append(resumesAt) + .append(expiresAt) + .append(lastOrderAt) + .append(nextOrderAt) + .append(skipConfiguration) + .append(store) + .append(businessUnit) + .append(state) + .append(recurringOrderState) + .append(schedule) + .append(customer) + .append(customerEmail) + .append(custom) + .append(lastModifiedBy) + .append(createdBy) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("key", key) + .append("cart", cart) + .append("originOrder", originOrder) + .append("startsAt", startsAt) + .append("resumesAt", resumesAt) + .append("expiresAt", expiresAt) + .append("lastOrderAt", lastOrderAt) + .append("nextOrderAt", nextOrderAt) + .append("skipConfiguration", skipConfiguration) + .append("store", store) + .append("businessUnit", businessUnit) + .append("state", state) + .append("recurringOrderState", recurringOrderState) + .append("schedule", schedule) + .append("customer", customer) + .append("customerEmail", customerEmail) + .append("custom", custom) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .build(); + } + + @Override + public RecurringOrder copyDeep() { + return RecurringOrder.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPagedQueryResponse.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPagedQueryResponse.java new file mode 100644 index 00000000000..7cc9981b0a4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPagedQueryResponse.java @@ -0,0 +1,210 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +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.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      PagedQueryResult with results containing an array of RecurringOrder.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderPagedQueryResponse recurringOrderPagedQueryResponse = RecurringOrderPagedQueryResponse.builder()
      + *             .limit(0.3)
      + *             .offset(0.3)
      + *             .count(0.3)
      + *             .plusResults(resultsBuilder -> resultsBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderPagedQueryResponseImpl.class) +public interface RecurringOrderPagedQueryResponse { + + /** + *

      Number of results requested.

      + * @return limit + */ + @NotNull + @JsonProperty("limit") + public Long getLimit(); + + /** + *

      Number of elements skipped.

      + * @return offset + */ + @NotNull + @JsonProperty("offset") + public Long getOffset(); + + /** + *

      Actual number of results returned.

      + * @return count + */ + @NotNull + @JsonProperty("count") + public Long getCount(); + + /** + *

      Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

      + * @return total + */ + + @JsonProperty("total") + public Long getTotal(); + + /** + *

      RecurringOrders matching the query.

      + * @return results + */ + @NotNull + @Valid + @JsonProperty("results") + public List getResults(); + + /** + *

      Number of results requested.

      + * @param limit value to be set + */ + + public void setLimit(final Long limit); + + /** + *

      Number of elements skipped.

      + * @param offset value to be set + */ + + public void setOffset(final Long offset); + + /** + *

      Actual number of results returned.

      + * @param count value to be set + */ + + public void setCount(final Long count); + + /** + *

      Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

      + * @param total value to be set + */ + + public void setTotal(final Long total); + + /** + *

      RecurringOrders matching the query.

      + * @param results values to be set + */ + + @JsonIgnore + public void setResults(final RecurringOrder... results); + + /** + *

      RecurringOrders matching the query.

      + * @param results values to be set + */ + + public void setResults(final List results); + + /** + * factory method + * @return instance of RecurringOrderPagedQueryResponse + */ + public static RecurringOrderPagedQueryResponse of() { + return new RecurringOrderPagedQueryResponseImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderPagedQueryResponse + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderPagedQueryResponse of(final RecurringOrderPagedQueryResponse template) { + RecurringOrderPagedQueryResponseImpl instance = new RecurringOrderPagedQueryResponseImpl(); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + instance.setCount(template.getCount()); + instance.setTotal(template.getTotal()); + instance.setResults(template.getResults()); + return instance; + } + + public RecurringOrderPagedQueryResponse copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderPagedQueryResponse + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderPagedQueryResponse deepCopy(@Nullable final RecurringOrderPagedQueryResponse template) { + if (template == null) { + return null; + } + RecurringOrderPagedQueryResponseImpl instance = new RecurringOrderPagedQueryResponseImpl(); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + instance.setCount(template.getCount()); + instance.setTotal(template.getTotal()); + instance.setResults(Optional.ofNullable(template.getResults()) + .map(t -> t.stream() + .map(com.commercetools.api.models.recurring_order.RecurringOrder::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for RecurringOrderPagedQueryResponse + * @return builder + */ + public static RecurringOrderPagedQueryResponseBuilder builder() { + return RecurringOrderPagedQueryResponseBuilder.of(); + } + + /** + * create builder for RecurringOrderPagedQueryResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderPagedQueryResponseBuilder builder(final RecurringOrderPagedQueryResponse template) { + return RecurringOrderPagedQueryResponseBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderPagedQueryResponse(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPagedQueryResponseBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPagedQueryResponseBuilder.java new file mode 100644 index 00000000000..067e3b007eb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPagedQueryResponseBuilder.java @@ -0,0 +1,265 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderPagedQueryResponseBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderPagedQueryResponse recurringOrderPagedQueryResponse = RecurringOrderPagedQueryResponse.builder()
      + *             .limit(0.3)
      + *             .offset(0.3)
      + *             .count(0.3)
      + *             .plusResults(resultsBuilder -> resultsBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderPagedQueryResponseBuilder implements Builder { + + private Long limit; + + private Long offset; + + private Long count; + + @Nullable + private Long total; + + private java.util.List results; + + /** + *

      Number of results requested.

      + * @param limit value to be set + * @return Builder + */ + + public RecurringOrderPagedQueryResponseBuilder limit(final Long limit) { + this.limit = limit; + return this; + } + + /** + *

      Number of elements skipped.

      + * @param offset value to be set + * @return Builder + */ + + public RecurringOrderPagedQueryResponseBuilder offset(final Long offset) { + this.offset = offset; + return this; + } + + /** + *

      Actual number of results returned.

      + * @param count value to be set + * @return Builder + */ + + public RecurringOrderPagedQueryResponseBuilder count(final Long count) { + this.count = count; + return this; + } + + /** + *

      Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

      + * @param total value to be set + * @return Builder + */ + + public RecurringOrderPagedQueryResponseBuilder total(@Nullable final Long total) { + this.total = total; + return this; + } + + /** + *

      RecurringOrders matching the query.

      + * @param results value to be set + * @return Builder + */ + + public RecurringOrderPagedQueryResponseBuilder results( + final com.commercetools.api.models.recurring_order.RecurringOrder... results) { + this.results = new ArrayList<>(Arrays.asList(results)); + return this; + } + + /** + *

      RecurringOrders matching the query.

      + * @param results value to be set + * @return Builder + */ + + public RecurringOrderPagedQueryResponseBuilder results( + final java.util.List results) { + this.results = results; + return this; + } + + /** + *

      RecurringOrders matching the query.

      + * @param results value to be set + * @return Builder + */ + + public RecurringOrderPagedQueryResponseBuilder plusResults( + final com.commercetools.api.models.recurring_order.RecurringOrder... results) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.addAll(Arrays.asList(results)); + return this; + } + + /** + *

      RecurringOrders matching the query.

      + * @param builder function to build the results value + * @return Builder + */ + + public RecurringOrderPagedQueryResponseBuilder plusResults( + Function builder) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results + .add(builder.apply(com.commercetools.api.models.recurring_order.RecurringOrderBuilder.of()).build()); + return this; + } + + /** + *

      RecurringOrders matching the query.

      + * @param builder function to build the results value + * @return Builder + */ + + public RecurringOrderPagedQueryResponseBuilder withResults( + Function builder) { + this.results = new ArrayList<>(); + this.results + .add(builder.apply(com.commercetools.api.models.recurring_order.RecurringOrderBuilder.of()).build()); + return this; + } + + /** + *

      RecurringOrders matching the query.

      + * @param builder function to build the results value + * @return Builder + */ + + public RecurringOrderPagedQueryResponseBuilder addResults( + Function builder) { + return plusResults(builder.apply(com.commercetools.api.models.recurring_order.RecurringOrderBuilder.of())); + } + + /** + *

      RecurringOrders matching the query.

      + * @param builder function to build the results value + * @return Builder + */ + + public RecurringOrderPagedQueryResponseBuilder setResults( + Function builder) { + return results(builder.apply(com.commercetools.api.models.recurring_order.RecurringOrderBuilder.of())); + } + + /** + *

      Number of results requested.

      + * @return limit + */ + + public Long getLimit() { + return this.limit; + } + + /** + *

      Number of elements skipped.

      + * @return offset + */ + + public Long getOffset() { + return this.offset; + } + + /** + *

      Actual number of results returned.

      + * @return count + */ + + public Long getCount() { + return this.count; + } + + /** + *

      Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

      + * @return total + */ + + @Nullable + public Long getTotal() { + return this.total; + } + + /** + *

      RecurringOrders matching the query.

      + * @return results + */ + + public java.util.List getResults() { + return this.results; + } + + /** + * builds RecurringOrderPagedQueryResponse with checking for non-null required values + * @return RecurringOrderPagedQueryResponse + */ + public RecurringOrderPagedQueryResponse build() { + Objects.requireNonNull(limit, RecurringOrderPagedQueryResponse.class + ": limit is missing"); + Objects.requireNonNull(offset, RecurringOrderPagedQueryResponse.class + ": offset is missing"); + Objects.requireNonNull(count, RecurringOrderPagedQueryResponse.class + ": count is missing"); + Objects.requireNonNull(results, RecurringOrderPagedQueryResponse.class + ": results is missing"); + return new RecurringOrderPagedQueryResponseImpl(limit, offset, count, total, results); + } + + /** + * builds RecurringOrderPagedQueryResponse without checking for non-null required values + * @return RecurringOrderPagedQueryResponse + */ + public RecurringOrderPagedQueryResponse buildUnchecked() { + return new RecurringOrderPagedQueryResponseImpl(limit, offset, count, total, results); + } + + /** + * factory method for an instance of RecurringOrderPagedQueryResponseBuilder + * @return builder + */ + public static RecurringOrderPagedQueryResponseBuilder of() { + return new RecurringOrderPagedQueryResponseBuilder(); + } + + /** + * create builder for RecurringOrderPagedQueryResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderPagedQueryResponseBuilder of(final RecurringOrderPagedQueryResponse template) { + RecurringOrderPagedQueryResponseBuilder builder = new RecurringOrderPagedQueryResponseBuilder(); + builder.limit = template.getLimit(); + builder.offset = template.getOffset(); + builder.count = template.getCount(); + builder.total = template.getTotal(); + builder.results = template.getResults(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPagedQueryResponseImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPagedQueryResponseImpl.java new file mode 100644 index 00000000000..5d473a420a4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPagedQueryResponseImpl.java @@ -0,0 +1,167 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      PagedQueryResult with results containing an array of RecurringOrder.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderPagedQueryResponseImpl implements RecurringOrderPagedQueryResponse, ModelBase { + + private Long limit; + + private Long offset; + + private Long count; + + private Long total; + + private java.util.List results; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderPagedQueryResponseImpl(@JsonProperty("limit") final Long limit, + @JsonProperty("offset") final Long offset, @JsonProperty("count") final Long count, + @JsonProperty("total") final Long total, + @JsonProperty("results") final java.util.List results) { + this.limit = limit; + this.offset = offset; + this.count = count; + this.total = total; + this.results = results; + } + + /** + * create empty instance + */ + public RecurringOrderPagedQueryResponseImpl() { + } + + /** + *

      Number of results requested.

      + */ + + public Long getLimit() { + return this.limit; + } + + /** + *

      Number of elements skipped.

      + */ + + public Long getOffset() { + return this.offset; + } + + /** + *

      Actual number of results returned.

      + */ + + public Long getCount() { + return this.count; + } + + /** + *

      Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

      + */ + + public Long getTotal() { + return this.total; + } + + /** + *

      RecurringOrders matching the query.

      + */ + + public java.util.List getResults() { + return this.results; + } + + public void setLimit(final Long limit) { + this.limit = limit; + } + + public void setOffset(final Long offset) { + this.offset = offset; + } + + public void setCount(final Long count) { + this.count = count; + } + + public void setTotal(final Long total) { + this.total = total; + } + + public void setResults(final com.commercetools.api.models.recurring_order.RecurringOrder... results) { + this.results = new ArrayList<>(Arrays.asList(results)); + } + + public void setResults(final java.util.List results) { + this.results = results; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderPagedQueryResponseImpl that = (RecurringOrderPagedQueryResponseImpl) o; + + return new EqualsBuilder().append(limit, that.limit) + .append(offset, that.offset) + .append(count, that.count) + .append(total, that.total) + .append(results, that.results) + .append(limit, that.limit) + .append(offset, that.offset) + .append(count, that.count) + .append(total, that.total) + .append(results, that.results) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(limit) + .append(offset) + .append(count) + .append(total) + .append(results) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("limit", limit) + .append("offset", offset) + .append("count", count) + .append("total", total) + .append("results", results) + .build(); + } + + @Override + public RecurringOrderPagedQueryResponse copyDeep() { + return RecurringOrderPagedQueryResponse.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPaused.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPaused.java new file mode 100644 index 00000000000..11385c43ff2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPaused.java @@ -0,0 +1,110 @@ + +package com.commercetools.api.models.recurring_order; + +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; + +/** + *

      Changes the Recurring Order state to paused.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderPaused recurringOrderPaused = RecurringOrderPaused.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("paused") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderPausedImpl.class) +public interface RecurringOrderPaused extends RecurringOrderStateDraft { + + /** + * discriminator value for RecurringOrderPaused + */ + String PAUSED = "paused"; + + /** + * factory method + * @return instance of RecurringOrderPaused + */ + public static RecurringOrderPaused of() { + return new RecurringOrderPausedImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderPaused + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderPaused of(final RecurringOrderPaused template) { + RecurringOrderPausedImpl instance = new RecurringOrderPausedImpl(); + return instance; + } + + public RecurringOrderPaused copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderPaused + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderPaused deepCopy(@Nullable final RecurringOrderPaused template) { + if (template == null) { + return null; + } + RecurringOrderPausedImpl instance = new RecurringOrderPausedImpl(); + return instance; + } + + /** + * builder factory method for RecurringOrderPaused + * @return builder + */ + public static RecurringOrderPausedBuilder builder() { + return RecurringOrderPausedBuilder.of(); + } + + /** + * create builder for RecurringOrderPaused instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderPausedBuilder builder(final RecurringOrderPaused template) { + return RecurringOrderPausedBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderPaused(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPausedBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPausedBuilder.java new file mode 100644 index 00000000000..bafbbbe06bb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPausedBuilder.java @@ -0,0 +1,57 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderPausedBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderPaused recurringOrderPaused = RecurringOrderPaused.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderPausedBuilder implements Builder { + + /** + * builds RecurringOrderPaused with checking for non-null required values + * @return RecurringOrderPaused + */ + public RecurringOrderPaused build() { + return new RecurringOrderPausedImpl(); + } + + /** + * builds RecurringOrderPaused without checking for non-null required values + * @return RecurringOrderPaused + */ + public RecurringOrderPaused buildUnchecked() { + return new RecurringOrderPausedImpl(); + } + + /** + * factory method for an instance of RecurringOrderPausedBuilder + * @return builder + */ + public static RecurringOrderPausedBuilder of() { + return new RecurringOrderPausedBuilder(); + } + + /** + * create builder for RecurringOrderPaused instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderPausedBuilder of(final RecurringOrderPaused template) { + RecurringOrderPausedBuilder builder = new RecurringOrderPausedBuilder(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPausedImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPausedImpl.java new file mode 100644 index 00000000000..98586029ffe --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPausedImpl.java @@ -0,0 +1,69 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Changes the Recurring Order state to paused.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderPausedImpl implements RecurringOrderPaused, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + public RecurringOrderPausedImpl() { + this.type = PAUSED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderPausedImpl that = (RecurringOrderPausedImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + + @Override + public RecurringOrderPaused copyDeep() { + return RecurringOrderPaused.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderReference.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderReference.java new file mode 100644 index 00000000000..c669717e6af --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderReference.java @@ -0,0 +1,149 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.Reference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Reference to a RecurringOrder.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderReference recurringOrderReference = RecurringOrderReference.builder()
      + *             .id("{id}")
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("recurring-order") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderReferenceImpl.class) +public interface RecurringOrderReference extends Reference { + + /** + * discriminator value for RecurringOrderReference + */ + String RECURRING_ORDER = "recurring-order"; + + /** + *

      Contains the representation of the expanded RecurringOrder. Only present in responses to requests with Reference Expansion for RecurringOrders.

      + * @return obj + */ + @Valid + @JsonProperty("obj") + public RecurringOrder getObj(); + + /** + *

      Unique identifier of the referenced RecurringOrder.

      + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

      Contains the representation of the expanded RecurringOrder. Only present in responses to requests with Reference Expansion for RecurringOrders.

      + * @param obj value to be set + */ + + public void setObj(final RecurringOrder obj); + + /** + *

      Unique identifier of the referenced RecurringOrder.

      + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of RecurringOrderReference + */ + public static RecurringOrderReference of() { + return new RecurringOrderReferenceImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderReference + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderReference of(final RecurringOrderReference template) { + RecurringOrderReferenceImpl instance = new RecurringOrderReferenceImpl(); + instance.setId(template.getId()); + instance.setObj(template.getObj()); + return instance; + } + + public RecurringOrderReference copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderReference deepCopy(@Nullable final RecurringOrderReference template) { + if (template == null) { + return null; + } + RecurringOrderReferenceImpl instance = new RecurringOrderReferenceImpl(); + instance.setId(template.getId()); + instance.setObj(com.commercetools.api.models.recurring_order.RecurringOrder.deepCopy(template.getObj())); + return instance; + } + + /** + * builder factory method for RecurringOrderReference + * @return builder + */ + public static RecurringOrderReferenceBuilder builder() { + return RecurringOrderReferenceBuilder.of(); + } + + /** + * create builder for RecurringOrderReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderReferenceBuilder builder(final RecurringOrderReference template) { + return RecurringOrderReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderReference(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderReferenceBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderReferenceBuilder.java new file mode 100644 index 00000000000..365d69484ad --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderReferenceBuilder.java @@ -0,0 +1,135 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderReferenceBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderReference recurringOrderReference = RecurringOrderReference.builder()
      + *             .id("{id}")
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderReferenceBuilder implements Builder { + + private String id; + + @Nullable + private com.commercetools.api.models.recurring_order.RecurringOrder obj; + + /** + *

      Unique identifier of the referenced RecurringOrder.

      + * @param id value to be set + * @return Builder + */ + + public RecurringOrderReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

      Contains the representation of the expanded RecurringOrder. Only present in responses to requests with Reference Expansion for RecurringOrders.

      + * @param builder function to build the obj value + * @return Builder + */ + + public RecurringOrderReferenceBuilder obj( + Function builder) { + this.obj = builder.apply(com.commercetools.api.models.recurring_order.RecurringOrderBuilder.of()).build(); + return this; + } + + /** + *

      Contains the representation of the expanded RecurringOrder. Only present in responses to requests with Reference Expansion for RecurringOrders.

      + * @param builder function to build the obj value + * @return Builder + */ + + public RecurringOrderReferenceBuilder withObj( + Function builder) { + this.obj = builder.apply(com.commercetools.api.models.recurring_order.RecurringOrderBuilder.of()); + return this; + } + + /** + *

      Contains the representation of the expanded RecurringOrder. Only present in responses to requests with Reference Expansion for RecurringOrders.

      + * @param obj value to be set + * @return Builder + */ + + public RecurringOrderReferenceBuilder obj( + @Nullable final com.commercetools.api.models.recurring_order.RecurringOrder obj) { + this.obj = obj; + return this; + } + + /** + *

      Unique identifier of the referenced RecurringOrder.

      + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

      Contains the representation of the expanded RecurringOrder. Only present in responses to requests with Reference Expansion for RecurringOrders.

      + * @return obj + */ + + @Nullable + public com.commercetools.api.models.recurring_order.RecurringOrder getObj() { + return this.obj; + } + + /** + * builds RecurringOrderReference with checking for non-null required values + * @return RecurringOrderReference + */ + public RecurringOrderReference build() { + Objects.requireNonNull(id, RecurringOrderReference.class + ": id is missing"); + return new RecurringOrderReferenceImpl(id, obj); + } + + /** + * builds RecurringOrderReference without checking for non-null required values + * @return RecurringOrderReference + */ + public RecurringOrderReference buildUnchecked() { + return new RecurringOrderReferenceImpl(id, obj); + } + + /** + * factory method for an instance of RecurringOrderReferenceBuilder + * @return builder + */ + public static RecurringOrderReferenceBuilder of() { + return new RecurringOrderReferenceBuilder(); + } + + /** + * create builder for RecurringOrderReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderReferenceBuilder of(final RecurringOrderReference template) { + RecurringOrderReferenceBuilder builder = new RecurringOrderReferenceBuilder(); + builder.id = template.getId(); + builder.obj = template.getObj(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderReferenceImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderReferenceImpl.java new file mode 100644 index 00000000000..02e8b77ae42 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderReferenceImpl.java @@ -0,0 +1,118 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.commercetools.api.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Reference to a RecurringOrder.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderReferenceImpl implements RecurringOrderReference, ModelBase { + + private com.commercetools.api.models.common.ReferenceTypeId typeId; + + private String id; + + private com.commercetools.api.models.recurring_order.RecurringOrder obj; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderReferenceImpl(@JsonProperty("id") final String id, + @JsonProperty("obj") final com.commercetools.api.models.recurring_order.RecurringOrder obj) { + this.id = id; + this.obj = obj; + this.typeId = ReferenceTypeId.findEnum("recurring-order"); + } + + /** + * create empty instance + */ + public RecurringOrderReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("recurring-order"); + } + + /** + *

      Type of referenced resource.

      + */ + + public com.commercetools.api.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

      Unique identifier of the referenced RecurringOrder.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      Contains the representation of the expanded RecurringOrder. Only present in responses to requests with Reference Expansion for RecurringOrders.

      + */ + + public com.commercetools.api.models.recurring_order.RecurringOrder getObj() { + return this.obj; + } + + public void setId(final String id) { + this.id = id; + } + + public void setObj(final com.commercetools.api.models.recurring_order.RecurringOrder obj) { + this.obj = obj; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderReferenceImpl that = (RecurringOrderReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(obj, that.obj) + .append(typeId, that.typeId) + .append(id, that.id) + .append(obj, that.obj) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).append(obj).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .append("obj", obj) + .build(); + } + + @Override + public RecurringOrderReference copyDeep() { + return RecurringOrderReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderResourceIdentifier.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderResourceIdentifier.java new file mode 100644 index 00000000000..241eee35387 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderResourceIdentifier.java @@ -0,0 +1,145 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.ResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

      ResourceIdentifier to a RecurringOrder. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderResourceIdentifier recurringOrderResourceIdentifier = RecurringOrderResourceIdentifier.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("recurring-order") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderResourceIdentifierImpl.class) +public interface RecurringOrderResourceIdentifier extends ResourceIdentifier { + + /** + * discriminator value for RecurringOrderResourceIdentifier + */ + String RECURRING_ORDER = "recurring-order"; + + /** + *

      Unique identifier of the referenced RecurringOrder. Required if key is absent.

      + * @return id + */ + + @JsonProperty("id") + public String getId(); + + /** + *

      User-defined unique identifier of the referenced RecurringOrder. Required if id is absent.

      + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

      Unique identifier of the referenced RecurringOrder. Required if key is absent.

      + * @param id value to be set + */ + + public void setId(final String id); + + /** + *

      User-defined unique identifier of the referenced RecurringOrder. Required if id is absent.

      + * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of RecurringOrderResourceIdentifier + */ + public static RecurringOrderResourceIdentifier of() { + return new RecurringOrderResourceIdentifierImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderResourceIdentifier of(final RecurringOrderResourceIdentifier template) { + RecurringOrderResourceIdentifierImpl instance = new RecurringOrderResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + public RecurringOrderResourceIdentifier copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderResourceIdentifier + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderResourceIdentifier deepCopy(@Nullable final RecurringOrderResourceIdentifier template) { + if (template == null) { + return null; + } + RecurringOrderResourceIdentifierImpl instance = new RecurringOrderResourceIdentifierImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for RecurringOrderResourceIdentifier + * @return builder + */ + public static RecurringOrderResourceIdentifierBuilder builder() { + return RecurringOrderResourceIdentifierBuilder.of(); + } + + /** + * create builder for RecurringOrderResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderResourceIdentifierBuilder builder(final RecurringOrderResourceIdentifier template) { + return RecurringOrderResourceIdentifierBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderResourceIdentifier(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderResourceIdentifierBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderResourceIdentifierBuilder.java new file mode 100644 index 00000000000..4ae3e08d086 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderResourceIdentifierBuilder.java @@ -0,0 +1,109 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderResourceIdentifierBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderResourceIdentifier recurringOrderResourceIdentifier = RecurringOrderResourceIdentifier.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderResourceIdentifierBuilder implements Builder { + + @Nullable + private String id; + + @Nullable + private String key; + + /** + *

      Unique identifier of the referenced RecurringOrder. Required if key is absent.

      + * @param id value to be set + * @return Builder + */ + + public RecurringOrderResourceIdentifierBuilder id(@Nullable final String id) { + this.id = id; + return this; + } + + /** + *

      User-defined unique identifier of the referenced RecurringOrder. Required if id is absent.

      + * @param key value to be set + * @return Builder + */ + + public RecurringOrderResourceIdentifierBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

      Unique identifier of the referenced RecurringOrder. Required if key is absent.

      + * @return id + */ + + @Nullable + public String getId() { + return this.id; + } + + /** + *

      User-defined unique identifier of the referenced RecurringOrder. Required if id is absent.

      + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + * builds RecurringOrderResourceIdentifier with checking for non-null required values + * @return RecurringOrderResourceIdentifier + */ + public RecurringOrderResourceIdentifier build() { + return new RecurringOrderResourceIdentifierImpl(id, key); + } + + /** + * builds RecurringOrderResourceIdentifier without checking for non-null required values + * @return RecurringOrderResourceIdentifier + */ + public RecurringOrderResourceIdentifier buildUnchecked() { + return new RecurringOrderResourceIdentifierImpl(id, key); + } + + /** + * factory method for an instance of RecurringOrderResourceIdentifierBuilder + * @return builder + */ + public static RecurringOrderResourceIdentifierBuilder of() { + return new RecurringOrderResourceIdentifierBuilder(); + } + + /** + * create builder for RecurringOrderResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderResourceIdentifierBuilder of(final RecurringOrderResourceIdentifier template) { + RecurringOrderResourceIdentifierBuilder builder = new RecurringOrderResourceIdentifierBuilder(); + builder.id = template.getId(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderResourceIdentifierImpl.java new file mode 100644 index 00000000000..e2b482a4349 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderResourceIdentifierImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.commercetools.api.models.common.ReferenceTypeId; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      ResourceIdentifier to a RecurringOrder. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderResourceIdentifierImpl implements RecurringOrderResourceIdentifier, ModelBase { + + private com.commercetools.api.models.common.ReferenceTypeId typeId; + + private String id; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderResourceIdentifierImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key) { + this.id = id; + this.key = key; + this.typeId = ReferenceTypeId.findEnum("recurring-order"); + } + + /** + * create empty instance + */ + public RecurringOrderResourceIdentifierImpl() { + this.typeId = ReferenceTypeId.findEnum("recurring-order"); + } + + /** + *

      Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

      + */ + + public com.commercetools.api.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

      Unique identifier of the referenced RecurringOrder. Required if key is absent.

      + */ + + public String getId() { + return this.id; + } + + /** + *

      User-defined unique identifier of the referenced RecurringOrder. Required if id is absent.

      + */ + + public String getKey() { + return this.key; + } + + public void setId(final String id) { + this.id = id; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderResourceIdentifierImpl that = (RecurringOrderResourceIdentifierImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .append("key", key) + .build(); + } + + @Override + public RecurringOrderResourceIdentifier copyDeep() { + return RecurringOrderResourceIdentifier.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomFieldAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomFieldAction.java new file mode 100644 index 00000000000..23e617ee0c9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomFieldAction.java @@ -0,0 +1,148 @@ + +package com.commercetools.api.models.recurring_order; + +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; + +/** + *

      Adding a Custom Field to a Recurring Order generates the RecurringOrderCustomFieldAdded Message, removing one generates the RecurringOrderCustomFieldRemoved Message, and updating an existing one generates the RecurringOrderCustomFieldChanged Message.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderSetCustomFieldAction recurringOrderSetCustomFieldAction = RecurringOrderSetCustomFieldAction.builder()
      + *             .name("{name}")
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("setCustomField") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderSetCustomFieldActionImpl.class) +public interface RecurringOrderSetCustomFieldAction extends RecurringOrderUpdateAction { + + /** + * discriminator value for RecurringOrderSetCustomFieldAction + */ + String SET_CUSTOM_FIELD = "setCustomField"; + + /** + *

      Name of the Custom Field.

      + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

      If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

      + * @return value + */ + + @JsonProperty("value") + public Object getValue(); + + /** + *

      Name of the Custom Field.

      + * @param name value to be set + */ + + public void setName(final String name); + + /** + *

      If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

      + * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * factory method + * @return instance of RecurringOrderSetCustomFieldAction + */ + public static RecurringOrderSetCustomFieldAction of() { + return new RecurringOrderSetCustomFieldActionImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderSetCustomFieldAction + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderSetCustomFieldAction of(final RecurringOrderSetCustomFieldAction template) { + RecurringOrderSetCustomFieldActionImpl instance = new RecurringOrderSetCustomFieldActionImpl(); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + public RecurringOrderSetCustomFieldAction copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderSetCustomFieldAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderSetCustomFieldAction deepCopy( + @Nullable final RecurringOrderSetCustomFieldAction template) { + if (template == null) { + return null; + } + RecurringOrderSetCustomFieldActionImpl instance = new RecurringOrderSetCustomFieldActionImpl(); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * builder factory method for RecurringOrderSetCustomFieldAction + * @return builder + */ + public static RecurringOrderSetCustomFieldActionBuilder builder() { + return RecurringOrderSetCustomFieldActionBuilder.of(); + } + + /** + * create builder for RecurringOrderSetCustomFieldAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderSetCustomFieldActionBuilder builder(final RecurringOrderSetCustomFieldAction template) { + return RecurringOrderSetCustomFieldActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderSetCustomFieldAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomFieldActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomFieldActionBuilder.java new file mode 100644 index 00000000000..66cc16b5e2f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomFieldActionBuilder.java @@ -0,0 +1,109 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderSetCustomFieldActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderSetCustomFieldAction recurringOrderSetCustomFieldAction = RecurringOrderSetCustomFieldAction.builder()
      + *             .name("{name}")
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderSetCustomFieldActionBuilder implements Builder { + + private String name; + + @Nullable + private java.lang.Object value; + + /** + *

      Name of the Custom Field.

      + * @param name value to be set + * @return Builder + */ + + public RecurringOrderSetCustomFieldActionBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *

      If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

      + * @param value value to be set + * @return Builder + */ + + public RecurringOrderSetCustomFieldActionBuilder value(@Nullable final java.lang.Object value) { + this.value = value; + return this; + } + + /** + *

      Name of the Custom Field.

      + * @return name + */ + + public String getName() { + return this.name; + } + + /** + *

      If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

      + * @return value + */ + + @Nullable + public java.lang.Object getValue() { + return this.value; + } + + /** + * builds RecurringOrderSetCustomFieldAction with checking for non-null required values + * @return RecurringOrderSetCustomFieldAction + */ + public RecurringOrderSetCustomFieldAction build() { + Objects.requireNonNull(name, RecurringOrderSetCustomFieldAction.class + ": name is missing"); + return new RecurringOrderSetCustomFieldActionImpl(name, value); + } + + /** + * builds RecurringOrderSetCustomFieldAction without checking for non-null required values + * @return RecurringOrderSetCustomFieldAction + */ + public RecurringOrderSetCustomFieldAction buildUnchecked() { + return new RecurringOrderSetCustomFieldActionImpl(name, value); + } + + /** + * factory method for an instance of RecurringOrderSetCustomFieldActionBuilder + * @return builder + */ + public static RecurringOrderSetCustomFieldActionBuilder of() { + return new RecurringOrderSetCustomFieldActionBuilder(); + } + + /** + * create builder for RecurringOrderSetCustomFieldAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderSetCustomFieldActionBuilder of(final RecurringOrderSetCustomFieldAction template) { + RecurringOrderSetCustomFieldActionBuilder builder = new RecurringOrderSetCustomFieldActionBuilder(); + builder.name = template.getName(); + builder.value = template.getValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomFieldActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomFieldActionImpl.java new file mode 100644 index 00000000000..9b53f361d66 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomFieldActionImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Adding a Custom Field to a Recurring Order generates the RecurringOrderCustomFieldAdded Message, removing one generates the RecurringOrderCustomFieldRemoved Message, and updating an existing one generates the RecurringOrderCustomFieldChanged Message.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderSetCustomFieldActionImpl implements RecurringOrderSetCustomFieldAction, ModelBase { + + private String action; + + private String name; + + private java.lang.Object value; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderSetCustomFieldActionImpl(@JsonProperty("name") final String name, + @JsonProperty("value") final java.lang.Object value) { + this.name = name; + this.value = value; + this.action = SET_CUSTOM_FIELD; + } + + /** + * create empty instance + */ + public RecurringOrderSetCustomFieldActionImpl() { + this.action = SET_CUSTOM_FIELD; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      Name of the Custom Field.

      + */ + + public String getName() { + return this.name; + } + + /** + *

      If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

      + */ + + public java.lang.Object getValue() { + return this.value; + } + + public void setName(final String name) { + this.name = name; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderSetCustomFieldActionImpl that = (RecurringOrderSetCustomFieldActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(name, that.name) + .append(value, that.value) + .append(action, that.action) + .append(name, that.name) + .append(value, that.value) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(name).append(value).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("name", name) + .append("value", value) + .build(); + } + + @Override + public RecurringOrderSetCustomFieldAction copyDeep() { + return RecurringOrderSetCustomFieldAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomTypeAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomTypeAction.java new file mode 100644 index 00000000000..350c8017b6c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomTypeAction.java @@ -0,0 +1,149 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.type.FieldContainer; +import com.commercetools.api.models.type.TypeResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

      Adding or updating a Custom Type on a Recurring Order generates the RecurringOrderCustomTypeSet Message, removing one generates the RecurringOrderCustomTypeRemoved Message.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderSetCustomTypeAction recurringOrderSetCustomTypeAction = RecurringOrderSetCustomTypeAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("setCustomType") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderSetCustomTypeActionImpl.class) +public interface RecurringOrderSetCustomTypeAction extends RecurringOrderUpdateAction { + + /** + * discriminator value for RecurringOrderSetCustomTypeAction + */ + String SET_CUSTOM_TYPE = "setCustomType"; + + /** + *

      Defines the Type that extends the RecurringOrder with Custom Fields. If absent, any existing Type and Custom Fields are removed from the RecurringOrder.

      + * @return type + */ + @Valid + @JsonProperty("type") + public TypeResourceIdentifier getType(); + + /** + *

      Sets the Custom Fields fields for the RecurringOrder.

      + * @return fields + */ + @Valid + @JsonProperty("fields") + public FieldContainer getFields(); + + /** + *

      Defines the Type that extends the RecurringOrder with Custom Fields. If absent, any existing Type and Custom Fields are removed from the RecurringOrder.

      + * @param type value to be set + */ + + public void setType(final TypeResourceIdentifier type); + + /** + *

      Sets the Custom Fields fields for the RecurringOrder.

      + * @param fields value to be set + */ + + public void setFields(final FieldContainer fields); + + /** + * factory method + * @return instance of RecurringOrderSetCustomTypeAction + */ + public static RecurringOrderSetCustomTypeAction of() { + return new RecurringOrderSetCustomTypeActionImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderSetCustomTypeAction + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderSetCustomTypeAction of(final RecurringOrderSetCustomTypeAction template) { + RecurringOrderSetCustomTypeActionImpl instance = new RecurringOrderSetCustomTypeActionImpl(); + instance.setType(template.getType()); + instance.setFields(template.getFields()); + return instance; + } + + public RecurringOrderSetCustomTypeAction copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderSetCustomTypeAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderSetCustomTypeAction deepCopy( + @Nullable final RecurringOrderSetCustomTypeAction template) { + if (template == null) { + return null; + } + RecurringOrderSetCustomTypeActionImpl instance = new RecurringOrderSetCustomTypeActionImpl(); + instance.setType(com.commercetools.api.models.type.TypeResourceIdentifier.deepCopy(template.getType())); + instance.setFields(com.commercetools.api.models.type.FieldContainer.deepCopy(template.getFields())); + return instance; + } + + /** + * builder factory method for RecurringOrderSetCustomTypeAction + * @return builder + */ + public static RecurringOrderSetCustomTypeActionBuilder builder() { + return RecurringOrderSetCustomTypeActionBuilder.of(); + } + + /** + * create builder for RecurringOrderSetCustomTypeAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderSetCustomTypeActionBuilder builder(final RecurringOrderSetCustomTypeAction template) { + return RecurringOrderSetCustomTypeActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderSetCustomTypeAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomTypeActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomTypeActionBuilder.java new file mode 100644 index 00000000000..1be776a4216 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomTypeActionBuilder.java @@ -0,0 +1,160 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderSetCustomTypeActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderSetCustomTypeAction recurringOrderSetCustomTypeAction = RecurringOrderSetCustomTypeAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderSetCustomTypeActionBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.type.TypeResourceIdentifier type; + + @Nullable + private com.commercetools.api.models.type.FieldContainer fields; + + /** + *

      Defines the Type that extends the RecurringOrder with Custom Fields. If absent, any existing Type and Custom Fields are removed from the RecurringOrder.

      + * @param builder function to build the type value + * @return Builder + */ + + public RecurringOrderSetCustomTypeActionBuilder type( + Function builder) { + this.type = builder.apply(com.commercetools.api.models.type.TypeResourceIdentifierBuilder.of()).build(); + return this; + } + + /** + *

      Defines the Type that extends the RecurringOrder with Custom Fields. If absent, any existing Type and Custom Fields are removed from the RecurringOrder.

      + * @param builder function to build the type value + * @return Builder + */ + + public RecurringOrderSetCustomTypeActionBuilder withType( + Function builder) { + this.type = builder.apply(com.commercetools.api.models.type.TypeResourceIdentifierBuilder.of()); + return this; + } + + /** + *

      Defines the Type that extends the RecurringOrder with Custom Fields. If absent, any existing Type and Custom Fields are removed from the RecurringOrder.

      + * @param type value to be set + * @return Builder + */ + + public RecurringOrderSetCustomTypeActionBuilder type( + @Nullable final com.commercetools.api.models.type.TypeResourceIdentifier type) { + this.type = type; + return this; + } + + /** + *

      Sets the Custom Fields fields for the RecurringOrder.

      + * @param builder function to build the fields value + * @return Builder + */ + + public RecurringOrderSetCustomTypeActionBuilder fields( + Function builder) { + this.fields = builder.apply(com.commercetools.api.models.type.FieldContainerBuilder.of()).build(); + return this; + } + + /** + *

      Sets the Custom Fields fields for the RecurringOrder.

      + * @param builder function to build the fields value + * @return Builder + */ + + public RecurringOrderSetCustomTypeActionBuilder withFields( + Function builder) { + this.fields = builder.apply(com.commercetools.api.models.type.FieldContainerBuilder.of()); + return this; + } + + /** + *

      Sets the Custom Fields fields for the RecurringOrder.

      + * @param fields value to be set + * @return Builder + */ + + public RecurringOrderSetCustomTypeActionBuilder fields( + @Nullable final com.commercetools.api.models.type.FieldContainer fields) { + this.fields = fields; + return this; + } + + /** + *

      Defines the Type that extends the RecurringOrder with Custom Fields. If absent, any existing Type and Custom Fields are removed from the RecurringOrder.

      + * @return type + */ + + @Nullable + public com.commercetools.api.models.type.TypeResourceIdentifier getType() { + return this.type; + } + + /** + *

      Sets the Custom Fields fields for the RecurringOrder.

      + * @return fields + */ + + @Nullable + public com.commercetools.api.models.type.FieldContainer getFields() { + return this.fields; + } + + /** + * builds RecurringOrderSetCustomTypeAction with checking for non-null required values + * @return RecurringOrderSetCustomTypeAction + */ + public RecurringOrderSetCustomTypeAction build() { + return new RecurringOrderSetCustomTypeActionImpl(type, fields); + } + + /** + * builds RecurringOrderSetCustomTypeAction without checking for non-null required values + * @return RecurringOrderSetCustomTypeAction + */ + public RecurringOrderSetCustomTypeAction buildUnchecked() { + return new RecurringOrderSetCustomTypeActionImpl(type, fields); + } + + /** + * factory method for an instance of RecurringOrderSetCustomTypeActionBuilder + * @return builder + */ + public static RecurringOrderSetCustomTypeActionBuilder of() { + return new RecurringOrderSetCustomTypeActionBuilder(); + } + + /** + * create builder for RecurringOrderSetCustomTypeAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderSetCustomTypeActionBuilder of(final RecurringOrderSetCustomTypeAction template) { + RecurringOrderSetCustomTypeActionBuilder builder = new RecurringOrderSetCustomTypeActionBuilder(); + builder.type = template.getType(); + builder.fields = template.getFields(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomTypeActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomTypeActionImpl.java new file mode 100644 index 00000000000..b4e89965e6f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomTypeActionImpl.java @@ -0,0 +1,118 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Adding or updating a Custom Type on a Recurring Order generates the RecurringOrderCustomTypeSet Message, removing one generates the RecurringOrderCustomTypeRemoved Message.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderSetCustomTypeActionImpl implements RecurringOrderSetCustomTypeAction, ModelBase { + + private String action; + + private com.commercetools.api.models.type.TypeResourceIdentifier type; + + private com.commercetools.api.models.type.FieldContainer fields; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderSetCustomTypeActionImpl( + @JsonProperty("type") final com.commercetools.api.models.type.TypeResourceIdentifier type, + @JsonProperty("fields") final com.commercetools.api.models.type.FieldContainer fields) { + this.type = type; + this.fields = fields; + this.action = SET_CUSTOM_TYPE; + } + + /** + * create empty instance + */ + public RecurringOrderSetCustomTypeActionImpl() { + this.action = SET_CUSTOM_TYPE; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      Defines the Type that extends the RecurringOrder with Custom Fields. If absent, any existing Type and Custom Fields are removed from the RecurringOrder.

      + */ + + public com.commercetools.api.models.type.TypeResourceIdentifier getType() { + return this.type; + } + + /** + *

      Sets the Custom Fields fields for the RecurringOrder.

      + */ + + public com.commercetools.api.models.type.FieldContainer getFields() { + return this.fields; + } + + public void setType(final com.commercetools.api.models.type.TypeResourceIdentifier type) { + this.type = type; + } + + public void setFields(final com.commercetools.api.models.type.FieldContainer fields) { + this.fields = fields; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderSetCustomTypeActionImpl that = (RecurringOrderSetCustomTypeActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(type, that.type) + .append(fields, that.fields) + .append(action, that.action) + .append(type, that.type) + .append(fields, that.fields) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(type).append(fields).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("type", type) + .append("fields", fields) + .build(); + } + + @Override + public RecurringOrderSetCustomTypeAction copyDeep() { + return RecurringOrderSetCustomTypeAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetKeyAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetKeyAction.java new file mode 100644 index 00000000000..e844ec3eca4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetKeyAction.java @@ -0,0 +1,127 @@ + +package com.commercetools.api.models.recurring_order; + +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; + +/** + *

      This update action generates the RecurringOrderKeySet Message.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderSetKeyAction recurringOrderSetKeyAction = RecurringOrderSetKeyAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("setKey") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderSetKeyActionImpl.class) +public interface RecurringOrderSetKeyAction extends RecurringOrderUpdateAction { + + /** + * discriminator value for RecurringOrderSetKeyAction + */ + String SET_KEY = "setKey"; + + /** + *

      Value to set. If empty, any existing key will be removed.

      + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

      Value to set. If empty, any existing key will be removed.

      + * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of RecurringOrderSetKeyAction + */ + public static RecurringOrderSetKeyAction of() { + return new RecurringOrderSetKeyActionImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderSetKeyAction + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderSetKeyAction of(final RecurringOrderSetKeyAction template) { + RecurringOrderSetKeyActionImpl instance = new RecurringOrderSetKeyActionImpl(); + instance.setKey(template.getKey()); + return instance; + } + + public RecurringOrderSetKeyAction copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderSetKeyAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderSetKeyAction deepCopy(@Nullable final RecurringOrderSetKeyAction template) { + if (template == null) { + return null; + } + RecurringOrderSetKeyActionImpl instance = new RecurringOrderSetKeyActionImpl(); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for RecurringOrderSetKeyAction + * @return builder + */ + public static RecurringOrderSetKeyActionBuilder builder() { + return RecurringOrderSetKeyActionBuilder.of(); + } + + /** + * create builder for RecurringOrderSetKeyAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderSetKeyActionBuilder builder(final RecurringOrderSetKeyAction template) { + return RecurringOrderSetKeyActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderSetKeyAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetKeyActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetKeyActionBuilder.java new file mode 100644 index 00000000000..c37e71b79e9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetKeyActionBuilder.java @@ -0,0 +1,84 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderSetKeyActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderSetKeyAction recurringOrderSetKeyAction = RecurringOrderSetKeyAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderSetKeyActionBuilder implements Builder { + + @Nullable + private String key; + + /** + *

      Value to set. If empty, any existing key will be removed.

      + * @param key value to be set + * @return Builder + */ + + public RecurringOrderSetKeyActionBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

      Value to set. If empty, any existing key will be removed.

      + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + * builds RecurringOrderSetKeyAction with checking for non-null required values + * @return RecurringOrderSetKeyAction + */ + public RecurringOrderSetKeyAction build() { + return new RecurringOrderSetKeyActionImpl(key); + } + + /** + * builds RecurringOrderSetKeyAction without checking for non-null required values + * @return RecurringOrderSetKeyAction + */ + public RecurringOrderSetKeyAction buildUnchecked() { + return new RecurringOrderSetKeyActionImpl(key); + } + + /** + * factory method for an instance of RecurringOrderSetKeyActionBuilder + * @return builder + */ + public static RecurringOrderSetKeyActionBuilder of() { + return new RecurringOrderSetKeyActionBuilder(); + } + + /** + * create builder for RecurringOrderSetKeyAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderSetKeyActionBuilder of(final RecurringOrderSetKeyAction template) { + RecurringOrderSetKeyActionBuilder builder = new RecurringOrderSetKeyActionBuilder(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetKeyActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetKeyActionImpl.java new file mode 100644 index 00000000000..2b7170c50cd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetKeyActionImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      This update action generates the RecurringOrderKeySet Message.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderSetKeyActionImpl implements RecurringOrderSetKeyAction, ModelBase { + + private String action; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderSetKeyActionImpl(@JsonProperty("key") final String key) { + this.key = key; + this.action = SET_KEY; + } + + /** + * create empty instance + */ + public RecurringOrderSetKeyActionImpl() { + this.action = SET_KEY; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      Value to set. If empty, any existing key will be removed.

      + */ + + public String getKey() { + return this.key; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderSetKeyActionImpl that = (RecurringOrderSetKeyActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(key, that.key) + .append(action, that.action) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("key", key) + .build(); + } + + @Override + public RecurringOrderSetKeyAction copyDeep() { + return RecurringOrderSetKeyAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetOrderSkipConfigurationAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetOrderSkipConfigurationAction.java new file mode 100644 index 00000000000..4b7beac2477 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetOrderSkipConfigurationAction.java @@ -0,0 +1,152 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.time.ZonedDateTime; +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.Valid; + +/** + * RecurringOrderSetOrderSkipConfigurationAction + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderSetOrderSkipConfigurationAction recurringOrderSetOrderSkipConfigurationAction = RecurringOrderSetOrderSkipConfigurationAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("setOrderSkipConfiguration") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderSetOrderSkipConfigurationActionImpl.class) +public interface RecurringOrderSetOrderSkipConfigurationAction extends RecurringOrderUpdateAction { + + /** + * discriminator value for RecurringOrderSetOrderSkipConfigurationAction + */ + String SET_ORDER_SKIP_CONFIGURATION = "setOrderSkipConfiguration"; + + /** + *

      Configuration for skipping the next orders of the Recurring Order.

      + * @return skipConfiguration + */ + @Valid + @JsonProperty("skipConfiguration") + public SkipConfigurationDraft getSkipConfiguration(); + + /** + *

      Date and time (UTC) the Recurring Order will resume and start to generate new orders.

      + * @return updatedExpiresAt + */ + + @JsonProperty("updatedExpiresAt") + public ZonedDateTime getUpdatedExpiresAt(); + + /** + *

      Configuration for skipping the next orders of the Recurring Order.

      + * @param skipConfiguration value to be set + */ + + public void setSkipConfiguration(final SkipConfigurationDraft skipConfiguration); + + /** + *

      Date and time (UTC) the Recurring Order will resume and start to generate new orders.

      + * @param updatedExpiresAt value to be set + */ + + public void setUpdatedExpiresAt(final ZonedDateTime updatedExpiresAt); + + /** + * factory method + * @return instance of RecurringOrderSetOrderSkipConfigurationAction + */ + public static RecurringOrderSetOrderSkipConfigurationAction of() { + return new RecurringOrderSetOrderSkipConfigurationActionImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderSetOrderSkipConfigurationAction + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderSetOrderSkipConfigurationAction of( + final RecurringOrderSetOrderSkipConfigurationAction template) { + RecurringOrderSetOrderSkipConfigurationActionImpl instance = new RecurringOrderSetOrderSkipConfigurationActionImpl(); + instance.setSkipConfiguration(template.getSkipConfiguration()); + instance.setUpdatedExpiresAt(template.getUpdatedExpiresAt()); + return instance; + } + + public RecurringOrderSetOrderSkipConfigurationAction copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderSetOrderSkipConfigurationAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderSetOrderSkipConfigurationAction deepCopy( + @Nullable final RecurringOrderSetOrderSkipConfigurationAction template) { + if (template == null) { + return null; + } + RecurringOrderSetOrderSkipConfigurationActionImpl instance = new RecurringOrderSetOrderSkipConfigurationActionImpl(); + instance.setSkipConfiguration(com.commercetools.api.models.recurring_order.SkipConfigurationDraft + .deepCopy(template.getSkipConfiguration())); + instance.setUpdatedExpiresAt(template.getUpdatedExpiresAt()); + return instance; + } + + /** + * builder factory method for RecurringOrderSetOrderSkipConfigurationAction + * @return builder + */ + public static RecurringOrderSetOrderSkipConfigurationActionBuilder builder() { + return RecurringOrderSetOrderSkipConfigurationActionBuilder.of(); + } + + /** + * create builder for RecurringOrderSetOrderSkipConfigurationAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderSetOrderSkipConfigurationActionBuilder builder( + final RecurringOrderSetOrderSkipConfigurationAction template) { + return RecurringOrderSetOrderSkipConfigurationActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderSetOrderSkipConfigurationAction( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetOrderSkipConfigurationActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetOrderSkipConfigurationActionBuilder.java new file mode 100644 index 00000000000..d95e1ca2d69 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetOrderSkipConfigurationActionBuilder.java @@ -0,0 +1,128 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderSetOrderSkipConfigurationActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderSetOrderSkipConfigurationAction recurringOrderSetOrderSkipConfigurationAction = RecurringOrderSetOrderSkipConfigurationAction.builder()
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderSetOrderSkipConfigurationActionBuilder + implements Builder { + + @Nullable + private com.commercetools.api.models.recurring_order.SkipConfigurationDraft skipConfiguration; + + @Nullable + private java.time.ZonedDateTime updatedExpiresAt; + + /** + *

      Configuration for skipping the next orders of the Recurring Order.

      + * @param skipConfiguration value to be set + * @return Builder + */ + + public RecurringOrderSetOrderSkipConfigurationActionBuilder skipConfiguration( + @Nullable final com.commercetools.api.models.recurring_order.SkipConfigurationDraft skipConfiguration) { + this.skipConfiguration = skipConfiguration; + return this; + } + + /** + *

      Configuration for skipping the next orders of the Recurring Order.

      + * @param builder function to build the skipConfiguration value + * @return Builder + */ + + public RecurringOrderSetOrderSkipConfigurationActionBuilder skipConfiguration( + Function> builder) { + this.skipConfiguration = builder + .apply(com.commercetools.api.models.recurring_order.SkipConfigurationDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      Date and time (UTC) the Recurring Order will resume and start to generate new orders.

      + * @param updatedExpiresAt value to be set + * @return Builder + */ + + public RecurringOrderSetOrderSkipConfigurationActionBuilder updatedExpiresAt( + @Nullable final java.time.ZonedDateTime updatedExpiresAt) { + this.updatedExpiresAt = updatedExpiresAt; + return this; + } + + /** + *

      Configuration for skipping the next orders of the Recurring Order.

      + * @return skipConfiguration + */ + + @Nullable + public com.commercetools.api.models.recurring_order.SkipConfigurationDraft getSkipConfiguration() { + return this.skipConfiguration; + } + + /** + *

      Date and time (UTC) the Recurring Order will resume and start to generate new orders.

      + * @return updatedExpiresAt + */ + + @Nullable + public java.time.ZonedDateTime getUpdatedExpiresAt() { + return this.updatedExpiresAt; + } + + /** + * builds RecurringOrderSetOrderSkipConfigurationAction with checking for non-null required values + * @return RecurringOrderSetOrderSkipConfigurationAction + */ + public RecurringOrderSetOrderSkipConfigurationAction build() { + return new RecurringOrderSetOrderSkipConfigurationActionImpl(skipConfiguration, updatedExpiresAt); + } + + /** + * builds RecurringOrderSetOrderSkipConfigurationAction without checking for non-null required values + * @return RecurringOrderSetOrderSkipConfigurationAction + */ + public RecurringOrderSetOrderSkipConfigurationAction buildUnchecked() { + return new RecurringOrderSetOrderSkipConfigurationActionImpl(skipConfiguration, updatedExpiresAt); + } + + /** + * factory method for an instance of RecurringOrderSetOrderSkipConfigurationActionBuilder + * @return builder + */ + public static RecurringOrderSetOrderSkipConfigurationActionBuilder of() { + return new RecurringOrderSetOrderSkipConfigurationActionBuilder(); + } + + /** + * create builder for RecurringOrderSetOrderSkipConfigurationAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderSetOrderSkipConfigurationActionBuilder of( + final RecurringOrderSetOrderSkipConfigurationAction template) { + RecurringOrderSetOrderSkipConfigurationActionBuilder builder = new RecurringOrderSetOrderSkipConfigurationActionBuilder(); + builder.skipConfiguration = template.getSkipConfiguration(); + builder.updatedExpiresAt = template.getUpdatedExpiresAt(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetOrderSkipConfigurationActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetOrderSkipConfigurationActionImpl.java new file mode 100644 index 00000000000..6883d90e5e4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetOrderSkipConfigurationActionImpl.java @@ -0,0 +1,123 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RecurringOrderSetOrderSkipConfigurationAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderSetOrderSkipConfigurationActionImpl + implements RecurringOrderSetOrderSkipConfigurationAction, ModelBase { + + private String action; + + private com.commercetools.api.models.recurring_order.SkipConfigurationDraft skipConfiguration; + + private java.time.ZonedDateTime updatedExpiresAt; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderSetOrderSkipConfigurationActionImpl( + @JsonProperty("skipConfiguration") final com.commercetools.api.models.recurring_order.SkipConfigurationDraft skipConfiguration, + @JsonProperty("updatedExpiresAt") final java.time.ZonedDateTime updatedExpiresAt) { + this.skipConfiguration = skipConfiguration; + this.updatedExpiresAt = updatedExpiresAt; + this.action = SET_ORDER_SKIP_CONFIGURATION; + } + + /** + * create empty instance + */ + public RecurringOrderSetOrderSkipConfigurationActionImpl() { + this.action = SET_ORDER_SKIP_CONFIGURATION; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      Configuration for skipping the next orders of the Recurring Order.

      + */ + + public com.commercetools.api.models.recurring_order.SkipConfigurationDraft getSkipConfiguration() { + return this.skipConfiguration; + } + + /** + *

      Date and time (UTC) the Recurring Order will resume and start to generate new orders.

      + */ + + public java.time.ZonedDateTime getUpdatedExpiresAt() { + return this.updatedExpiresAt; + } + + public void setSkipConfiguration( + final com.commercetools.api.models.recurring_order.SkipConfigurationDraft skipConfiguration) { + this.skipConfiguration = skipConfiguration; + } + + public void setUpdatedExpiresAt(final java.time.ZonedDateTime updatedExpiresAt) { + this.updatedExpiresAt = updatedExpiresAt; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderSetOrderSkipConfigurationActionImpl that = (RecurringOrderSetOrderSkipConfigurationActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(skipConfiguration, that.skipConfiguration) + .append(updatedExpiresAt, that.updatedExpiresAt) + .append(action, that.action) + .append(skipConfiguration, that.skipConfiguration) + .append(updatedExpiresAt, that.updatedExpiresAt) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(skipConfiguration) + .append(updatedExpiresAt) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("skipConfiguration", skipConfiguration) + .append("updatedExpiresAt", updatedExpiresAt) + .build(); + } + + @Override + public RecurringOrderSetOrderSkipConfigurationAction copyDeep() { + return RecurringOrderSetOrderSkipConfigurationAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetScheduleAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetScheduleAction.java new file mode 100644 index 00000000000..8e3a4871dd6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetScheduleAction.java @@ -0,0 +1,134 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      To set the schedule, the Recurring Order must be active, with no active Skip Configuration and with available prices for all Cart items for the new schedule. Setting the schedule generates the RecurringOrderScheduleSet Message.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderSetScheduleAction recurringOrderSetScheduleAction = RecurringOrderSetScheduleAction.builder()
      + *             .recurrencePolicy(recurrencePolicyBuilder -> recurrencePolicyBuilder)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("setSchedule") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderSetScheduleActionImpl.class) +public interface RecurringOrderSetScheduleAction extends RecurringOrderUpdateAction { + + /** + * discriminator value for RecurringOrderSetScheduleAction + */ + String SET_SCHEDULE = "setSchedule"; + + /** + *

      Value to set.

      + * @return recurrencePolicy + */ + @NotNull + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyResourceIdentifier getRecurrencePolicy(); + + /** + *

      Value to set.

      + * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyResourceIdentifier recurrencePolicy); + + /** + * factory method + * @return instance of RecurringOrderSetScheduleAction + */ + public static RecurringOrderSetScheduleAction of() { + return new RecurringOrderSetScheduleActionImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderSetScheduleAction + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderSetScheduleAction of(final RecurringOrderSetScheduleAction template) { + RecurringOrderSetScheduleActionImpl instance = new RecurringOrderSetScheduleActionImpl(); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); + return instance; + } + + public RecurringOrderSetScheduleAction copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderSetScheduleAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderSetScheduleAction deepCopy(@Nullable final RecurringOrderSetScheduleAction template) { + if (template == null) { + return null; + } + RecurringOrderSetScheduleActionImpl instance = new RecurringOrderSetScheduleActionImpl(); + instance.setRecurrencePolicy(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier + .deepCopy(template.getRecurrencePolicy())); + return instance; + } + + /** + * builder factory method for RecurringOrderSetScheduleAction + * @return builder + */ + public static RecurringOrderSetScheduleActionBuilder builder() { + return RecurringOrderSetScheduleActionBuilder.of(); + } + + /** + * create builder for RecurringOrderSetScheduleAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderSetScheduleActionBuilder builder(final RecurringOrderSetScheduleAction template) { + return RecurringOrderSetScheduleActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderSetScheduleAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetScheduleActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetScheduleActionBuilder.java new file mode 100644 index 00000000000..7c7a47641ee --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetScheduleActionBuilder.java @@ -0,0 +1,112 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderSetScheduleActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderSetScheduleAction recurringOrderSetScheduleAction = RecurringOrderSetScheduleAction.builder()
      + *             .recurrencePolicy(recurrencePolicyBuilder -> recurrencePolicyBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderSetScheduleActionBuilder implements Builder { + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy; + + /** + *

      Value to set.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public RecurringOrderSetScheduleActionBuilder recurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

      Value to set.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public RecurringOrderSetScheduleActionBuilder withRecurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of()); + return this; + } + + /** + *

      Value to set.

      + * @param recurrencePolicy value to be set + * @return Builder + */ + + public RecurringOrderSetScheduleActionBuilder recurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + return this; + } + + /** + *

      Value to set.

      + * @return recurrencePolicy + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier getRecurrencePolicy() { + return this.recurrencePolicy; + } + + /** + * builds RecurringOrderSetScheduleAction with checking for non-null required values + * @return RecurringOrderSetScheduleAction + */ + public RecurringOrderSetScheduleAction build() { + Objects.requireNonNull(recurrencePolicy, + RecurringOrderSetScheduleAction.class + ": recurrencePolicy is missing"); + return new RecurringOrderSetScheduleActionImpl(recurrencePolicy); + } + + /** + * builds RecurringOrderSetScheduleAction without checking for non-null required values + * @return RecurringOrderSetScheduleAction + */ + public RecurringOrderSetScheduleAction buildUnchecked() { + return new RecurringOrderSetScheduleActionImpl(recurrencePolicy); + } + + /** + * factory method for an instance of RecurringOrderSetScheduleActionBuilder + * @return builder + */ + public static RecurringOrderSetScheduleActionBuilder of() { + return new RecurringOrderSetScheduleActionBuilder(); + } + + /** + * create builder for RecurringOrderSetScheduleAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderSetScheduleActionBuilder of(final RecurringOrderSetScheduleAction template) { + RecurringOrderSetScheduleActionBuilder builder = new RecurringOrderSetScheduleActionBuilder(); + builder.recurrencePolicy = template.getRecurrencePolicy(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetScheduleActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetScheduleActionImpl.java new file mode 100644 index 00000000000..4d36453c2d0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetScheduleActionImpl.java @@ -0,0 +1,100 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      To set the schedule, the Recurring Order must be active, with no active Skip Configuration and with available prices for all Cart items for the new schedule. Setting the schedule generates the RecurringOrderScheduleSet Message.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderSetScheduleActionImpl implements RecurringOrderSetScheduleAction, ModelBase { + + private String action; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderSetScheduleActionImpl( + @JsonProperty("recurrencePolicy") final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + this.action = SET_SCHEDULE; + } + + /** + * create empty instance + */ + public RecurringOrderSetScheduleActionImpl() { + this.action = SET_SCHEDULE; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      Value to set.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier getRecurrencePolicy() { + return this.recurrencePolicy; + } + + public void setRecurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderSetScheduleActionImpl that = (RecurringOrderSetScheduleActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(recurrencePolicy, that.recurrencePolicy) + .append(action, that.action) + .append(recurrencePolicy, that.recurrencePolicy) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(recurrencePolicy).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("recurrencePolicy", recurrencePolicy) + .build(); + } + + @Override + public RecurringOrderSetScheduleAction copyDeep() { + return RecurringOrderSetScheduleAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStartsAtAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStartsAtAction.java new file mode 100644 index 00000000000..f593b966a3f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStartsAtAction.java @@ -0,0 +1,131 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.time.ZonedDateTime; +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; + +/** + *

      To set the start date and time, the Recurring Order must not have been started yet. Setting the start date and time generates the RecurringOrderStartsAtSet Message.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderSetStartsAtAction recurringOrderSetStartsAtAction = RecurringOrderSetStartsAtAction.builder()
      + *             .startsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("setStartsAt") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderSetStartsAtActionImpl.class) +public interface RecurringOrderSetStartsAtAction extends RecurringOrderUpdateAction { + + /** + * discriminator value for RecurringOrderSetStartsAtAction + */ + String SET_STARTS_AT = "setStartsAt"; + + /** + *

      Date and time (UTC) the Recurring Order should be started. The date and time must be in the future.

      + * @return startsAt + */ + @NotNull + @JsonProperty("startsAt") + public ZonedDateTime getStartsAt(); + + /** + *

      Date and time (UTC) the Recurring Order should be started. The date and time must be in the future.

      + * @param startsAt value to be set + */ + + public void setStartsAt(final ZonedDateTime startsAt); + + /** + * factory method + * @return instance of RecurringOrderSetStartsAtAction + */ + public static RecurringOrderSetStartsAtAction of() { + return new RecurringOrderSetStartsAtActionImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderSetStartsAtAction + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderSetStartsAtAction of(final RecurringOrderSetStartsAtAction template) { + RecurringOrderSetStartsAtActionImpl instance = new RecurringOrderSetStartsAtActionImpl(); + instance.setStartsAt(template.getStartsAt()); + return instance; + } + + public RecurringOrderSetStartsAtAction copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderSetStartsAtAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderSetStartsAtAction deepCopy(@Nullable final RecurringOrderSetStartsAtAction template) { + if (template == null) { + return null; + } + RecurringOrderSetStartsAtActionImpl instance = new RecurringOrderSetStartsAtActionImpl(); + instance.setStartsAt(template.getStartsAt()); + return instance; + } + + /** + * builder factory method for RecurringOrderSetStartsAtAction + * @return builder + */ + public static RecurringOrderSetStartsAtActionBuilder builder() { + return RecurringOrderSetStartsAtActionBuilder.of(); + } + + /** + * create builder for RecurringOrderSetStartsAtAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderSetStartsAtActionBuilder builder(final RecurringOrderSetStartsAtAction template) { + return RecurringOrderSetStartsAtActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderSetStartsAtAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStartsAtActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStartsAtActionBuilder.java new file mode 100644 index 00000000000..5e65ee4d0d6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStartsAtActionBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderSetStartsAtActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderSetStartsAtAction recurringOrderSetStartsAtAction = RecurringOrderSetStartsAtAction.builder()
      + *             .startsAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderSetStartsAtActionBuilder implements Builder { + + private java.time.ZonedDateTime startsAt; + + /** + *

      Date and time (UTC) the Recurring Order should be started. The date and time must be in the future.

      + * @param startsAt value to be set + * @return Builder + */ + + public RecurringOrderSetStartsAtActionBuilder startsAt(final java.time.ZonedDateTime startsAt) { + this.startsAt = startsAt; + return this; + } + + /** + *

      Date and time (UTC) the Recurring Order should be started. The date and time must be in the future.

      + * @return startsAt + */ + + public java.time.ZonedDateTime getStartsAt() { + return this.startsAt; + } + + /** + * builds RecurringOrderSetStartsAtAction with checking for non-null required values + * @return RecurringOrderSetStartsAtAction + */ + public RecurringOrderSetStartsAtAction build() { + Objects.requireNonNull(startsAt, RecurringOrderSetStartsAtAction.class + ": startsAt is missing"); + return new RecurringOrderSetStartsAtActionImpl(startsAt); + } + + /** + * builds RecurringOrderSetStartsAtAction without checking for non-null required values + * @return RecurringOrderSetStartsAtAction + */ + public RecurringOrderSetStartsAtAction buildUnchecked() { + return new RecurringOrderSetStartsAtActionImpl(startsAt); + } + + /** + * factory method for an instance of RecurringOrderSetStartsAtActionBuilder + * @return builder + */ + public static RecurringOrderSetStartsAtActionBuilder of() { + return new RecurringOrderSetStartsAtActionBuilder(); + } + + /** + * create builder for RecurringOrderSetStartsAtAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderSetStartsAtActionBuilder of(final RecurringOrderSetStartsAtAction template) { + RecurringOrderSetStartsAtActionBuilder builder = new RecurringOrderSetStartsAtActionBuilder(); + builder.startsAt = template.getStartsAt(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStartsAtActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStartsAtActionImpl.java new file mode 100644 index 00000000000..82f0597b72e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStartsAtActionImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      To set the start date and time, the Recurring Order must not have been started yet. Setting the start date and time generates the RecurringOrderStartsAtSet Message.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderSetStartsAtActionImpl implements RecurringOrderSetStartsAtAction, ModelBase { + + private String action; + + private java.time.ZonedDateTime startsAt; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderSetStartsAtActionImpl(@JsonProperty("startsAt") final java.time.ZonedDateTime startsAt) { + this.startsAt = startsAt; + this.action = SET_STARTS_AT; + } + + /** + * create empty instance + */ + public RecurringOrderSetStartsAtActionImpl() { + this.action = SET_STARTS_AT; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      Date and time (UTC) the Recurring Order should be started. The date and time must be in the future.

      + */ + + public java.time.ZonedDateTime getStartsAt() { + return this.startsAt; + } + + public void setStartsAt(final java.time.ZonedDateTime startsAt) { + this.startsAt = startsAt; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderSetStartsAtActionImpl that = (RecurringOrderSetStartsAtActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(startsAt, that.startsAt) + .append(action, that.action) + .append(startsAt, that.startsAt) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(startsAt).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("startsAt", startsAt) + .build(); + } + + @Override + public RecurringOrderSetStartsAtAction copyDeep() { + return RecurringOrderSetStartsAtAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStateAction.java new file mode 100644 index 00000000000..4204d60ca3c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStateAction.java @@ -0,0 +1,133 @@ + +package com.commercetools.api.models.recurring_order; + +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.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      Setting the RecurringOrderState generates the RecurringOrderStateChanged Message.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderSetStateAction recurringOrderSetStateAction = RecurringOrderSetStateAction.builder()
      + *             .recurringOrderState(recurringOrderStateBuilder -> recurringOrderStateBuilder)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("setRecurringOrderState") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderSetStateActionImpl.class) +public interface RecurringOrderSetStateAction extends RecurringOrderUpdateAction { + + /** + * discriminator value for RecurringOrderSetStateAction + */ + String SET_RECURRING_ORDER_STATE = "setRecurringOrderState"; + + /** + *

      New state of the RecurringOrder.

      + * @return recurringOrderState + */ + @NotNull + @Valid + @JsonProperty("recurringOrderState") + public RecurringOrderStateDraft getRecurringOrderState(); + + /** + *

      New state of the RecurringOrder.

      + * @param recurringOrderState value to be set + */ + + public void setRecurringOrderState(final RecurringOrderStateDraft recurringOrderState); + + /** + * factory method + * @return instance of RecurringOrderSetStateAction + */ + public static RecurringOrderSetStateAction of() { + return new RecurringOrderSetStateActionImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderSetStateAction + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderSetStateAction of(final RecurringOrderSetStateAction template) { + RecurringOrderSetStateActionImpl instance = new RecurringOrderSetStateActionImpl(); + instance.setRecurringOrderState(template.getRecurringOrderState()); + return instance; + } + + public RecurringOrderSetStateAction copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderSetStateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderSetStateAction deepCopy(@Nullable final RecurringOrderSetStateAction template) { + if (template == null) { + return null; + } + RecurringOrderSetStateActionImpl instance = new RecurringOrderSetStateActionImpl(); + instance.setRecurringOrderState(com.commercetools.api.models.recurring_order.RecurringOrderStateDraft + .deepCopy(template.getRecurringOrderState())); + return instance; + } + + /** + * builder factory method for RecurringOrderSetStateAction + * @return builder + */ + public static RecurringOrderSetStateActionBuilder builder() { + return RecurringOrderSetStateActionBuilder.of(); + } + + /** + * create builder for RecurringOrderSetStateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderSetStateActionBuilder builder(final RecurringOrderSetStateAction template) { + return RecurringOrderSetStateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderSetStateAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStateActionBuilder.java new file mode 100644 index 00000000000..49ecb5a7d8f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStateActionBuilder.java @@ -0,0 +1,99 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderSetStateActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderSetStateAction recurringOrderSetStateAction = RecurringOrderSetStateAction.builder()
      + *             .recurringOrderState(recurringOrderStateBuilder -> recurringOrderStateBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderSetStateActionBuilder implements Builder { + + private com.commercetools.api.models.recurring_order.RecurringOrderStateDraft recurringOrderState; + + /** + *

      New state of the RecurringOrder.

      + * @param recurringOrderState value to be set + * @return Builder + */ + + public RecurringOrderSetStateActionBuilder recurringOrderState( + final com.commercetools.api.models.recurring_order.RecurringOrderStateDraft recurringOrderState) { + this.recurringOrderState = recurringOrderState; + return this; + } + + /** + *

      New state of the RecurringOrder.

      + * @param builder function to build the recurringOrderState value + * @return Builder + */ + + public RecurringOrderSetStateActionBuilder recurringOrderState( + Function> builder) { + this.recurringOrderState = builder + .apply(com.commercetools.api.models.recurring_order.RecurringOrderStateDraftBuilder.of()) + .build(); + return this; + } + + /** + *

      New state of the RecurringOrder.

      + * @return recurringOrderState + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderStateDraft getRecurringOrderState() { + return this.recurringOrderState; + } + + /** + * builds RecurringOrderSetStateAction with checking for non-null required values + * @return RecurringOrderSetStateAction + */ + public RecurringOrderSetStateAction build() { + Objects.requireNonNull(recurringOrderState, + RecurringOrderSetStateAction.class + ": recurringOrderState is missing"); + return new RecurringOrderSetStateActionImpl(recurringOrderState); + } + + /** + * builds RecurringOrderSetStateAction without checking for non-null required values + * @return RecurringOrderSetStateAction + */ + public RecurringOrderSetStateAction buildUnchecked() { + return new RecurringOrderSetStateActionImpl(recurringOrderState); + } + + /** + * factory method for an instance of RecurringOrderSetStateActionBuilder + * @return builder + */ + public static RecurringOrderSetStateActionBuilder of() { + return new RecurringOrderSetStateActionBuilder(); + } + + /** + * create builder for RecurringOrderSetStateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderSetStateActionBuilder of(final RecurringOrderSetStateAction template) { + RecurringOrderSetStateActionBuilder builder = new RecurringOrderSetStateActionBuilder(); + builder.recurringOrderState = template.getRecurringOrderState(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStateActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStateActionImpl.java new file mode 100644 index 00000000000..02931421b16 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStateActionImpl.java @@ -0,0 +1,100 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Setting the RecurringOrderState generates the RecurringOrderStateChanged Message.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderSetStateActionImpl implements RecurringOrderSetStateAction, ModelBase { + + private String action; + + private com.commercetools.api.models.recurring_order.RecurringOrderStateDraft recurringOrderState; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderSetStateActionImpl( + @JsonProperty("recurringOrderState") final com.commercetools.api.models.recurring_order.RecurringOrderStateDraft recurringOrderState) { + this.recurringOrderState = recurringOrderState; + this.action = SET_RECURRING_ORDER_STATE; + } + + /** + * create empty instance + */ + public RecurringOrderSetStateActionImpl() { + this.action = SET_RECURRING_ORDER_STATE; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      New state of the RecurringOrder.

      + */ + + public com.commercetools.api.models.recurring_order.RecurringOrderStateDraft getRecurringOrderState() { + return this.recurringOrderState; + } + + public void setRecurringOrderState( + final com.commercetools.api.models.recurring_order.RecurringOrderStateDraft recurringOrderState) { + this.recurringOrderState = recurringOrderState; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderSetStateActionImpl that = (RecurringOrderSetStateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(recurringOrderState, that.recurringOrderState) + .append(action, that.action) + .append(recurringOrderState, that.recurringOrderState) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(recurringOrderState).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("recurringOrderState", recurringOrderState) + .build(); + } + + @Override + public RecurringOrderSetStateAction copyDeep() { + return RecurringOrderSetStateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderState.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderState.java new file mode 100644 index 00000000000..d8dde30aff0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderState.java @@ -0,0 +1,139 @@ + +package com.commercetools.api.models.recurring_order; + +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; + +/** + *

      Indicates the state of the RecurringOrder.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface RecurringOrderState extends JsonEnum { + + /** +

      The default state of a new RecurringOrder.

      */ + RecurringOrderState ACTIVE = RecurringOrderStateEnum.ACTIVE; + /** +

      Indicates that the RecurringOrder is paused.

      */ + RecurringOrderState PAUSED = RecurringOrderStateEnum.PAUSED; + /** +

      Indicates that the RecurringOrder has expired.

      */ + RecurringOrderState EXPIRED = RecurringOrderStateEnum.EXPIRED; + /** +

      Indicates that the RecurringOrder is canceled.

      */ + RecurringOrderState CANCELED = RecurringOrderStateEnum.CANCELED; + /** +

      Indicates that the process of creating new orders has failed. The field failure stores the error encountered (inventory unavailable, etc). New orders will not be created until the issue is fixed.

      */ + RecurringOrderState FAILED = RecurringOrderStateEnum.FAILED; + + /** + * possible values of RecurringOrderState + */ + enum RecurringOrderStateEnum implements RecurringOrderState { + /** + * Active + */ + ACTIVE("Active"), + + /** + * Paused + */ + PAUSED("Paused"), + + /** + * Expired + */ + EXPIRED("Expired"), + + /** + * Canceled + */ + CANCELED("Canceled"), + + /** + * Failed + */ + FAILED("Failed"); + private final String jsonName; + + private RecurringOrderStateEnum(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 RecurringOrderState + * 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 RecurringOrderState findEnum(String value) { + return findEnumViaJsonName(value).orElse(new RecurringOrderState() { + @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 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 RecurringOrderState[] values() { + return RecurringOrderStateEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderStateDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderStateDraft.java new file mode 100644 index 00000000000..83e94bc764b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderStateDraft.java @@ -0,0 +1,116 @@ + +package com.commercetools.api.models.recurring_order; + +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; + +/** + *

      Defines the new state for the Recurring Order—for possible values, see RecurringOrderActive, RecurringOrderPaused, RecurringOrderExpired, and RecurringOrderCanceled.

      + * + *
      + * Example to create a subtype instance using the builder pattern + *
      + *
      
      + *     RecurringOrderStateDraft recurringOrderStateDraft = RecurringOrderStateDraft.activeBuilder()
      + *             .build()
      + * 
      + *
      + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", defaultImpl = RecurringOrderStateDraftImpl.class, visible = true) +@JsonDeserialize(as = RecurringOrderStateDraftImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface RecurringOrderStateDraft { + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + public RecurringOrderStateDraft copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderStateDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderStateDraft deepCopy(@Nullable final RecurringOrderStateDraft template) { + if (template == null) { + return null; + } + + if (!(template instanceof RecurringOrderStateDraftImpl)) { + return template.copyDeep(); + } + RecurringOrderStateDraftImpl instance = new RecurringOrderStateDraftImpl(); + return instance; + } + + /** + * builder for active subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.RecurringOrderActiveBuilder activeBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderActiveBuilder.of(); + } + + /** + * builder for canceled subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.RecurringOrderCanceledBuilder canceledBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderCanceledBuilder.of(); + } + + /** + * builder for expired subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.RecurringOrderExpiredBuilder expiredBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderExpiredBuilder.of(); + } + + /** + * builder for paused subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.RecurringOrderPausedBuilder pausedBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderPausedBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderStateDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderStateDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderStateDraftBuilder.java new file mode 100644 index 00000000000..59e22ad7f17 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderStateDraftBuilder.java @@ -0,0 +1,38 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderStateDraftBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderStateDraftBuilder { + + public com.commercetools.api.models.recurring_order.RecurringOrderActiveBuilder activeBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderActiveBuilder.of(); + } + + public com.commercetools.api.models.recurring_order.RecurringOrderCanceledBuilder canceledBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderCanceledBuilder.of(); + } + + public com.commercetools.api.models.recurring_order.RecurringOrderExpiredBuilder expiredBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderExpiredBuilder.of(); + } + + public com.commercetools.api.models.recurring_order.RecurringOrderPausedBuilder pausedBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderPausedBuilder.of(); + } + + /** + * factory method for an instance of RecurringOrderStateDraftBuilder + * @return builder + */ + public static RecurringOrderStateDraftBuilder of() { + return new RecurringOrderStateDraftBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderStateDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderStateDraftImpl.java new file mode 100644 index 00000000000..0f9f3a8b2f9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderStateDraftImpl.java @@ -0,0 +1,76 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Defines the new state for the Recurring Order—for possible values, see RecurringOrderActive, RecurringOrderPaused, RecurringOrderExpired, and RecurringOrderCanceled.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderStateDraftImpl implements RecurringOrderStateDraft, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderStateDraftImpl(@JsonProperty("type") final String type) { + this.type = type; + } + + /** + * create empty instance + */ + public RecurringOrderStateDraftImpl() { + } + + /** + * + */ + + public String getType() { + return this.type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderStateDraftImpl that = (RecurringOrderStateDraftImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + + @Override + public RecurringOrderStateDraft copyDeep() { + return RecurringOrderStateDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderTransitionStateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderTransitionStateAction.java new file mode 100644 index 00000000000..891b4788cdb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderTransitionStateAction.java @@ -0,0 +1,153 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.state.StateResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

      If the existing State has set transitions, there must be a direct transition to the new State. If transitions is not set, no validation is performed.

      + *

      This update action produces the Recurring Order State Transition Message.

      + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderTransitionStateAction recurringOrderTransitionStateAction = RecurringOrderTransitionStateAction.builder()
      + *             .state(stateBuilder -> stateBuilder)
      + *             .build()
      + * 
      + *
      + */ +@io.vrap.rmf.base.client.utils.json.SubType("transitionState") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderTransitionStateActionImpl.class) +public interface RecurringOrderTransitionStateAction extends RecurringOrderUpdateAction { + + /** + * discriminator value for RecurringOrderTransitionStateAction + */ + String TRANSITION_STATE = "transitionState"; + + /** + *

      Value to set. If there is no State yet, the new State must be an initial State.

      + * @return state + */ + @NotNull + @Valid + @JsonProperty("state") + public StateResourceIdentifier getState(); + + /** + *

      Set to true to turn off validation.

      + * @return force + */ + + @JsonProperty("force") + public Boolean getForce(); + + /** + *

      Value to set. If there is no State yet, the new State must be an initial State.

      + * @param state value to be set + */ + + public void setState(final StateResourceIdentifier state); + + /** + *

      Set to true to turn off validation.

      + * @param force value to be set + */ + + public void setForce(final Boolean force); + + /** + * factory method + * @return instance of RecurringOrderTransitionStateAction + */ + public static RecurringOrderTransitionStateAction of() { + return new RecurringOrderTransitionStateActionImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderTransitionStateAction + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderTransitionStateAction of(final RecurringOrderTransitionStateAction template) { + RecurringOrderTransitionStateActionImpl instance = new RecurringOrderTransitionStateActionImpl(); + instance.setState(template.getState()); + instance.setForce(template.getForce()); + return instance; + } + + public RecurringOrderTransitionStateAction copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderTransitionStateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderTransitionStateAction deepCopy( + @Nullable final RecurringOrderTransitionStateAction template) { + if (template == null) { + return null; + } + RecurringOrderTransitionStateActionImpl instance = new RecurringOrderTransitionStateActionImpl(); + instance.setState(com.commercetools.api.models.state.StateResourceIdentifier.deepCopy(template.getState())); + instance.setForce(template.getForce()); + return instance; + } + + /** + * builder factory method for RecurringOrderTransitionStateAction + * @return builder + */ + public static RecurringOrderTransitionStateActionBuilder builder() { + return RecurringOrderTransitionStateActionBuilder.of(); + } + + /** + * create builder for RecurringOrderTransitionStateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderTransitionStateActionBuilder builder( + final RecurringOrderTransitionStateAction template) { + return RecurringOrderTransitionStateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderTransitionStateAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderTransitionStateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderTransitionStateActionBuilder.java new file mode 100644 index 00000000000..6cc63ef027e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderTransitionStateActionBuilder.java @@ -0,0 +1,135 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderTransitionStateActionBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderTransitionStateAction recurringOrderTransitionStateAction = RecurringOrderTransitionStateAction.builder()
      + *             .state(stateBuilder -> stateBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderTransitionStateActionBuilder implements Builder { + + private com.commercetools.api.models.state.StateResourceIdentifier state; + + @Nullable + private Boolean force; + + /** + *

      Value to set. If there is no State yet, the new State must be an initial State.

      + * @param builder function to build the state value + * @return Builder + */ + + public RecurringOrderTransitionStateActionBuilder state( + Function builder) { + this.state = builder.apply(com.commercetools.api.models.state.StateResourceIdentifierBuilder.of()).build(); + return this; + } + + /** + *

      Value to set. If there is no State yet, the new State must be an initial State.

      + * @param builder function to build the state value + * @return Builder + */ + + public RecurringOrderTransitionStateActionBuilder withState( + Function builder) { + this.state = builder.apply(com.commercetools.api.models.state.StateResourceIdentifierBuilder.of()); + return this; + } + + /** + *

      Value to set. If there is no State yet, the new State must be an initial State.

      + * @param state value to be set + * @return Builder + */ + + public RecurringOrderTransitionStateActionBuilder state( + final com.commercetools.api.models.state.StateResourceIdentifier state) { + this.state = state; + return this; + } + + /** + *

      Set to true to turn off validation.

      + * @param force value to be set + * @return Builder + */ + + public RecurringOrderTransitionStateActionBuilder force(@Nullable final Boolean force) { + this.force = force; + return this; + } + + /** + *

      Value to set. If there is no State yet, the new State must be an initial State.

      + * @return state + */ + + public com.commercetools.api.models.state.StateResourceIdentifier getState() { + return this.state; + } + + /** + *

      Set to true to turn off validation.

      + * @return force + */ + + @Nullable + public Boolean getForce() { + return this.force; + } + + /** + * builds RecurringOrderTransitionStateAction with checking for non-null required values + * @return RecurringOrderTransitionStateAction + */ + public RecurringOrderTransitionStateAction build() { + Objects.requireNonNull(state, RecurringOrderTransitionStateAction.class + ": state is missing"); + return new RecurringOrderTransitionStateActionImpl(state, force); + } + + /** + * builds RecurringOrderTransitionStateAction without checking for non-null required values + * @return RecurringOrderTransitionStateAction + */ + public RecurringOrderTransitionStateAction buildUnchecked() { + return new RecurringOrderTransitionStateActionImpl(state, force); + } + + /** + * factory method for an instance of RecurringOrderTransitionStateActionBuilder + * @return builder + */ + public static RecurringOrderTransitionStateActionBuilder of() { + return new RecurringOrderTransitionStateActionBuilder(); + } + + /** + * create builder for RecurringOrderTransitionStateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderTransitionStateActionBuilder of(final RecurringOrderTransitionStateAction template) { + RecurringOrderTransitionStateActionBuilder builder = new RecurringOrderTransitionStateActionBuilder(); + builder.state = template.getState(); + builder.force = template.getForce(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderTransitionStateActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderTransitionStateActionImpl.java new file mode 100644 index 00000000000..bbc4c1d987f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderTransitionStateActionImpl.java @@ -0,0 +1,119 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      If the existing State has set transitions, there must be a direct transition to the new State. If transitions is not set, no validation is performed.

      + *

      This update action produces the Recurring Order State Transition Message.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderTransitionStateActionImpl implements RecurringOrderTransitionStateAction, ModelBase { + + private String action; + + private com.commercetools.api.models.state.StateResourceIdentifier state; + + private Boolean force; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderTransitionStateActionImpl( + @JsonProperty("state") final com.commercetools.api.models.state.StateResourceIdentifier state, + @JsonProperty("force") final Boolean force) { + this.state = state; + this.force = force; + this.action = TRANSITION_STATE; + } + + /** + * create empty instance + */ + public RecurringOrderTransitionStateActionImpl() { + this.action = TRANSITION_STATE; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

      Value to set. If there is no State yet, the new State must be an initial State.

      + */ + + public com.commercetools.api.models.state.StateResourceIdentifier getState() { + return this.state; + } + + /** + *

      Set to true to turn off validation.

      + */ + + public Boolean getForce() { + return this.force; + } + + public void setState(final com.commercetools.api.models.state.StateResourceIdentifier state) { + this.state = state; + } + + public void setForce(final Boolean force) { + this.force = force; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderTransitionStateActionImpl that = (RecurringOrderTransitionStateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(state, that.state) + .append(force, that.force) + .append(action, that.action) + .append(state, that.state) + .append(force, that.force) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(state).append(force).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("state", state) + .append("force", force) + .build(); + } + + @Override + public RecurringOrderTransitionStateAction copyDeep() { + return RecurringOrderTransitionStateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdate.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdate.java new file mode 100644 index 00000000000..7483c3834e5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdate.java @@ -0,0 +1,157 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +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.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * RecurringOrderUpdate + * + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderUpdate recurringOrderUpdate = RecurringOrderUpdate.builder()
      + *             .version(0.3)
      + *             .plusActions(actionsBuilder -> actionsBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderUpdateImpl.class) +public interface RecurringOrderUpdate { + + /** + *

      Expected version of the RecurringOrder on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      + * @return version + */ + @NotNull + @JsonProperty("version") + public Long getVersion(); + + /** + *

      Update actions to be performed on the RecurringOrder.

      + * @return actions + */ + @NotNull + @Valid + @JsonProperty("actions") + public List getActions(); + + /** + *

      Expected version of the RecurringOrder on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      + * @param version value to be set + */ + + public void setVersion(final Long version); + + /** + *

      Update actions to be performed on the RecurringOrder.

      + * @param actions values to be set + */ + + @JsonIgnore + public void setActions(final RecurringOrderUpdateAction... actions); + + /** + *

      Update actions to be performed on the RecurringOrder.

      + * @param actions values to be set + */ + + public void setActions(final List actions); + + /** + * factory method + * @return instance of RecurringOrderUpdate + */ + public static RecurringOrderUpdate of() { + return new RecurringOrderUpdateImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderUpdate + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderUpdate of(final RecurringOrderUpdate template) { + RecurringOrderUpdateImpl instance = new RecurringOrderUpdateImpl(); + instance.setVersion(template.getVersion()); + instance.setActions(template.getActions()); + return instance; + } + + public RecurringOrderUpdate copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderUpdate + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderUpdate deepCopy(@Nullable final RecurringOrderUpdate template) { + if (template == null) { + return null; + } + RecurringOrderUpdateImpl instance = new RecurringOrderUpdateImpl(); + instance.setVersion(template.getVersion()); + instance.setActions(Optional.ofNullable(template.getActions()) + .map(t -> t.stream() + .map(com.commercetools.api.models.recurring_order.RecurringOrderUpdateAction::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for RecurringOrderUpdate + * @return builder + */ + public static RecurringOrderUpdateBuilder builder() { + return RecurringOrderUpdateBuilder.of(); + } + + /** + * create builder for RecurringOrderUpdate instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderUpdateBuilder builder(final RecurringOrderUpdate template) { + return RecurringOrderUpdateBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderUpdate(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateAction.java new file mode 100644 index 00000000000..1c71a9c92c4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateAction.java @@ -0,0 +1,149 @@ + +package com.commercetools.api.models.recurring_order; + +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; + +/** + * RecurringOrderUpdateAction + * + *
      + * Example to create a subtype instance using the builder pattern + *
      + *
      
      + *     RecurringOrderUpdateAction recurringOrderUpdateAction = RecurringOrderUpdateAction.setCustomFieldBuilder()
      + *             name("{name}")
      + *             .build()
      + * 
      + *
      + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "action", defaultImpl = RecurringOrderUpdateActionImpl.class, visible = true) +@JsonDeserialize(as = RecurringOrderUpdateActionImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface RecurringOrderUpdateAction { + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + public RecurringOrderUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderUpdateAction deepCopy(@Nullable final RecurringOrderUpdateAction template) { + if (template == null) { + return null; + } + + if (!(template instanceof RecurringOrderUpdateActionImpl)) { + return template.copyDeep(); + } + RecurringOrderUpdateActionImpl instance = new RecurringOrderUpdateActionImpl(); + return instance; + } + + /** + * builder for setCustomField subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.RecurringOrderSetCustomFieldActionBuilder setCustomFieldBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderSetCustomFieldActionBuilder.of(); + } + + /** + * builder for setCustomType subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.RecurringOrderSetCustomTypeActionBuilder setCustomTypeBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderSetCustomTypeActionBuilder.of(); + } + + /** + * builder for setKey subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.RecurringOrderSetKeyActionBuilder setKeyBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderSetKeyActionBuilder.of(); + } + + /** + * builder for setOrderSkipConfiguration subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.RecurringOrderSetOrderSkipConfigurationActionBuilder setOrderSkipConfigurationBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderSetOrderSkipConfigurationActionBuilder.of(); + } + + /** + * builder for setSchedule subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.RecurringOrderSetScheduleActionBuilder setScheduleBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderSetScheduleActionBuilder.of(); + } + + /** + * builder for setStartsAt subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.RecurringOrderSetStartsAtActionBuilder setStartsAtBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderSetStartsAtActionBuilder.of(); + } + + /** + * builder for setRecurringOrderState subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.RecurringOrderSetStateActionBuilder setRecurringOrderStateBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderSetStateActionBuilder.of(); + } + + /** + * builder for transitionState subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.RecurringOrderTransitionStateActionBuilder transitionStateBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderTransitionStateActionBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderUpdateAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateActionBuilder.java new file mode 100644 index 00000000000..cfae1b45320 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateActionBuilder.java @@ -0,0 +1,54 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderUpdateActionBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderUpdateActionBuilder { + + public com.commercetools.api.models.recurring_order.RecurringOrderSetCustomFieldActionBuilder setCustomFieldBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderSetCustomFieldActionBuilder.of(); + } + + public com.commercetools.api.models.recurring_order.RecurringOrderSetCustomTypeActionBuilder setCustomTypeBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderSetCustomTypeActionBuilder.of(); + } + + public com.commercetools.api.models.recurring_order.RecurringOrderSetKeyActionBuilder setKeyBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderSetKeyActionBuilder.of(); + } + + public com.commercetools.api.models.recurring_order.RecurringOrderSetOrderSkipConfigurationActionBuilder setOrderSkipConfigurationBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderSetOrderSkipConfigurationActionBuilder.of(); + } + + public com.commercetools.api.models.recurring_order.RecurringOrderSetScheduleActionBuilder setScheduleBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderSetScheduleActionBuilder.of(); + } + + public com.commercetools.api.models.recurring_order.RecurringOrderSetStartsAtActionBuilder setStartsAtBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderSetStartsAtActionBuilder.of(); + } + + public com.commercetools.api.models.recurring_order.RecurringOrderSetStateActionBuilder setRecurringOrderStateBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderSetStateActionBuilder.of(); + } + + public com.commercetools.api.models.recurring_order.RecurringOrderTransitionStateActionBuilder transitionStateBuilder() { + return com.commercetools.api.models.recurring_order.RecurringOrderTransitionStateActionBuilder.of(); + } + + /** + * factory method for an instance of RecurringOrderUpdateActionBuilder + * @return builder + */ + public static RecurringOrderUpdateActionBuilder of() { + return new RecurringOrderUpdateActionBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateActionImpl.java new file mode 100644 index 00000000000..5ae5db65d06 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateActionImpl.java @@ -0,0 +1,76 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RecurringOrderUpdateAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderUpdateActionImpl implements RecurringOrderUpdateAction, ModelBase { + + private String action; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderUpdateActionImpl(@JsonProperty("action") final String action) { + this.action = action; + } + + /** + * create empty instance + */ + public RecurringOrderUpdateActionImpl() { + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderUpdateActionImpl that = (RecurringOrderUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action).append(action, that.action).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action).build(); + } + + @Override + public RecurringOrderUpdateAction copyDeep() { + return RecurringOrderUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateBuilder.java new file mode 100644 index 00000000000..5d3681e1b69 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateBuilder.java @@ -0,0 +1,166 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderUpdateBuilder + *
      + * Example to create an instance using the builder pattern + *
      + *
      
      + *     RecurringOrderUpdate recurringOrderUpdate = RecurringOrderUpdate.builder()
      + *             .version(0.3)
      + *             .plusActions(actionsBuilder -> actionsBuilder)
      + *             .build()
      + * 
      + *
      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderUpdateBuilder implements Builder { + + private Long version; + + private java.util.List actions; + + /** + *

      Expected version of the RecurringOrder on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      + * @param version value to be set + * @return Builder + */ + + public RecurringOrderUpdateBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

      Update actions to be performed on the RecurringOrder.

      + * @param actions value to be set + * @return Builder + */ + + public RecurringOrderUpdateBuilder actions( + final com.commercetools.api.models.recurring_order.RecurringOrderUpdateAction... actions) { + this.actions = new ArrayList<>(Arrays.asList(actions)); + return this; + } + + /** + *

      Update actions to be performed on the RecurringOrder.

      + * @param actions value to be set + * @return Builder + */ + + public RecurringOrderUpdateBuilder actions( + final java.util.List actions) { + this.actions = actions; + return this; + } + + /** + *

      Update actions to be performed on the RecurringOrder.

      + * @param actions value to be set + * @return Builder + */ + + public RecurringOrderUpdateBuilder plusActions( + final com.commercetools.api.models.recurring_order.RecurringOrderUpdateAction... actions) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions.addAll(Arrays.asList(actions)); + return this; + } + + /** + *

      Update actions to be performed on the RecurringOrder.

      + * @param builder function to build the actions value + * @return Builder + */ + + public RecurringOrderUpdateBuilder plusActions( + Function> builder) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions.add( + builder.apply(com.commercetools.api.models.recurring_order.RecurringOrderUpdateActionBuilder.of()).build()); + return this; + } + + /** + *

      Update actions to be performed on the RecurringOrder.

      + * @param builder function to build the actions value + * @return Builder + */ + + public RecurringOrderUpdateBuilder withActions( + Function> builder) { + this.actions = new ArrayList<>(); + this.actions.add( + builder.apply(com.commercetools.api.models.recurring_order.RecurringOrderUpdateActionBuilder.of()).build()); + return this; + } + + /** + *

      Expected version of the RecurringOrder on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Update actions to be performed on the RecurringOrder.

      + * @return actions + */ + + public java.util.List getActions() { + return this.actions; + } + + /** + * builds RecurringOrderUpdate with checking for non-null required values + * @return RecurringOrderUpdate + */ + public RecurringOrderUpdate build() { + Objects.requireNonNull(version, RecurringOrderUpdate.class + ": version is missing"); + Objects.requireNonNull(actions, RecurringOrderUpdate.class + ": actions is missing"); + return new RecurringOrderUpdateImpl(version, actions); + } + + /** + * builds RecurringOrderUpdate without checking for non-null required values + * @return RecurringOrderUpdate + */ + public RecurringOrderUpdate buildUnchecked() { + return new RecurringOrderUpdateImpl(version, actions); + } + + /** + * factory method for an instance of RecurringOrderUpdateBuilder + * @return builder + */ + public static RecurringOrderUpdateBuilder of() { + return new RecurringOrderUpdateBuilder(); + } + + /** + * create builder for RecurringOrderUpdate instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderUpdateBuilder of(final RecurringOrderUpdate template) { + RecurringOrderUpdateBuilder builder = new RecurringOrderUpdateBuilder(); + builder.version = template.getVersion(); + builder.actions = template.getActions(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateImpl.java new file mode 100644 index 00000000000..4ca59b5e856 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateImpl.java @@ -0,0 +1,107 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RecurringOrderUpdate + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderUpdateImpl implements RecurringOrderUpdate, ModelBase { + + private Long version; + + private java.util.List actions; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderUpdateImpl(@JsonProperty("version") final Long version, + @JsonProperty("actions") final java.util.List actions) { + this.version = version; + this.actions = actions; + } + + /** + * create empty instance + */ + public RecurringOrderUpdateImpl() { + } + + /** + *

      Expected version of the RecurringOrder on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      + */ + + public Long getVersion() { + return this.version; + } + + /** + *

      Update actions to be performed on the RecurringOrder.

      + */ + + public java.util.List getActions() { + return this.actions; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setActions(final com.commercetools.api.models.recurring_order.RecurringOrderUpdateAction... actions) { + this.actions = new ArrayList<>(Arrays.asList(actions)); + } + + public void setActions( + final java.util.List actions) { + this.actions = actions; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderUpdateImpl that = (RecurringOrderUpdateImpl) o; + + return new EqualsBuilder().append(version, that.version) + .append(actions, that.actions) + .append(version, that.version) + .append(actions, that.actions) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(version).append(actions).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("version", version) + .append("actions", actions) + .build(); + } + + @Override + public RecurringOrderUpdate copyDeep() { + return RecurringOrderUpdate.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfiguration.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfiguration.java new file mode 100644 index 00000000000..0775c1acaa8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfiguration.java @@ -0,0 +1,94 @@ + +package com.commercetools.api.models.recurring_order; + +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; + +/** + *

      Defines how the next orders are going to be skipped.

      + * + *
      + * Example to create a subtype instance using the builder pattern + *
      + *
      
      + *     SkipConfiguration skipConfiguration = SkipConfiguration.counterBuilder()
      + *             totalToSkip(1)
      + *             skipped(1)
      + *             .build()
      + * 
      + *
      + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", defaultImpl = SkipConfigurationImpl.class, visible = true) +@JsonDeserialize(as = SkipConfigurationImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface SkipConfiguration { + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + public SkipConfiguration copyDeep(); + + /** + * factory method to create a deep copy of SkipConfiguration + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SkipConfiguration deepCopy(@Nullable final SkipConfiguration template) { + if (template == null) { + return null; + } + + if (!(template instanceof SkipConfigurationImpl)) { + return template.copyDeep(); + } + SkipConfigurationImpl instance = new SkipConfigurationImpl(); + return instance; + } + + /** + * builder for counter subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.CounterBuilder counterBuilder() { + return com.commercetools.api.models.recurring_order.CounterBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSkipConfiguration(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfigurationBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfigurationBuilder.java new file mode 100644 index 00000000000..3ac316cad3d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfigurationBuilder.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SkipConfigurationBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SkipConfigurationBuilder { + + public com.commercetools.api.models.recurring_order.CounterBuilder counterBuilder() { + return com.commercetools.api.models.recurring_order.CounterBuilder.of(); + } + + /** + * factory method for an instance of SkipConfigurationBuilder + * @return builder + */ + public static SkipConfigurationBuilder of() { + return new SkipConfigurationBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfigurationDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfigurationDraft.java new file mode 100644 index 00000000000..52afee1dbb4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfigurationDraft.java @@ -0,0 +1,93 @@ + +package com.commercetools.api.models.recurring_order; + +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; + +/** + *

      Defines how the next orders are going to be skipped.

      + * + *
      + * Example to create a subtype instance using the builder pattern + *
      + *
      
      + *     SkipConfigurationDraft skipConfigurationDraft = SkipConfigurationDraft.counterBuilder()
      + *             totalToSkip(1)
      + *             .build()
      + * 
      + *
      + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", defaultImpl = SkipConfigurationDraftImpl.class, visible = true) +@JsonDeserialize(as = SkipConfigurationDraftImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface SkipConfigurationDraft { + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + public SkipConfigurationDraft copyDeep(); + + /** + * factory method to create a deep copy of SkipConfigurationDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SkipConfigurationDraft deepCopy(@Nullable final SkipConfigurationDraft template) { + if (template == null) { + return null; + } + + if (!(template instanceof SkipConfigurationDraftImpl)) { + return template.copyDeep(); + } + SkipConfigurationDraftImpl instance = new SkipConfigurationDraftImpl(); + return instance; + } + + /** + * builder for counter subtype + * @return builder + */ + public static com.commercetools.api.models.recurring_order.CounterDraftBuilder counterBuilder() { + return com.commercetools.api.models.recurring_order.CounterDraftBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSkipConfigurationDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfigurationDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfigurationDraftBuilder.java new file mode 100644 index 00000000000..744a9cfdb18 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfigurationDraftBuilder.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SkipConfigurationDraftBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SkipConfigurationDraftBuilder { + + public com.commercetools.api.models.recurring_order.CounterDraftBuilder counterBuilder() { + return com.commercetools.api.models.recurring_order.CounterDraftBuilder.of(); + } + + /** + * factory method for an instance of SkipConfigurationDraftBuilder + * @return builder + */ + public static SkipConfigurationDraftBuilder of() { + return new SkipConfigurationDraftBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfigurationDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfigurationDraftImpl.java new file mode 100644 index 00000000000..c9b5cf8a5c3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfigurationDraftImpl.java @@ -0,0 +1,76 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Defines how the next orders are going to be skipped.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SkipConfigurationDraftImpl implements SkipConfigurationDraft, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + SkipConfigurationDraftImpl(@JsonProperty("type") final String type) { + this.type = type; + } + + /** + * create empty instance + */ + public SkipConfigurationDraftImpl() { + } + + /** + * + */ + + public String getType() { + return this.type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SkipConfigurationDraftImpl that = (SkipConfigurationDraftImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + + @Override + public SkipConfigurationDraft copyDeep() { + return SkipConfigurationDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfigurationImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfigurationImpl.java new file mode 100644 index 00000000000..c05c2bdb7a9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurring_order/SkipConfigurationImpl.java @@ -0,0 +1,76 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

      Defines how the next orders are going to be skipped.

      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SkipConfigurationImpl implements SkipConfiguration, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + SkipConfigurationImpl(@JsonProperty("type") final String type) { + this.type = type; + } + + /** + * create empty instance + */ + public SkipConfigurationImpl() { + } + + /** + * + */ + + public String getType() { + return this.type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SkipConfigurationImpl that = (SkipConfigurationImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + + @Override + public SkipConfiguration copyDeep() { + return SkipConfiguration.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePrice.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePrice.java index 277ccac343f..e83eda71a52 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePrice.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePrice.java @@ -17,6 +17,7 @@ import com.commercetools.api.models.common.PriceTier; import com.commercetools.api.models.common.TypedMoney; import com.commercetools.api.models.customer_group.CustomerGroupReference; +import com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference; import com.commercetools.api.models.type.CustomFields; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -207,6 +208,14 @@ public interface StandalonePrice @JsonProperty("active") public Boolean getActive(); + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @return recurrencePolicy + */ + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyReference getRecurrencePolicy(); + /** *

      Unique identifier of the StandalonePrice.

      * @param id value to be set @@ -350,6 +359,13 @@ public interface StandalonePrice public void setActive(final Boolean active); + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyReference recurrencePolicy); + /** * factory method * @return instance of StandalonePrice @@ -384,6 +400,7 @@ public static StandalonePrice of(final StandalonePrice template) { instance.setCustom(template.getCustom()); instance.setStaged(template.getStaged()); instance.setActive(template.getActive()); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); return instance; } @@ -426,6 +443,8 @@ public static StandalonePrice deepCopy(@Nullable final StandalonePrice template) instance.setStaged( com.commercetools.api.models.standalone_price.StagedStandalonePrice.deepCopy(template.getStaged())); instance.setActive(template.getActive()); + instance.setRecurrencePolicy(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference + .deepCopy(template.getRecurrencePolicy())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceBuilder.java index cea453d2485..be482508019 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceBuilder.java @@ -80,6 +80,9 @@ public class StandalonePriceBuilder implements Builder { private Boolean active; + @Nullable + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy; + /** *

      Unique identifier of the StandalonePrice.

      * @param id value to be set @@ -561,6 +564,45 @@ public StandalonePriceBuilder active(final Boolean active) { return this; } + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public StandalonePriceBuilder recurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public StandalonePriceBuilder withRecurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder.of()); + return this; + } + + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @param recurrencePolicy value to be set + * @return Builder + */ + + public StandalonePriceBuilder recurrencePolicy( + @Nullable final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + return this; + } + /** *

      Unique identifier of the StandalonePrice.

      * @return id @@ -745,6 +787,16 @@ public Boolean getActive() { return this.active; } + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @return recurrencePolicy + */ + + @Nullable + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + /** * builds StandalonePrice with checking for non-null required values * @return StandalonePrice @@ -758,7 +810,8 @@ public StandalonePrice build() { Objects.requireNonNull(value, StandalonePrice.class + ": value is missing"); Objects.requireNonNull(active, StandalonePrice.class + ": active is missing"); return new StandalonePriceImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, sku, - value, country, customerGroup, channel, validFrom, validUntil, tiers, discounted, custom, staged, active); + value, country, customerGroup, channel, validFrom, validUntil, tiers, discounted, custom, staged, active, + recurrencePolicy); } /** @@ -767,7 +820,8 @@ public StandalonePrice build() { */ public StandalonePrice buildUnchecked() { return new StandalonePriceImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, sku, - value, country, customerGroup, channel, validFrom, validUntil, tiers, discounted, custom, staged, active); + value, country, customerGroup, channel, validFrom, validUntil, tiers, discounted, custom, staged, active, + recurrencePolicy); } /** @@ -804,6 +858,7 @@ public static StandalonePriceBuilder of(final StandalonePrice template) { builder.custom = template.getCustom(); builder.staged = template.getStaged(); builder.active = template.getActive(); + builder.recurrencePolicy = template.getRecurrencePolicy(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraft.java index ea21f302712..91ac4b02609 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraft.java @@ -14,6 +14,7 @@ import com.commercetools.api.models.common.Money; import com.commercetools.api.models.common.PriceTierDraft; import com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier; +import com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier; import com.commercetools.api.models.type.CustomFieldsDraft; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -133,6 +134,14 @@ public interface StandalonePriceDraft extends com.commercetools.api.models.Custo @JsonProperty("custom") public CustomFieldsDraft getCustom(); + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @return recurrencePolicy + */ + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyResourceIdentifier getRecurrencePolicy(); + /** *

      Staged changes for the StandalonePrice.

      * @return staged @@ -237,6 +246,13 @@ public interface StandalonePriceDraft extends com.commercetools.api.models.Custo public void setCustom(final CustomFieldsDraft custom); + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyResourceIdentifier recurrencePolicy); + /** *

      Staged changes for the StandalonePrice.

      * @param staged value to be set @@ -277,6 +293,7 @@ public static StandalonePriceDraft of(final StandalonePriceDraft template) { instance.setTiers(template.getTiers()); instance.setDiscounted(template.getDiscounted()); instance.setCustom(template.getCustom()); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); instance.setStaged(template.getStaged()); instance.setActive(template.getActive()); return instance; @@ -313,6 +330,8 @@ public static StandalonePriceDraft deepCopy(@Nullable final StandalonePriceDraft instance.setDiscounted( com.commercetools.api.models.common.DiscountedPriceDraft.deepCopy(template.getDiscounted())); instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom())); + instance.setRecurrencePolicy(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier + .deepCopy(template.getRecurrencePolicy())); instance.setStaged( com.commercetools.api.models.standalone_price.StagedPriceDraft.deepCopy(template.getStaged())); instance.setActive(template.getActive()); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraftBuilder.java index 75a81a01f33..f7623d71f48 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraftBuilder.java @@ -56,6 +56,9 @@ public class StandalonePriceDraftBuilder implements BuilderRecurrencePolicy for which this Price is valid.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public StandalonePriceDraftBuilder recurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public StandalonePriceDraftBuilder withRecurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of()); + return this; + } + + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @param recurrencePolicy value to be set + * @return Builder + */ + + public StandalonePriceDraftBuilder recurrencePolicy( + @Nullable final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + return this; + } + /** *

      Staged changes for the StandalonePrice.

      * @param builder function to build the staged value @@ -556,6 +598,16 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { return this.custom; } + /** + *

      RecurrencePolicy for which this Price is valid.

      + * @return recurrencePolicy + */ + + @Nullable + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier getRecurrencePolicy() { + return this.recurrencePolicy; + } + /** *

      Staged changes for the StandalonePrice.

      * @return staged @@ -584,7 +636,7 @@ public StandalonePriceDraft build() { Objects.requireNonNull(sku, StandalonePriceDraft.class + ": sku is missing"); Objects.requireNonNull(value, StandalonePriceDraft.class + ": value is missing"); return new StandalonePriceDraftImpl(key, sku, value, country, customerGroup, channel, validFrom, validUntil, - tiers, discounted, custom, staged, active); + tiers, discounted, custom, recurrencePolicy, staged, active); } /** @@ -593,7 +645,7 @@ public StandalonePriceDraft build() { */ public StandalonePriceDraft buildUnchecked() { return new StandalonePriceDraftImpl(key, sku, value, country, customerGroup, channel, validFrom, validUntil, - tiers, discounted, custom, staged, active); + tiers, discounted, custom, recurrencePolicy, staged, active); } /** @@ -622,6 +674,7 @@ public static StandalonePriceDraftBuilder of(final StandalonePriceDraft template builder.tiers = template.getTiers(); builder.discounted = template.getDiscounted(); builder.custom = template.getCustom(); + builder.recurrencePolicy = template.getRecurrencePolicy(); builder.staged = template.getStaged(); builder.active = template.getActive(); return builder; diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraftImpl.java index 5bc9fb84ea7..ca4fe97add4 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraftImpl.java @@ -44,6 +44,8 @@ public class StandalonePriceDraftImpl implements StandalonePriceDraft, ModelBase private com.commercetools.api.models.type.CustomFieldsDraft custom; + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy; + private com.commercetools.api.models.standalone_price.StagedPriceDraft staged; private Boolean active; @@ -62,6 +64,7 @@ public class StandalonePriceDraftImpl implements StandalonePriceDraft, ModelBase @JsonProperty("tiers") final java.util.List tiers, @JsonProperty("discounted") final com.commercetools.api.models.common.DiscountedPriceDraft discounted, @JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom, + @JsonProperty("recurrencePolicy") final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy, @JsonProperty("staged") final com.commercetools.api.models.standalone_price.StagedPriceDraft staged, @JsonProperty("active") final Boolean active) { this.key = key; @@ -75,6 +78,7 @@ public class StandalonePriceDraftImpl implements StandalonePriceDraft, ModelBase this.tiers = tiers; this.discounted = discounted; this.custom = custom; + this.recurrencePolicy = recurrencePolicy; this.staged = staged; this.active = active; } @@ -175,6 +179,14 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { return this.custom; } + /** + *

      RecurrencePolicy for which this Price is valid.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier getRecurrencePolicy() { + return this.recurrencePolicy; + } + /** *

      Staged changes for the StandalonePrice.

      */ @@ -240,6 +252,11 @@ public void setCustom(final com.commercetools.api.models.type.CustomFieldsDraft this.custom = custom; } + public void setRecurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + public void setStaged(final com.commercetools.api.models.standalone_price.StagedPriceDraft staged) { this.staged = staged; } @@ -269,6 +286,7 @@ public boolean equals(Object o) { .append(tiers, that.tiers) .append(discounted, that.discounted) .append(custom, that.custom) + .append(recurrencePolicy, that.recurrencePolicy) .append(staged, that.staged) .append(active, that.active) .append(key, that.key) @@ -282,6 +300,7 @@ public boolean equals(Object o) { .append(tiers, that.tiers) .append(discounted, that.discounted) .append(custom, that.custom) + .append(recurrencePolicy, that.recurrencePolicy) .append(staged, that.staged) .append(active, that.active) .isEquals(); @@ -300,6 +319,7 @@ public int hashCode() { .append(tiers) .append(discounted) .append(custom) + .append(recurrencePolicy) .append(staged) .append(active) .toHashCode(); @@ -318,6 +338,7 @@ public String toString() { .append("tiers", tiers) .append("discounted", discounted) .append("custom", custom) + .append("recurrencePolicy", recurrencePolicy) .append("staged", staged) .append("active", active) .build(); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceImpl.java index cd411607b28..3d48481c3ff 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceImpl.java @@ -60,6 +60,8 @@ public class StandalonePriceImpl implements StandalonePrice, ModelBase { private Boolean active; + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy; + /** * create instance with all properties */ @@ -80,7 +82,8 @@ public class StandalonePriceImpl implements StandalonePrice, ModelBase { @JsonProperty("discounted") final com.commercetools.api.models.common.DiscountedPrice discounted, @JsonProperty("custom") final com.commercetools.api.models.type.CustomFields custom, @JsonProperty("staged") final com.commercetools.api.models.standalone_price.StagedStandalonePrice staged, - @JsonProperty("active") final Boolean active) { + @JsonProperty("active") final Boolean active, + @JsonProperty("recurrencePolicy") final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { this.id = id; this.version = version; this.createdAt = createdAt; @@ -100,6 +103,7 @@ public class StandalonePriceImpl implements StandalonePrice, ModelBase { this.custom = custom; this.staged = staged; this.active = active; + this.recurrencePolicy = recurrencePolicy; } /** @@ -261,6 +265,14 @@ public Boolean getActive() { return this.active; } + /** + *

      RecurrencePolicy for which this Price is valid.

      + */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + public void setId(final String id) { this.id = id; } @@ -342,6 +354,11 @@ public void setActive(final Boolean active) { this.active = active; } + public void setRecurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + @Override public boolean equals(Object o) { if (this == o) @@ -371,6 +388,7 @@ public boolean equals(Object o) { .append(custom, that.custom) .append(staged, that.staged) .append(active, that.active) + .append(recurrencePolicy, that.recurrencePolicy) .append(id, that.id) .append(version, that.version) .append(createdAt, that.createdAt) @@ -390,6 +408,7 @@ public boolean equals(Object o) { .append(custom, that.custom) .append(staged, that.staged) .append(active, that.active) + .append(recurrencePolicy, that.recurrencePolicy) .isEquals(); } @@ -414,6 +433,7 @@ public int hashCode() { .append(custom) .append(staged) .append(active) + .append(recurrencePolicy) .toHashCode(); } @@ -438,6 +458,7 @@ public String toString() { .append("custom", custom) .append("staged", staged) .append("active", active) + .append("recurrencePolicy", recurrencePolicy) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/state/StateTypeEnum.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/state/StateTypeEnum.java index 5a494b90211..298cba33af7 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/state/StateTypeEnum.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/state/StateTypeEnum.java @@ -20,6 +20,9 @@ public interface StateTypeEnum extends JsonEnum {

      Used by Orders.

      */ StateTypeEnum ORDER_STATE = StateTypeEnumEnum.ORDER_STATE; /** +

      Used by RecurringOrders.

      */ + StateTypeEnum RECURRING_ORDER_STATE = StateTypeEnumEnum.RECURRING_ORDER_STATE; + /**

      Used by LineItems and CustomLineItems in Carts and Orders, with the builtin field always set to true by default. In addition, the initial field is set to true upon creation.

      */ StateTypeEnum LINE_ITEM_STATE = StateTypeEnumEnum.LINE_ITEM_STATE; /** @@ -50,6 +53,11 @@ enum StateTypeEnumEnum implements StateTypeEnum { */ ORDER_STATE("OrderState"), + /** + * RecurringOrderState + */ + RECURRING_ORDER_STATE("RecurringOrderState"), + /** * LineItemState */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/ChangeSubscriptionResourceTypeId.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/ChangeSubscriptionResourceTypeId.java index 676e404a4fa..06b8fcf07f2 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/ChangeSubscriptionResourceTypeId.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/ChangeSubscriptionResourceTypeId.java @@ -98,6 +98,12 @@ public interface ChangeSubscriptionResourceTypeId extends JsonEnum {

      Changes to QuoteRequests.

      */ ChangeSubscriptionResourceTypeId QUOTE_REQUEST = ChangeSubscriptionResourceTypeIdEnum.QUOTE_REQUEST; /** +

      Changes to RecurrencePolicies.

      */ + ChangeSubscriptionResourceTypeId RECURRENCE_POLICY = ChangeSubscriptionResourceTypeIdEnum.RECURRENCE_POLICY; + /** +

      Changes to RecurringOrders.

      */ + ChangeSubscriptionResourceTypeId RECURRING_ORDER = ChangeSubscriptionResourceTypeIdEnum.RECURRING_ORDER; + /**

      Changes to Reviews.

      */ ChangeSubscriptionResourceTypeId REVIEW = ChangeSubscriptionResourceTypeIdEnum.REVIEW; /** @@ -270,6 +276,16 @@ enum ChangeSubscriptionResourceTypeIdEnum implements ChangeSubscriptionResourceT */ QUOTE_REQUEST("quote-request"), + /** + * recurrence-policy + */ + RECURRENCE_POLICY("recurrence-policy"), + + /** + * recurring-order + */ + RECURRING_ORDER("recurring-order"), + /** * review */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/ResourceTypeId.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/ResourceTypeId.java index f96744d9ec0..718c7562ba0 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/ResourceTypeId.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/ResourceTypeId.java @@ -98,6 +98,9 @@ public interface ResourceTypeId extends JsonEnum {

      Review

      */ ResourceTypeId REVIEW = ResourceTypeIdEnum.REVIEW; /** +

      RecurringOrder

      */ + ResourceTypeId RECURRING_ORDER = ResourceTypeIdEnum.RECURRING_ORDER; + /**

      Shipping

      */ ResourceTypeId SHIPPING = ResourceTypeIdEnum.SHIPPING; /** @@ -258,6 +261,11 @@ enum ResourceTypeIdEnum implements ResourceTypeId { */ REVIEW("review"), + /** + * recurring-order + */ + RECURRING_ORDER("recurring-order"), + /** * shipping */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/common/PriceExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/common/PriceExpansionBuilderDsl.java index 88cd8bb843a..dea274d7700 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/common/PriceExpansionBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/common/PriceExpansionBuilderDsl.java @@ -48,4 +48,9 @@ public com.commercetools.api.predicates.expansion.type.CustomFieldsExpansionBuil return com.commercetools.api.predicates.expansion.type.CustomFieldsExpansionBuilderDsl .of(appendOne(path, "custom")); } + + public com.commercetools.api.predicates.expansion.recurrence_policy.RecurrencePolicyReferenceExpansionBuilderDsl recurrencePolicy() { + return com.commercetools.api.predicates.expansion.recurrence_policy.RecurrencePolicyReferenceExpansionBuilderDsl + .of(appendOne(path, "recurrencePolicy")); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/OrderCreatedFromRecurringOrderMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/OrderCreatedFromRecurringOrderMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..8d872d1282a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/OrderCreatedFromRecurringOrderMessageExpansionBuilderDsl.java @@ -0,0 +1,55 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class OrderCreatedFromRecurringOrderMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private OrderCreatedFromRecurringOrderMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static OrderCreatedFromRecurringOrderMessageExpansionBuilderDsl of() { + return new OrderCreatedFromRecurringOrderMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static OrderCreatedFromRecurringOrderMessageExpansionBuilderDsl of(final List path) { + return new OrderCreatedFromRecurringOrderMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } + + public com.commercetools.api.predicates.expansion.order.OrderExpansionBuilderDsl order() { + return com.commercetools.api.predicates.expansion.order.OrderExpansionBuilderDsl.of(appendOne(path, "order")); + } + + public com.commercetools.api.predicates.expansion.recurring_order.RecurringOrderReferenceExpansionBuilderDsl recurringOrderRef() { + return com.commercetools.api.predicates.expansion.recurring_order.RecurringOrderReferenceExpansionBuilderDsl + .of(appendOne(path, "recurringOrderRef")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCreatedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCreatedMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..6e8f9567c0a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCreatedMessageExpansionBuilderDsl.java @@ -0,0 +1,51 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurringOrderCreatedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurringOrderCreatedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurringOrderCreatedMessageExpansionBuilderDsl of() { + return new RecurringOrderCreatedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurringOrderCreatedMessageExpansionBuilderDsl of(final List path) { + return new RecurringOrderCreatedMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } + + public com.commercetools.api.predicates.expansion.recurring_order.RecurringOrderExpansionBuilderDsl order() { + return com.commercetools.api.predicates.expansion.recurring_order.RecurringOrderExpansionBuilderDsl + .of(appendOne(path, "order")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCustomFieldAddedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCustomFieldAddedMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..c1b30b0f71f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCustomFieldAddedMessageExpansionBuilderDsl.java @@ -0,0 +1,50 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurringOrderCustomFieldAddedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurringOrderCustomFieldAddedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurringOrderCustomFieldAddedMessageExpansionBuilderDsl of() { + return new RecurringOrderCustomFieldAddedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurringOrderCustomFieldAddedMessageExpansionBuilderDsl of(final List path) { + return new RecurringOrderCustomFieldAddedMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } + + public com.commercetools.api.predicates.expansion.ObjectExpansionDsl value() { + return com.commercetools.api.predicates.expansion.ObjectExpansionDsl.of(appendOne(path, "value")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCustomFieldChangedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCustomFieldChangedMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..86848a9babd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCustomFieldChangedMessageExpansionBuilderDsl.java @@ -0,0 +1,54 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurringOrderCustomFieldChangedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurringOrderCustomFieldChangedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurringOrderCustomFieldChangedMessageExpansionBuilderDsl of() { + return new RecurringOrderCustomFieldChangedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurringOrderCustomFieldChangedMessageExpansionBuilderDsl of(final List path) { + return new RecurringOrderCustomFieldChangedMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } + + public com.commercetools.api.predicates.expansion.ObjectExpansionDsl value() { + return com.commercetools.api.predicates.expansion.ObjectExpansionDsl.of(appendOne(path, "value")); + } + + public com.commercetools.api.predicates.expansion.ObjectExpansionDsl previousValue() { + return com.commercetools.api.predicates.expansion.ObjectExpansionDsl.of(appendOne(path, "previousValue")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCustomFieldRemovedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCustomFieldRemovedMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..b907a932242 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCustomFieldRemovedMessageExpansionBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurringOrderCustomFieldRemovedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurringOrderCustomFieldRemovedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurringOrderCustomFieldRemovedMessageExpansionBuilderDsl of() { + return new RecurringOrderCustomFieldRemovedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurringOrderCustomFieldRemovedMessageExpansionBuilderDsl of(final List path) { + return new RecurringOrderCustomFieldRemovedMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCustomTypeRemovedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCustomTypeRemovedMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..b1467d6f1f4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCustomTypeRemovedMessageExpansionBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurringOrderCustomTypeRemovedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurringOrderCustomTypeRemovedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurringOrderCustomTypeRemovedMessageExpansionBuilderDsl of() { + return new RecurringOrderCustomTypeRemovedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurringOrderCustomTypeRemovedMessageExpansionBuilderDsl of(final List path) { + return new RecurringOrderCustomTypeRemovedMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCustomTypeSetMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCustomTypeSetMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..3cf7aa97ebc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderCustomTypeSetMessageExpansionBuilderDsl.java @@ -0,0 +1,51 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurringOrderCustomTypeSetMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurringOrderCustomTypeSetMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurringOrderCustomTypeSetMessageExpansionBuilderDsl of() { + return new RecurringOrderCustomTypeSetMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurringOrderCustomTypeSetMessageExpansionBuilderDsl of(final List path) { + return new RecurringOrderCustomTypeSetMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } + + public com.commercetools.api.predicates.expansion.type.CustomFieldsExpansionBuilderDsl customFields() { + return com.commercetools.api.predicates.expansion.type.CustomFieldsExpansionBuilderDsl + .of(appendOne(path, "customFields")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderKeySetMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderKeySetMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..3d8bc6128b1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderKeySetMessageExpansionBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurringOrderKeySetMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurringOrderKeySetMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurringOrderKeySetMessageExpansionBuilderDsl of() { + return new RecurringOrderKeySetMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurringOrderKeySetMessageExpansionBuilderDsl of(final List path) { + return new RecurringOrderKeySetMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderScheduleSetMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderScheduleSetMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..62e65a87521 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderScheduleSetMessageExpansionBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurringOrderScheduleSetMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurringOrderScheduleSetMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurringOrderScheduleSetMessageExpansionBuilderDsl of() { + return new RecurringOrderScheduleSetMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurringOrderScheduleSetMessageExpansionBuilderDsl of(final List path) { + return new RecurringOrderScheduleSetMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderStartsAtSetMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderStartsAtSetMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..ed1ae4d6b0e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderStartsAtSetMessageExpansionBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurringOrderStartsAtSetMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurringOrderStartsAtSetMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurringOrderStartsAtSetMessageExpansionBuilderDsl of() { + return new RecurringOrderStartsAtSetMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurringOrderStartsAtSetMessageExpansionBuilderDsl of(final List path) { + return new RecurringOrderStartsAtSetMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderStateChangedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderStateChangedMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..d811bd97408 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderStateChangedMessageExpansionBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurringOrderStateChangedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurringOrderStateChangedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurringOrderStateChangedMessageExpansionBuilderDsl of() { + return new RecurringOrderStateChangedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurringOrderStateChangedMessageExpansionBuilderDsl of(final List path) { + return new RecurringOrderStateChangedMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderStateTransitionMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderStateTransitionMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..3bfd1262ace --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderStateTransitionMessageExpansionBuilderDsl.java @@ -0,0 +1,56 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurringOrderStateTransitionMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurringOrderStateTransitionMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurringOrderStateTransitionMessageExpansionBuilderDsl of() { + return new RecurringOrderStateTransitionMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurringOrderStateTransitionMessageExpansionBuilderDsl of(final List path) { + return new RecurringOrderStateTransitionMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } + + public com.commercetools.api.predicates.expansion.state.StateReferenceExpansionBuilderDsl state() { + return com.commercetools.api.predicates.expansion.state.StateReferenceExpansionBuilderDsl + .of(appendOne(path, "state")); + } + + public com.commercetools.api.predicates.expansion.state.StateReferenceExpansionBuilderDsl oldState() { + return com.commercetools.api.predicates.expansion.state.StateReferenceExpansionBuilderDsl + .of(appendOne(path, "oldState")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/order/OrderExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/order/OrderExpansionBuilderDsl.java index 3ba229ecb60..cb88a35c0d1 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/order/OrderExpansionBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/order/OrderExpansionBuilderDsl.java @@ -102,6 +102,11 @@ public com.commercetools.api.predicates.expansion.quote.QuoteReferenceExpansionB .of(appendOne(path, "quote")); } + public com.commercetools.api.predicates.expansion.recurring_order.RecurringOrderReferenceExpansionBuilderDsl recurringOrder() { + return com.commercetools.api.predicates.expansion.recurring_order.RecurringOrderReferenceExpansionBuilderDsl + .of(appendOne(path, "recurringOrder")); + } + public com.commercetools.api.predicates.expansion.state.StateReferenceExpansionBuilderDsl state() { return com.commercetools.api.predicates.expansion.state.StateReferenceExpansionBuilderDsl .of(appendOne(path, "state")); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/order_edit/StagedOrderExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/order_edit/StagedOrderExpansionBuilderDsl.java index 82ee4f035eb..c6cb069106e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/order_edit/StagedOrderExpansionBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/order_edit/StagedOrderExpansionBuilderDsl.java @@ -102,6 +102,11 @@ public com.commercetools.api.predicates.expansion.quote.QuoteReferenceExpansionB .of(appendOne(path, "quote")); } + public com.commercetools.api.predicates.expansion.recurring_order.RecurringOrderReferenceExpansionBuilderDsl recurringOrder() { + return com.commercetools.api.predicates.expansion.recurring_order.RecurringOrderReferenceExpansionBuilderDsl + .of(appendOne(path, "recurringOrder")); + } + public com.commercetools.api.predicates.expansion.state.StateReferenceExpansionBuilderDsl state() { return com.commercetools.api.predicates.expansion.state.StateReferenceExpansionBuilderDsl .of(appendOne(path, "state")); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/product/ProductVariantExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/product/ProductVariantExpansionBuilderDsl.java index ee4332150b3..31d82794a1d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/product/ProductVariantExpansionBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/product/ProductVariantExpansionBuilderDsl.java @@ -57,4 +57,14 @@ public com.commercetools.api.predicates.expansion.common.ScopedPriceExpansionBui return com.commercetools.api.predicates.expansion.common.ScopedPriceExpansionBuilderDsl .of(appendOne(path, "scopedPrice")); } + + public com.commercetools.api.predicates.expansion.common.PriceExpansionBuilderDsl recurrencePrices() { + return com.commercetools.api.predicates.expansion.common.PriceExpansionBuilderDsl + .of(appendOne(path, "recurrencePrices[*]")); + } + + public com.commercetools.api.predicates.expansion.common.PriceExpansionBuilderDsl recurrencePrices(long index) { + return com.commercetools.api.predicates.expansion.common.PriceExpansionBuilderDsl + .of(appendOne(path, "recurrencePrices[" + index + "]")); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/recurrence_policy/RecurrencePolicyExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/recurrence_policy/RecurrencePolicyExpansionBuilderDsl.java new file mode 100644 index 00000000000..cb126697e34 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/recurrence_policy/RecurrencePolicyExpansionBuilderDsl.java @@ -0,0 +1,41 @@ + +package com.commercetools.api.predicates.expansion.recurrence_policy; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurrencePolicyExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurrencePolicyExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurrencePolicyExpansionBuilderDsl of() { + return new RecurrencePolicyExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurrencePolicyExpansionBuilderDsl of(final List path) { + return new RecurrencePolicyExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/recurrence_policy/RecurrencePolicyReferenceExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/recurrence_policy/RecurrencePolicyReferenceExpansionBuilderDsl.java new file mode 100644 index 00000000000..c5f9570081b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/recurrence_policy/RecurrencePolicyReferenceExpansionBuilderDsl.java @@ -0,0 +1,36 @@ + +package com.commercetools.api.predicates.expansion.recurrence_policy; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurrencePolicyReferenceExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurrencePolicyReferenceExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurrencePolicyReferenceExpansionBuilderDsl of() { + return new RecurrencePolicyReferenceExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurrencePolicyReferenceExpansionBuilderDsl of(final List path) { + return new RecurrencePolicyReferenceExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.recurrence_policy.RecurrencePolicyExpansionBuilderDsl obj() { + return com.commercetools.api.predicates.expansion.recurrence_policy.RecurrencePolicyExpansionBuilderDsl + .of(appendOne(path, "obj")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/recurring_order/RecurringOrderExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/recurring_order/RecurringOrderExpansionBuilderDsl.java new file mode 100644 index 00000000000..a96b70c0ddb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/recurring_order/RecurringOrderExpansionBuilderDsl.java @@ -0,0 +1,66 @@ + +package com.commercetools.api.predicates.expansion.recurring_order; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurringOrderExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurringOrderExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurringOrderExpansionBuilderDsl of() { + return new RecurringOrderExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurringOrderExpansionBuilderDsl of(final List path) { + return new RecurringOrderExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.cart.CartReferenceExpansionBuilderDsl cart() { + return com.commercetools.api.predicates.expansion.cart.CartReferenceExpansionBuilderDsl + .of(appendOne(path, "cart")); + } + + public com.commercetools.api.predicates.expansion.order.OrderReferenceExpansionBuilderDsl originOrder() { + return com.commercetools.api.predicates.expansion.order.OrderReferenceExpansionBuilderDsl + .of(appendOne(path, "originOrder")); + } + + public com.commercetools.api.predicates.expansion.state.StateReferenceExpansionBuilderDsl state() { + return com.commercetools.api.predicates.expansion.state.StateReferenceExpansionBuilderDsl + .of(appendOne(path, "state")); + } + + public com.commercetools.api.predicates.expansion.customer.CustomerReferenceExpansionBuilderDsl customer() { + return com.commercetools.api.predicates.expansion.customer.CustomerReferenceExpansionBuilderDsl + .of(appendOne(path, "customer")); + } + + public com.commercetools.api.predicates.expansion.type.CustomFieldsExpansionBuilderDsl custom() { + return com.commercetools.api.predicates.expansion.type.CustomFieldsExpansionBuilderDsl + .of(appendOne(path, "custom")); + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/recurring_order/RecurringOrderReferenceExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/recurring_order/RecurringOrderReferenceExpansionBuilderDsl.java new file mode 100644 index 00000000000..c23f7f6a032 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/recurring_order/RecurringOrderReferenceExpansionBuilderDsl.java @@ -0,0 +1,36 @@ + +package com.commercetools.api.predicates.expansion.recurring_order; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurringOrderReferenceExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurringOrderReferenceExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurringOrderReferenceExpansionBuilderDsl of() { + return new RecurringOrderReferenceExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurringOrderReferenceExpansionBuilderDsl of(final List path) { + return new RecurringOrderReferenceExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.recurring_order.RecurringOrderExpansionBuilderDsl obj() { + return com.commercetools.api.predicates.expansion.recurring_order.RecurringOrderExpansionBuilderDsl + .of(appendOne(path, "obj")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/standalone_price/StandalonePriceExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/standalone_price/StandalonePriceExpansionBuilderDsl.java index fa69707209f..d7615b4eeb4 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/standalone_price/StandalonePriceExpansionBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/standalone_price/StandalonePriceExpansionBuilderDsl.java @@ -58,4 +58,9 @@ public com.commercetools.api.predicates.expansion.type.CustomFieldsExpansionBuil return com.commercetools.api.predicates.expansion.type.CustomFieldsExpansionBuilderDsl .of(appendOne(path, "custom")); } + + public com.commercetools.api.predicates.expansion.recurrence_policy.RecurrencePolicyReferenceExpansionBuilderDsl recurrencePolicy() { + return com.commercetools.api.predicates.expansion.recurrence_policy.RecurrencePolicyReferenceExpansionBuilderDsl + .of(appendOne(path, "recurrencePolicy")); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartAddCustomLineItemActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartAddCustomLineItemActionQueryBuilderDsl.java index ef4bb867f3e..fb249f8f56f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartAddCustomLineItemActionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartAddCustomLineItemActionQueryBuilderDsl.java @@ -97,4 +97,14 @@ public StringComparisonPredicateBuilder new CombinationQueryPredicate<>(p, CartAddCustomLineItemActionQueryBuilderDsl::of)); } + public CombinationQueryPredicate recurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrenceInfo")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.CustomLineItemRecurrenceInfoDraftQueryBuilderDsl + .of())), + CartAddCustomLineItemActionQueryBuilderDsl::of); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartAddLineItemActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartAddLineItemActionQueryBuilderDsl.java index 7077c1dbd2e..cbb621dbfd2 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartAddLineItemActionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartAddLineItemActionQueryBuilderDsl.java @@ -132,6 +132,16 @@ public CombinationQueryPredicate shippingD CartAddLineItemActionQueryBuilderDsl::of); } + public CombinationQueryPredicate recurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrenceInfo")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.LineItemRecurrenceInfoDraftQueryBuilderDsl + .of())), + CartAddLineItemActionQueryBuilderDsl::of); + } + public CombinationQueryPredicate custom( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl.java new file mode 100644 index 00000000000..5928bbe9f46 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.predicates.query.cart; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl { + public CartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl() { + } + + public static CartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl of() { + return new CartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, CartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder customLineItemId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("customLineItemId")), + p -> new CombinationQueryPredicate<>(p, CartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder customLineItemKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("customLineItemKey")), + p -> new CombinationQueryPredicate<>(p, CartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate recurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrenceInfo")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.CustomLineItemRecurrenceInfoDraftQueryBuilderDsl + .of())), + CartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartSetLineItemRecurrenceInfoActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartSetLineItemRecurrenceInfoActionQueryBuilderDsl.java new file mode 100644 index 00000000000..d885dd7b219 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartSetLineItemRecurrenceInfoActionQueryBuilderDsl.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.predicates.query.cart; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CartSetLineItemRecurrenceInfoActionQueryBuilderDsl { + public CartSetLineItemRecurrenceInfoActionQueryBuilderDsl() { + } + + public static CartSetLineItemRecurrenceInfoActionQueryBuilderDsl of() { + return new CartSetLineItemRecurrenceInfoActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, CartSetLineItemRecurrenceInfoActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder lineItemId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lineItemId")), + p -> new CombinationQueryPredicate<>(p, CartSetLineItemRecurrenceInfoActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder lineItemKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lineItemKey")), + p -> new CombinationQueryPredicate<>(p, CartSetLineItemRecurrenceInfoActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate recurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrenceInfo")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.LineItemRecurrenceInfoDraftQueryBuilderDsl + .of())), + CartSetLineItemRecurrenceInfoActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartUpdateActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartUpdateActionQueryBuilderDsl.java index 4627290f1dd..da37404be94 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartUpdateActionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CartUpdateActionQueryBuilderDsl.java @@ -288,6 +288,13 @@ public CombinationQueryPredicate asSetCustomLin CartUpdateActionQueryBuilderDsl::of); } + public CombinationQueryPredicate asSetCustomLineItemRecurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.cart.CartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl.of()), + CartUpdateActionQueryBuilderDsl::of); + } + public CombinationQueryPredicate asSetCustomLineItemShippingDetails( Function> fn) { return new CombinationQueryPredicate<>(fn.apply( @@ -419,6 +426,14 @@ public CombinationQueryPredicate asSetLineItemP CartUpdateActionQueryBuilderDsl::of); } + public CombinationQueryPredicate asSetLineItemRecurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.cart.CartSetLineItemRecurrenceInfoActionQueryBuilderDsl.of()), + CartUpdateActionQueryBuilderDsl::of); + } + public CombinationQueryPredicate asSetLineItemShippingDetails( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CustomLineItemDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CustomLineItemDraftQueryBuilderDsl.java index 36cfe58f15f..29226e50c4c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CustomLineItemDraftQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CustomLineItemDraftQueryBuilderDsl.java @@ -91,4 +91,14 @@ public StringComparisonPredicateBuilder pric p -> new CombinationQueryPredicate<>(p, CustomLineItemDraftQueryBuilderDsl::of)); } + public CombinationQueryPredicate recurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrenceInfo")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.CustomLineItemRecurrenceInfoDraftQueryBuilderDsl + .of())), + CustomLineItemDraftQueryBuilderDsl::of); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CustomLineItemQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CustomLineItemQueryBuilderDsl.java index 4e1fbce729e..a54cb21d176 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CustomLineItemQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/CustomLineItemQueryBuilderDsl.java @@ -172,4 +172,14 @@ public StringComparisonPredicateBuilder priceMode p -> new CombinationQueryPredicate<>(p, CustomLineItemQueryBuilderDsl::of)); } + public CombinationQueryPredicate recurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrenceInfo")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.CustomLineItemRecurrenceInfoQueryBuilderDsl + .of())), + CustomLineItemQueryBuilderDsl::of); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/LineItemDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/LineItemDraftQueryBuilderDsl.java index b7ab9fda4a9..026e5954716 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/LineItemDraftQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/LineItemDraftQueryBuilderDsl.java @@ -135,4 +135,14 @@ public CombinationQueryPredicate custom( LineItemDraftQueryBuilderDsl::of); } + public CombinationQueryPredicate recurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrenceInfo")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.LineItemRecurrenceInfoDraftQueryBuilderDsl + .of())), + LineItemDraftQueryBuilderDsl::of); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/LineItemQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/LineItemQueryBuilderDsl.java index a07ba522ebf..689417f5f7b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/LineItemQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/LineItemQueryBuilderDsl.java @@ -236,4 +236,13 @@ public DateTimeComparisonPredicateBuilder lastModifiedA p -> new CombinationQueryPredicate<>(p, LineItemQueryBuilderDsl::of)); } + public CombinationQueryPredicate recurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrenceInfo")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.LineItemRecurrenceInfoQueryBuilderDsl.of())), + LineItemQueryBuilderDsl::of); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/BaseResourceQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/BaseResourceQueryBuilderDsl.java index 0856786f7b9..b74c14caa82 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/BaseResourceQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/BaseResourceQueryBuilderDsl.java @@ -239,6 +239,20 @@ public CombinationQueryPredicate asQuoteRequest( BaseResourceQueryBuilderDsl::of); } + public CombinationQueryPredicate asRecurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyQueryBuilderDsl.of()), + BaseResourceQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrder( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.recurring_order.RecurringOrderQueryBuilderDsl.of()), + BaseResourceQueryBuilderDsl::of); + } + public CombinationQueryPredicate asReview( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/PriceDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/PriceDraftQueryBuilderDsl.java index f93030f9869..638487c3f0e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/PriceDraftQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/PriceDraftQueryBuilderDsl.java @@ -98,4 +98,14 @@ public CombinationQueryPredicate custom( PriceDraftQueryBuilderDsl::of); } + public CombinationQueryPredicate recurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePolicy")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyResourceIdentifierQueryBuilderDsl + .of())), + PriceDraftQueryBuilderDsl::of); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/PriceQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/PriceQueryBuilderDsl.java index 909e19e0548..c039ec0d253 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/PriceQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/PriceQueryBuilderDsl.java @@ -99,4 +99,14 @@ public CombinationQueryPredicate custom( PriceQueryBuilderDsl::of); } + public CombinationQueryPredicate recurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePolicy")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyReferenceQueryBuilderDsl + .of())), + PriceQueryBuilderDsl::of); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ReferenceQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ReferenceQueryBuilderDsl.java index fa451bd67e6..9940743af0a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ReferenceQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ReferenceQueryBuilderDsl.java @@ -218,6 +218,22 @@ public CombinationQueryPredicate asQuoteRequest( ReferenceQueryBuilderDsl::of); } + public CombinationQueryPredicate asRecurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyReferenceQueryBuilderDsl.of()), + ReferenceQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrder( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderReferenceQueryBuilderDsl.of()), + ReferenceQueryBuilderDsl::of); + } + public CombinationQueryPredicate asReview( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ResourceIdentifierQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ResourceIdentifierQueryBuilderDsl.java index f00c50adc6a..8ef35803e44 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ResourceIdentifierQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/common/ResourceIdentifierQueryBuilderDsl.java @@ -182,6 +182,22 @@ public CombinationQueryPredicate asQuote( ResourceIdentifierQueryBuilderDsl::of); } + public CombinationQueryPredicate asRecurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyResourceIdentifierQueryBuilderDsl + .of()), + ResourceIdentifierQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrder( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderResourceIdentifierQueryBuilderDsl + .of()), + ResourceIdentifierQueryBuilderDsl::of); + } + public CombinationQueryPredicate asReview( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartAddLineItemActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartAddLineItemActionQueryBuilderDsl.java index 725be2b49b4..78ae634b89c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartAddLineItemActionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartAddLineItemActionQueryBuilderDsl.java @@ -83,6 +83,16 @@ public CombinationQueryPredicate shippin MyCartAddLineItemActionQueryBuilderDsl::of); } + public CombinationQueryPredicate recurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrenceInfo")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.LineItemRecurrenceInfoDraftQueryBuilderDsl + .of())), + MyCartAddLineItemActionQueryBuilderDsl::of); + } + public CombinationQueryPredicate custom( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl.java new file mode 100644 index 00000000000..906f1469374 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.predicates.query.me; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class MyCartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl { + public MyCartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl() { + } + + public static MyCartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl of() { + return new MyCartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, MyCartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder customLineItemId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("customLineItemId")), + p -> new CombinationQueryPredicate<>(p, MyCartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder customLineItemKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("customLineItemKey")), + p -> new CombinationQueryPredicate<>(p, MyCartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate recurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrenceInfo")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.CustomLineItemRecurrenceInfoDraftQueryBuilderDsl + .of())), + MyCartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartSetLineItemRecurrenceInfoActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartSetLineItemRecurrenceInfoActionQueryBuilderDsl.java new file mode 100644 index 00000000000..b2fc08bd348 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartSetLineItemRecurrenceInfoActionQueryBuilderDsl.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.predicates.query.me; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class MyCartSetLineItemRecurrenceInfoActionQueryBuilderDsl { + public MyCartSetLineItemRecurrenceInfoActionQueryBuilderDsl() { + } + + public static MyCartSetLineItemRecurrenceInfoActionQueryBuilderDsl of() { + return new MyCartSetLineItemRecurrenceInfoActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, MyCartSetLineItemRecurrenceInfoActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder lineItemId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lineItemId")), + p -> new CombinationQueryPredicate<>(p, MyCartSetLineItemRecurrenceInfoActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder lineItemKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lineItemKey")), + p -> new CombinationQueryPredicate<>(p, MyCartSetLineItemRecurrenceInfoActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate recurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrenceInfo")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.LineItemRecurrenceInfoDraftQueryBuilderDsl + .of())), + MyCartSetLineItemRecurrenceInfoActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartUpdateActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartUpdateActionQueryBuilderDsl.java index 58365b49cbb..2c78f7015ba 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartUpdateActionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyCartUpdateActionQueryBuilderDsl.java @@ -140,6 +140,13 @@ public CombinationQueryPredicate asSetCustomF MyCartUpdateActionQueryBuilderDsl::of); } + public CombinationQueryPredicate asSetCustomLineItemRecurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.me.MyCartSetCustomLineItemRecurrenceInfoActionQueryBuilderDsl.of()), + MyCartUpdateActionQueryBuilderDsl::of); + } + public CombinationQueryPredicate asSetCustomType( Function> fn) { return new CombinationQueryPredicate<>( @@ -183,6 +190,14 @@ public CombinationQueryPredicate asSetLineIte MyCartUpdateActionQueryBuilderDsl::of); } + public CombinationQueryPredicate asSetLineItemRecurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.me.MyCartSetLineItemRecurrenceInfoActionQueryBuilderDsl.of()), + MyCartUpdateActionQueryBuilderDsl::of); + } + public CombinationQueryPredicate asSetLineItemShippingDetails( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyLineItemDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyLineItemDraftQueryBuilderDsl.java index efba6930845..e1e9d955891 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyLineItemDraftQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/me/MyLineItemDraftQueryBuilderDsl.java @@ -77,6 +77,16 @@ public CombinationQueryPredicate shippingDetails MyLineItemDraftQueryBuilderDsl::of); } + public CombinationQueryPredicate recurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrenceInfo")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.LineItemRecurrenceInfoDraftQueryBuilderDsl + .of())), + MyLineItemDraftQueryBuilderDsl::of); + } + public CombinationQueryPredicate custom( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java index 2e107ffce02..41e06b094be 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java @@ -1517,6 +1517,99 @@ public CombinationQueryPredicate asQuoteStateTran MessagePayloadQueryBuilderDsl::of); } + public CombinationQueryPredicate asRecurringOrderCreated( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderCreatedMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderCustomFieldAdded( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderCustomFieldAddedMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderCustomFieldChanged( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderCustomFieldChangedMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderCustomFieldRemoved( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderCustomFieldRemovedMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderCustomTypeRemoved( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderCustomTypeRemovedMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderCustomTypeSet( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderCustomTypeSetMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderKeySet( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderKeySetMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderMessagePayload( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.RecurringOrderMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderScheduleSet( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderScheduleSetMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderStartsAtSet( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderStartsAtSetMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderStateChanged( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderStateChangedMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderStateTransition( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderStateTransitionMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + public CombinationQueryPredicate asReviewCreated( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java index de3edcfd03d..e8935cd86cf 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java @@ -1523,6 +1523,87 @@ public CombinationQueryPredicate asQuoteStateTransition( MessageQueryBuilderDsl::of); } + public CombinationQueryPredicate asRecurringOrderCreated( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.RecurringOrderCreatedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderCustomFieldAdded( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderCustomFieldAddedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderCustomFieldChanged( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderCustomFieldChangedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderCustomFieldRemoved( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderCustomTypeRemoved( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderCustomTypeSet( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderCustomTypeSetMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderKeySet( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.RecurringOrderKeySetMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderScheduleSet( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderScheduleSetMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderStartsAtSet( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderStartsAtSetMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderStateChanged( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderStateChangedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRecurringOrderStateTransition( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderStateTransitionMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + public CombinationQueryPredicate asReviewCreated( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderCreatedFromRecurringOrderMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderCreatedFromRecurringOrderMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..1aebb464894 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderCreatedFromRecurringOrderMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,41 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class OrderCreatedFromRecurringOrderMessagePayloadQueryBuilderDsl { + public OrderCreatedFromRecurringOrderMessagePayloadQueryBuilderDsl() { + } + + public static OrderCreatedFromRecurringOrderMessagePayloadQueryBuilderDsl of() { + return new OrderCreatedFromRecurringOrderMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, OrderCreatedFromRecurringOrderMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate order( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("order")) + .inner(fn.apply(com.commercetools.api.predicates.query.order.OrderQueryBuilderDsl.of())), + OrderCreatedFromRecurringOrderMessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate recurringOrderRef( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurringOrderRef")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderReferenceQueryBuilderDsl + .of())), + OrderCreatedFromRecurringOrderMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderCreatedFromRecurringOrderMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderCreatedFromRecurringOrderMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..343bd9febff --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderCreatedFromRecurringOrderMessageQueryBuilderDsl.java @@ -0,0 +1,113 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class OrderCreatedFromRecurringOrderMessageQueryBuilderDsl { + public OrderCreatedFromRecurringOrderMessageQueryBuilderDsl() { + } + + public static OrderCreatedFromRecurringOrderMessageQueryBuilderDsl of() { + return new OrderCreatedFromRecurringOrderMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, OrderCreatedFromRecurringOrderMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, OrderCreatedFromRecurringOrderMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, OrderCreatedFromRecurringOrderMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, OrderCreatedFromRecurringOrderMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + OrderCreatedFromRecurringOrderMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + OrderCreatedFromRecurringOrderMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, OrderCreatedFromRecurringOrderMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + OrderCreatedFromRecurringOrderMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, OrderCreatedFromRecurringOrderMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, OrderCreatedFromRecurringOrderMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + OrderCreatedFromRecurringOrderMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate order( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("order")) + .inner(fn.apply(com.commercetools.api.predicates.query.order.OrderQueryBuilderDsl.of())), + OrderCreatedFromRecurringOrderMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate recurringOrderRef( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurringOrderRef")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderReferenceQueryBuilderDsl + .of())), + OrderCreatedFromRecurringOrderMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderMessagePayloadQueryBuilderDsl.java index ce8acac8902..1569cb3b893 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderMessagePayloadQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderMessagePayloadQueryBuilderDsl.java @@ -117,6 +117,14 @@ public CombinationQueryPredicate asOrderBusi OrderMessagePayloadQueryBuilderDsl::of); } + public CombinationQueryPredicate asOrderCreatedFromRecurringOrder( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.OrderCreatedFromRecurringOrderMessagePayloadQueryBuilderDsl + .of()), + OrderMessagePayloadQueryBuilderDsl::of); + } + public CombinationQueryPredicate asOrderCreated( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderMessageQueryBuilderDsl.java index e50bdf6b1c6..31aa80adb56 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderMessageQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderMessageQueryBuilderDsl.java @@ -186,6 +186,13 @@ public CombinationQueryPredicate asOrderBusinessUni OrderMessageQueryBuilderDsl::of); } + public CombinationQueryPredicate asOrderCreatedFromRecurringOrder( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.OrderCreatedFromRecurringOrderMessageQueryBuilderDsl.of()), + OrderMessageQueryBuilderDsl::of); + } + public CombinationQueryPredicate asOrderCreated( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCreatedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCreatedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..c25a1d4d745 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCreatedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderCreatedMessagePayloadQueryBuilderDsl { + public RecurringOrderCreatedMessagePayloadQueryBuilderDsl() { + } + + public static RecurringOrderCreatedMessagePayloadQueryBuilderDsl of() { + return new RecurringOrderCreatedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCreatedMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate order( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("order")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderQueryBuilderDsl.of())), + RecurringOrderCreatedMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCreatedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCreatedMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..e478e9894f5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCreatedMessageQueryBuilderDsl.java @@ -0,0 +1,104 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderCreatedMessageQueryBuilderDsl { + public RecurringOrderCreatedMessageQueryBuilderDsl() { + } + + public static RecurringOrderCreatedMessageQueryBuilderDsl of() { + return new RecurringOrderCreatedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCreatedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCreatedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCreatedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCreatedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + RecurringOrderCreatedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + RecurringOrderCreatedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCreatedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + RecurringOrderCreatedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCreatedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCreatedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + RecurringOrderCreatedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate order( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("order")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderQueryBuilderDsl.of())), + RecurringOrderCreatedMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldAddedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldAddedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..3e3e89fddec --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldAddedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.message; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderCustomFieldAddedMessagePayloadQueryBuilderDsl { + public RecurringOrderCustomFieldAddedMessagePayloadQueryBuilderDsl() { + } + + public static RecurringOrderCustomFieldAddedMessagePayloadQueryBuilderDsl of() { + return new RecurringOrderCustomFieldAddedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldAddedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldAddedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder value() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldAddedMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldAddedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldAddedMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..3c96d77e7a2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldAddedMessageQueryBuilderDsl.java @@ -0,0 +1,106 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderCustomFieldAddedMessageQueryBuilderDsl { + public RecurringOrderCustomFieldAddedMessageQueryBuilderDsl() { + } + + public static RecurringOrderCustomFieldAddedMessageQueryBuilderDsl of() { + return new RecurringOrderCustomFieldAddedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + RecurringOrderCustomFieldAddedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + RecurringOrderCustomFieldAddedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + RecurringOrderCustomFieldAddedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + RecurringOrderCustomFieldAddedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder value() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldAddedMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldChangedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldChangedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..784ddb4a393 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldChangedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,38 @@ + +package com.commercetools.api.predicates.query.message; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderCustomFieldChangedMessagePayloadQueryBuilderDsl { + public RecurringOrderCustomFieldChangedMessagePayloadQueryBuilderDsl() { + } + + public static RecurringOrderCustomFieldChangedMessagePayloadQueryBuilderDsl of() { + return new RecurringOrderCustomFieldChangedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldChangedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldChangedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder value() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldChangedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder previousValue() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("previousValue")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldChangedMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldChangedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldChangedMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..4776ee23cc4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldChangedMessageQueryBuilderDsl.java @@ -0,0 +1,112 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderCustomFieldChangedMessageQueryBuilderDsl { + public RecurringOrderCustomFieldChangedMessageQueryBuilderDsl() { + } + + public static RecurringOrderCustomFieldChangedMessageQueryBuilderDsl of() { + return new RecurringOrderCustomFieldChangedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + RecurringOrderCustomFieldChangedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + RecurringOrderCustomFieldChangedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + RecurringOrderCustomFieldChangedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + RecurringOrderCustomFieldChangedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder value() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder previousValue() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("previousValue")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldChangedMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldRemovedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldRemovedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..acce298708d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldRemovedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.message; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderCustomFieldRemovedMessagePayloadQueryBuilderDsl { + public RecurringOrderCustomFieldRemovedMessagePayloadQueryBuilderDsl() { + } + + public static RecurringOrderCustomFieldRemovedMessagePayloadQueryBuilderDsl of() { + return new RecurringOrderCustomFieldRemovedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldRemovedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldRemovedMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..8c24cee71b7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl.java @@ -0,0 +1,100 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl { + public RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl() { + } + + public static RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl of() { + return new RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomTypeRemovedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomTypeRemovedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..972d9b89d4c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomTypeRemovedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.message; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderCustomTypeRemovedMessagePayloadQueryBuilderDsl { + public RecurringOrderCustomTypeRemovedMessagePayloadQueryBuilderDsl() { + } + + public static RecurringOrderCustomTypeRemovedMessagePayloadQueryBuilderDsl of() { + return new RecurringOrderCustomTypeRemovedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeRemovedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder previousTypeId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("previousTypeId")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeRemovedMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..d1201fac555 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl.java @@ -0,0 +1,100 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl { + public RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl() { + } + + public static RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl of() { + return new RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder previousTypeId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("previousTypeId")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeRemovedMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomTypeSetMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomTypeSetMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..b7d7814f421 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomTypeSetMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderCustomTypeSetMessagePayloadQueryBuilderDsl { + public RecurringOrderCustomTypeSetMessagePayloadQueryBuilderDsl() { + } + + public static RecurringOrderCustomTypeSetMessagePayloadQueryBuilderDsl of() { + return new RecurringOrderCustomTypeSetMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeSetMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate customFields( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("customFields")) + .inner(fn.apply(com.commercetools.api.predicates.query.type.CustomFieldsQueryBuilderDsl.of())), + RecurringOrderCustomTypeSetMessagePayloadQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder previousTypeId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("previousTypeId")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeSetMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomTypeSetMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomTypeSetMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..6d361302605 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderCustomTypeSetMessageQueryBuilderDsl.java @@ -0,0 +1,109 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderCustomTypeSetMessageQueryBuilderDsl { + public RecurringOrderCustomTypeSetMessageQueryBuilderDsl() { + } + + public static RecurringOrderCustomTypeSetMessageQueryBuilderDsl of() { + return new RecurringOrderCustomTypeSetMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeSetMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + RecurringOrderCustomTypeSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + RecurringOrderCustomTypeSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + RecurringOrderCustomTypeSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeSetMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + RecurringOrderCustomTypeSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate customFields( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("customFields")) + .inner(fn.apply(com.commercetools.api.predicates.query.type.CustomFieldsQueryBuilderDsl.of())), + RecurringOrderCustomTypeSetMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder previousTypeId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("previousTypeId")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCustomTypeSetMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderKeySetMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderKeySetMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..cb23f1aadbb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderKeySetMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.predicates.query.message; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderKeySetMessagePayloadQueryBuilderDsl { + public RecurringOrderKeySetMessagePayloadQueryBuilderDsl() { + } + + public static RecurringOrderKeySetMessagePayloadQueryBuilderDsl of() { + return new RecurringOrderKeySetMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderKeySetMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderKeySetMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder oldKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldKey")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderKeySetMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderKeySetMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderKeySetMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..18b2ff35758 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderKeySetMessageQueryBuilderDsl.java @@ -0,0 +1,105 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderKeySetMessageQueryBuilderDsl { + public RecurringOrderKeySetMessageQueryBuilderDsl() { + } + + public static RecurringOrderKeySetMessageQueryBuilderDsl of() { + return new RecurringOrderKeySetMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderKeySetMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderKeySetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderKeySetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderKeySetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + RecurringOrderKeySetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + RecurringOrderKeySetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderKeySetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + RecurringOrderKeySetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderKeySetMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderKeySetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + RecurringOrderKeySetMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderKeySetMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder oldKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldKey")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderKeySetMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..9dded91e054 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,20 @@ + +package com.commercetools.api.predicates.query.message; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderMessagePayloadQueryBuilderDsl { + public RecurringOrderMessagePayloadQueryBuilderDsl() { + } + + public static RecurringOrderMessagePayloadQueryBuilderDsl of() { + return new RecurringOrderMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderScheduleSetMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderScheduleSetMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..148124af578 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderScheduleSetMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,42 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderScheduleSetMessagePayloadQueryBuilderDsl { + public RecurringOrderScheduleSetMessagePayloadQueryBuilderDsl() { + } + + public static RecurringOrderScheduleSetMessagePayloadQueryBuilderDsl of() { + return new RecurringOrderScheduleSetMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderScheduleSetMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate recurrencePolicySchedule( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePolicySchedule")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyScheduleQueryBuilderDsl + .of())), + RecurringOrderScheduleSetMessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate oldRecurrencePolicySchedule( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("oldRecurrencePolicySchedule")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyScheduleQueryBuilderDsl + .of())), + RecurringOrderScheduleSetMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderScheduleSetMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderScheduleSetMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..58469d0e942 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderScheduleSetMessageQueryBuilderDsl.java @@ -0,0 +1,114 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderScheduleSetMessageQueryBuilderDsl { + public RecurringOrderScheduleSetMessageQueryBuilderDsl() { + } + + public static RecurringOrderScheduleSetMessageQueryBuilderDsl of() { + return new RecurringOrderScheduleSetMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderScheduleSetMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderScheduleSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderScheduleSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderScheduleSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + RecurringOrderScheduleSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + RecurringOrderScheduleSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderScheduleSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + RecurringOrderScheduleSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderScheduleSetMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderScheduleSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + RecurringOrderScheduleSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate recurrencePolicySchedule( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePolicySchedule")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyScheduleQueryBuilderDsl + .of())), + RecurringOrderScheduleSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate oldRecurrencePolicySchedule( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("oldRecurrencePolicySchedule")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyScheduleQueryBuilderDsl + .of())), + RecurringOrderScheduleSetMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStartsAtSetMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStartsAtSetMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..d24719c1ab9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStartsAtSetMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.message; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderStartsAtSetMessagePayloadQueryBuilderDsl { + public RecurringOrderStartsAtSetMessagePayloadQueryBuilderDsl() { + } + + public static RecurringOrderStartsAtSetMessagePayloadQueryBuilderDsl of() { + return new RecurringOrderStartsAtSetMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStartsAtSetMessagePayloadQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder startsAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("startsAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStartsAtSetMessagePayloadQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder oldStartsAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldStartsAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStartsAtSetMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStartsAtSetMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStartsAtSetMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..859adc11edd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStartsAtSetMessageQueryBuilderDsl.java @@ -0,0 +1,106 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderStartsAtSetMessageQueryBuilderDsl { + public RecurringOrderStartsAtSetMessageQueryBuilderDsl() { + } + + public static RecurringOrderStartsAtSetMessageQueryBuilderDsl of() { + return new RecurringOrderStartsAtSetMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStartsAtSetMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStartsAtSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStartsAtSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStartsAtSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + RecurringOrderStartsAtSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + RecurringOrderStartsAtSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStartsAtSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + RecurringOrderStartsAtSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStartsAtSetMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStartsAtSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + RecurringOrderStartsAtSetMessageQueryBuilderDsl::of); + } + + public DateTimeComparisonPredicateBuilder startsAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("startsAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStartsAtSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder oldStartsAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldStartsAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStartsAtSetMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStateChangedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStateChangedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..6c69cb6dc56 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStateChangedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.message; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderStateChangedMessagePayloadQueryBuilderDsl { + public RecurringOrderStateChangedMessagePayloadQueryBuilderDsl() { + } + + public static RecurringOrderStateChangedMessagePayloadQueryBuilderDsl of() { + return new RecurringOrderStateChangedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateChangedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder state() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("state")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateChangedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder oldState() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldState")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateChangedMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStateChangedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStateChangedMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..67132e2f6b7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStateChangedMessageQueryBuilderDsl.java @@ -0,0 +1,106 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderStateChangedMessageQueryBuilderDsl { + public RecurringOrderStateChangedMessageQueryBuilderDsl() { + } + + public static RecurringOrderStateChangedMessageQueryBuilderDsl of() { + return new RecurringOrderStateChangedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateChangedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateChangedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateChangedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateChangedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + RecurringOrderStateChangedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + RecurringOrderStateChangedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateChangedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + RecurringOrderStateChangedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateChangedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateChangedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + RecurringOrderStateChangedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder state() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("state")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateChangedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder oldState() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldState")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateChangedMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStateTransitionMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStateTransitionMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..247b176d0cb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStateTransitionMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderStateTransitionMessagePayloadQueryBuilderDsl { + public RecurringOrderStateTransitionMessagePayloadQueryBuilderDsl() { + } + + public static RecurringOrderStateTransitionMessagePayloadQueryBuilderDsl of() { + return new RecurringOrderStateTransitionMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateTransitionMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate state( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("state")) + .inner(fn.apply(com.commercetools.api.predicates.query.state.StateReferenceQueryBuilderDsl.of())), + RecurringOrderStateTransitionMessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate oldState( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("oldState")) + .inner(fn.apply(com.commercetools.api.predicates.query.state.StateReferenceQueryBuilderDsl.of())), + RecurringOrderStateTransitionMessagePayloadQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder force() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("force")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateTransitionMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStateTransitionMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStateTransitionMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..8416b553602 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderStateTransitionMessageQueryBuilderDsl.java @@ -0,0 +1,118 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderStateTransitionMessageQueryBuilderDsl { + public RecurringOrderStateTransitionMessageQueryBuilderDsl() { + } + + public static RecurringOrderStateTransitionMessageQueryBuilderDsl of() { + return new RecurringOrderStateTransitionMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateTransitionMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateTransitionMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateTransitionMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateTransitionMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + RecurringOrderStateTransitionMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + RecurringOrderStateTransitionMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateTransitionMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + RecurringOrderStateTransitionMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateTransitionMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateTransitionMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + RecurringOrderStateTransitionMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate state( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("state")) + .inner(fn.apply(com.commercetools.api.predicates.query.state.StateReferenceQueryBuilderDsl.of())), + RecurringOrderStateTransitionMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate oldState( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("oldState")) + .inner(fn.apply(com.commercetools.api.predicates.query.state.StateReferenceQueryBuilderDsl.of())), + RecurringOrderStateTransitionMessageQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder force() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("force")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateTransitionMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order/OrderQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order/OrderQueryBuilderDsl.java index 7e9b4f80b58..ba518264dd3 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order/OrderQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order/OrderQueryBuilderDsl.java @@ -361,6 +361,16 @@ public CombinationQueryPredicate quote( OrderQueryBuilderDsl::of); } + public CombinationQueryPredicate recurringOrder( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurringOrder")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderReferenceQueryBuilderDsl + .of())), + OrderQueryBuilderDsl::of); + } + public StringComparisonPredicateBuilder orderState() { return new StringComparisonPredicateBuilder<>( BinaryQueryPredicate.of().left(new ConstantQueryPredicate("orderState")), diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderAddCustomLineItemActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderAddCustomLineItemActionQueryBuilderDsl.java index 102be191153..3626c72336e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderAddCustomLineItemActionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderAddCustomLineItemActionQueryBuilderDsl.java @@ -97,4 +97,14 @@ public CombinationQueryPredicate recurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrenceInfo")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.CustomLineItemRecurrenceInfoDraftQueryBuilderDsl + .of())), + StagedOrderAddCustomLineItemActionQueryBuilderDsl::of); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderAddLineItemActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderAddLineItemActionQueryBuilderDsl.java index 47d76b71ad2..d2e1c64f19a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderAddLineItemActionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderAddLineItemActionQueryBuilderDsl.java @@ -125,4 +125,14 @@ public CombinationQueryPredicate cu StagedOrderAddLineItemActionQueryBuilderDsl::of); } + public CombinationQueryPredicate recurrenceInfo( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrenceInfo")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.LineItemRecurrenceInfoDraftQueryBuilderDsl + .of())), + StagedOrderAddLineItemActionQueryBuilderDsl::of); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderQueryBuilderDsl.java index 40679c4b1e4..ce7c8f86cc4 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/order_edit/StagedOrderQueryBuilderDsl.java @@ -361,6 +361,16 @@ public CombinationQueryPredicate quote( StagedOrderQueryBuilderDsl::of); } + public CombinationQueryPredicate recurringOrder( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurringOrder")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderReferenceQueryBuilderDsl + .of())), + StagedOrderQueryBuilderDsl::of); + } + public StringComparisonPredicateBuilder orderState() { return new StringComparisonPredicateBuilder<>( BinaryQueryPredicate.of().left(new ConstantQueryPredicate("orderState")), diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product/ProductVariantQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product/ProductVariantQueryBuilderDsl.java index 8e8505a7876..88b415f9c50 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product/ProductVariantQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product/ProductVariantQueryBuilderDsl.java @@ -125,4 +125,19 @@ public BooleanComparisonPredicateBuilder scopedPr p -> new CombinationQueryPredicate<>(p, ProductVariantQueryBuilderDsl::of)); } + public CombinationQueryPredicate recurrencePrices( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePrices")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.PriceQueryBuilderDsl.of())), + ProductVariantQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder recurrencePrices() { + return new CollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("recurrencePrices")), + p -> new CombinationQueryPredicate<>(p, ProductVariantQueryBuilderDsl::of)); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/DayOfMonthScheduleDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/DayOfMonthScheduleDraftQueryBuilderDsl.java new file mode 100644 index 00000000000..3ef600a8659 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/DayOfMonthScheduleDraftQueryBuilderDsl.java @@ -0,0 +1,25 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import com.commercetools.api.predicates.query.*; + +public class DayOfMonthScheduleDraftQueryBuilderDsl { + public DayOfMonthScheduleDraftQueryBuilderDsl() { + } + + public static DayOfMonthScheduleDraftQueryBuilderDsl of() { + return new DayOfMonthScheduleDraftQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, DayOfMonthScheduleDraftQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder day() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("day")), + p -> new CombinationQueryPredicate<>(p, DayOfMonthScheduleDraftQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/DayOfMonthScheduleQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/DayOfMonthScheduleQueryBuilderDsl.java new file mode 100644 index 00000000000..223b4760cde --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/DayOfMonthScheduleQueryBuilderDsl.java @@ -0,0 +1,25 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import com.commercetools.api.predicates.query.*; + +public class DayOfMonthScheduleQueryBuilderDsl { + public DayOfMonthScheduleQueryBuilderDsl() { + } + + public static DayOfMonthScheduleQueryBuilderDsl of() { + return new DayOfMonthScheduleQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, DayOfMonthScheduleQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder day() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("day")), + p -> new CombinationQueryPredicate<>(p, DayOfMonthScheduleQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyDraftQueryBuilderDsl.java new file mode 100644 index 00000000000..ca355172c43 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyDraftQueryBuilderDsl.java @@ -0,0 +1,49 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurrencePolicyDraftQueryBuilderDsl { + public RecurrencePolicyDraftQueryBuilderDsl() { + } + + public static RecurrencePolicyDraftQueryBuilderDsl of() { + return new RecurrencePolicyDraftQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyDraftQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate name( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("name")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + RecurrencePolicyDraftQueryBuilderDsl::of); + } + + public CombinationQueryPredicate description( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("description")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + RecurrencePolicyDraftQueryBuilderDsl::of); + } + + public CombinationQueryPredicate schedule( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("schedule")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyScheduleDraftQueryBuilderDsl + .of())), + RecurrencePolicyDraftQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyPagedQueryResponseQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyPagedQueryResponseQueryBuilderDsl.java new file mode 100644 index 00000000000..9f7d0473d75 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyPagedQueryResponseQueryBuilderDsl.java @@ -0,0 +1,52 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurrencePolicyPagedQueryResponseQueryBuilderDsl { + public RecurrencePolicyPagedQueryResponseQueryBuilderDsl() { + } + + public static RecurrencePolicyPagedQueryResponseQueryBuilderDsl of() { + return new RecurrencePolicyPagedQueryResponseQueryBuilderDsl(); + } + + public LongComparisonPredicateBuilder limit() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("limit")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyPagedQueryResponseQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder offset() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("offset")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyPagedQueryResponseQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder count() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("count")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyPagedQueryResponseQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder total() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("total")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyPagedQueryResponseQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate results( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("results")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyQueryBuilderDsl.of())), + RecurrencePolicyPagedQueryResponseQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder results() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("results")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyPagedQueryResponseQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyQueryBuilderDsl.java new file mode 100644 index 00000000000..64733ba0d91 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyQueryBuilderDsl.java @@ -0,0 +1,90 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurrencePolicyQueryBuilderDsl { + public RecurrencePolicyQueryBuilderDsl() { + } + + public static RecurrencePolicyQueryBuilderDsl of() { + return new RecurrencePolicyQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate name( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("name")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + RecurrencePolicyQueryBuilderDsl::of); + } + + public CombinationQueryPredicate description( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("description")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + RecurrencePolicyQueryBuilderDsl::of); + } + + public CombinationQueryPredicate schedule( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("schedule")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyScheduleQueryBuilderDsl + .of())), + RecurrencePolicyQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + RecurrencePolicyQueryBuilderDsl::of); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + RecurrencePolicyQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyReferenceQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyReferenceQueryBuilderDsl.java new file mode 100644 index 00000000000..06f64459466 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyReferenceQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurrencePolicyReferenceQueryBuilderDsl { + public RecurrencePolicyReferenceQueryBuilderDsl() { + } + + public static RecurrencePolicyReferenceQueryBuilderDsl of() { + return new RecurrencePolicyReferenceQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder typeId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("typeId")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyReferenceQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyReferenceQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate obj( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("obj")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyQueryBuilderDsl.of())), + RecurrencePolicyReferenceQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyResourceIdentifierQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyResourceIdentifierQueryBuilderDsl.java new file mode 100644 index 00000000000..9aa069210ec --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyResourceIdentifierQueryBuilderDsl.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import com.commercetools.api.predicates.query.*; + +public class RecurrencePolicyResourceIdentifierQueryBuilderDsl { + public RecurrencePolicyResourceIdentifierQueryBuilderDsl() { + } + + public static RecurrencePolicyResourceIdentifierQueryBuilderDsl of() { + return new RecurrencePolicyResourceIdentifierQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder typeId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("typeId")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyResourceIdentifierQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyResourceIdentifierQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyResourceIdentifierQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyScheduleDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyScheduleDraftQueryBuilderDsl.java new file mode 100644 index 00000000000..dcd6a0dd836 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyScheduleDraftQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurrencePolicyScheduleDraftQueryBuilderDsl { + public RecurrencePolicyScheduleDraftQueryBuilderDsl() { + } + + public static RecurrencePolicyScheduleDraftQueryBuilderDsl of() { + return new RecurrencePolicyScheduleDraftQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyScheduleDraftQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate asDayOfMonthScheduleDraft( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.DayOfMonthScheduleDraftQueryBuilderDsl.of()), + RecurrencePolicyScheduleDraftQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asStandard( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.StandardScheduleDraftQueryBuilderDsl.of()), + RecurrencePolicyScheduleDraftQueryBuilderDsl::of); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyScheduleQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyScheduleQueryBuilderDsl.java new file mode 100644 index 00000000000..626365c18c2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyScheduleQueryBuilderDsl.java @@ -0,0 +1,35 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurrencePolicyScheduleQueryBuilderDsl { + public RecurrencePolicyScheduleQueryBuilderDsl() { + } + + public static RecurrencePolicyScheduleQueryBuilderDsl of() { + return new RecurrencePolicyScheduleQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyScheduleQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate asDayOfMonth( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.recurrence_policy.DayOfMonthScheduleQueryBuilderDsl.of()), + RecurrencePolicyScheduleQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asStandard( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.recurrence_policy.StandardScheduleQueryBuilderDsl.of()), + RecurrencePolicyScheduleQueryBuilderDsl::of); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicySetDescriptionActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicySetDescriptionActionQueryBuilderDsl.java new file mode 100644 index 00000000000..d14e5dcd84c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicySetDescriptionActionQueryBuilderDsl.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurrencePolicySetDescriptionActionQueryBuilderDsl { + public RecurrencePolicySetDescriptionActionQueryBuilderDsl() { + } + + public static RecurrencePolicySetDescriptionActionQueryBuilderDsl of() { + return new RecurrencePolicySetDescriptionActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicySetDescriptionActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate description( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("description")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + RecurrencePolicySetDescriptionActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicySetKeyActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicySetKeyActionQueryBuilderDsl.java new file mode 100644 index 00000000000..26cfd494cc3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicySetKeyActionQueryBuilderDsl.java @@ -0,0 +1,25 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import com.commercetools.api.predicates.query.*; + +public class RecurrencePolicySetKeyActionQueryBuilderDsl { + public RecurrencePolicySetKeyActionQueryBuilderDsl() { + } + + public static RecurrencePolicySetKeyActionQueryBuilderDsl of() { + return new RecurrencePolicySetKeyActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicySetKeyActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicySetKeyActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicySetNameActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicySetNameActionQueryBuilderDsl.java new file mode 100644 index 00000000000..936857b7cc2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicySetNameActionQueryBuilderDsl.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurrencePolicySetNameActionQueryBuilderDsl { + public RecurrencePolicySetNameActionQueryBuilderDsl() { + } + + public static RecurrencePolicySetNameActionQueryBuilderDsl of() { + return new RecurrencePolicySetNameActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicySetNameActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate name( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("name")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + RecurrencePolicySetNameActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicySetScheduleActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicySetScheduleActionQueryBuilderDsl.java new file mode 100644 index 00000000000..af0d9bb394d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicySetScheduleActionQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurrencePolicySetScheduleActionQueryBuilderDsl { + public RecurrencePolicySetScheduleActionQueryBuilderDsl() { + } + + public static RecurrencePolicySetScheduleActionQueryBuilderDsl of() { + return new RecurrencePolicySetScheduleActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicySetScheduleActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate schedule( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("schedule")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyScheduleDraftQueryBuilderDsl + .of())), + RecurrencePolicySetScheduleActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyUpdateActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyUpdateActionQueryBuilderDsl.java new file mode 100644 index 00000000000..efab865ca83 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyUpdateActionQueryBuilderDsl.java @@ -0,0 +1,51 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurrencePolicyUpdateActionQueryBuilderDsl { + public RecurrencePolicyUpdateActionQueryBuilderDsl() { + } + + public static RecurrencePolicyUpdateActionQueryBuilderDsl of() { + return new RecurrencePolicyUpdateActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyUpdateActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate asSetDescription( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicySetDescriptionActionQueryBuilderDsl + .of()), + RecurrencePolicyUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetKey( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicySetKeyActionQueryBuilderDsl.of()), + RecurrencePolicyUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetName( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicySetNameActionQueryBuilderDsl.of()), + RecurrencePolicyUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetSchedule( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicySetScheduleActionQueryBuilderDsl + .of()), + RecurrencePolicyUpdateActionQueryBuilderDsl::of); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyUpdateQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyUpdateQueryBuilderDsl.java new file mode 100644 index 00000000000..83133d2e76e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/RecurrencePolicyUpdateQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurrencePolicyUpdateQueryBuilderDsl { + public RecurrencePolicyUpdateQueryBuilderDsl() { + } + + public static RecurrencePolicyUpdateQueryBuilderDsl of() { + return new RecurrencePolicyUpdateQueryBuilderDsl(); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyUpdateQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate actions( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("actions")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyUpdateActionQueryBuilderDsl + .of())), + RecurrencePolicyUpdateQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder actions() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("actions")), + p -> new CombinationQueryPredicate<>(p, RecurrencePolicyUpdateQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/StandardScheduleDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/StandardScheduleDraftQueryBuilderDsl.java new file mode 100644 index 00000000000..7bcfec42b8e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/StandardScheduleDraftQueryBuilderDsl.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import com.commercetools.api.predicates.query.*; + +public class StandardScheduleDraftQueryBuilderDsl { + public StandardScheduleDraftQueryBuilderDsl() { + } + + public static StandardScheduleDraftQueryBuilderDsl of() { + return new StandardScheduleDraftQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, StandardScheduleDraftQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder value() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, StandardScheduleDraftQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder intervalUnit() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("intervalUnit")), + p -> new CombinationQueryPredicate<>(p, StandardScheduleDraftQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/StandardScheduleQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/StandardScheduleQueryBuilderDsl.java new file mode 100644 index 00000000000..312ac98eb81 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurrence_policy/StandardScheduleQueryBuilderDsl.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.predicates.query.recurrence_policy; + +import com.commercetools.api.predicates.query.*; + +public class StandardScheduleQueryBuilderDsl { + public StandardScheduleQueryBuilderDsl() { + } + + public static StandardScheduleQueryBuilderDsl of() { + return new StandardScheduleQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, StandardScheduleQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder value() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, StandardScheduleQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder intervalUnit() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("intervalUnit")), + p -> new CombinationQueryPredicate<>(p, StandardScheduleQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/CounterDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/CounterDraftQueryBuilderDsl.java new file mode 100644 index 00000000000..952e7abb588 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/CounterDraftQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import com.commercetools.api.predicates.query.*; + +public class CounterDraftQueryBuilderDsl { + public CounterDraftQueryBuilderDsl() { + } + + public static CounterDraftQueryBuilderDsl of() { + return new CounterDraftQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, CounterDraftQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder totalToSkip() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("totalToSkip")), + p -> new CombinationQueryPredicate<>(p, CounterDraftQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/CounterQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/CounterQueryBuilderDsl.java new file mode 100644 index 00000000000..81a33300530 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/CounterQueryBuilderDsl.java @@ -0,0 +1,38 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import com.commercetools.api.predicates.query.*; + +public class CounterQueryBuilderDsl { + public CounterQueryBuilderDsl() { + } + + public static CounterQueryBuilderDsl of() { + return new CounterQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, CounterQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder totalToSkip() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("totalToSkip")), + p -> new CombinationQueryPredicate<>(p, CounterQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder skipped() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("skipped")), + p -> new CombinationQueryPredicate<>(p, CounterQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastSkippedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastSkippedAt")), + p -> new CombinationQueryPredicate<>(p, CounterQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/CustomLineItemRecurrenceInfoDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/CustomLineItemRecurrenceInfoDraftQueryBuilderDsl.java new file mode 100644 index 00000000000..16a90eedf3e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/CustomLineItemRecurrenceInfoDraftQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CustomLineItemRecurrenceInfoDraftQueryBuilderDsl { + public CustomLineItemRecurrenceInfoDraftQueryBuilderDsl() { + } + + public static CustomLineItemRecurrenceInfoDraftQueryBuilderDsl of() { + return new CustomLineItemRecurrenceInfoDraftQueryBuilderDsl(); + } + + public CombinationQueryPredicate recurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePolicy")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyResourceIdentifierQueryBuilderDsl + .of())), + CustomLineItemRecurrenceInfoDraftQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/CustomLineItemRecurrenceInfoQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/CustomLineItemRecurrenceInfoQueryBuilderDsl.java new file mode 100644 index 00000000000..3e2b56e450c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/CustomLineItemRecurrenceInfoQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CustomLineItemRecurrenceInfoQueryBuilderDsl { + public CustomLineItemRecurrenceInfoQueryBuilderDsl() { + } + + public static CustomLineItemRecurrenceInfoQueryBuilderDsl of() { + return new CustomLineItemRecurrenceInfoQueryBuilderDsl(); + } + + public CombinationQueryPredicate recurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePolicy")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyReferenceQueryBuilderDsl + .of())), + CustomLineItemRecurrenceInfoQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/LineItemRecurrenceInfoDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/LineItemRecurrenceInfoDraftQueryBuilderDsl.java new file mode 100644 index 00000000000..56be5aeb08a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/LineItemRecurrenceInfoDraftQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class LineItemRecurrenceInfoDraftQueryBuilderDsl { + public LineItemRecurrenceInfoDraftQueryBuilderDsl() { + } + + public static LineItemRecurrenceInfoDraftQueryBuilderDsl of() { + return new LineItemRecurrenceInfoDraftQueryBuilderDsl(); + } + + public CombinationQueryPredicate recurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePolicy")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyResourceIdentifierQueryBuilderDsl + .of())), + LineItemRecurrenceInfoDraftQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder priceSelectionMode() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("priceSelectionMode")), + p -> new CombinationQueryPredicate<>(p, LineItemRecurrenceInfoDraftQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/LineItemRecurrenceInfoQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/LineItemRecurrenceInfoQueryBuilderDsl.java new file mode 100644 index 00000000000..1af55cd29db --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/LineItemRecurrenceInfoQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class LineItemRecurrenceInfoQueryBuilderDsl { + public LineItemRecurrenceInfoQueryBuilderDsl() { + } + + public static LineItemRecurrenceInfoQueryBuilderDsl of() { + return new LineItemRecurrenceInfoQueryBuilderDsl(); + } + + public CombinationQueryPredicate recurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePolicy")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyReferenceQueryBuilderDsl + .of())), + LineItemRecurrenceInfoQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder priceSelectionMode() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("priceSelectionMode")), + p -> new CombinationQueryPredicate<>(p, LineItemRecurrenceInfoQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderActiveQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderActiveQueryBuilderDsl.java new file mode 100644 index 00000000000..2a5d732c0cd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderActiveQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderActiveQueryBuilderDsl { + public RecurringOrderActiveQueryBuilderDsl() { + } + + public static RecurringOrderActiveQueryBuilderDsl of() { + return new RecurringOrderActiveQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderActiveQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder resumesAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resumesAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderActiveQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderCanceledQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderCanceledQueryBuilderDsl.java new file mode 100644 index 00000000000..10e397971f3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderCanceledQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderCanceledQueryBuilderDsl { + public RecurringOrderCanceledQueryBuilderDsl() { + } + + public static RecurringOrderCanceledQueryBuilderDsl of() { + return new RecurringOrderCanceledQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCanceledQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder reason() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("reason")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderCanceledQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderDraftQueryBuilderDsl.java new file mode 100644 index 00000000000..76a0d63dce9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderDraftQueryBuilderDsl.java @@ -0,0 +1,62 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderDraftQueryBuilderDsl { + public RecurringOrderDraftQueryBuilderDsl() { + } + + public static RecurringOrderDraftQueryBuilderDsl of() { + return new RecurringOrderDraftQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderDraftQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate cart( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("cart")) + .inner(fn.apply( + com.commercetools.api.predicates.query.cart.CartResourceIdentifierQueryBuilderDsl.of())), + RecurringOrderDraftQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder cartVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("cartVersion")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderDraftQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder startsAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("startsAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderDraftQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate state( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("state")) + .inner(fn.apply( + com.commercetools.api.predicates.query.state.StateResourceIdentifierQueryBuilderDsl.of())), + RecurringOrderDraftQueryBuilderDsl::of); + } + + public CombinationQueryPredicate custom( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("custom")) + .inner(fn.apply(com.commercetools.api.predicates.query.type.CustomFieldsDraftQueryBuilderDsl.of())), + RecurringOrderDraftQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderExpiredQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderExpiredQueryBuilderDsl.java new file mode 100644 index 00000000000..adeaa32083c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderExpiredQueryBuilderDsl.java @@ -0,0 +1,20 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderExpiredQueryBuilderDsl { + public RecurringOrderExpiredQueryBuilderDsl() { + } + + public static RecurringOrderExpiredQueryBuilderDsl of() { + return new RecurringOrderExpiredQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderExpiredQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderPagedQueryResponseQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderPagedQueryResponseQueryBuilderDsl.java new file mode 100644 index 00000000000..ba4344fcfaf --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderPagedQueryResponseQueryBuilderDsl.java @@ -0,0 +1,52 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderPagedQueryResponseQueryBuilderDsl { + public RecurringOrderPagedQueryResponseQueryBuilderDsl() { + } + + public static RecurringOrderPagedQueryResponseQueryBuilderDsl of() { + return new RecurringOrderPagedQueryResponseQueryBuilderDsl(); + } + + public LongComparisonPredicateBuilder limit() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("limit")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderPagedQueryResponseQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder offset() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("offset")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderPagedQueryResponseQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder count() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("count")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderPagedQueryResponseQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder total() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("total")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderPagedQueryResponseQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate results( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("results")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderQueryBuilderDsl.of())), + RecurringOrderPagedQueryResponseQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder results() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("results")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderPagedQueryResponseQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderPausedQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderPausedQueryBuilderDsl.java new file mode 100644 index 00000000000..21c1769e851 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderPausedQueryBuilderDsl.java @@ -0,0 +1,20 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderPausedQueryBuilderDsl { + public RecurringOrderPausedQueryBuilderDsl() { + } + + public static RecurringOrderPausedQueryBuilderDsl of() { + return new RecurringOrderPausedQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderPausedQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderQueryBuilderDsl.java new file mode 100644 index 00000000000..731be53bf51 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderQueryBuilderDsl.java @@ -0,0 +1,187 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderQueryBuilderDsl { + public RecurringOrderQueryBuilderDsl() { + } + + public static RecurringOrderQueryBuilderDsl of() { + return new RecurringOrderQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate cart( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("cart")) + .inner(fn.apply(com.commercetools.api.predicates.query.cart.CartReferenceQueryBuilderDsl.of())), + RecurringOrderQueryBuilderDsl::of); + } + + public CombinationQueryPredicate originOrder( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("originOrder")) + .inner(fn.apply(com.commercetools.api.predicates.query.order.OrderReferenceQueryBuilderDsl.of())), + RecurringOrderQueryBuilderDsl::of); + } + + public DateTimeComparisonPredicateBuilder startsAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("startsAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder resumesAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resumesAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder expiresAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("expiresAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastOrderAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastOrderAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder nextOrderAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("nextOrderAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate skipConfiguration( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("skipConfiguration")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.SkipConfigurationQueryBuilderDsl.of())), + RecurringOrderQueryBuilderDsl::of); + } + + public CombinationQueryPredicate store( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("store")) + .inner(fn.apply(com.commercetools.api.predicates.query.store.StoreKeyReferenceQueryBuilderDsl.of())), + RecurringOrderQueryBuilderDsl::of); + } + + public CombinationQueryPredicate businessUnit( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("businessUnit")) + .inner(fn.apply( + com.commercetools.api.predicates.query.business_unit.BusinessUnitKeyReferenceQueryBuilderDsl.of())), + RecurringOrderQueryBuilderDsl::of); + } + + public CombinationQueryPredicate state( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("state")) + .inner(fn.apply(com.commercetools.api.predicates.query.state.StateReferenceQueryBuilderDsl.of())), + RecurringOrderQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder recurringOrderState() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("recurringOrderState")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate schedule( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("schedule")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyScheduleQueryBuilderDsl + .of())), + RecurringOrderQueryBuilderDsl::of); + } + + public CombinationQueryPredicate customer( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("customer")) + .inner(fn.apply( + com.commercetools.api.predicates.query.customer.CustomerReferenceQueryBuilderDsl.of())), + RecurringOrderQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder customerEmail() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("customerEmail")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate custom( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("custom")) + .inner(fn.apply(com.commercetools.api.predicates.query.type.CustomFieldsQueryBuilderDsl.of())), + RecurringOrderQueryBuilderDsl::of); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + RecurringOrderQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + RecurringOrderQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderReferenceQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderReferenceQueryBuilderDsl.java new file mode 100644 index 00000000000..dc251024ea8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderReferenceQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderReferenceQueryBuilderDsl { + public RecurringOrderReferenceQueryBuilderDsl() { + } + + public static RecurringOrderReferenceQueryBuilderDsl of() { + return new RecurringOrderReferenceQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder typeId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("typeId")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderReferenceQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderReferenceQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate obj( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("obj")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderQueryBuilderDsl.of())), + RecurringOrderReferenceQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderResourceIdentifierQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderResourceIdentifierQueryBuilderDsl.java new file mode 100644 index 00000000000..2b2af360b0c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderResourceIdentifierQueryBuilderDsl.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderResourceIdentifierQueryBuilderDsl { + public RecurringOrderResourceIdentifierQueryBuilderDsl() { + } + + public static RecurringOrderResourceIdentifierQueryBuilderDsl of() { + return new RecurringOrderResourceIdentifierQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder typeId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("typeId")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderResourceIdentifierQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderResourceIdentifierQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderResourceIdentifierQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetCustomFieldActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetCustomFieldActionQueryBuilderDsl.java new file mode 100644 index 00000000000..e24043b7285 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetCustomFieldActionQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderSetCustomFieldActionQueryBuilderDsl { + public RecurringOrderSetCustomFieldActionQueryBuilderDsl() { + } + + public static RecurringOrderSetCustomFieldActionQueryBuilderDsl of() { + return new RecurringOrderSetCustomFieldActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderSetCustomFieldActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderSetCustomFieldActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder value() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderSetCustomFieldActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetCustomTypeActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetCustomTypeActionQueryBuilderDsl.java new file mode 100644 index 00000000000..889bd939465 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetCustomTypeActionQueryBuilderDsl.java @@ -0,0 +1,41 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderSetCustomTypeActionQueryBuilderDsl { + public RecurringOrderSetCustomTypeActionQueryBuilderDsl() { + } + + public static RecurringOrderSetCustomTypeActionQueryBuilderDsl of() { + return new RecurringOrderSetCustomTypeActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderSetCustomTypeActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate type( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("type")) + .inner(fn.apply( + com.commercetools.api.predicates.query.type.TypeResourceIdentifierQueryBuilderDsl.of())), + RecurringOrderSetCustomTypeActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate fields( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("fields")) + .inner(fn.apply(com.commercetools.api.predicates.query.type.FieldContainerQueryBuilderDsl.of())), + RecurringOrderSetCustomTypeActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetKeyActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetKeyActionQueryBuilderDsl.java new file mode 100644 index 00000000000..917fb0234eb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetKeyActionQueryBuilderDsl.java @@ -0,0 +1,25 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderSetKeyActionQueryBuilderDsl { + public RecurringOrderSetKeyActionQueryBuilderDsl() { + } + + public static RecurringOrderSetKeyActionQueryBuilderDsl of() { + return new RecurringOrderSetKeyActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderSetKeyActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderSetKeyActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetOrderSkipConfigurationActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetOrderSkipConfigurationActionQueryBuilderDsl.java new file mode 100644 index 00000000000..2aa14b5d08d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetOrderSkipConfigurationActionQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderSetOrderSkipConfigurationActionQueryBuilderDsl { + public RecurringOrderSetOrderSkipConfigurationActionQueryBuilderDsl() { + } + + public static RecurringOrderSetOrderSkipConfigurationActionQueryBuilderDsl of() { + return new RecurringOrderSetOrderSkipConfigurationActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderSetOrderSkipConfigurationActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate skipConfiguration( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("skipConfiguration")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.SkipConfigurationDraftQueryBuilderDsl.of())), + RecurringOrderSetOrderSkipConfigurationActionQueryBuilderDsl::of); + } + + public DateTimeComparisonPredicateBuilder updatedExpiresAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("updatedExpiresAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderSetOrderSkipConfigurationActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetScheduleActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetScheduleActionQueryBuilderDsl.java new file mode 100644 index 00000000000..e0d1ddb13f1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetScheduleActionQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderSetScheduleActionQueryBuilderDsl { + public RecurringOrderSetScheduleActionQueryBuilderDsl() { + } + + public static RecurringOrderSetScheduleActionQueryBuilderDsl of() { + return new RecurringOrderSetScheduleActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderSetScheduleActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate recurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePolicy")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyResourceIdentifierQueryBuilderDsl + .of())), + RecurringOrderSetScheduleActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetStartsAtActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetStartsAtActionQueryBuilderDsl.java new file mode 100644 index 00000000000..c509cdf21b8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetStartsAtActionQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderSetStartsAtActionQueryBuilderDsl { + public RecurringOrderSetStartsAtActionQueryBuilderDsl() { + } + + public static RecurringOrderSetStartsAtActionQueryBuilderDsl of() { + return new RecurringOrderSetStartsAtActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderSetStartsAtActionQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder startsAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("startsAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderSetStartsAtActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetStateActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetStateActionQueryBuilderDsl.java new file mode 100644 index 00000000000..e826e5a1fcb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderSetStateActionQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderSetStateActionQueryBuilderDsl { + public RecurringOrderSetStateActionQueryBuilderDsl() { + } + + public static RecurringOrderSetStateActionQueryBuilderDsl of() { + return new RecurringOrderSetStateActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderSetStateActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate recurringOrderState( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurringOrderState")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderStateDraftQueryBuilderDsl + .of())), + RecurringOrderSetStateActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderStateDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderStateDraftQueryBuilderDsl.java new file mode 100644 index 00000000000..e8dd0990caa --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderStateDraftQueryBuilderDsl.java @@ -0,0 +1,49 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderStateDraftQueryBuilderDsl { + public RecurringOrderStateDraftQueryBuilderDsl() { + } + + public static RecurringOrderStateDraftQueryBuilderDsl of() { + return new RecurringOrderStateDraftQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderStateDraftQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate asActive( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.recurring_order.RecurringOrderActiveQueryBuilderDsl.of()), + RecurringOrderStateDraftQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asCanceled( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.recurring_order.RecurringOrderCanceledQueryBuilderDsl.of()), + RecurringOrderStateDraftQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asExpired( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.recurring_order.RecurringOrderExpiredQueryBuilderDsl.of()), + RecurringOrderStateDraftQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asPaused( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.recurring_order.RecurringOrderPausedQueryBuilderDsl.of()), + RecurringOrderStateDraftQueryBuilderDsl::of); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderTransitionStateActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderTransitionStateActionQueryBuilderDsl.java new file mode 100644 index 00000000000..6951c3c66f6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderTransitionStateActionQueryBuilderDsl.java @@ -0,0 +1,38 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderTransitionStateActionQueryBuilderDsl { + public RecurringOrderTransitionStateActionQueryBuilderDsl() { + } + + public static RecurringOrderTransitionStateActionQueryBuilderDsl of() { + return new RecurringOrderTransitionStateActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderTransitionStateActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate state( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("state")) + .inner(fn.apply( + com.commercetools.api.predicates.query.state.StateResourceIdentifierQueryBuilderDsl.of())), + RecurringOrderTransitionStateActionQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder force() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("force")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderTransitionStateActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderUpdateActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderUpdateActionQueryBuilderDsl.java new file mode 100644 index 00000000000..5a191d2b226 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderUpdateActionQueryBuilderDsl.java @@ -0,0 +1,82 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderUpdateActionQueryBuilderDsl { + public RecurringOrderUpdateActionQueryBuilderDsl() { + } + + public static RecurringOrderUpdateActionQueryBuilderDsl of() { + return new RecurringOrderUpdateActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderUpdateActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate asSetCustomField( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderSetCustomFieldActionQueryBuilderDsl + .of()), + RecurringOrderUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetCustomType( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderSetCustomTypeActionQueryBuilderDsl + .of()), + RecurringOrderUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetKey( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderSetKeyActionQueryBuilderDsl.of()), + RecurringOrderUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetOrderSkipConfiguration( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderSetOrderSkipConfigurationActionQueryBuilderDsl + .of()), + RecurringOrderUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetSchedule( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderSetScheduleActionQueryBuilderDsl.of()), + RecurringOrderUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetStartsAt( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderSetStartsAtActionQueryBuilderDsl.of()), + RecurringOrderUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetRecurringOrderState( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderSetStateActionQueryBuilderDsl.of()), + RecurringOrderUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asTransitionState( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderTransitionStateActionQueryBuilderDsl + .of()), + RecurringOrderUpdateActionQueryBuilderDsl::of); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderUpdateQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderUpdateQueryBuilderDsl.java new file mode 100644 index 00000000000..1b34f2a23b0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/RecurringOrderUpdateQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderUpdateQueryBuilderDsl { + public RecurringOrderUpdateQueryBuilderDsl() { + } + + public static RecurringOrderUpdateQueryBuilderDsl of() { + return new RecurringOrderUpdateQueryBuilderDsl(); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderUpdateQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate actions( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("actions")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurring_order.RecurringOrderUpdateActionQueryBuilderDsl + .of())), + RecurringOrderUpdateQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder actions() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("actions")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderUpdateQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/SkipConfigurationDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/SkipConfigurationDraftQueryBuilderDsl.java new file mode 100644 index 00000000000..752c5835b52 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/SkipConfigurationDraftQueryBuilderDsl.java @@ -0,0 +1,28 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class SkipConfigurationDraftQueryBuilderDsl { + public SkipConfigurationDraftQueryBuilderDsl() { + } + + public static SkipConfigurationDraftQueryBuilderDsl of() { + return new SkipConfigurationDraftQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, SkipConfigurationDraftQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate asCounter( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.recurring_order.CounterDraftQueryBuilderDsl.of()), + SkipConfigurationDraftQueryBuilderDsl::of); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/SkipConfigurationQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/SkipConfigurationQueryBuilderDsl.java new file mode 100644 index 00000000000..98aea247cb3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/recurring_order/SkipConfigurationQueryBuilderDsl.java @@ -0,0 +1,28 @@ + +package com.commercetools.api.predicates.query.recurring_order; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class SkipConfigurationQueryBuilderDsl { + public SkipConfigurationQueryBuilderDsl() { + } + + public static SkipConfigurationQueryBuilderDsl of() { + return new SkipConfigurationQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, SkipConfigurationQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate asCounter( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.recurring_order.CounterQueryBuilderDsl.of()), + SkipConfigurationQueryBuilderDsl::of); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/standalone_price/StandalonePriceDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/standalone_price/StandalonePriceDraftQueryBuilderDsl.java index 7b006448505..233b7698481 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/standalone_price/StandalonePriceDraftQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/standalone_price/StandalonePriceDraftQueryBuilderDsl.java @@ -103,6 +103,16 @@ public CombinationQueryPredicate custom( StandalonePriceDraftQueryBuilderDsl::of); } + public CombinationQueryPredicate recurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePolicy")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyResourceIdentifierQueryBuilderDsl + .of())), + StandalonePriceDraftQueryBuilderDsl::of); + } + public CombinationQueryPredicate staged( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/standalone_price/StandalonePriceQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/standalone_price/StandalonePriceQueryBuilderDsl.java index da8747cb695..d46fdbca537 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/standalone_price/StandalonePriceQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/standalone_price/StandalonePriceQueryBuilderDsl.java @@ -155,4 +155,14 @@ public BooleanComparisonPredicateBuilder active( p -> new CombinationQueryPredicate<>(p, StandalonePriceQueryBuilderDsl::of)); } + public CombinationQueryPredicate recurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePolicy")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyReferenceQueryBuilderDsl + .of())), + StandalonePriceQueryBuilderDsl::of); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java/com/commercetools/api/client/ProjectApiRoot.java b/commercetools/commercetools-sdk-java-api/src/main/java/com/commercetools/api/client/ProjectApiRoot.java index 6f4c40f1d07..b139f415641 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java/com/commercetools/api/client/ProjectApiRoot.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java/com/commercetools/api/client/ProjectApiRoot.java @@ -318,6 +318,16 @@ public ByProjectKeyPaymentMethodsRequestBuilder paymentMethods() { return with().paymentMethods(); } + @Override + public ByProjectKeyRecurringOrdersRequestBuilder recurringOrders() { + return with().recurringOrders(); + } + + @Override + public ByProjectKeyRecurrencePoliciesRequestBuilder recurrencePolicies() { + return with().recurrencePolicies(); + } + @Override public R with(Function op) { return op.apply(this); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java/com/commercetools/api/client/ProjectScopedApiRoot.java b/commercetools/commercetools-sdk-java-api/src/main/java/com/commercetools/api/client/ProjectScopedApiRoot.java index 9e2b4f5fcb0..f4ce2b9f9ba 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java/com/commercetools/api/client/ProjectScopedApiRoot.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java/com/commercetools/api/client/ProjectScopedApiRoot.java @@ -102,5 +102,9 @@ public interface ProjectScopedApiRoot { ByProjectKeyPaymentMethodsRequestBuilder paymentMethods(); + ByProjectKeyRecurringOrdersRequestBuilder recurringOrders(); + + ByProjectKeyRecurrencePoliciesRequestBuilder recurrencePolicies(); + R with(Function op); } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDTest.java index 48dcb47b1cf..5d3437eda61 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDTest.java @@ -116,6 +116,16 @@ public static Object[][] requestWithMethodParameters() { .createHttpRequest(), "get", "test_projectKey/in-store/key=test_storeKey/product-projections/test_ID?priceChannel=priceChannel", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productProjections() + .withId("test_ID") + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy") + .createHttpRequest(), + "get", + "test_projectKey/in-store/key=test_storeKey/product-projections/test_ID?priceRecurrencePolicy=priceRecurrencePolicy", }, new Object[] { apiRoot.withProjectKey("test_projectKey") .inStoreKeyWithStoreKeyValue("test_storeKey") @@ -192,6 +202,12 @@ public static Object[][] executeMethodParameters() { .withId("test_ID") .get() .withPriceChannel("priceChannel"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productProjections() + .withId("test_ID") + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy"), }, new Object[] { apiRoot.withProjectKey("test_projectKey") .inStoreKeyWithStoreKeyValue("test_storeKey") .productProjections() diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyTest.java index 59ed07466a2..6105d90397f 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyTest.java @@ -117,6 +117,16 @@ public static Object[][] requestWithMethodParameters() { .createHttpRequest(), "get", "test_projectKey/in-store/key=test_storeKey/product-projections/key=test_key?priceChannel=priceChannel", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productProjections() + .withKey("test_key") + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy") + .createHttpRequest(), + "get", + "test_projectKey/in-store/key=test_storeKey/product-projections/key=test_key?priceRecurrencePolicy=priceRecurrencePolicy", }, new Object[] { apiRoot.withProjectKey("test_projectKey") .inStoreKeyWithStoreKeyValue("test_storeKey") @@ -193,6 +203,12 @@ public static Object[][] executeMethodParameters() { .withKey("test_key") .get() .withPriceChannel("priceChannel"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .productProjections() + .withKey("test_key") + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy"), }, new Object[] { apiRoot.withProjectKey("test_projectKey") .inStoreKeyWithStoreKeyValue("test_storeKey") .productProjections() diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsByIDTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsByIDTest.java index cb9678a14bd..1cb4b21c14b 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsByIDTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsByIDTest.java @@ -106,6 +106,15 @@ public static Object[][] requestWithMethodParameters() { .withPriceChannel("priceChannel") .createHttpRequest(), "get", "test_projectKey/product-projections/test_ID?priceChannel=priceChannel", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .productProjections() + .withId("test_ID") + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy") + .createHttpRequest(), + "get", + "test_projectKey/product-projections/test_ID?priceRecurrencePolicy=priceRecurrencePolicy", }, new Object[] { apiRoot.withProjectKey("test_projectKey") .productProjections() @@ -174,6 +183,11 @@ public static Object[][] executeMethodParameters() { .withId("test_ID") .get() .withPriceChannel("priceChannel"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productProjections() + .withId("test_ID") + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy"), }, new Object[] { apiRoot.withProjectKey("test_projectKey") .productProjections() .withId("test_ID") diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsKeyByKeyTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsKeyByKeyTest.java index 1a69ac3a56f..211f203aab0 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsKeyByKeyTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsKeyByKeyTest.java @@ -107,6 +107,15 @@ public static Object[][] requestWithMethodParameters() { .withPriceChannel("priceChannel") .createHttpRequest(), "get", "test_projectKey/product-projections/key=test_key?priceChannel=priceChannel", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .productProjections() + .withKey("test_key") + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy") + .createHttpRequest(), + "get", + "test_projectKey/product-projections/key=test_key?priceRecurrencePolicy=priceRecurrencePolicy", }, new Object[] { apiRoot.withProjectKey("test_projectKey") .productProjections() @@ -175,6 +184,11 @@ public static Object[][] executeMethodParameters() { .withKey("test_key") .get() .withPriceChannel("priceChannel"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productProjections() + .withKey("test_key") + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy"), }, new Object[] { apiRoot.withProjectKey("test_projectKey") .productProjections() .withKey("test_key") diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsSearchTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsSearchTest.java index ea6f264db3a..339dbc5b436 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsSearchTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsSearchTest.java @@ -196,6 +196,15 @@ public static Object[][] requestWithMethodParameters() { .withPriceChannel("priceChannel") .createHttpRequest(), "get", "test_projectKey/product-projections/search?priceChannel=priceChannel", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .productProjections() + .search() + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy") + .createHttpRequest(), + "get", + "test_projectKey/product-projections/search?priceRecurrencePolicy=priceRecurrencePolicy", }, new Object[] { apiRoot.withProjectKey("test_projectKey") .productProjections() @@ -306,6 +315,11 @@ public static Object[][] executeMethodParameters() { .search() .get() .withPriceChannel("priceChannel"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productProjections() + .search() + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy"), }, new Object[] { apiRoot.withProjectKey("test_projectKey") .productProjections() .search() diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsTest.java index 4474782746f..297a75e3d96 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductProjectionsTest.java @@ -98,6 +98,13 @@ public static Object[][] requestWithMethodParameters() { .withPriceChannel("priceChannel") .createHttpRequest(), "get", "test_projectKey/product-projections?priceChannel=priceChannel", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .productProjections() + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy") + .createHttpRequest(), + "get", "test_projectKey/product-projections?priceRecurrencePolicy=priceRecurrencePolicy", }, new Object[] { apiRoot.withProjectKey("test_projectKey") .productProjections() @@ -184,6 +191,10 @@ public static Object[][] executeMethodParameters() { .productProjections() .get() .withPriceChannel("priceChannel"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .productProjections() + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy"), }, new Object[] { apiRoot.withProjectKey("test_projectKey") .productProjections() .get() diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductsByIDTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductsByIDTest.java index 890921efcf5..41eb9d29a72 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductsByIDTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductsByIDTest.java @@ -98,6 +98,14 @@ public static Object[][] requestWithMethodParameters() { .withPriceChannel("priceChannel") .createHttpRequest(), "get", "test_projectKey/products/test_ID?priceChannel=priceChannel", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .products() + .withId("test_ID") + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy") + .createHttpRequest(), + "get", "test_projectKey/products/test_ID?priceRecurrencePolicy=priceRecurrencePolicy", }, new Object[] { apiRoot.withProjectKey("test_projectKey") .products() .withId("test_ID") @@ -155,6 +163,14 @@ public static Object[][] requestWithMethodParameters() { .withPriceChannel("priceChannel") .createHttpRequest(), "post", "test_projectKey/products/test_ID?priceChannel=priceChannel", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .products() + .withId("test_ID") + .post(com.commercetools.api.models.product.ProductUpdate.of()) + .withPriceRecurrencePolicy("priceRecurrencePolicy") + .createHttpRequest(), + "post", "test_projectKey/products/test_ID?priceRecurrencePolicy=priceRecurrencePolicy", }, new Object[] { apiRoot.withProjectKey("test_projectKey") .products() .withId("test_ID") @@ -207,6 +223,14 @@ public static Object[][] requestWithMethodParameters() { .withPriceChannel("priceChannel") .createHttpRequest(), "delete", "test_projectKey/products/test_ID?priceChannel=priceChannel", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .products() + .withId("test_ID") + .delete() + .withPriceRecurrencePolicy("priceRecurrencePolicy") + .createHttpRequest(), + "delete", "test_projectKey/products/test_ID?priceRecurrencePolicy=priceRecurrencePolicy", }, new Object[] { apiRoot.withProjectKey("test_projectKey") .products() .withId("test_ID") @@ -253,6 +277,11 @@ public static Object[][] executeMethodParameters() { .withId("test_ID") .get() .withPriceChannel("priceChannel"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .products() + .withId("test_ID") + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy"), }, new Object[] { apiRoot.withProjectKey("test_projectKey") .products() .withId("test_ID") @@ -285,6 +314,11 @@ public static Object[][] executeMethodParameters() { .withId("test_ID") .post(com.commercetools.api.models.product.ProductUpdate.of()) .withPriceChannel("priceChannel"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .products() + .withId("test_ID") + .post(com.commercetools.api.models.product.ProductUpdate.of()) + .withPriceRecurrencePolicy("priceRecurrencePolicy"), }, new Object[] { apiRoot.withProjectKey("test_projectKey") .products() .withId("test_ID") @@ -319,6 +353,11 @@ public static Object[][] executeMethodParameters() { .withId("test_ID") .delete() .withPriceChannel("priceChannel"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .products() + .withId("test_ID") + .delete() + .withPriceRecurrencePolicy("priceRecurrencePolicy"), }, new Object[] { apiRoot.withProjectKey("test_projectKey") .products() .withId("test_ID") diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductsKeyByKeyTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductsKeyByKeyTest.java index 7b5629c1aa2..8bf93c721cc 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductsKeyByKeyTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductsKeyByKeyTest.java @@ -98,6 +98,14 @@ public static Object[][] requestWithMethodParameters() { .withPriceChannel("priceChannel") .createHttpRequest(), "get", "test_projectKey/products/key=test_key?priceChannel=priceChannel", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .products() + .withKey("test_key") + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy") + .createHttpRequest(), + "get", "test_projectKey/products/key=test_key?priceRecurrencePolicy=priceRecurrencePolicy", }, new Object[] { apiRoot.withProjectKey("test_projectKey") .products() .withKey("test_key") @@ -155,6 +163,14 @@ public static Object[][] requestWithMethodParameters() { .withPriceChannel("priceChannel") .createHttpRequest(), "post", "test_projectKey/products/key=test_key?priceChannel=priceChannel", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .products() + .withKey("test_key") + .post(com.commercetools.api.models.product.ProductUpdate.of()) + .withPriceRecurrencePolicy("priceRecurrencePolicy") + .createHttpRequest(), + "post", "test_projectKey/products/key=test_key?priceRecurrencePolicy=priceRecurrencePolicy", }, new Object[] { apiRoot.withProjectKey("test_projectKey") .products() .withKey("test_key") @@ -207,6 +223,15 @@ public static Object[][] requestWithMethodParameters() { .withPriceChannel("priceChannel") .createHttpRequest(), "delete", "test_projectKey/products/key=test_key?priceChannel=priceChannel", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .products() + .withKey("test_key") + .delete() + .withPriceRecurrencePolicy("priceRecurrencePolicy") + .createHttpRequest(), + "delete", + "test_projectKey/products/key=test_key?priceRecurrencePolicy=priceRecurrencePolicy", }, new Object[] { apiRoot.withProjectKey("test_projectKey") .products() .withKey("test_key") @@ -255,6 +280,11 @@ public static Object[][] executeMethodParameters() { .withKey("test_key") .get() .withPriceChannel("priceChannel"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .products() + .withKey("test_key") + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy"), }, new Object[] { apiRoot.withProjectKey("test_projectKey") .products() .withKey("test_key") @@ -287,6 +317,11 @@ public static Object[][] executeMethodParameters() { .withKey("test_key") .post(com.commercetools.api.models.product.ProductUpdate.of()) .withPriceChannel("priceChannel"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .products() + .withKey("test_key") + .post(com.commercetools.api.models.product.ProductUpdate.of()) + .withPriceRecurrencePolicy("priceRecurrencePolicy"), }, new Object[] { apiRoot.withProjectKey("test_projectKey") .products() .withKey("test_key") @@ -321,6 +356,11 @@ public static Object[][] executeMethodParameters() { .withKey("test_key") .delete() .withPriceChannel("priceChannel"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .products() + .withKey("test_key") + .delete() + .withPriceRecurrencePolicy("priceRecurrencePolicy"), }, new Object[] { apiRoot.withProjectKey("test_projectKey") .products() .withKey("test_key") diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductsTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductsTest.java index 005c26aa2f7..48304c41367 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductsTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductsTest.java @@ -89,6 +89,13 @@ public static Object[][] requestWithMethodParameters() { .get() .withPriceChannel("priceChannel") .createHttpRequest(), "get", "test_projectKey/products?priceChannel=priceChannel", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .products() + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy") + .createHttpRequest(), + "get", "test_projectKey/products?priceRecurrencePolicy=priceRecurrencePolicy", }, new Object[] { apiRoot.withProjectKey("test_projectKey") .products() .get() @@ -152,6 +159,13 @@ public static Object[][] requestWithMethodParameters() { .post(com.commercetools.api.models.product.ProductDraft.of()) .withPriceChannel("priceChannel") .createHttpRequest(), "post", "test_projectKey/products?priceChannel=priceChannel", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .products() + .post(com.commercetools.api.models.product.ProductDraft.of()) + .withPriceRecurrencePolicy("priceRecurrencePolicy") + .createHttpRequest(), + "post", "test_projectKey/products?priceRecurrencePolicy=priceRecurrencePolicy", }, new Object[] { apiRoot.withProjectKey("test_projectKey") .products() .post(com.commercetools.api.models.product.ProductDraft.of()) @@ -182,6 +196,10 @@ public static Object[][] executeMethodParameters() { .withPriceCustomerGroupAssignments("priceCustomerGroupAssignments"), }, new Object[] { apiRoot.withProjectKey("test_projectKey").products().get().withPriceChannel("priceChannel"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .products() + .get() + .withPriceRecurrencePolicy("priceRecurrencePolicy"), }, new Object[] { apiRoot.withProjectKey("test_projectKey").products().get().withExpand("expand"), }, new Object[] { apiRoot.withProjectKey("test_projectKey").products().get().withSort("sort"), }, new Object[] { apiRoot.withProjectKey("test_projectKey").products().get().withLimit(7), }, @@ -214,6 +232,10 @@ public static Object[][] executeMethodParameters() { .products() .post(com.commercetools.api.models.product.ProductDraft.of()) .withPriceChannel("priceChannel"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .products() + .post(com.commercetools.api.models.product.ProductDraft.of()) + .withPriceRecurrencePolicy("priceRecurrencePolicy"), }, new Object[] { apiRoot.withProjectKey("test_projectKey") .products() .post(com.commercetools.api.models.product.ProductDraft.of()) diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesByIDTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesByIDTest.java new file mode 100644 index 00000000000..b6cf3aa5041 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesByIDTest.java @@ -0,0 +1,114 @@ + +package com.commercetools.api.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.api.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesByIDTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withId("test_ID") + .get() + .withExpand("expand") + .createHttpRequest(), + "get", "test_projectKey/recurrence-policies/test_ID?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withId("test_ID") + .get() + .createHttpRequest(), "get", "test_projectKey/recurrence-policies/test_ID", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withId("test_ID") + .head() + .createHttpRequest(), "head", "test_projectKey/recurrence-policies/test_ID", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withId("test_ID") + .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate.of()) + .withExpand("expand") + .createHttpRequest(), + "post", "test_projectKey/recurrence-policies/test_ID?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withId("test_ID") + .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate.of()) + .createHttpRequest(), "post", "test_projectKey/recurrence-policies/test_ID", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withId("test_ID") + .get() + .withExpand("expand"), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").recurrencePolicies().withId("test_ID").get(), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").recurrencePolicies().withId("test_ID").head(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withId("test_ID") + .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate.of()) + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withId("test_ID") + .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesKeyByKeyTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesKeyByKeyTest.java new file mode 100644 index 00000000000..e4b94061c5b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesKeyByKeyTest.java @@ -0,0 +1,114 @@ + +package com.commercetools.api.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.api.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesKeyByKeyTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withKey("test_key") + .get() + .withExpand("expand") + .createHttpRequest(), + "get", "test_projectKey/recurrence-policies/key=test_key?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withKey("test_key") + .get() + .createHttpRequest(), "get", "test_projectKey/recurrence-policies/key=test_key", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withKey("test_key") + .head() + .createHttpRequest(), "head", "test_projectKey/recurrence-policies/key=test_key", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withKey("test_key") + .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate.of()) + .withExpand("expand") + .createHttpRequest(), + "post", "test_projectKey/recurrence-policies/key=test_key?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withKey("test_key") + .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate.of()) + .createHttpRequest(), "post", "test_projectKey/recurrence-policies/key=test_key", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withKey("test_key") + .get() + .withExpand("expand"), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").recurrencePolicies().withKey("test_key").get(), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").recurrencePolicies().withKey("test_key").head(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withKey("test_key") + .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate.of()) + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .withKey("test_key") + .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdate.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesTest.java new file mode 100644 index 00000000000..369354487f3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurrencePoliciesTest.java @@ -0,0 +1,145 @@ + +package com.commercetools.api.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.api.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurrencePoliciesTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .get() + .withExpand("expand") + .createHttpRequest(), "get", "test_projectKey/recurrence-policies?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .get() + .withSort("sort") + .createHttpRequest(), "get", "test_projectKey/recurrence-policies?sort=sort", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .get() + .withLimit(7) + .createHttpRequest(), "get", "test_projectKey/recurrence-policies?limit=7", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .get() + .withOffset(3) + .createHttpRequest(), "get", "test_projectKey/recurrence-policies?offset=3", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .get() + .withWithTotal(true) + .createHttpRequest(), "get", "test_projectKey/recurrence-policies?withTotal=true", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .get() + .withWhere("where") + .createHttpRequest(), "get", "test_projectKey/recurrence-policies?where=where", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .get() + .withPredicateVar("varName", "var.varName") + .createHttpRequest(), + "get", "test_projectKey/recurrence-policies?var.varName=var.varName", }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurrencePolicies().get().createHttpRequest(), + "get", "test_projectKey/recurrence-policies", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .head() + .withWhere("where") + .createHttpRequest(), "head", "test_projectKey/recurrence-policies?where=where", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").recurrencePolicies().head().createHttpRequest(), + "head", "test_projectKey/recurrence-policies", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyDraft.of()) + .withExpand("expand") + .createHttpRequest(), "post", "test_projectKey/recurrence-policies?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyDraft.of()) + .createHttpRequest(), "post", "test_projectKey/recurrence-policies", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { + apiRoot.withProjectKey("test_projectKey").recurrencePolicies().get().withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurrencePolicies().get().withSort("sort"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurrencePolicies().get().withLimit(7), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurrencePolicies().get().withOffset(3), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").recurrencePolicies().get().withWithTotal(true), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").recurrencePolicies().get().withWhere("where"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .get() + .withPredicateVar("varName", "var.varName"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurrencePolicies().get(), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").recurrencePolicies().head().withWhere("where"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurrencePolicies().head(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyDraft.of()) + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurrencePolicies() + .post(com.commercetools.api.models.recurrence_policy.RecurrencePolicyDraft.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurringOrdersByIDTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurringOrdersByIDTest.java new file mode 100644 index 00000000000..ec18ac8b585 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurringOrdersByIDTest.java @@ -0,0 +1,112 @@ + +package com.commercetools.api.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.api.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersByIDTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withId("test_ID") + .get() + .withExpand("expand") + .createHttpRequest(), + "get", "test_projectKey/recurring-orders/test_ID?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withId("test_ID") + .get() + .createHttpRequest(), "get", "test_projectKey/recurring-orders/test_ID", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withId("test_ID") + .head() + .createHttpRequest(), "head", "test_projectKey/recurring-orders/test_ID", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withId("test_ID") + .post(com.commercetools.api.models.recurring_order.RecurringOrderUpdate.of()) + .withExpand("expand") + .createHttpRequest(), + "post", "test_projectKey/recurring-orders/test_ID?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withId("test_ID") + .post(com.commercetools.api.models.recurring_order.RecurringOrderUpdate.of()) + .createHttpRequest(), "post", "test_projectKey/recurring-orders/test_ID", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withId("test_ID") + .get() + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurringOrders().withId("test_ID").get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurringOrders().withId("test_ID").head(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withId("test_ID") + .post(com.commercetools.api.models.recurring_order.RecurringOrderUpdate.of()) + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withId("test_ID") + .post(com.commercetools.api.models.recurring_order.RecurringOrderUpdate.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurringOrdersKeyByKeyTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurringOrdersKeyByKeyTest.java new file mode 100644 index 00000000000..9e650f0f23c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurringOrdersKeyByKeyTest.java @@ -0,0 +1,113 @@ + +package com.commercetools.api.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.api.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersKeyByKeyTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withKey("test_key") + .get() + .withExpand("expand") + .createHttpRequest(), + "get", "test_projectKey/recurring-orders/key=test_key?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withKey("test_key") + .get() + .createHttpRequest(), "get", "test_projectKey/recurring-orders/key=test_key", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withKey("test_key") + .head() + .createHttpRequest(), "head", "test_projectKey/recurring-orders/key=test_key", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withKey("test_key") + .post(com.commercetools.api.models.recurring_order.RecurringOrderUpdate.of()) + .withExpand("expand") + .createHttpRequest(), + "post", "test_projectKey/recurring-orders/key=test_key?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withKey("test_key") + .post(com.commercetools.api.models.recurring_order.RecurringOrderUpdate.of()) + .createHttpRequest(), "post", "test_projectKey/recurring-orders/key=test_key", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withKey("test_key") + .get() + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurringOrders().withKey("test_key").get(), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").recurringOrders().withKey("test_key").head(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withKey("test_key") + .post(com.commercetools.api.models.recurring_order.RecurringOrderUpdate.of()) + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .withKey("test_key") + .post(com.commercetools.api.models.recurring_order.RecurringOrderUpdate.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurringOrdersTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurringOrdersTest.java new file mode 100644 index 00000000000..d94eaa412e4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyRecurringOrdersTest.java @@ -0,0 +1,141 @@ + +package com.commercetools.api.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.api.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyRecurringOrdersTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .get() + .withExpand("expand") + .createHttpRequest(), "get", "test_projectKey/recurring-orders?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .get() + .withSort("sort") + .createHttpRequest(), "get", "test_projectKey/recurring-orders?sort=sort", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .get() + .withLimit(7) + .createHttpRequest(), "get", "test_projectKey/recurring-orders?limit=7", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .get() + .withOffset(3) + .createHttpRequest(), "get", "test_projectKey/recurring-orders?offset=3", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .get() + .withWithTotal(true) + .createHttpRequest(), "get", "test_projectKey/recurring-orders?withTotal=true", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .get() + .withWhere("where") + .createHttpRequest(), "get", "test_projectKey/recurring-orders?where=where", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .get() + .withPredicateVar("varName", "var.varName") + .createHttpRequest(), + "get", "test_projectKey/recurring-orders?var.varName=var.varName", }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurringOrders().get().createHttpRequest(), + "get", "test_projectKey/recurring-orders", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .head() + .withWhere("where") + .createHttpRequest(), "head", "test_projectKey/recurring-orders?where=where", }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurringOrders().head().createHttpRequest(), + "head", "test_projectKey/recurring-orders", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .post(com.commercetools.api.models.recurring_order.RecurringOrderDraft.of()) + .withExpand("expand") + .createHttpRequest(), "post", "test_projectKey/recurring-orders?expand=expand", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .post(com.commercetools.api.models.recurring_order.RecurringOrderDraft.of()) + .createHttpRequest(), "post", "test_projectKey/recurring-orders", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { + apiRoot.withProjectKey("test_projectKey").recurringOrders().get().withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurringOrders().get().withSort("sort"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurringOrders().get().withLimit(7), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurringOrders().get().withOffset(3), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurringOrders().get().withWithTotal(true), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurringOrders().get().withWhere("where"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .get() + .withPredicateVar("varName", "var.varName"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurringOrders().get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurringOrders().head().withWhere("where"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").recurringOrders().head(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .post(com.commercetools.api.models.recurring_order.RecurringOrderDraft.of()) + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .recurringOrders() + .post(com.commercetools.api.models.recurring_order.RecurringOrderDraft.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemActionTest.java index 3e584463c07..0e219a14f3d 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemActionTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CartAddCustomLineItemActionTest.java @@ -38,7 +38,10 @@ public static Object[][] objectBuilder() { CartAddCustomLineItemAction.builder() .custom(new com.commercetools.api.models.type.CustomFieldsDraftImpl()) }, new Object[] { "priceMode", CartAddCustomLineItemAction.builder() - .priceMode(com.commercetools.api.models.cart.CustomLineItemPriceMode.findEnum("Standard")) } }; + .priceMode(com.commercetools.api.models.cart.CustomLineItemPriceMode.findEnum("Standard")) }, + new Object[] { "recurrenceInfo", CartAddCustomLineItemAction.builder() + .recurrenceInfo( + new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftImpl()) } }; } @Test @@ -115,4 +118,13 @@ public void priceMode() { Assertions.assertThat(value.getPriceMode()) .isEqualTo(com.commercetools.api.models.cart.CustomLineItemPriceMode.findEnum("Standard")); } + + @Test + public void recurrenceInfo() { + CartAddCustomLineItemAction value = CartAddCustomLineItemAction.of(); + value.setRecurrenceInfo( + new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftImpl()); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionTest.java index 416e0218fb7..6e95efdb25f 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionTest.java @@ -49,6 +49,9 @@ public static Object[][] objectBuilder() { .inventoryMode(com.commercetools.api.models.cart.InventoryMode.findEnum("None")) }, new Object[] { "shippingDetails", CartAddLineItemAction.builder() .shippingDetails(new com.commercetools.api.models.cart.ItemShippingDetailsDraftImpl()) }, + new Object[] { "recurrenceInfo", CartAddLineItemAction.builder() + .recurrenceInfo( + new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()) }, new Object[] { "custom", CartAddLineItemAction.builder() .custom(new com.commercetools.api.models.type.CustomFieldsDraftImpl()) } }; } @@ -160,6 +163,14 @@ public void shippingDetails() { .isEqualTo(new com.commercetools.api.models.cart.ItemShippingDetailsDraftImpl()); } + @Test + public void recurrenceInfo() { + CartAddLineItemAction value = CartAddLineItemAction.of(); + value.setRecurrenceInfo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()); + } + @Test public void custom() { CartAddLineItemAction value = CartAddLineItemAction.of(); diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CartSetCustomLineItemRecurrenceInfoActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CartSetCustomLineItemRecurrenceInfoActionTest.java new file mode 100644 index 00000000000..112ab32361f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CartSetCustomLineItemRecurrenceInfoActionTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.api.models.cart; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CartSetCustomLineItemRecurrenceInfoActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CartSetCustomLineItemRecurrenceInfoActionBuilder builder) { + CartSetCustomLineItemRecurrenceInfoAction cartSetCustomLineItemRecurrenceInfoAction = builder.buildUnchecked(); + Assertions.assertThat(cartSetCustomLineItemRecurrenceInfoAction) + .isInstanceOf(CartSetCustomLineItemRecurrenceInfoAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "customLineItemId", + CartSetCustomLineItemRecurrenceInfoAction.builder().customLineItemId("customLineItemId") }, + new Object[] { "customLineItemKey", + CartSetCustomLineItemRecurrenceInfoAction.builder().customLineItemKey("customLineItemKey") }, + new Object[] { "recurrenceInfo", CartSetCustomLineItemRecurrenceInfoAction.builder() + .recurrenceInfo( + new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftImpl()) } }; + } + + @Test + public void customLineItemId() { + CartSetCustomLineItemRecurrenceInfoAction value = CartSetCustomLineItemRecurrenceInfoAction.of(); + value.setCustomLineItemId("customLineItemId"); + Assertions.assertThat(value.getCustomLineItemId()).isEqualTo("customLineItemId"); + } + + @Test + public void customLineItemKey() { + CartSetCustomLineItemRecurrenceInfoAction value = CartSetCustomLineItemRecurrenceInfoAction.of(); + value.setCustomLineItemKey("customLineItemKey"); + Assertions.assertThat(value.getCustomLineItemKey()).isEqualTo("customLineItemKey"); + } + + @Test + public void recurrenceInfo() { + CartSetCustomLineItemRecurrenceInfoAction value = CartSetCustomLineItemRecurrenceInfoAction.of(); + value.setRecurrenceInfo( + new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CartSetLineItemRecurrenceInfoActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CartSetLineItemRecurrenceInfoActionTest.java new file mode 100644 index 00000000000..3ee91ce949e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CartSetLineItemRecurrenceInfoActionTest.java @@ -0,0 +1,50 @@ + +package com.commercetools.api.models.cart; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CartSetLineItemRecurrenceInfoActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CartSetLineItemRecurrenceInfoActionBuilder builder) { + CartSetLineItemRecurrenceInfoAction cartSetLineItemRecurrenceInfoAction = builder.buildUnchecked(); + Assertions.assertThat(cartSetLineItemRecurrenceInfoAction) + .isInstanceOf(CartSetLineItemRecurrenceInfoAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "lineItemId", CartSetLineItemRecurrenceInfoAction.builder().lineItemId("lineItemId") }, + new Object[] { "lineItemKey", + CartSetLineItemRecurrenceInfoAction.builder().lineItemKey("lineItemKey") }, + new Object[] { "recurrenceInfo", CartSetLineItemRecurrenceInfoAction.builder() + .recurrenceInfo( + new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()) } }; + } + + @Test + public void lineItemId() { + CartSetLineItemRecurrenceInfoAction value = CartSetLineItemRecurrenceInfoAction.of(); + value.setLineItemId("lineItemId"); + Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); + } + + @Test + public void lineItemKey() { + CartSetLineItemRecurrenceInfoAction value = CartSetLineItemRecurrenceInfoAction.of(); + value.setLineItemKey("lineItemKey"); + Assertions.assertThat(value.getLineItemKey()).isEqualTo("lineItemKey"); + } + + @Test + public void recurrenceInfo() { + CartSetLineItemRecurrenceInfoAction value = CartSetLineItemRecurrenceInfoAction.of(); + value.setRecurrenceInfo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CustomLineItemDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CustomLineItemDraftTest.java index faf6d32c1fc..19a4de16ff0 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CustomLineItemDraftTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CustomLineItemDraftTest.java @@ -37,7 +37,10 @@ public static Object[][] objectBuilder() { new Object[] { "shippingDetails", CustomLineItemDraft.builder() .shippingDetails(new com.commercetools.api.models.cart.ItemShippingDetailsDraftImpl()) }, new Object[] { "priceMode", CustomLineItemDraft.builder() - .priceMode(com.commercetools.api.models.cart.CustomLineItemPriceMode.findEnum("Standard")) } }; + .priceMode(com.commercetools.api.models.cart.CustomLineItemPriceMode.findEnum("Standard")) }, + new Object[] { "recurrenceInfo", CustomLineItemDraft.builder() + .recurrenceInfo( + new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftImpl()) } }; } @Test @@ -114,4 +117,13 @@ public void priceMode() { Assertions.assertThat(value.getPriceMode()) .isEqualTo(com.commercetools.api.models.cart.CustomLineItemPriceMode.findEnum("Standard")); } + + @Test + public void recurrenceInfo() { + CustomLineItemDraft value = CustomLineItemDraft.of(); + value.setRecurrenceInfo( + new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftImpl()); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CustomLineItemTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CustomLineItemTest.java index bfaa3430f55..a2a0641d611 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CustomLineItemTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/CustomLineItemTest.java @@ -58,7 +58,10 @@ public static Object[][] objectBuilder() { CustomLineItem.builder() .shippingDetails(new com.commercetools.api.models.cart.ItemShippingDetailsImpl()) }, new Object[] { "priceMode", CustomLineItem.builder() - .priceMode(com.commercetools.api.models.cart.CustomLineItemPriceMode.findEnum("Standard")) } }; + .priceMode(com.commercetools.api.models.cart.CustomLineItemPriceMode.findEnum("Standard")) }, + new Object[] { "recurrenceInfo", CustomLineItem.builder() + .recurrenceInfo( + new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoImpl()) } }; } @Test @@ -192,4 +195,12 @@ public void priceMode() { Assertions.assertThat(value.getPriceMode()) .isEqualTo(com.commercetools.api.models.cart.CustomLineItemPriceMode.findEnum("Standard")); } + + @Test + public void recurrenceInfo() { + CustomLineItem value = CustomLineItem.of(); + value.setRecurrenceInfo(new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoImpl()); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/LineItemDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/LineItemDraftTest.java index 1fff139b73e..9fd5048a0bb 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/LineItemDraftTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/LineItemDraftTest.java @@ -47,8 +47,11 @@ public static Object[][] objectBuilder() { .inventoryMode(com.commercetools.api.models.cart.InventoryMode.findEnum("None")) }, new Object[] { "shippingDetails", LineItemDraft.builder() .shippingDetails(new com.commercetools.api.models.cart.ItemShippingDetailsDraftImpl()) }, - new Object[] { "custom", LineItemDraft.builder() - .custom(new com.commercetools.api.models.type.CustomFieldsDraftImpl()) } }; + new Object[] { "custom", + LineItemDraft.builder().custom(new com.commercetools.api.models.type.CustomFieldsDraftImpl()) }, + new Object[] { "recurrenceInfo", LineItemDraft.builder() + .recurrenceInfo( + new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()) } }; } @Test @@ -165,4 +168,12 @@ public void custom() { Assertions.assertThat(value.getCustom()) .isEqualTo(new com.commercetools.api.models.type.CustomFieldsDraftImpl()); } + + @Test + public void recurrenceInfo() { + LineItemDraft value = LineItemDraft.of(); + value.setRecurrenceInfo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/LineItemTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/LineItemTest.java index ab4a0b353bc..9cf146e9dd1 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/LineItemTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/LineItemTest.java @@ -78,7 +78,11 @@ public static Object[][] objectBuilder() { LineItem.builder().custom(new com.commercetools.api.models.type.CustomFieldsImpl()) }, new Object[] { "addedAt", LineItem.builder().addedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, new Object[] { "lastModifiedAt", - LineItem.builder().lastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) } }; + LineItem.builder().lastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "recurrenceInfo", + LineItem.builder() + .recurrenceInfo( + new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoImpl()) } }; } @Test @@ -281,4 +285,12 @@ public void lastModifiedAt() { value.setLastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); Assertions.assertThat(value.getLastModifiedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); } + + @Test + public void recurrenceInfo() { + LineItem value = LineItem.of(); + value.setRecurrenceInfo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoImpl()); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/common/PriceDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/common/PriceDraftTest.java index 2c9c28c481c..cb5a2545f3e 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/common/PriceDraftTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/common/PriceDraftTest.java @@ -40,7 +40,10 @@ public static Object[][] objectBuilder() { .tiers(Collections .singletonList(new com.commercetools.api.models.common.PriceTierDraftImpl())) }, new Object[] { "custom", - PriceDraft.builder().custom(new com.commercetools.api.models.type.CustomFieldsDraftImpl()) } }; + PriceDraft.builder().custom(new com.commercetools.api.models.type.CustomFieldsDraftImpl()) }, + new Object[] { "recurrencePolicy", PriceDraft.builder() + .recurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()) } }; } @Test @@ -117,4 +120,13 @@ public void custom() { Assertions.assertThat(value.getCustom()) .isEqualTo(new com.commercetools.api.models.type.CustomFieldsDraftImpl()); } + + @Test + public void recurrencePolicy() { + PriceDraft value = PriceDraft.of(); + value.setRecurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/common/PriceTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/common/PriceTest.java index 0e58236f098..26453ebb0d0 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/common/PriceTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/common/PriceTest.java @@ -37,7 +37,10 @@ public static Object[][] objectBuilder() { .tiers(Collections .singletonList(new com.commercetools.api.models.common.PriceTierImpl())) }, new Object[] { "custom", - Price.builder().custom(new com.commercetools.api.models.type.CustomFieldsImpl()) } }; + Price.builder().custom(new com.commercetools.api.models.type.CustomFieldsImpl()) }, + new Object[] { "recurrencePolicy", Price.builder() + .recurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()) } }; } @Test @@ -120,4 +123,12 @@ public void custom() { value.setCustom(new com.commercetools.api.models.type.CustomFieldsImpl()); Assertions.assertThat(value.getCustom()).isEqualTo(new com.commercetools.api.models.type.CustomFieldsImpl()); } + + @Test + public void recurrencePolicy() { + Price value = Price.of(); + value.setRecurrencePolicy(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyCartAddLineItemActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyCartAddLineItemActionTest.java index 7b0a4459ccc..f103f5bde32 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyCartAddLineItemActionTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyCartAddLineItemActionTest.java @@ -33,6 +33,9 @@ public static Object[][] objectBuilder() { .supplyChannel(new com.commercetools.api.models.channel.ChannelResourceIdentifierImpl()) }, new Object[] { "shippingDetails", MyCartAddLineItemAction.builder() .shippingDetails(new com.commercetools.api.models.cart.ItemShippingDetailsDraftImpl()) }, + new Object[] { "recurrenceInfo", MyCartAddLineItemAction.builder() + .recurrenceInfo( + new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()) }, new Object[] { "custom", MyCartAddLineItemAction.builder() .custom(new com.commercetools.api.models.type.CustomFieldsDraftImpl()) } }; } @@ -103,6 +106,14 @@ public void shippingDetails() { .isEqualTo(new com.commercetools.api.models.cart.ItemShippingDetailsDraftImpl()); } + @Test + public void recurrenceInfo() { + MyCartAddLineItemAction value = MyCartAddLineItemAction.of(); + value.setRecurrenceInfo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()); + } + @Test public void custom() { MyCartAddLineItemAction value = MyCartAddLineItemAction.of(); diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyCartSetCustomLineItemRecurrenceInfoActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyCartSetCustomLineItemRecurrenceInfoActionTest.java new file mode 100644 index 00000000000..3e208d978af --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyCartSetCustomLineItemRecurrenceInfoActionTest.java @@ -0,0 +1,53 @@ + +package com.commercetools.api.models.me; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class MyCartSetCustomLineItemRecurrenceInfoActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, MyCartSetCustomLineItemRecurrenceInfoActionBuilder builder) { + MyCartSetCustomLineItemRecurrenceInfoAction myCartSetCustomLineItemRecurrenceInfoAction = builder + .buildUnchecked(); + Assertions.assertThat(myCartSetCustomLineItemRecurrenceInfoAction) + .isInstanceOf(MyCartSetCustomLineItemRecurrenceInfoAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "customLineItemId", + MyCartSetCustomLineItemRecurrenceInfoAction.builder().customLineItemId("customLineItemId") }, + new Object[] { "customLineItemKey", + MyCartSetCustomLineItemRecurrenceInfoAction.builder().customLineItemKey("customLineItemKey") }, + new Object[] { "recurrenceInfo", MyCartSetCustomLineItemRecurrenceInfoAction.builder() + .recurrenceInfo( + new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftImpl()) } }; + } + + @Test + public void customLineItemId() { + MyCartSetCustomLineItemRecurrenceInfoAction value = MyCartSetCustomLineItemRecurrenceInfoAction.of(); + value.setCustomLineItemId("customLineItemId"); + Assertions.assertThat(value.getCustomLineItemId()).isEqualTo("customLineItemId"); + } + + @Test + public void customLineItemKey() { + MyCartSetCustomLineItemRecurrenceInfoAction value = MyCartSetCustomLineItemRecurrenceInfoAction.of(); + value.setCustomLineItemKey("customLineItemKey"); + Assertions.assertThat(value.getCustomLineItemKey()).isEqualTo("customLineItemKey"); + } + + @Test + public void recurrenceInfo() { + MyCartSetCustomLineItemRecurrenceInfoAction value = MyCartSetCustomLineItemRecurrenceInfoAction.of(); + value.setRecurrenceInfo( + new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyCartSetLineItemRecurrenceInfoActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyCartSetLineItemRecurrenceInfoActionTest.java new file mode 100644 index 00000000000..15ff60a809e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyCartSetLineItemRecurrenceInfoActionTest.java @@ -0,0 +1,50 @@ + +package com.commercetools.api.models.me; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class MyCartSetLineItemRecurrenceInfoActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, MyCartSetLineItemRecurrenceInfoActionBuilder builder) { + MyCartSetLineItemRecurrenceInfoAction myCartSetLineItemRecurrenceInfoAction = builder.buildUnchecked(); + Assertions.assertThat(myCartSetLineItemRecurrenceInfoAction) + .isInstanceOf(MyCartSetLineItemRecurrenceInfoAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "lineItemId", MyCartSetLineItemRecurrenceInfoAction.builder().lineItemId("lineItemId") }, + new Object[] { "lineItemKey", + MyCartSetLineItemRecurrenceInfoAction.builder().lineItemKey("lineItemKey") }, + new Object[] { "recurrenceInfo", MyCartSetLineItemRecurrenceInfoAction.builder() + .recurrenceInfo( + new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()) } }; + } + + @Test + public void lineItemId() { + MyCartSetLineItemRecurrenceInfoAction value = MyCartSetLineItemRecurrenceInfoAction.of(); + value.setLineItemId("lineItemId"); + Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); + } + + @Test + public void lineItemKey() { + MyCartSetLineItemRecurrenceInfoAction value = MyCartSetLineItemRecurrenceInfoAction.of(); + value.setLineItemKey("lineItemKey"); + Assertions.assertThat(value.getLineItemKey()).isEqualTo("lineItemKey"); + } + + @Test + public void recurrenceInfo() { + MyCartSetLineItemRecurrenceInfoAction value = MyCartSetLineItemRecurrenceInfoAction.of(); + value.setRecurrenceInfo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyLineItemDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyLineItemDraftTest.java index 5daa2a12dbf..66edc980132 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyLineItemDraftTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/me/MyLineItemDraftTest.java @@ -32,6 +32,9 @@ public static Object[][] objectBuilder() { new com.commercetools.api.models.channel.ChannelResourceIdentifierImpl()) }, new Object[] { "shippingDetails", MyLineItemDraft.builder() .shippingDetails(new com.commercetools.api.models.cart.ItemShippingDetailsDraftImpl()) }, + new Object[] { "recurrenceInfo", MyLineItemDraft.builder() + .recurrenceInfo( + new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()) }, new Object[] { "custom", MyLineItemDraft.builder() .custom(new com.commercetools.api.models.type.CustomFieldsDraftImpl()) } }; } @@ -102,6 +105,14 @@ public void shippingDetails() { .isEqualTo(new com.commercetools.api.models.cart.ItemShippingDetailsDraftImpl()); } + @Test + public void recurrenceInfo() { + MyLineItemDraft value = MyLineItemDraft.of(); + value.setRecurrenceInfo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()); + } + @Test public void custom() { MyLineItemDraft value = MyLineItemDraft.of(); diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessagePayloadTest.java new file mode 100644 index 00000000000..51d4aa4face --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessagePayloadTest.java @@ -0,0 +1,45 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class OrderCreatedFromRecurringOrderMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, OrderCreatedFromRecurringOrderMessagePayloadBuilder builder) { + OrderCreatedFromRecurringOrderMessagePayload orderCreatedFromRecurringOrderMessagePayload = builder + .buildUnchecked(); + Assertions.assertThat(orderCreatedFromRecurringOrderMessagePayload) + .isInstanceOf(OrderCreatedFromRecurringOrderMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "order", + OrderCreatedFromRecurringOrderMessagePayload.builder() + .order(new com.commercetools.api.models.order.OrderImpl()) }, + new Object[] { "recurringOrderRef", + OrderCreatedFromRecurringOrderMessagePayload.builder() + .recurringOrderRef( + new com.commercetools.api.models.recurring_order.RecurringOrderReferenceImpl()) } }; + } + + @Test + public void order() { + OrderCreatedFromRecurringOrderMessagePayload value = OrderCreatedFromRecurringOrderMessagePayload.of(); + value.setOrder(new com.commercetools.api.models.order.OrderImpl()); + Assertions.assertThat(value.getOrder()).isEqualTo(new com.commercetools.api.models.order.OrderImpl()); + } + + @Test + public void recurringOrderRef() { + OrderCreatedFromRecurringOrderMessagePayload value = OrderCreatedFromRecurringOrderMessagePayload.of(); + value.setRecurringOrderRef(new com.commercetools.api.models.recurring_order.RecurringOrderReferenceImpl()); + Assertions.assertThat(value.getRecurringOrderRef()) + .isEqualTo(new com.commercetools.api.models.recurring_order.RecurringOrderReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessageTest.java new file mode 100644 index 00000000000..c05a7c96d93 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderCreatedFromRecurringOrderMessageTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class OrderCreatedFromRecurringOrderMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, OrderCreatedFromRecurringOrderMessageBuilder builder) { + OrderCreatedFromRecurringOrderMessage orderCreatedFromRecurringOrderMessage = builder.buildUnchecked(); + Assertions.assertThat(orderCreatedFromRecurringOrderMessage) + .isInstanceOf(OrderCreatedFromRecurringOrderMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "order", + OrderCreatedFromRecurringOrderMessage.builder() + .order(new com.commercetools.api.models.order.OrderImpl()) }, + new Object[] { "recurringOrderRef", + OrderCreatedFromRecurringOrderMessage.builder() + .recurringOrderRef( + new com.commercetools.api.models.recurring_order.RecurringOrderReferenceImpl()) } }; + } + + @Test + public void order() { + OrderCreatedFromRecurringOrderMessage value = OrderCreatedFromRecurringOrderMessage.of(); + value.setOrder(new com.commercetools.api.models.order.OrderImpl()); + Assertions.assertThat(value.getOrder()).isEqualTo(new com.commercetools.api.models.order.OrderImpl()); + } + + @Test + public void recurringOrderRef() { + OrderCreatedFromRecurringOrderMessage value = OrderCreatedFromRecurringOrderMessage.of(); + value.setRecurringOrderRef(new com.commercetools.api.models.recurring_order.RecurringOrderReferenceImpl()); + Assertions.assertThat(value.getRecurringOrderRef()) + .isEqualTo(new com.commercetools.api.models.recurring_order.RecurringOrderReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessagePayloadTest.java new file mode 100644 index 00000000000..b41bb7f9028 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessagePayloadTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderCreatedMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderCreatedMessagePayloadBuilder builder) { + RecurringOrderCreatedMessagePayload recurringOrderCreatedMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderCreatedMessagePayload) + .isInstanceOf(RecurringOrderCreatedMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "order", RecurringOrderCreatedMessagePayload.builder() + .order(new com.commercetools.api.models.recurring_order.RecurringOrderImpl()) } }; + } + + @Test + public void order() { + RecurringOrderCreatedMessagePayload value = RecurringOrderCreatedMessagePayload.of(); + value.setOrder(new com.commercetools.api.models.recurring_order.RecurringOrderImpl()); + Assertions.assertThat(value.getOrder()) + .isEqualTo(new com.commercetools.api.models.recurring_order.RecurringOrderImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessageTest.java new file mode 100644 index 00000000000..0e7fcee5f41 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCreatedMessageTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderCreatedMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderCreatedMessageBuilder builder) { + RecurringOrderCreatedMessage recurringOrderCreatedMessage = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderCreatedMessage).isInstanceOf(RecurringOrderCreatedMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "order", RecurringOrderCreatedMessage.builder() + .order(new com.commercetools.api.models.recurring_order.RecurringOrderImpl()) } }; + } + + @Test + public void order() { + RecurringOrderCreatedMessage value = RecurringOrderCreatedMessage.of(); + value.setOrder(new com.commercetools.api.models.recurring_order.RecurringOrderImpl()); + Assertions.assertThat(value.getOrder()) + .isEqualTo(new com.commercetools.api.models.recurring_order.RecurringOrderImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessagePayloadTest.java new file mode 100644 index 00000000000..982af93a984 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessagePayloadTest.java @@ -0,0 +1,39 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderCustomFieldAddedMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderCustomFieldAddedMessagePayloadBuilder builder) { + RecurringOrderCustomFieldAddedMessagePayload recurringOrderCustomFieldAddedMessagePayload = builder + .buildUnchecked(); + Assertions.assertThat(recurringOrderCustomFieldAddedMessagePayload) + .isInstanceOf(RecurringOrderCustomFieldAddedMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "name", RecurringOrderCustomFieldAddedMessagePayload.builder().name("name") }, + new Object[] { "value", RecurringOrderCustomFieldAddedMessagePayload.builder().value("value") } }; + } + + @Test + public void name() { + RecurringOrderCustomFieldAddedMessagePayload value = RecurringOrderCustomFieldAddedMessagePayload.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void value() { + RecurringOrderCustomFieldAddedMessagePayload value = RecurringOrderCustomFieldAddedMessagePayload.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessageTest.java new file mode 100644 index 00000000000..bf329695f44 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldAddedMessageTest.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderCustomFieldAddedMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderCustomFieldAddedMessageBuilder builder) { + RecurringOrderCustomFieldAddedMessage recurringOrderCustomFieldAddedMessage = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderCustomFieldAddedMessage) + .isInstanceOf(RecurringOrderCustomFieldAddedMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "name", RecurringOrderCustomFieldAddedMessage.builder().name("name") }, + new Object[] { "value", RecurringOrderCustomFieldAddedMessage.builder().value("value") } }; + } + + @Test + public void name() { + RecurringOrderCustomFieldAddedMessage value = RecurringOrderCustomFieldAddedMessage.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void value() { + RecurringOrderCustomFieldAddedMessage value = RecurringOrderCustomFieldAddedMessage.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessagePayloadTest.java new file mode 100644 index 00000000000..4a4fcefd59e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessagePayloadTest.java @@ -0,0 +1,48 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderCustomFieldChangedMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderCustomFieldChangedMessagePayloadBuilder builder) { + RecurringOrderCustomFieldChangedMessagePayload recurringOrderCustomFieldChangedMessagePayload = builder + .buildUnchecked(); + Assertions.assertThat(recurringOrderCustomFieldChangedMessagePayload) + .isInstanceOf(RecurringOrderCustomFieldChangedMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "name", RecurringOrderCustomFieldChangedMessagePayload.builder().name("name") }, + new Object[] { "value", RecurringOrderCustomFieldChangedMessagePayload.builder().value("value") }, + new Object[] { "previousValue", + RecurringOrderCustomFieldChangedMessagePayload.builder().previousValue("previousValue") } }; + } + + @Test + public void name() { + RecurringOrderCustomFieldChangedMessagePayload value = RecurringOrderCustomFieldChangedMessagePayload.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void value() { + RecurringOrderCustomFieldChangedMessagePayload value = RecurringOrderCustomFieldChangedMessagePayload.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } + + @Test + public void previousValue() { + RecurringOrderCustomFieldChangedMessagePayload value = RecurringOrderCustomFieldChangedMessagePayload.of(); + value.setPreviousValue("previousValue"); + Assertions.assertThat(value.getPreviousValue()).isEqualTo("previousValue"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessageTest.java new file mode 100644 index 00000000000..48d742b7890 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldChangedMessageTest.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderCustomFieldChangedMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderCustomFieldChangedMessageBuilder builder) { + RecurringOrderCustomFieldChangedMessage recurringOrderCustomFieldChangedMessage = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderCustomFieldChangedMessage) + .isInstanceOf(RecurringOrderCustomFieldChangedMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "name", RecurringOrderCustomFieldChangedMessage.builder().name("name") }, + new Object[] { "value", RecurringOrderCustomFieldChangedMessage.builder().value("value") }, + new Object[] { "previousValue", + RecurringOrderCustomFieldChangedMessage.builder().previousValue("previousValue") } }; + } + + @Test + public void name() { + RecurringOrderCustomFieldChangedMessage value = RecurringOrderCustomFieldChangedMessage.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void value() { + RecurringOrderCustomFieldChangedMessage value = RecurringOrderCustomFieldChangedMessage.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } + + @Test + public void previousValue() { + RecurringOrderCustomFieldChangedMessage value = RecurringOrderCustomFieldChangedMessage.of(); + value.setPreviousValue("previousValue"); + Assertions.assertThat(value.getPreviousValue()).isEqualTo("previousValue"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessagePayloadTest.java new file mode 100644 index 00000000000..e378aee7896 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessagePayloadTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderCustomFieldRemovedMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderCustomFieldRemovedMessagePayloadBuilder builder) { + RecurringOrderCustomFieldRemovedMessagePayload recurringOrderCustomFieldRemovedMessagePayload = builder + .buildUnchecked(); + Assertions.assertThat(recurringOrderCustomFieldRemovedMessagePayload) + .isInstanceOf(RecurringOrderCustomFieldRemovedMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "name", RecurringOrderCustomFieldRemovedMessagePayload.builder().name("name") } }; + } + + @Test + public void name() { + RecurringOrderCustomFieldRemovedMessagePayload value = RecurringOrderCustomFieldRemovedMessagePayload.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessageTest.java new file mode 100644 index 00000000000..550fcb101e4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomFieldRemovedMessageTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderCustomFieldRemovedMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderCustomFieldRemovedMessageBuilder builder) { + RecurringOrderCustomFieldRemovedMessage recurringOrderCustomFieldRemovedMessage = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderCustomFieldRemovedMessage) + .isInstanceOf(RecurringOrderCustomFieldRemovedMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "name", RecurringOrderCustomFieldRemovedMessage.builder().name("name") } }; + } + + @Test + public void name() { + RecurringOrderCustomFieldRemovedMessage value = RecurringOrderCustomFieldRemovedMessage.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessagePayloadTest.java new file mode 100644 index 00000000000..65cbe4ad2dc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessagePayloadTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderCustomTypeRemovedMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderCustomTypeRemovedMessagePayloadBuilder builder) { + RecurringOrderCustomTypeRemovedMessagePayload recurringOrderCustomTypeRemovedMessagePayload = builder + .buildUnchecked(); + Assertions.assertThat(recurringOrderCustomTypeRemovedMessagePayload) + .isInstanceOf(RecurringOrderCustomTypeRemovedMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "previousTypeId", + RecurringOrderCustomTypeRemovedMessagePayload.builder().previousTypeId("previousTypeId") } }; + } + + @Test + public void previousTypeId() { + RecurringOrderCustomTypeRemovedMessagePayload value = RecurringOrderCustomTypeRemovedMessagePayload.of(); + value.setPreviousTypeId("previousTypeId"); + Assertions.assertThat(value.getPreviousTypeId()).isEqualTo("previousTypeId"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessageTest.java new file mode 100644 index 00000000000..2c3c150286a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeRemovedMessageTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderCustomTypeRemovedMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderCustomTypeRemovedMessageBuilder builder) { + RecurringOrderCustomTypeRemovedMessage recurringOrderCustomTypeRemovedMessage = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderCustomTypeRemovedMessage) + .isInstanceOf(RecurringOrderCustomTypeRemovedMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "previousTypeId", + RecurringOrderCustomTypeRemovedMessage.builder().previousTypeId("previousTypeId") } }; + } + + @Test + public void previousTypeId() { + RecurringOrderCustomTypeRemovedMessage value = RecurringOrderCustomTypeRemovedMessage.of(); + value.setPreviousTypeId("previousTypeId"); + Assertions.assertThat(value.getPreviousTypeId()).isEqualTo("previousTypeId"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessagePayloadTest.java new file mode 100644 index 00000000000..cb82053d9a4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessagePayloadTest.java @@ -0,0 +1,42 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderCustomTypeSetMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderCustomTypeSetMessagePayloadBuilder builder) { + RecurringOrderCustomTypeSetMessagePayload recurringOrderCustomTypeSetMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderCustomTypeSetMessagePayload) + .isInstanceOf(RecurringOrderCustomTypeSetMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "customFields", + RecurringOrderCustomTypeSetMessagePayload.builder() + .customFields(new com.commercetools.api.models.type.CustomFieldsImpl()) }, + new Object[] { "previousTypeId", + RecurringOrderCustomTypeSetMessagePayload.builder().previousTypeId("previousTypeId") } }; + } + + @Test + public void customFields() { + RecurringOrderCustomTypeSetMessagePayload value = RecurringOrderCustomTypeSetMessagePayload.of(); + value.setCustomFields(new com.commercetools.api.models.type.CustomFieldsImpl()); + Assertions.assertThat(value.getCustomFields()) + .isEqualTo(new com.commercetools.api.models.type.CustomFieldsImpl()); + } + + @Test + public void previousTypeId() { + RecurringOrderCustomTypeSetMessagePayload value = RecurringOrderCustomTypeSetMessagePayload.of(); + value.setPreviousTypeId("previousTypeId"); + Assertions.assertThat(value.getPreviousTypeId()).isEqualTo("previousTypeId"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessageTest.java new file mode 100644 index 00000000000..d872eb9fd3a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderCustomTypeSetMessageTest.java @@ -0,0 +1,42 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderCustomTypeSetMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderCustomTypeSetMessageBuilder builder) { + RecurringOrderCustomTypeSetMessage recurringOrderCustomTypeSetMessage = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderCustomTypeSetMessage) + .isInstanceOf(RecurringOrderCustomTypeSetMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "customFields", + RecurringOrderCustomTypeSetMessage.builder() + .customFields(new com.commercetools.api.models.type.CustomFieldsImpl()) }, + new Object[] { "previousTypeId", + RecurringOrderCustomTypeSetMessage.builder().previousTypeId("previousTypeId") } }; + } + + @Test + public void customFields() { + RecurringOrderCustomTypeSetMessage value = RecurringOrderCustomTypeSetMessage.of(); + value.setCustomFields(new com.commercetools.api.models.type.CustomFieldsImpl()); + Assertions.assertThat(value.getCustomFields()) + .isEqualTo(new com.commercetools.api.models.type.CustomFieldsImpl()); + } + + @Test + public void previousTypeId() { + RecurringOrderCustomTypeSetMessage value = RecurringOrderCustomTypeSetMessage.of(); + value.setPreviousTypeId("previousTypeId"); + Assertions.assertThat(value.getPreviousTypeId()).isEqualTo("previousTypeId"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessagePayloadTest.java new file mode 100644 index 00000000000..66da1490bbe --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessagePayloadTest.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderKeySetMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderKeySetMessagePayloadBuilder builder) { + RecurringOrderKeySetMessagePayload recurringOrderKeySetMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderKeySetMessagePayload) + .isInstanceOf(RecurringOrderKeySetMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", RecurringOrderKeySetMessagePayload.builder().key("key") }, + new Object[] { "oldKey", RecurringOrderKeySetMessagePayload.builder().oldKey("oldKey") } }; + } + + @Test + public void key() { + RecurringOrderKeySetMessagePayload value = RecurringOrderKeySetMessagePayload.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void oldKey() { + RecurringOrderKeySetMessagePayload value = RecurringOrderKeySetMessagePayload.of(); + value.setOldKey("oldKey"); + Assertions.assertThat(value.getOldKey()).isEqualTo("oldKey"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessageTest.java new file mode 100644 index 00000000000..a5b4cc5dbce --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderKeySetMessageTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderKeySetMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderKeySetMessageBuilder builder) { + RecurringOrderKeySetMessage recurringOrderKeySetMessage = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderKeySetMessage).isInstanceOf(RecurringOrderKeySetMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", RecurringOrderKeySetMessage.builder().key("key") }, + new Object[] { "oldKey", RecurringOrderKeySetMessage.builder().oldKey("oldKey") } }; + } + + @Test + public void key() { + RecurringOrderKeySetMessage value = RecurringOrderKeySetMessage.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void oldKey() { + RecurringOrderKeySetMessage value = RecurringOrderKeySetMessage.of(); + value.setOldKey("oldKey"); + Assertions.assertThat(value.getOldKey()).isEqualTo("oldKey"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessagePayloadTest.java new file mode 100644 index 00000000000..4dc253bf7e2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessagePayloadTest.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderScheduleSetMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderScheduleSetMessagePayloadBuilder builder) { + RecurringOrderScheduleSetMessagePayload recurringOrderScheduleSetMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderScheduleSetMessagePayload) + .isInstanceOf(RecurringOrderScheduleSetMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "recurrencePolicySchedule", RecurringOrderScheduleSetMessagePayload.builder() + .recurrencePolicySchedule( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()) }, + new Object[] { "oldRecurrencePolicySchedule", RecurringOrderScheduleSetMessagePayload.builder() + .oldRecurrencePolicySchedule( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()) } }; + } + + @Test + public void recurrencePolicySchedule() { + RecurringOrderScheduleSetMessagePayload value = RecurringOrderScheduleSetMessagePayload.of(); + value.setRecurrencePolicySchedule( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()); + Assertions.assertThat(value.getRecurrencePolicySchedule()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()); + } + + @Test + public void oldRecurrencePolicySchedule() { + RecurringOrderScheduleSetMessagePayload value = RecurringOrderScheduleSetMessagePayload.of(); + value.setOldRecurrencePolicySchedule( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()); + Assertions.assertThat(value.getOldRecurrencePolicySchedule()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessageTest.java new file mode 100644 index 00000000000..38e8fea483c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderScheduleSetMessageTest.java @@ -0,0 +1,45 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderScheduleSetMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderScheduleSetMessageBuilder builder) { + RecurringOrderScheduleSetMessage recurringOrderScheduleSetMessage = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderScheduleSetMessage).isInstanceOf(RecurringOrderScheduleSetMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "recurrencePolicySchedule", RecurringOrderScheduleSetMessage.builder() + .recurrencePolicySchedule( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()) }, + new Object[] { "oldRecurrencePolicySchedule", RecurringOrderScheduleSetMessage.builder() + .oldRecurrencePolicySchedule( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()) } }; + } + + @Test + public void recurrencePolicySchedule() { + RecurringOrderScheduleSetMessage value = RecurringOrderScheduleSetMessage.of(); + value.setRecurrencePolicySchedule( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()); + Assertions.assertThat(value.getRecurrencePolicySchedule()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()); + } + + @Test + public void oldRecurrencePolicySchedule() { + RecurringOrderScheduleSetMessage value = RecurringOrderScheduleSetMessage.of(); + value.setOldRecurrencePolicySchedule( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()); + Assertions.assertThat(value.getOldRecurrencePolicySchedule()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessagePayloadTest.java new file mode 100644 index 00000000000..9a268183e6a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessagePayloadTest.java @@ -0,0 +1,43 @@ + +package com.commercetools.api.models.message; + +import java.time.ZonedDateTime; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderStartsAtSetMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderStartsAtSetMessagePayloadBuilder builder) { + RecurringOrderStartsAtSetMessagePayload recurringOrderStartsAtSetMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderStartsAtSetMessagePayload) + .isInstanceOf(RecurringOrderStartsAtSetMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "startsAt", + RecurringOrderStartsAtSetMessagePayload.builder() + .startsAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "oldStartsAt", RecurringOrderStartsAtSetMessagePayload.builder() + .oldStartsAt(ZonedDateTime.parse("2023-06-01T12:00Z")) } }; + } + + @Test + public void startsAt() { + RecurringOrderStartsAtSetMessagePayload value = RecurringOrderStartsAtSetMessagePayload.of(); + value.setStartsAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getStartsAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void oldStartsAt() { + RecurringOrderStartsAtSetMessagePayload value = RecurringOrderStartsAtSetMessagePayload.of(); + value.setOldStartsAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getOldStartsAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessageTest.java new file mode 100644 index 00000000000..024587239d9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStartsAtSetMessageTest.java @@ -0,0 +1,41 @@ + +package com.commercetools.api.models.message; + +import java.time.ZonedDateTime; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderStartsAtSetMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderStartsAtSetMessageBuilder builder) { + RecurringOrderStartsAtSetMessage recurringOrderStartsAtSetMessage = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderStartsAtSetMessage).isInstanceOf(RecurringOrderStartsAtSetMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "startsAt", + RecurringOrderStartsAtSetMessage.builder().startsAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "oldStartsAt", RecurringOrderStartsAtSetMessage.builder() + .oldStartsAt(ZonedDateTime.parse("2023-06-01T12:00Z")) } }; + } + + @Test + public void startsAt() { + RecurringOrderStartsAtSetMessage value = RecurringOrderStartsAtSetMessage.of(); + value.setStartsAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getStartsAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void oldStartsAt() { + RecurringOrderStartsAtSetMessage value = RecurringOrderStartsAtSetMessage.of(); + value.setOldStartsAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getOldStartsAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessagePayloadTest.java new file mode 100644 index 00000000000..0637fabe3f7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessagePayloadTest.java @@ -0,0 +1,45 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderStateChangedMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderStateChangedMessagePayloadBuilder builder) { + RecurringOrderStateChangedMessagePayload recurringOrderStateChangedMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderStateChangedMessagePayload) + .isInstanceOf(RecurringOrderStateChangedMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "state", + RecurringOrderStateChangedMessagePayload.builder() + .state(com.commercetools.api.models.recurring_order.RecurringOrderState + .findEnum("Active")) }, + new Object[] { "oldState", RecurringOrderStateChangedMessagePayload.builder() + .oldState( + com.commercetools.api.models.recurring_order.RecurringOrderState.findEnum("Active")) } }; + } + + @Test + public void state() { + RecurringOrderStateChangedMessagePayload value = RecurringOrderStateChangedMessagePayload.of(); + value.setState(com.commercetools.api.models.recurring_order.RecurringOrderState.findEnum("Active")); + Assertions.assertThat(value.getState()) + .isEqualTo(com.commercetools.api.models.recurring_order.RecurringOrderState.findEnum("Active")); + } + + @Test + public void oldState() { + RecurringOrderStateChangedMessagePayload value = RecurringOrderStateChangedMessagePayload.of(); + value.setOldState(com.commercetools.api.models.recurring_order.RecurringOrderState.findEnum("Active")); + Assertions.assertThat(value.getOldState()) + .isEqualTo(com.commercetools.api.models.recurring_order.RecurringOrderState.findEnum("Active")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessageTest.java new file mode 100644 index 00000000000..13f555f06a8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStateChangedMessageTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderStateChangedMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderStateChangedMessageBuilder builder) { + RecurringOrderStateChangedMessage recurringOrderStateChangedMessage = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderStateChangedMessage).isInstanceOf(RecurringOrderStateChangedMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "state", + RecurringOrderStateChangedMessage.builder() + .state(com.commercetools.api.models.recurring_order.RecurringOrderState + .findEnum("Active")) }, + new Object[] { "oldState", RecurringOrderStateChangedMessage.builder() + .oldState( + com.commercetools.api.models.recurring_order.RecurringOrderState.findEnum("Active")) } }; + } + + @Test + public void state() { + RecurringOrderStateChangedMessage value = RecurringOrderStateChangedMessage.of(); + value.setState(com.commercetools.api.models.recurring_order.RecurringOrderState.findEnum("Active")); + Assertions.assertThat(value.getState()) + .isEqualTo(com.commercetools.api.models.recurring_order.RecurringOrderState.findEnum("Active")); + } + + @Test + public void oldState() { + RecurringOrderStateChangedMessage value = RecurringOrderStateChangedMessage.of(); + value.setOldState(com.commercetools.api.models.recurring_order.RecurringOrderState.findEnum("Active")); + Assertions.assertThat(value.getOldState()) + .isEqualTo(com.commercetools.api.models.recurring_order.RecurringOrderState.findEnum("Active")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessagePayloadTest.java new file mode 100644 index 00000000000..0202267ae3d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessagePayloadTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderStateTransitionMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderStateTransitionMessagePayloadBuilder builder) { + RecurringOrderStateTransitionMessagePayload recurringOrderStateTransitionMessagePayload = builder + .buildUnchecked(); + Assertions.assertThat(recurringOrderStateTransitionMessagePayload) + .isInstanceOf(RecurringOrderStateTransitionMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "state", + RecurringOrderStateTransitionMessagePayload.builder() + .state(new com.commercetools.api.models.state.StateReferenceImpl()) }, + new Object[] { "oldState", + RecurringOrderStateTransitionMessagePayload.builder() + .oldState(new com.commercetools.api.models.state.StateReferenceImpl()) }, + new Object[] { "force", RecurringOrderStateTransitionMessagePayload.builder().force(true) } }; + } + + @Test + public void state() { + RecurringOrderStateTransitionMessagePayload value = RecurringOrderStateTransitionMessagePayload.of(); + value.setState(new com.commercetools.api.models.state.StateReferenceImpl()); + Assertions.assertThat(value.getState()).isEqualTo(new com.commercetools.api.models.state.StateReferenceImpl()); + } + + @Test + public void oldState() { + RecurringOrderStateTransitionMessagePayload value = RecurringOrderStateTransitionMessagePayload.of(); + value.setOldState(new com.commercetools.api.models.state.StateReferenceImpl()); + Assertions.assertThat(value.getOldState()) + .isEqualTo(new com.commercetools.api.models.state.StateReferenceImpl()); + } + + @Test + public void force() { + RecurringOrderStateTransitionMessagePayload value = RecurringOrderStateTransitionMessagePayload.of(); + value.setForce(true); + Assertions.assertThat(value.getForce()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessageTest.java new file mode 100644 index 00000000000..8cee4a7672c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderStateTransitionMessageTest.java @@ -0,0 +1,51 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderStateTransitionMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderStateTransitionMessageBuilder builder) { + RecurringOrderStateTransitionMessage recurringOrderStateTransitionMessage = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderStateTransitionMessage) + .isInstanceOf(RecurringOrderStateTransitionMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "state", + RecurringOrderStateTransitionMessage.builder() + .state(new com.commercetools.api.models.state.StateReferenceImpl()) }, + new Object[] { "oldState", + RecurringOrderStateTransitionMessage.builder() + .oldState(new com.commercetools.api.models.state.StateReferenceImpl()) }, + new Object[] { "force", RecurringOrderStateTransitionMessage.builder().force(true) } }; + } + + @Test + public void state() { + RecurringOrderStateTransitionMessage value = RecurringOrderStateTransitionMessage.of(); + value.setState(new com.commercetools.api.models.state.StateReferenceImpl()); + Assertions.assertThat(value.getState()).isEqualTo(new com.commercetools.api.models.state.StateReferenceImpl()); + } + + @Test + public void oldState() { + RecurringOrderStateTransitionMessage value = RecurringOrderStateTransitionMessage.of(); + value.setOldState(new com.commercetools.api.models.state.StateReferenceImpl()); + Assertions.assertThat(value.getOldState()) + .isEqualTo(new com.commercetools.api.models.state.StateReferenceImpl()); + } + + @Test + public void force() { + RecurringOrderStateTransitionMessage value = RecurringOrderStateTransitionMessage.of(); + value.setForce(true); + Assertions.assertThat(value.getForce()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order/OrderTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order/OrderTest.java index 3e03f5fd71b..0202e0aa15c 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order/OrderTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order/OrderTest.java @@ -104,6 +104,10 @@ public static Object[][] objectBuilder() { Order.builder().cart(new com.commercetools.api.models.cart.CartReferenceImpl()) }, new Object[] { "quote", Order.builder().quote(new com.commercetools.api.models.quote.QuoteReferenceImpl()) }, + new Object[] { "recurringOrder", + Order.builder() + .recurringOrder( + new com.commercetools.api.models.recurring_order.RecurringOrderReferenceImpl()) }, new Object[] { "orderState", Order.builder().orderState(com.commercetools.api.models.order.OrderState.findEnum("Open")) }, new Object[] { "shipmentState", @@ -437,6 +441,14 @@ public void quote() { Assertions.assertThat(value.getQuote()).isEqualTo(new com.commercetools.api.models.quote.QuoteReferenceImpl()); } + @Test + public void recurringOrder() { + Order value = Order.of(); + value.setRecurringOrder(new com.commercetools.api.models.recurring_order.RecurringOrderReferenceImpl()); + Assertions.assertThat(value.getRecurringOrder()) + .isEqualTo(new com.commercetools.api.models.recurring_order.RecurringOrderReferenceImpl()); + } + @Test public void orderState() { Order value = Order.of(); diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemActionTest.java index 54adf3d6475..0b6f9b48f1e 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemActionTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddCustomLineItemActionTest.java @@ -37,8 +37,12 @@ public static Object[][] objectBuilder() { .shippingDetails(new com.commercetools.api.models.cart.ItemShippingDetailsDraftImpl()) }, new Object[] { "priceMode", StagedOrderAddCustomLineItemAction.builder() .priceMode(com.commercetools.api.models.cart.CustomLineItemPriceMode.findEnum("Standard")) }, - new Object[] { "custom", StagedOrderAddCustomLineItemAction.builder() - .custom(new com.commercetools.api.models.type.CustomFieldsDraftImpl()) } }; + new Object[] { "custom", + StagedOrderAddCustomLineItemAction.builder() + .custom(new com.commercetools.api.models.type.CustomFieldsDraftImpl()) }, + new Object[] { "recurrenceInfo", StagedOrderAddCustomLineItemAction.builder() + .recurrenceInfo( + new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftImpl()) } }; } @Test @@ -115,4 +119,13 @@ public void custom() { Assertions.assertThat(value.getCustom()) .isEqualTo(new com.commercetools.api.models.type.CustomFieldsDraftImpl()); } + + @Test + public void recurrenceInfo() { + StagedOrderAddCustomLineItemAction value = StagedOrderAddCustomLineItemAction.of(); + value.setRecurrenceInfo( + new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.api.models.recurring_order.CustomLineItemRecurrenceInfoDraftImpl()); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionTest.java index 4dd56245b77..3f5cc9e01f6 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionTest.java @@ -44,8 +44,12 @@ public static Object[][] objectBuilder() { .inventoryMode(com.commercetools.api.models.cart.InventoryMode.findEnum("None")) }, new Object[] { "shippingDetails", StagedOrderAddLineItemAction.builder() .shippingDetails(new com.commercetools.api.models.cart.ItemShippingDetailsDraftImpl()) }, - new Object[] { "custom", StagedOrderAddLineItemAction.builder() - .custom(new com.commercetools.api.models.type.CustomFieldsDraftImpl()) } }; + new Object[] { "custom", + StagedOrderAddLineItemAction.builder() + .custom(new com.commercetools.api.models.type.CustomFieldsDraftImpl()) }, + new Object[] { "recurrenceInfo", StagedOrderAddLineItemAction.builder() + .recurrenceInfo( + new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()) } }; } @Test @@ -152,4 +156,12 @@ public void custom() { Assertions.assertThat(value.getCustom()) .isEqualTo(new com.commercetools.api.models.type.CustomFieldsDraftImpl()); } + + @Test + public void recurrenceInfo() { + StagedOrderAddLineItemAction value = StagedOrderAddLineItemAction.of(); + value.setRecurrenceInfo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.api.models.recurring_order.LineItemRecurrenceInfoDraftImpl()); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product/ProductVariantTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product/ProductVariantTest.java index 8128d5c3843..bcea89244be 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product/ProductVariantTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product/ProductVariantTest.java @@ -39,7 +39,11 @@ public static Object[][] objectBuilder() { new Object[] { "scopedPrice", ProductVariant.builder() .scopedPrice(new com.commercetools.api.models.common.ScopedPriceImpl()) }, - new Object[] { "scopedPriceDiscounted", ProductVariant.builder().scopedPriceDiscounted(true) } }; + new Object[] { "scopedPriceDiscounted", ProductVariant.builder().scopedPriceDiscounted(true) }, + new Object[] { "recurrencePrices", + ProductVariant.builder() + .recurrencePrices( + Collections.singletonList(new com.commercetools.api.models.common.PriceImpl())) } }; } @Test @@ -131,4 +135,12 @@ public void scopedPriceDiscounted() { value.setScopedPriceDiscounted(true); Assertions.assertThat(value.getScopedPriceDiscounted()).isEqualTo(true); } + + @Test + public void recurrencePrices() { + ProductVariant value = ProductVariant.of(); + value.setRecurrencePrices(Collections.singletonList(new com.commercetools.api.models.common.PriceImpl())); + Assertions.assertThat(value.getRecurrencePrices()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.PriceImpl())); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleTest.java new file mode 100644 index 00000000000..55494b9d924 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.api.models.recurrence_policy; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class DayOfMonthScheduleTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, DayOfMonthScheduleBuilder builder) { + DayOfMonthSchedule dayOfMonthSchedule = builder.buildUnchecked(); + Assertions.assertThat(dayOfMonthSchedule).isInstanceOf(DayOfMonthSchedule.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "day", DayOfMonthSchedule.builder().day(5) } }; + } + + @Test + public void day() { + DayOfMonthSchedule value = DayOfMonthSchedule.of(); + value.setDay(5); + Assertions.assertThat(value.getDay()).isEqualTo(5); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyDraftTest.java new file mode 100644 index 00000000000..e67333dd0d7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyDraftTest.java @@ -0,0 +1,60 @@ + +package com.commercetools.api.models.recurrence_policy; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurrencePolicyDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurrencePolicyDraftBuilder builder) { + RecurrencePolicyDraft recurrencePolicyDraft = builder.buildUnchecked(); + Assertions.assertThat(recurrencePolicyDraft).isInstanceOf(RecurrencePolicyDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", RecurrencePolicyDraft.builder().key("key") }, + new Object[] { "name", + RecurrencePolicyDraft.builder() + .name(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { "description", + RecurrencePolicyDraft.builder() + .description(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { "schedule", RecurrencePolicyDraft.builder() + .schedule( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraftImpl()) } }; + } + + @Test + public void key() { + RecurrencePolicyDraft value = RecurrencePolicyDraft.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void name() { + RecurrencePolicyDraft value = RecurrencePolicyDraft.of(); + value.setName(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getName()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void description() { + RecurrencePolicyDraft value = RecurrencePolicyDraft.of(); + value.setDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void schedule() { + RecurrencePolicyDraft value = RecurrencePolicyDraft.of(); + value.setSchedule(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraftImpl()); + Assertions.assertThat(value.getSchedule()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraftImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyPagedQueryResponseTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyPagedQueryResponseTest.java new file mode 100644 index 00000000000..e044fc54850 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyPagedQueryResponseTest.java @@ -0,0 +1,69 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurrencePolicyPagedQueryResponseTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurrencePolicyPagedQueryResponseBuilder builder) { + RecurrencePolicyPagedQueryResponse recurrencePolicyPagedQueryResponse = builder.buildUnchecked(); + Assertions.assertThat(recurrencePolicyPagedQueryResponse) + .isInstanceOf(RecurrencePolicyPagedQueryResponse.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "limit", RecurrencePolicyPagedQueryResponse.builder().limit(7L) }, + new Object[] { "offset", RecurrencePolicyPagedQueryResponse.builder().offset(3L) }, + new Object[] { "count", RecurrencePolicyPagedQueryResponse.builder().count(2L) }, + new Object[] { "total", RecurrencePolicyPagedQueryResponse.builder().total(1L) }, + new Object[] { "results", + RecurrencePolicyPagedQueryResponse.builder() + .results(Collections.singletonList( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyImpl())) } }; + } + + @Test + public void limit() { + RecurrencePolicyPagedQueryResponse value = RecurrencePolicyPagedQueryResponse.of(); + value.setLimit(7L); + Assertions.assertThat(value.getLimit()).isEqualTo(7L); + } + + @Test + public void offset() { + RecurrencePolicyPagedQueryResponse value = RecurrencePolicyPagedQueryResponse.of(); + value.setOffset(3L); + Assertions.assertThat(value.getOffset()).isEqualTo(3L); + } + + @Test + public void count() { + RecurrencePolicyPagedQueryResponse value = RecurrencePolicyPagedQueryResponse.of(); + value.setCount(2L); + Assertions.assertThat(value.getCount()).isEqualTo(2L); + } + + @Test + public void total() { + RecurrencePolicyPagedQueryResponse value = RecurrencePolicyPagedQueryResponse.of(); + value.setTotal(1L); + Assertions.assertThat(value.getTotal()).isEqualTo(1L); + } + + @Test + public void results() { + RecurrencePolicyPagedQueryResponse value = RecurrencePolicyPagedQueryResponse.of(); + value.setResults( + Collections.singletonList(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyImpl())); + Assertions.assertThat(value.getResults()) + .isEqualTo(Collections + .singletonList(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyReferenceTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyReferenceTest.java new file mode 100644 index 00000000000..42981fd7448 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyReferenceTest.java @@ -0,0 +1,40 @@ + +package com.commercetools.api.models.recurrence_policy; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurrencePolicyReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurrencePolicyReferenceBuilder builder) { + RecurrencePolicyReference recurrencePolicyReference = builder.buildUnchecked(); + Assertions.assertThat(recurrencePolicyReference).isInstanceOf(RecurrencePolicyReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "obj", + RecurrencePolicyReference.builder() + .obj(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyImpl()) }, + new Object[] { "id", RecurrencePolicyReference.builder().id("id") } }; + } + + @Test + public void obj() { + RecurrencePolicyReference value = RecurrencePolicyReference.of(); + value.setObj(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyImpl()); + Assertions.assertThat(value.getObj()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyImpl()); + } + + @Test + public void id() { + RecurrencePolicyReference value = RecurrencePolicyReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyResourceIdentifierTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyResourceIdentifierTest.java new file mode 100644 index 00000000000..bc6521636c4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyResourceIdentifierTest.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.models.recurrence_policy; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurrencePolicyResourceIdentifierTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurrencePolicyResourceIdentifierBuilder builder) { + RecurrencePolicyResourceIdentifier recurrencePolicyResourceIdentifier = builder.buildUnchecked(); + Assertions.assertThat(recurrencePolicyResourceIdentifier) + .isInstanceOf(RecurrencePolicyResourceIdentifier.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", RecurrencePolicyResourceIdentifier.builder().id("id") }, + new Object[] { "key", RecurrencePolicyResourceIdentifier.builder().key("key") } }; + } + + @Test + public void id() { + RecurrencePolicyResourceIdentifier value = RecurrencePolicyResourceIdentifier.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void key() { + RecurrencePolicyResourceIdentifier value = RecurrencePolicyResourceIdentifier.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetDescriptionActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetDescriptionActionTest.java new file mode 100644 index 00000000000..fb85baca719 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetDescriptionActionTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.models.recurrence_policy; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurrencePolicySetDescriptionActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurrencePolicySetDescriptionActionBuilder builder) { + RecurrencePolicySetDescriptionAction recurrencePolicySetDescriptionAction = builder.buildUnchecked(); + Assertions.assertThat(recurrencePolicySetDescriptionAction) + .isInstanceOf(RecurrencePolicySetDescriptionAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "description", RecurrencePolicySetDescriptionAction.builder() + .description(new com.commercetools.api.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void description() { + RecurrencePolicySetDescriptionAction value = RecurrencePolicySetDescriptionAction.of(); + value.setDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetKeyActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetKeyActionTest.java new file mode 100644 index 00000000000..6941ac0430c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetKeyActionTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.api.models.recurrence_policy; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurrencePolicySetKeyActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurrencePolicySetKeyActionBuilder builder) { + RecurrencePolicySetKeyAction recurrencePolicySetKeyAction = builder.buildUnchecked(); + Assertions.assertThat(recurrencePolicySetKeyAction).isInstanceOf(RecurrencePolicySetKeyAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", RecurrencePolicySetKeyAction.builder().key("key") } }; + } + + @Test + public void key() { + RecurrencePolicySetKeyAction value = RecurrencePolicySetKeyAction.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetNameActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetNameActionTest.java new file mode 100644 index 00000000000..5a9470ab67d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetNameActionTest.java @@ -0,0 +1,29 @@ + +package com.commercetools.api.models.recurrence_policy; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurrencePolicySetNameActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurrencePolicySetNameActionBuilder builder) { + RecurrencePolicySetNameAction recurrencePolicySetNameAction = builder.buildUnchecked(); + Assertions.assertThat(recurrencePolicySetNameAction).isInstanceOf(RecurrencePolicySetNameAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "name", RecurrencePolicySetNameAction.builder() + .name(new com.commercetools.api.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void name() { + RecurrencePolicySetNameAction value = RecurrencePolicySetNameAction.of(); + value.setName(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getName()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetScheduleActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetScheduleActionTest.java new file mode 100644 index 00000000000..af98118cc17 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicySetScheduleActionTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.models.recurrence_policy; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurrencePolicySetScheduleActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurrencePolicySetScheduleActionBuilder builder) { + RecurrencePolicySetScheduleAction recurrencePolicySetScheduleAction = builder.buildUnchecked(); + Assertions.assertThat(recurrencePolicySetScheduleAction).isInstanceOf(RecurrencePolicySetScheduleAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "schedule", RecurrencePolicySetScheduleAction.builder() + .schedule(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraftImpl()) } }; + } + + @Test + public void schedule() { + RecurrencePolicySetScheduleAction value = RecurrencePolicySetScheduleAction.of(); + value.setSchedule(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraftImpl()); + Assertions.assertThat(value.getSchedule()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleDraftImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyTest.java new file mode 100644 index 00000000000..9d75217ea1f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyTest.java @@ -0,0 +1,114 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.time.ZonedDateTime; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurrencePolicyTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurrencePolicyBuilder builder) { + RecurrencePolicy recurrencePolicy = builder.buildUnchecked(); + Assertions.assertThat(recurrencePolicy).isInstanceOf(RecurrencePolicy.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", RecurrencePolicy.builder().id("id") }, + new Object[] { "version", RecurrencePolicy.builder().version(2L) }, + new Object[] { "key", RecurrencePolicy.builder().key("key") }, + new Object[] { "name", + RecurrencePolicy.builder() + .name(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { "description", + RecurrencePolicy.builder() + .description(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { "schedule", RecurrencePolicy.builder() + .schedule(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()) }, + new Object[] { "createdAt", + RecurrencePolicy.builder().createdAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "createdBy", + RecurrencePolicy.builder().createdBy(new com.commercetools.api.models.common.CreatedByImpl()) }, + new Object[] { "lastModifiedAt", + RecurrencePolicy.builder().lastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "lastModifiedBy", RecurrencePolicy.builder() + .lastModifiedBy(new com.commercetools.api.models.common.LastModifiedByImpl()) } }; + } + + @Test + public void id() { + RecurrencePolicy value = RecurrencePolicy.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void version() { + RecurrencePolicy value = RecurrencePolicy.of(); + value.setVersion(2L); + Assertions.assertThat(value.getVersion()).isEqualTo(2L); + } + + @Test + public void key() { + RecurrencePolicy value = RecurrencePolicy.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void name() { + RecurrencePolicy value = RecurrencePolicy.of(); + value.setName(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getName()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void description() { + RecurrencePolicy value = RecurrencePolicy.of(); + value.setDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void schedule() { + RecurrencePolicy value = RecurrencePolicy.of(); + value.setSchedule(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()); + Assertions.assertThat(value.getSchedule()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()); + } + + @Test + public void createdAt() { + RecurrencePolicy value = RecurrencePolicy.of(); + value.setCreatedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getCreatedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void createdBy() { + RecurrencePolicy value = RecurrencePolicy.of(); + value.setCreatedBy(new com.commercetools.api.models.common.CreatedByImpl()); + Assertions.assertThat(value.getCreatedBy()).isEqualTo(new com.commercetools.api.models.common.CreatedByImpl()); + } + + @Test + public void lastModifiedAt() { + RecurrencePolicy value = RecurrencePolicy.of(); + value.setLastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getLastModifiedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void lastModifiedBy() { + RecurrencePolicy value = RecurrencePolicy.of(); + value.setLastModifiedBy(new com.commercetools.api.models.common.LastModifiedByImpl()); + Assertions.assertThat(value.getLastModifiedBy()) + .isEqualTo(new com.commercetools.api.models.common.LastModifiedByImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateTest.java new file mode 100644 index 00000000000..fd13608369f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyUpdateTest.java @@ -0,0 +1,43 @@ + +package com.commercetools.api.models.recurrence_policy; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurrencePolicyUpdateTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurrencePolicyUpdateBuilder builder) { + RecurrencePolicyUpdate recurrencePolicyUpdate = builder.buildUnchecked(); + Assertions.assertThat(recurrencePolicyUpdate).isInstanceOf(RecurrencePolicyUpdate.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "version", RecurrencePolicyUpdate.builder().version(2L) }, + new Object[] { "actions", RecurrencePolicyUpdate.builder() + .actions(Collections.singletonList( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdateActionImpl())) } }; + } + + @Test + public void version() { + RecurrencePolicyUpdate value = RecurrencePolicyUpdate.of(); + value.setVersion(2L); + Assertions.assertThat(value.getVersion()).isEqualTo(2L); + } + + @Test + public void actions() { + RecurrencePolicyUpdate value = RecurrencePolicyUpdate.of(); + value.setActions(Collections + .singletonList(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdateActionImpl())); + Assertions.assertThat(value.getActions()) + .isEqualTo(Collections.singletonList( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyUpdateActionImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleDraftTest.java new file mode 100644 index 00000000000..f0e194ae8f5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleDraftTest.java @@ -0,0 +1,38 @@ + +package com.commercetools.api.models.recurrence_policy; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class StandardScheduleDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, StandardScheduleDraftBuilder builder) { + StandardScheduleDraft standardScheduleDraft = builder.buildUnchecked(); + Assertions.assertThat(standardScheduleDraft).isInstanceOf(StandardScheduleDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "value", StandardScheduleDraft.builder().value(6L) }, + new Object[] { "intervalUnit", StandardScheduleDraft.builder() + .intervalUnit(com.commercetools.api.models.recurrence_policy.IntervalUnit.findEnum("Days")) } }; + } + + @Test + public void value() { + StandardScheduleDraft value = StandardScheduleDraft.of(); + value.setValue(6L); + Assertions.assertThat(value.getValue()).isEqualTo(6L); + } + + @Test + public void intervalUnit() { + StandardScheduleDraft value = StandardScheduleDraft.of(); + value.setIntervalUnit(com.commercetools.api.models.recurrence_policy.IntervalUnit.findEnum("Days")); + Assertions.assertThat(value.getIntervalUnit()) + .isEqualTo(com.commercetools.api.models.recurrence_policy.IntervalUnit.findEnum("Days")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleTest.java new file mode 100644 index 00000000000..4392c4f070e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurrence_policy/StandardScheduleTest.java @@ -0,0 +1,38 @@ + +package com.commercetools.api.models.recurrence_policy; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class StandardScheduleTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, StandardScheduleBuilder builder) { + StandardSchedule standardSchedule = builder.buildUnchecked(); + Assertions.assertThat(standardSchedule).isInstanceOf(StandardSchedule.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "value", StandardSchedule.builder().value(6L) }, + new Object[] { "intervalUnit", StandardSchedule.builder() + .intervalUnit(com.commercetools.api.models.recurrence_policy.IntervalUnit.findEnum("Days")) } }; + } + + @Test + public void value() { + StandardSchedule value = StandardSchedule.of(); + value.setValue(6L); + Assertions.assertThat(value.getValue()).isEqualTo(6L); + } + + @Test + public void intervalUnit() { + StandardSchedule value = StandardSchedule.of(); + value.setIntervalUnit(com.commercetools.api.models.recurrence_policy.IntervalUnit.findEnum("Days")); + Assertions.assertThat(value.getIntervalUnit()) + .isEqualTo(com.commercetools.api.models.recurrence_policy.IntervalUnit.findEnum("Days")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/CounterDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/CounterDraftTest.java new file mode 100644 index 00000000000..e70b3838cde --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/CounterDraftTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.api.models.recurring_order; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CounterDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CounterDraftBuilder builder) { + CounterDraft counterDraft = builder.buildUnchecked(); + Assertions.assertThat(counterDraft).isInstanceOf(CounterDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "totalToSkip", CounterDraft.builder().totalToSkip(3) } }; + } + + @Test + public void totalToSkip() { + CounterDraft value = CounterDraft.of(); + value.setTotalToSkip(3); + Assertions.assertThat(value.getTotalToSkip()).isEqualTo(3); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/CounterTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/CounterTest.java new file mode 100644 index 00000000000..393833dbf19 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/CounterTest.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.ZonedDateTime; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CounterTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CounterBuilder builder) { + Counter counter = builder.buildUnchecked(); + Assertions.assertThat(counter).isInstanceOf(Counter.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "totalToSkip", Counter.builder().totalToSkip(3) }, + new Object[] { "skipped", Counter.builder().skipped(5) }, new Object[] { "lastSkippedAt", + Counter.builder().lastSkippedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) } }; + } + + @Test + public void totalToSkip() { + Counter value = Counter.of(); + value.setTotalToSkip(3); + Assertions.assertThat(value.getTotalToSkip()).isEqualTo(3); + } + + @Test + public void skipped() { + Counter value = Counter.of(); + value.setSkipped(5); + Assertions.assertThat(value.getSkipped()).isEqualTo(5); + } + + @Test + public void lastSkippedAt() { + Counter value = Counter.of(); + value.setLastSkippedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getLastSkippedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoDraftTest.java new file mode 100644 index 00000000000..0714d1e36fe --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoDraftTest.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.models.recurring_order; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CustomLineItemRecurrenceInfoDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CustomLineItemRecurrenceInfoDraftBuilder builder) { + CustomLineItemRecurrenceInfoDraft customLineItemRecurrenceInfoDraft = builder.buildUnchecked(); + Assertions.assertThat(customLineItemRecurrenceInfoDraft).isInstanceOf(CustomLineItemRecurrenceInfoDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "recurrencePolicy", CustomLineItemRecurrenceInfoDraft.builder() + .recurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()) } }; + } + + @Test + public void recurrencePolicy() { + CustomLineItemRecurrenceInfoDraft value = CustomLineItemRecurrenceInfoDraft.of(); + value.setRecurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoTest.java new file mode 100644 index 00000000000..95b48c9d9bc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/CustomLineItemRecurrenceInfoTest.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.models.recurring_order; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CustomLineItemRecurrenceInfoTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CustomLineItemRecurrenceInfoBuilder builder) { + CustomLineItemRecurrenceInfo customLineItemRecurrenceInfo = builder.buildUnchecked(); + Assertions.assertThat(customLineItemRecurrenceInfo).isInstanceOf(CustomLineItemRecurrenceInfo.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "recurrencePolicy", + CustomLineItemRecurrenceInfo.builder() + .recurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()) } }; + } + + @Test + public void recurrencePolicy() { + CustomLineItemRecurrenceInfo value = CustomLineItemRecurrenceInfo.of(); + value.setRecurrencePolicy(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoDraftTest.java new file mode 100644 index 00000000000..7b7682dc372 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoDraftTest.java @@ -0,0 +1,43 @@ + +package com.commercetools.api.models.recurring_order; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class LineItemRecurrenceInfoDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, LineItemRecurrenceInfoDraftBuilder builder) { + LineItemRecurrenceInfoDraft lineItemRecurrenceInfoDraft = builder.buildUnchecked(); + Assertions.assertThat(lineItemRecurrenceInfoDraft).isInstanceOf(LineItemRecurrenceInfoDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "recurrencePolicy", LineItemRecurrenceInfoDraft.builder() + .recurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()) }, + new Object[] { "priceSelectionMode", LineItemRecurrenceInfoDraft.builder() + .priceSelectionMode( + com.commercetools.api.models.recurring_order.PriceSelectionMode.findEnum("Fixed")) } }; + } + + @Test + public void recurrencePolicy() { + LineItemRecurrenceInfoDraft value = LineItemRecurrenceInfoDraft.of(); + value.setRecurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()); + } + + @Test + public void priceSelectionMode() { + LineItemRecurrenceInfoDraft value = LineItemRecurrenceInfoDraft.of(); + value.setPriceSelectionMode(com.commercetools.api.models.recurring_order.PriceSelectionMode.findEnum("Fixed")); + Assertions.assertThat(value.getPriceSelectionMode()) + .isEqualTo(com.commercetools.api.models.recurring_order.PriceSelectionMode.findEnum("Fixed")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoTest.java new file mode 100644 index 00000000000..8932e18c64e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/LineItemRecurrenceInfoTest.java @@ -0,0 +1,41 @@ + +package com.commercetools.api.models.recurring_order; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class LineItemRecurrenceInfoTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, LineItemRecurrenceInfoBuilder builder) { + LineItemRecurrenceInfo lineItemRecurrenceInfo = builder.buildUnchecked(); + Assertions.assertThat(lineItemRecurrenceInfo).isInstanceOf(LineItemRecurrenceInfo.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "recurrencePolicy", LineItemRecurrenceInfo.builder() + .recurrencePolicy(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()) }, + new Object[] { "priceSelectionMode", LineItemRecurrenceInfo.builder() + .priceSelectionMode( + com.commercetools.api.models.recurring_order.PriceSelectionMode.findEnum("Fixed")) } }; + } + + @Test + public void recurrencePolicy() { + LineItemRecurrenceInfo value = LineItemRecurrenceInfo.of(); + value.setRecurrencePolicy(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()); + } + + @Test + public void priceSelectionMode() { + LineItemRecurrenceInfo value = LineItemRecurrenceInfo.of(); + value.setPriceSelectionMode(com.commercetools.api.models.recurring_order.PriceSelectionMode.findEnum("Fixed")); + Assertions.assertThat(value.getPriceSelectionMode()) + .isEqualTo(com.commercetools.api.models.recurring_order.PriceSelectionMode.findEnum("Fixed")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderActiveTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderActiveTest.java new file mode 100644 index 00000000000..d774b2da088 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderActiveTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.ZonedDateTime; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderActiveTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderActiveBuilder builder) { + RecurringOrderActive recurringOrderActive = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderActive).isInstanceOf(RecurringOrderActive.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "resumesAt", + RecurringOrderActive.builder().resumesAt(ZonedDateTime.parse("2023-06-01T12:00Z")) } }; + } + + @Test + public void resumesAt() { + RecurringOrderActive value = RecurringOrderActive.of(); + value.setResumesAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getResumesAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderCanceledTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderCanceledTest.java new file mode 100644 index 00000000000..7e7d7774878 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderCanceledTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.api.models.recurring_order; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderCanceledTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderCanceledBuilder builder) { + RecurringOrderCanceled recurringOrderCanceled = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderCanceled).isInstanceOf(RecurringOrderCanceled.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "reason", RecurringOrderCanceled.builder().reason("reason") } }; + } + + @Test + public void reason() { + RecurringOrderCanceled value = RecurringOrderCanceled.of(); + value.setReason("reason"); + Assertions.assertThat(value.getReason()).isEqualTo("reason"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderDraftTest.java new file mode 100644 index 00000000000..39e04ab5215 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderDraftTest.java @@ -0,0 +1,79 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.ZonedDateTime; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderDraftBuilder builder) { + RecurringOrderDraft recurringOrderDraft = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderDraft).isInstanceOf(RecurringOrderDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", RecurringOrderDraft.builder().key("key") }, + new Object[] { "cart", + RecurringOrderDraft.builder() + .cart(new com.commercetools.api.models.cart.CartResourceIdentifierImpl()) }, + new Object[] { "cartVersion", RecurringOrderDraft.builder().cartVersion(7L) }, + new Object[] { "startsAt", + RecurringOrderDraft.builder().startsAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "state", + RecurringOrderDraft.builder() + .state(new com.commercetools.api.models.state.StateResourceIdentifierImpl()) }, + new Object[] { "custom", RecurringOrderDraft.builder() + .custom(new com.commercetools.api.models.type.CustomFieldsDraftImpl()) } }; + } + + @Test + public void key() { + RecurringOrderDraft value = RecurringOrderDraft.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void cart() { + RecurringOrderDraft value = RecurringOrderDraft.of(); + value.setCart(new com.commercetools.api.models.cart.CartResourceIdentifierImpl()); + Assertions.assertThat(value.getCart()) + .isEqualTo(new com.commercetools.api.models.cart.CartResourceIdentifierImpl()); + } + + @Test + public void cartVersion() { + RecurringOrderDraft value = RecurringOrderDraft.of(); + value.setCartVersion(7L); + Assertions.assertThat(value.getCartVersion()).isEqualTo(7L); + } + + @Test + public void startsAt() { + RecurringOrderDraft value = RecurringOrderDraft.of(); + value.setStartsAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getStartsAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void state() { + RecurringOrderDraft value = RecurringOrderDraft.of(); + value.setState(new com.commercetools.api.models.state.StateResourceIdentifierImpl()); + Assertions.assertThat(value.getState()) + .isEqualTo(new com.commercetools.api.models.state.StateResourceIdentifierImpl()); + } + + @Test + public void custom() { + RecurringOrderDraft value = RecurringOrderDraft.of(); + value.setCustom(new com.commercetools.api.models.type.CustomFieldsDraftImpl()); + Assertions.assertThat(value.getCustom()) + .isEqualTo(new com.commercetools.api.models.type.CustomFieldsDraftImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderExpiredTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderExpiredTest.java new file mode 100644 index 00000000000..6c7b310e863 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderExpiredTest.java @@ -0,0 +1,6 @@ + +package com.commercetools.api.models.recurring_order; + +public class RecurringOrderExpiredTest { + +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPagedQueryResponseTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPagedQueryResponseTest.java new file mode 100644 index 00000000000..32809da796e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPagedQueryResponseTest.java @@ -0,0 +1,68 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderPagedQueryResponseTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderPagedQueryResponseBuilder builder) { + RecurringOrderPagedQueryResponse recurringOrderPagedQueryResponse = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderPagedQueryResponse).isInstanceOf(RecurringOrderPagedQueryResponse.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "limit", RecurringOrderPagedQueryResponse.builder().limit(7L) }, + new Object[] { "offset", RecurringOrderPagedQueryResponse.builder().offset(3L) }, + new Object[] { "count", RecurringOrderPagedQueryResponse.builder().count(2L) }, + new Object[] { "total", RecurringOrderPagedQueryResponse.builder().total(1L) }, + new Object[] { "results", + RecurringOrderPagedQueryResponse.builder() + .results(Collections.singletonList( + new com.commercetools.api.models.recurring_order.RecurringOrderImpl())) } }; + } + + @Test + public void limit() { + RecurringOrderPagedQueryResponse value = RecurringOrderPagedQueryResponse.of(); + value.setLimit(7L); + Assertions.assertThat(value.getLimit()).isEqualTo(7L); + } + + @Test + public void offset() { + RecurringOrderPagedQueryResponse value = RecurringOrderPagedQueryResponse.of(); + value.setOffset(3L); + Assertions.assertThat(value.getOffset()).isEqualTo(3L); + } + + @Test + public void count() { + RecurringOrderPagedQueryResponse value = RecurringOrderPagedQueryResponse.of(); + value.setCount(2L); + Assertions.assertThat(value.getCount()).isEqualTo(2L); + } + + @Test + public void total() { + RecurringOrderPagedQueryResponse value = RecurringOrderPagedQueryResponse.of(); + value.setTotal(1L); + Assertions.assertThat(value.getTotal()).isEqualTo(1L); + } + + @Test + public void results() { + RecurringOrderPagedQueryResponse value = RecurringOrderPagedQueryResponse.of(); + value.setResults( + Collections.singletonList(new com.commercetools.api.models.recurring_order.RecurringOrderImpl())); + Assertions.assertThat(value.getResults()) + .isEqualTo( + Collections.singletonList(new com.commercetools.api.models.recurring_order.RecurringOrderImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPausedTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPausedTest.java new file mode 100644 index 00000000000..415d16b4b7e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderPausedTest.java @@ -0,0 +1,6 @@ + +package com.commercetools.api.models.recurring_order; + +public class RecurringOrderPausedTest { + +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderReferenceTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderReferenceTest.java new file mode 100644 index 00000000000..3152236fb66 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderReferenceTest.java @@ -0,0 +1,40 @@ + +package com.commercetools.api.models.recurring_order; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderReferenceBuilder builder) { + RecurringOrderReference recurringOrderReference = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderReference).isInstanceOf(RecurringOrderReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "obj", + RecurringOrderReference.builder() + .obj(new com.commercetools.api.models.recurring_order.RecurringOrderImpl()) }, + new Object[] { "id", RecurringOrderReference.builder().id("id") } }; + } + + @Test + public void obj() { + RecurringOrderReference value = RecurringOrderReference.of(); + value.setObj(new com.commercetools.api.models.recurring_order.RecurringOrderImpl()); + Assertions.assertThat(value.getObj()) + .isEqualTo(new com.commercetools.api.models.recurring_order.RecurringOrderImpl()); + } + + @Test + public void id() { + RecurringOrderReference value = RecurringOrderReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderResourceIdentifierTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderResourceIdentifierTest.java new file mode 100644 index 00000000000..33575c0effe --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderResourceIdentifierTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.api.models.recurring_order; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderResourceIdentifierTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderResourceIdentifierBuilder builder) { + RecurringOrderResourceIdentifier recurringOrderResourceIdentifier = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderResourceIdentifier).isInstanceOf(RecurringOrderResourceIdentifier.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", RecurringOrderResourceIdentifier.builder().id("id") }, + new Object[] { "key", RecurringOrderResourceIdentifier.builder().key("key") } }; + } + + @Test + public void id() { + RecurringOrderResourceIdentifier value = RecurringOrderResourceIdentifier.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void key() { + RecurringOrderResourceIdentifier value = RecurringOrderResourceIdentifier.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomFieldActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomFieldActionTest.java new file mode 100644 index 00000000000..6e60955580a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomFieldActionTest.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.models.recurring_order; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderSetCustomFieldActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderSetCustomFieldActionBuilder builder) { + RecurringOrderSetCustomFieldAction recurringOrderSetCustomFieldAction = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderSetCustomFieldAction) + .isInstanceOf(RecurringOrderSetCustomFieldAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "name", RecurringOrderSetCustomFieldAction.builder().name("name") }, + new Object[] { "value", RecurringOrderSetCustomFieldAction.builder().value("value") } }; + } + + @Test + public void name() { + RecurringOrderSetCustomFieldAction value = RecurringOrderSetCustomFieldAction.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void value() { + RecurringOrderSetCustomFieldAction value = RecurringOrderSetCustomFieldAction.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomTypeActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomTypeActionTest.java new file mode 100644 index 00000000000..50032b5cacc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetCustomTypeActionTest.java @@ -0,0 +1,41 @@ + +package com.commercetools.api.models.recurring_order; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderSetCustomTypeActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderSetCustomTypeActionBuilder builder) { + RecurringOrderSetCustomTypeAction recurringOrderSetCustomTypeAction = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderSetCustomTypeAction).isInstanceOf(RecurringOrderSetCustomTypeAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "type", + RecurringOrderSetCustomTypeAction.builder() + .type(new com.commercetools.api.models.type.TypeResourceIdentifierImpl()) }, + new Object[] { "fields", RecurringOrderSetCustomTypeAction.builder() + .fields(new com.commercetools.api.models.type.FieldContainerImpl()) } }; + } + + @Test + public void type() { + RecurringOrderSetCustomTypeAction value = RecurringOrderSetCustomTypeAction.of(); + value.setType(new com.commercetools.api.models.type.TypeResourceIdentifierImpl()); + Assertions.assertThat(value.getType()) + .isEqualTo(new com.commercetools.api.models.type.TypeResourceIdentifierImpl()); + } + + @Test + public void fields() { + RecurringOrderSetCustomTypeAction value = RecurringOrderSetCustomTypeAction.of(); + value.setFields(new com.commercetools.api.models.type.FieldContainerImpl()); + Assertions.assertThat(value.getFields()).isEqualTo(new com.commercetools.api.models.type.FieldContainerImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetKeyActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetKeyActionTest.java new file mode 100644 index 00000000000..c39138cd1bb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetKeyActionTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.api.models.recurring_order; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderSetKeyActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderSetKeyActionBuilder builder) { + RecurringOrderSetKeyAction recurringOrderSetKeyAction = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderSetKeyAction).isInstanceOf(RecurringOrderSetKeyAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", RecurringOrderSetKeyAction.builder().key("key") } }; + } + + @Test + public void key() { + RecurringOrderSetKeyAction value = RecurringOrderSetKeyAction.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetOrderSkipConfigurationActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetOrderSkipConfigurationActionTest.java new file mode 100644 index 00000000000..b168336a158 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetOrderSkipConfigurationActionTest.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.ZonedDateTime; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderSetOrderSkipConfigurationActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderSetOrderSkipConfigurationActionBuilder builder) { + RecurringOrderSetOrderSkipConfigurationAction recurringOrderSetOrderSkipConfigurationAction = builder + .buildUnchecked(); + Assertions.assertThat(recurringOrderSetOrderSkipConfigurationAction) + .isInstanceOf(RecurringOrderSetOrderSkipConfigurationAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "skipConfiguration", + RecurringOrderSetOrderSkipConfigurationAction.builder() + .skipConfiguration( + new com.commercetools.api.models.recurring_order.SkipConfigurationDraftImpl()) }, + new Object[] { "updatedExpiresAt", RecurringOrderSetOrderSkipConfigurationAction.builder() + .updatedExpiresAt(ZonedDateTime.parse("2023-06-01T12:00Z")) } }; + } + + @Test + public void skipConfiguration() { + RecurringOrderSetOrderSkipConfigurationAction value = RecurringOrderSetOrderSkipConfigurationAction.of(); + value.setSkipConfiguration(new com.commercetools.api.models.recurring_order.SkipConfigurationDraftImpl()); + Assertions.assertThat(value.getSkipConfiguration()) + .isEqualTo(new com.commercetools.api.models.recurring_order.SkipConfigurationDraftImpl()); + } + + @Test + public void updatedExpiresAt() { + RecurringOrderSetOrderSkipConfigurationAction value = RecurringOrderSetOrderSkipConfigurationAction.of(); + value.setUpdatedExpiresAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getUpdatedExpiresAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetScheduleActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetScheduleActionTest.java new file mode 100644 index 00000000000..df6a267e5ca --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetScheduleActionTest.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.models.recurring_order; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderSetScheduleActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderSetScheduleActionBuilder builder) { + RecurringOrderSetScheduleAction recurringOrderSetScheduleAction = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderSetScheduleAction).isInstanceOf(RecurringOrderSetScheduleAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "recurrencePolicy", RecurringOrderSetScheduleAction.builder() + .recurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()) } }; + } + + @Test + public void recurrencePolicy() { + RecurringOrderSetScheduleAction value = RecurringOrderSetScheduleAction.of(); + value.setRecurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStartsAtActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStartsAtActionTest.java new file mode 100644 index 00000000000..665fe22eeb9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStartsAtActionTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.ZonedDateTime; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderSetStartsAtActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderSetStartsAtActionBuilder builder) { + RecurringOrderSetStartsAtAction recurringOrderSetStartsAtAction = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderSetStartsAtAction).isInstanceOf(RecurringOrderSetStartsAtAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "startsAt", + RecurringOrderSetStartsAtAction.builder().startsAt(ZonedDateTime.parse("2023-06-01T12:00Z")) } }; + } + + @Test + public void startsAt() { + RecurringOrderSetStartsAtAction value = RecurringOrderSetStartsAtAction.of(); + value.setStartsAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getStartsAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStateActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStateActionTest.java new file mode 100644 index 00000000000..4448a728883 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderSetStateActionTest.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.models.recurring_order; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderSetStateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderSetStateActionBuilder builder) { + RecurringOrderSetStateAction recurringOrderSetStateAction = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderSetStateAction).isInstanceOf(RecurringOrderSetStateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "recurringOrderState", + RecurringOrderSetStateAction.builder() + .recurringOrderState( + new com.commercetools.api.models.recurring_order.RecurringOrderStateDraftImpl()) } }; + } + + @Test + public void recurringOrderState() { + RecurringOrderSetStateAction value = RecurringOrderSetStateAction.of(); + value.setRecurringOrderState(new com.commercetools.api.models.recurring_order.RecurringOrderStateDraftImpl()); + Assertions.assertThat(value.getRecurringOrderState()) + .isEqualTo(new com.commercetools.api.models.recurring_order.RecurringOrderStateDraftImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderTest.java new file mode 100644 index 00000000000..2422addf867 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderTest.java @@ -0,0 +1,240 @@ + +package com.commercetools.api.models.recurring_order; + +import java.time.ZonedDateTime; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderBuilder builder) { + RecurringOrder recurringOrder = builder.buildUnchecked(); + Assertions.assertThat(recurringOrder).isInstanceOf(RecurringOrder.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", RecurringOrder.builder().id("id") }, + new Object[] { "key", RecurringOrder.builder().key("key") }, + new Object[] { "version", RecurringOrder.builder().version(2L) }, + new Object[] { "cart", + RecurringOrder.builder().cart(new com.commercetools.api.models.cart.CartReferenceImpl()) }, + new Object[] { "originOrder", + RecurringOrder.builder() + .originOrder(new com.commercetools.api.models.order.OrderReferenceImpl()) }, + new Object[] { "startsAt", + RecurringOrder.builder().startsAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "resumesAt", + RecurringOrder.builder().resumesAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "expiresAt", + RecurringOrder.builder().expiresAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "lastOrderAt", + RecurringOrder.builder().lastOrderAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "nextOrderAt", + RecurringOrder.builder().nextOrderAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "skipConfiguration", RecurringOrder.builder() + .skipConfiguration(new com.commercetools.api.models.recurring_order.SkipConfigurationImpl()) }, + new Object[] { "store", + RecurringOrder.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { "businessUnit", RecurringOrder.builder() + .businessUnit(new com.commercetools.api.models.business_unit.BusinessUnitKeyReferenceImpl()) }, + new Object[] { "state", + RecurringOrder.builder().state(new com.commercetools.api.models.state.StateReferenceImpl()) }, + new Object[] { "recurringOrderState", + RecurringOrder.builder() + .recurringOrderState(com.commercetools.api.models.recurring_order.RecurringOrderState + .findEnum("Active")) }, + new Object[] { "schedule", RecurringOrder.builder() + .schedule(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()) }, + new Object[] { "customer", + RecurringOrder.builder() + .customer(new com.commercetools.api.models.customer.CustomerReferenceImpl()) }, + new Object[] { "customerEmail", RecurringOrder.builder().customerEmail("customerEmail") }, + new Object[] { "custom", + RecurringOrder.builder().custom(new com.commercetools.api.models.type.CustomFieldsImpl()) }, + new Object[] { "createdAt", + RecurringOrder.builder().createdAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "lastModifiedAt", + RecurringOrder.builder().lastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "lastModifiedBy", + RecurringOrder.builder() + .lastModifiedBy(new com.commercetools.api.models.common.LastModifiedByImpl()) }, + new Object[] { "createdBy", + RecurringOrder.builder().createdBy(new com.commercetools.api.models.common.CreatedByImpl()) } }; + } + + @Test + public void id() { + RecurringOrder value = RecurringOrder.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void key() { + RecurringOrder value = RecurringOrder.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void version() { + RecurringOrder value = RecurringOrder.of(); + value.setVersion(2L); + Assertions.assertThat(value.getVersion()).isEqualTo(2L); + } + + @Test + public void cart() { + RecurringOrder value = RecurringOrder.of(); + value.setCart(new com.commercetools.api.models.cart.CartReferenceImpl()); + Assertions.assertThat(value.getCart()).isEqualTo(new com.commercetools.api.models.cart.CartReferenceImpl()); + } + + @Test + public void originOrder() { + RecurringOrder value = RecurringOrder.of(); + value.setOriginOrder(new com.commercetools.api.models.order.OrderReferenceImpl()); + Assertions.assertThat(value.getOriginOrder()) + .isEqualTo(new com.commercetools.api.models.order.OrderReferenceImpl()); + } + + @Test + public void startsAt() { + RecurringOrder value = RecurringOrder.of(); + value.setStartsAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getStartsAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void resumesAt() { + RecurringOrder value = RecurringOrder.of(); + value.setResumesAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getResumesAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void expiresAt() { + RecurringOrder value = RecurringOrder.of(); + value.setExpiresAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getExpiresAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void lastOrderAt() { + RecurringOrder value = RecurringOrder.of(); + value.setLastOrderAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getLastOrderAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void nextOrderAt() { + RecurringOrder value = RecurringOrder.of(); + value.setNextOrderAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getNextOrderAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void skipConfiguration() { + RecurringOrder value = RecurringOrder.of(); + value.setSkipConfiguration(new com.commercetools.api.models.recurring_order.SkipConfigurationImpl()); + Assertions.assertThat(value.getSkipConfiguration()) + .isEqualTo(new com.commercetools.api.models.recurring_order.SkipConfigurationImpl()); + } + + @Test + public void store() { + RecurringOrder value = RecurringOrder.of(); + value.setStore(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + Assertions.assertThat(value.getStore()) + .isEqualTo(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + } + + @Test + public void businessUnit() { + RecurringOrder value = RecurringOrder.of(); + value.setBusinessUnit(new com.commercetools.api.models.business_unit.BusinessUnitKeyReferenceImpl()); + Assertions.assertThat(value.getBusinessUnit()) + .isEqualTo(new com.commercetools.api.models.business_unit.BusinessUnitKeyReferenceImpl()); + } + + @Test + public void state() { + RecurringOrder value = RecurringOrder.of(); + value.setState(new com.commercetools.api.models.state.StateReferenceImpl()); + Assertions.assertThat(value.getState()).isEqualTo(new com.commercetools.api.models.state.StateReferenceImpl()); + } + + @Test + public void recurringOrderState() { + RecurringOrder value = RecurringOrder.of(); + value.setRecurringOrderState( + com.commercetools.api.models.recurring_order.RecurringOrderState.findEnum("Active")); + Assertions.assertThat(value.getRecurringOrderState()) + .isEqualTo(com.commercetools.api.models.recurring_order.RecurringOrderState.findEnum("Active")); + } + + @Test + public void schedule() { + RecurringOrder value = RecurringOrder.of(); + value.setSchedule(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()); + Assertions.assertThat(value.getSchedule()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyScheduleImpl()); + } + + @Test + public void customer() { + RecurringOrder value = RecurringOrder.of(); + value.setCustomer(new com.commercetools.api.models.customer.CustomerReferenceImpl()); + Assertions.assertThat(value.getCustomer()) + .isEqualTo(new com.commercetools.api.models.customer.CustomerReferenceImpl()); + } + + @Test + public void customerEmail() { + RecurringOrder value = RecurringOrder.of(); + value.setCustomerEmail("customerEmail"); + Assertions.assertThat(value.getCustomerEmail()).isEqualTo("customerEmail"); + } + + @Test + public void custom() { + RecurringOrder value = RecurringOrder.of(); + value.setCustom(new com.commercetools.api.models.type.CustomFieldsImpl()); + Assertions.assertThat(value.getCustom()).isEqualTo(new com.commercetools.api.models.type.CustomFieldsImpl()); + } + + @Test + public void createdAt() { + RecurringOrder value = RecurringOrder.of(); + value.setCreatedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getCreatedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void lastModifiedAt() { + RecurringOrder value = RecurringOrder.of(); + value.setLastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getLastModifiedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void lastModifiedBy() { + RecurringOrder value = RecurringOrder.of(); + value.setLastModifiedBy(new com.commercetools.api.models.common.LastModifiedByImpl()); + Assertions.assertThat(value.getLastModifiedBy()) + .isEqualTo(new com.commercetools.api.models.common.LastModifiedByImpl()); + } + + @Test + public void createdBy() { + RecurringOrder value = RecurringOrder.of(); + value.setCreatedBy(new com.commercetools.api.models.common.CreatedByImpl()); + Assertions.assertThat(value.getCreatedBy()).isEqualTo(new com.commercetools.api.models.common.CreatedByImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderTransitionStateActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderTransitionStateActionTest.java new file mode 100644 index 00000000000..748b93f61e6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderTransitionStateActionTest.java @@ -0,0 +1,41 @@ + +package com.commercetools.api.models.recurring_order; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderTransitionStateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderTransitionStateActionBuilder builder) { + RecurringOrderTransitionStateAction recurringOrderTransitionStateAction = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderTransitionStateAction) + .isInstanceOf(RecurringOrderTransitionStateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "state", + RecurringOrderTransitionStateAction.builder() + .state(new com.commercetools.api.models.state.StateResourceIdentifierImpl()) }, + new Object[] { "force", RecurringOrderTransitionStateAction.builder().force(true) } }; + } + + @Test + public void state() { + RecurringOrderTransitionStateAction value = RecurringOrderTransitionStateAction.of(); + value.setState(new com.commercetools.api.models.state.StateResourceIdentifierImpl()); + Assertions.assertThat(value.getState()) + .isEqualTo(new com.commercetools.api.models.state.StateResourceIdentifierImpl()); + } + + @Test + public void force() { + RecurringOrderTransitionStateAction value = RecurringOrderTransitionStateAction.of(); + value.setForce(true); + Assertions.assertThat(value.getForce()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateTest.java new file mode 100644 index 00000000000..fe087f40524 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/recurring_order/RecurringOrderUpdateTest.java @@ -0,0 +1,43 @@ + +package com.commercetools.api.models.recurring_order; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderUpdateTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderUpdateBuilder builder) { + RecurringOrderUpdate recurringOrderUpdate = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderUpdate).isInstanceOf(RecurringOrderUpdate.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "version", RecurringOrderUpdate.builder().version(2L) }, + new Object[] { "actions", RecurringOrderUpdate.builder() + .actions(Collections.singletonList( + new com.commercetools.api.models.recurring_order.RecurringOrderUpdateActionImpl())) } }; + } + + @Test + public void version() { + RecurringOrderUpdate value = RecurringOrderUpdate.of(); + value.setVersion(2L); + Assertions.assertThat(value.getVersion()).isEqualTo(2L); + } + + @Test + public void actions() { + RecurringOrderUpdate value = RecurringOrderUpdate.of(); + value.setActions(Collections + .singletonList(new com.commercetools.api.models.recurring_order.RecurringOrderUpdateActionImpl())); + Assertions.assertThat(value.getActions()) + .isEqualTo(Collections.singletonList( + new com.commercetools.api.models.recurring_order.RecurringOrderUpdateActionImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraftTest.java index c65c04ff331..cdf2eb74143 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraftTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceDraftTest.java @@ -44,6 +44,9 @@ public static Object[][] objectBuilder() { new Object[] { "custom", StandalonePriceDraft.builder() .custom(new com.commercetools.api.models.type.CustomFieldsDraftImpl()) }, + new Object[] { "recurrencePolicy", StandalonePriceDraft.builder() + .recurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()) }, new Object[] { "staged", StandalonePriceDraft.builder() .staged(new com.commercetools.api.models.standalone_price.StagedPriceDraftImpl()) }, @@ -132,6 +135,15 @@ public void custom() { .isEqualTo(new com.commercetools.api.models.type.CustomFieldsDraftImpl()); } + @Test + public void recurrencePolicy() { + StandalonePriceDraft value = StandalonePriceDraft.of(); + value.setRecurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()); + } + @Test public void staged() { StandalonePriceDraft value = StandalonePriceDraft.of(); diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceTest.java index 216c432a38a..b78f83986f7 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceTest.java @@ -55,7 +55,10 @@ public static Object[][] objectBuilder() { StandalonePrice.builder().custom(new com.commercetools.api.models.type.CustomFieldsImpl()) }, new Object[] { "staged", StandalonePrice.builder() .staged(new com.commercetools.api.models.standalone_price.StagedStandalonePriceImpl()) }, - new Object[] { "active", StandalonePrice.builder().active(true) } }; + new Object[] { "active", StandalonePrice.builder().active(true) }, + new Object[] { "recurrencePolicy", StandalonePrice.builder() + .recurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()) } }; } @Test @@ -196,4 +199,12 @@ public void active() { value.setActive(true); Assertions.assertThat(value.getActive()).isEqualTo(true); } + + @Test + public void recurrencePolicy() { + StandalonePrice value = StandalonePrice.of(); + value.setRecurrencePolicy(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionStateChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionStateChange.java index 982da7d49af..38673054112 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionStateChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionStateChange.java @@ -20,6 +20,7 @@ *

      Change triggered by the following update actions:

      *
        *
      • Transition State on Orders.
      • + *
      • Transition State on Recurring Orders.
      • *
      • Transition State on Staged Orders.
      • *
      • Transition State on Payments.
      • *
      • Transition State on Products.
      • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionStateChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionStateChangeImpl.java index 7b53b0514cf..34695f1e0bc 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionStateChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionStateChangeImpl.java @@ -20,6 +20,7 @@ *

        Change triggered by the following update actions:

        *
          *
        • Transition State on Orders.
        • + *
        • Transition State on Recurring Orders.
        • *
        • Transition State on Staged Orders.
        • *
        • Transition State on Payments.
        • *
        • Transition State on Products.
        • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StateTypeEnum.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StateTypeEnum.java index 11a650f71a4..8b9675084fe 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StateTypeEnum.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StateTypeEnum.java @@ -18,6 +18,8 @@ public interface StateTypeEnum extends JsonEnum { StateTypeEnum ORDER_STATE = StateTypeEnumEnum.ORDER_STATE; + StateTypeEnum RECURRING_ORDER_STATE = StateTypeEnumEnum.RECURRING_ORDER_STATE; + StateTypeEnum LINE_ITEM_STATE = StateTypeEnumEnum.LINE_ITEM_STATE; StateTypeEnum PRODUCT_STATE = StateTypeEnumEnum.PRODUCT_STATE; @@ -41,6 +43,11 @@ enum StateTypeEnumEnum implements StateTypeEnum { */ ORDER_STATE("OrderState"), + /** + * RecurringOrderState + */ + RECURRING_ORDER_STATE("RecurringOrderState"), + /** * LineItemState */ diff --git a/references.txt b/references.txt index 8da4e3a25c7..22e002d7ce9 100644 --- a/references.txt +++ b/references.txt @@ -433,3 +433,5 @@ bb49fa04d50e4e0267846c7d805ae8ebc254bdea 1a7da72f28929e745fe954c69569acda29a50ed5 6d4cd1e87a3eacff648e213aa9aff88292e9b75d 84839875c7243dce1c079f4b0a2b782c24c5810f +c12d33dda145602c607dcf1bb77f503f4508a1ee +0a2a61671b582388c376f777db72dba939ab4608