diff --git a/changes.md b/changes.md index 662adc79ee2..924fcbf460d 100644 --- a/changes.md +++ b/changes.md @@ -1,213 +1,110 @@ **Api changes**
-Added Type(s) - -- added type `BulkOperationMaxItemsExceededError` -- added type `OverlappingPriceValidityError` -- added type `GraphQLBulkOperationMaxItemsExceededError` -- added type `GraphQLOverlappingPriceValidityError` -- added type `CartLockedMessage` -- added type `CartUnlockedMessage` -- added type `VariantCreatedMessage` -- added type `VariantDeletedMessage` -- added type `VariantImageAddedMessage` -- added type `VariantImagesSetMessage` -- added type `VariantKeySetMessage` -- added type `VariantPublishedMessage` -- added type `VariantSkuSetMessage` -- added type `VariantStagedChangesRemovedMessage` -- added type `VariantUnpublishedMessage` -- added type `CartLockedMessagePayload` -- added type `CartUnlockedMessagePayload` -- added type `VariantCreatedMessagePayload` -- added type `VariantDeletedMessagePayload` -- added type `VariantImageAddedMessagePayload` -- added type `VariantImagesSetMessagePayload` -- added type `VariantKeySetMessagePayload` -- added type `VariantPublishedMessagePayload` -- added type `VariantSkuSetMessagePayload` -- added type `VariantStagedChangesRemovedMessagePayload` -- added type `VariantUnpublishedMessagePayload` -- added type `ProductSetDefaultVariantAction` -- added type `ProductCatalogModel` -- added type `ProjectSetProductCatalogModelAction` -- added type `ShippingMethodAddStoreAction` -- added type `ShippingMethodRemoveStoreAction` -- added type `ShippingMethodSetStoresAction` -- added type `VariantAttributes` -- added type `VariantAttributesAttributeMetadata` -- added type `VariantAttributesAvailability` -- added type `VariantAttributesChannelAvailability` -- added type `VariantAttributesChannelAvailabilityMap` -- added type `VariantAttributesVariant` -- added type `Variant` -- added type `VariantBulkUpdate` -- added type `VariantBulkUpdateFailResult` -- added type `VariantBulkUpdateItem` -- added type `VariantBulkUpdateResource` -- added type `VariantBulkUpdateResponse` -- added type `VariantBulkUpdateResult` -- added type `VariantBulkUpdateSuccessResult` -- added type `VariantData` -- added type `VariantDraft` -- added type `VariantPagedQueryResponse` -- added type `VariantProjection` -- added type `VariantProjectionPagedQueryResponse` -- added type `VariantReference` -- added type `VariantResourceIdentifier` -- added type `VariantUpdate` -- added type `VariantUpdateAction` -- added type `VariantAddAssetAction` -- added type `VariantAddExternalImageAction` -- added type `VariantChangeAssetNameAction` -- added type `VariantChangeAssetOrderAction` -- added type `VariantPublishAction` -- added type `VariantRemoveAssetAction` -- added type `VariantRemoveImageAction` -- added type `VariantRemoveStagedChangesAction` -- added type `VariantSetAssetCustomFieldAction` -- added type `VariantSetAssetCustomTypeAction` -- added type `VariantSetAssetDescriptionAction` -- added type `VariantSetAssetKeyAction` -- added type `VariantSetAssetSourcesAction` -- added type `VariantSetAssetTagsAction` -- added type `VariantSetAssetsAction` -- added type `VariantSetAttributeAction` -- added type `VariantSetAttributesAction` -- added type `VariantSetImagesAction` -- added type `VariantSetKeyAction` -- added type `VariantSetSkuAction` -- added type `VariantUnpublishAction` -
- - -
-Added QueryParameter(s) - -- added query parameter `dataErasure` to method `delete /{projectKey}/business-units/key={key}` -- added query parameter `dataErasure` to method `delete /{projectKey}/business-units/{ID}` -- added query parameter `dataErasure` to method `delete /{projectKey}/in-store/key={storeKey}/business-units/key={key}` -- added query parameter `dataErasure` to method `delete /{projectKey}/in-store/key={storeKey}/business-units/{ID}` -
- - -
-Added Resource(s) +Added Method(s) -- added resource `/{projectKey}/variant-projections` -- added resource `/{projectKey}/variants` -- added resource `/{projectKey}/product-projections/key={key}/variant-attributes` -- added resource `/{projectKey}/product-projections/{ID}/variant-attributes` -- added resource `/{projectKey}/variant-projections/key={key}` -- added resource `/{projectKey}/variant-projections/{ID}` -- added resource `/{projectKey}/variants/bulk` -- added resource `/{projectKey}/variants/key={key}` -- added resource `/{projectKey}/variants/{ID}` -- added resource `/{projectKey}/in-store/key={storeKey}/variant-projections` -- added resource `/{projectKey}/in-store/key={storeKey}/product-projections/key={key}/variant-attributes` -- added resource `/{projectKey}/in-store/key={storeKey}/product-projections/{ID}/variant-attributes` -- added resource `/{projectKey}/in-store/key={storeKey}/variant-projections/key={key}` -- added resource `/{projectKey}/in-store/key={storeKey}/variant-projections/{ID}` +- added method `apiRoot.withProjectKey().mcpServers().get()` +- added method `apiRoot.withProjectKey().mcpServers().post()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().discountCodes().get()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().discountCodes().head()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().discountCodes().withKey().get()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().discountCodes().withKey().head()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().discountCodes().withId().get()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().discountCodes().withId().head()` +- added method `apiRoot.withProjectKey().mcpServers().types().get()` +- added method `apiRoot.withProjectKey().mcpServers().withKey().get()` +- added method `apiRoot.withProjectKey().mcpServers().withKey().post()` +- added method `apiRoot.withProjectKey().mcpServers().withKey().delete()` +- added method `apiRoot.withProjectKey().mcpServers().withId().get()` +- added method `apiRoot.withProjectKey().mcpServers().withId().post()` +- added method `apiRoot.withProjectKey().mcpServers().withId().delete()` +- added method `apiRoot.withProjectKey().mcpServers().types().withMcpServerType().get()`
Added Property(s) -- added property `defaultVariant` to type `ProductData` -- added property `productCatalogModel` to type `Project` -- added property `stores` to type `ShippingMethod` -- added property `stores` to type `ShippingMethodDraft` +- added property `stores` to type `DiscountCode`
-Added Method(s) +Added Type(s) -- added method `apiRoot.withProjectKey().variantProjections().get()` -- added method `apiRoot.withProjectKey().variantProjections().head()` -- added method `apiRoot.withProjectKey().variants().get()` -- added method `apiRoot.withProjectKey().variants().post()` -- added method `apiRoot.withProjectKey().variants().head()` -- added method `apiRoot.withProjectKey().productProjections().withKey().variantAttributes().get()` -- added method `apiRoot.withProjectKey().productProjections().withId().variantAttributes().get()` -- added method `apiRoot.withProjectKey().variantProjections().withKey().get()` -- added method `apiRoot.withProjectKey().variantProjections().withKey().head()` -- added method `apiRoot.withProjectKey().variantProjections().withId().get()` -- added method `apiRoot.withProjectKey().variantProjections().withId().head()` -- added method `apiRoot.withProjectKey().variants().bulk().post()` -- added method `apiRoot.withProjectKey().variants().withKey().get()` -- added method `apiRoot.withProjectKey().variants().withKey().head()` -- added method `apiRoot.withProjectKey().variants().withKey().post()` -- added method `apiRoot.withProjectKey().variants().withKey().delete()` -- added method `apiRoot.withProjectKey().variants().withId().get()` -- added method `apiRoot.withProjectKey().variants().withId().head()` -- added method `apiRoot.withProjectKey().variants().withId().post()` -- added method `apiRoot.withProjectKey().variants().withId().delete()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().variantProjections().get()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().variantProjections().head()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().productProjections().withKey().variantAttributes().get()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().productProjections().withId().variantAttributes().get()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().variantProjections().withKey().get()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().variantProjections().withKey().head()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().variantProjections().withId().get()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().variantProjections().withId().head()` +- added type `UnauthorizedError` +- added type `GraphQLUnauthorizedError` +- added type `CommerceMcpServerConfig` +- added type `CommerceMcpServerConfigDraft` +- added type `McpServer` +- added type `McpServerConfig` +- added type `McpServerConfigDraft` +- added type `McpServerDraft` +- added type `McpServerJsonOutputFiltering` +- added type `McpServerJsonOutputFilteringMatcher` +- added type `McpServerPagedQueryResponse` +- added type `McpServerState` +- added type `McpServerTool` +- added type `McpServerToolOutputFormatting` +- added type `McpServerType` +- added type `McpServerTypeTool` +- added type `McpServerUpdate` +- added type `McpServerUpdateAction` +- added type `ParameterOverride` +- added type `RemoveToolCustomizationTarget` +- added type `ToolCustomization` +- added type `McpServerAddToolAction` +- added type `McpServerAddToolCustomizationAction` +- added type `McpServerRemoveToolAction` +- added type `McpServerRemoveToolCustomizationAction` +- added type `McpServerSetDescriptionAction` +- added type `McpServerSetJsonOutputFilteringAction` +- added type `McpServerSetNameAction` +- added type `McpServerSetStateAction` +- added type `McpServerSetToolCustomizationsAction` +- added type `McpServerSetToolOutputFormattingAction` +- added type `McpServerSetToolsAction` +- added type `ProductTailoringKeySetMessage` +- added type `ProductTailoringKeySetMessagePayload` +- added type `ProductTailoringSetKeyAction`
Added Enum(s) -- added enum `variant` to type `ReferenceTypeId` -
- -**Import changes** - -
-Added Type(s) - -- added type `VariantImportRequest` -- added type `VariantImport` +- added enum `variant` to type `AttributeReferenceTypeId` +- added enum `variant` to type `CustomFieldReferenceValue`
Added Resource(s) -- added resource `/{projectKey}/variants` -- added resource `/{projectKey}/variants/import-containers` -- added resource `/{projectKey}/variants/import-containers/{importContainerKey}` -
- - -
-Added Method(s) - -- added method `apiRoot.withProjectKeyValue().variants().importContainers().withImportContainerKeyValue().post()` +- added resource `/{projectKey}/mcp-servers` +- added resource `/{projectKey}/in-store/key={storeKey}/discount-codes` +- added resource `/{projectKey}/in-store/key={storeKey}/discount-codes/key={key}` +- added resource `/{projectKey}/in-store/key={storeKey}/discount-codes/{ID}` +- added resource `/{projectKey}/mcp-servers/types` +- added resource `/{projectKey}/mcp-servers/key={key}` +- added resource `/{projectKey}/mcp-servers/{ID}` +- added resource `/{projectKey}/mcp-servers/types/{mcpServerType}`
+**History changes**
-Added Enum(s) - -- added enum `variant` to type `ImportResourceType` -- added enum `variant` to type `ReferenceType` -
- -**Checkout changes** - -
-Changed MethodResponseBody(s) +Added QueryParameter(s) -- :warning: changed response body for `200: application/json` of method `post /{projectKey}/payment-intents/{paymentId}` from type `any` to `PaymentIntentResponse` +- added query parameter `withTotal` to method `get /{projectKey}` +- added query parameter `withTotal` to method `get /{projectKey}/{resourceType}` +- added query parameter `withTotal` to method `get /{projectKey}/{resourceType}/{ID}`
-Added Type(s) +Required Property(s) -- added type `PaymentIntentOutcome` -- added type `PaymentIntentResponse` +- changed property `total` of type `RecordPagedQueryResponse` to be optional
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 6d69029b652..046101b0183 100644 --- a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls +++ b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls @@ -1787,6 +1787,20 @@ type CommerceMcpServerConfig implements McpServerConfig { toolOutputFormatting: McpServerToolOutputFormatting } +""" +Skeleton shopper-facing MCP server config. Carries only the shared +`McpServerConfig` fields — no response-shaping (`jsonOutputFiltering`, +`toolOutputFormatting`) yet, as the skeleton exposes a single demo tool. +Those fields can be added later without breaking existing clients. +""" +type UcpShopperMcpServerConfig implements McpServerConfig { + type: McpServerType! + majorVersion: String! + url: String! + tools: [String!]! + toolCustomizations: [ToolCustomization!]! +} + """ Customization applied to a single tool at `tools/list` and `tools/call` time. At least one of `description` or a non-empty `parameters` list MUST @@ -1830,8 +1844,8 @@ type McpServerTypeCatalogEntry { type McpServerCatalogTool { name: String! description: String - operationType: McpToolOperationType! - groups: [String!]! + operationType: McpToolOperationType + groups: [String!] } type Product implements Versioned & ReviewTarget & ReferenceExpandable { @@ -3178,6 +3192,12 @@ type CartDiscountVisualizationSearchConfiguration { lastModifiedAt: DateTime! } +type CartEstimatedDeliverySet implements MessagePayload { + estimatedDelivery: EstimatedDelivery + shippingKey: String + type: String! +} + type CartFrozen implements MessagePayload { type: String! } @@ -4494,6 +4514,11 @@ type EnumValue { label: String! } +type EstimatedDelivery { + from: DateTime + until: DateTime +} + type EventBridgeDestination implements Destination { source: String! region: String! @@ -5840,6 +5865,12 @@ type OrderEditQueryResult { results: [OrderEdit!]! } +type OrderEstimatedDeliverySet implements MessagePayload & OrderMessagePayload { + estimatedDelivery: EstimatedDelivery + shippingKey: String + type: String! +} + type OrderExcerpt { totalPrice: Money! taxedPrice: TaxedPrice @@ -7518,6 +7549,15 @@ type ProductTailoringImagesSet implements MessagePayload { type: String! } +type ProductTailoringKeySet implements MessagePayload { + key: String + oldKey: String + storeRef: KeyReference! + productRef: Reference! + productKey: String + type: String! +} + type ProductTailoringNameSet implements MessagePayload { storeRef: KeyReference! productRef: Reference! @@ -8711,6 +8751,7 @@ type SetStagedOrderCustomShippingMethodOutput implements StagedOrderUpdateAction taxCategoryResId: ResourceIdentifier externalTaxRate: ExternalTaxRateDraftOutput custom: CustomFieldsCommand + estimatedDelivery: EstimatedDelivery } type SetStagedOrderCustomTypeOutput implements StagedOrderUpdateActionOutput { @@ -8782,6 +8823,12 @@ type SetStagedOrderDirectDiscountsOutput implements StagedOrderUpdateActionOutpu discounts: [DirectDiscountDraftOutput!]! } +type SetStagedOrderEstimatedDeliveryOutput implements StagedOrderUpdateActionOutput { + type: String! + estimatedDelivery: EstimatedDelivery + shippingKey: String +} + type SetStagedOrderItemShippingAddressCustomFieldOutput implements StagedOrderUpdateActionOutput { type: String! addressKey: String! @@ -8995,6 +9042,7 @@ type SetStagedOrderShippingMethodOutput implements StagedOrderUpdateActionOutput type: String! shippingMethodResId: ResourceIdentifier externalTaxRate: ExternalTaxRateDraftOutput + estimatedDelivery: EstimatedDelivery } type SetStagedOrderShippingMethodTaxAmountOutput implements StagedOrderUpdateActionOutput { @@ -9046,6 +9094,7 @@ type ShippingInfo { deliveries: [Delivery!]! discountedPrice: DiscountedLineItemPrice shippingMethodState: ShippingMethodState! + estimatedDelivery: EstimatedDelivery shippingMethod: ShippingMethod shippingMethodRef: Reference taxCategory: TaxCategory @@ -9060,6 +9109,7 @@ type ShippingMethod implements Versioned & ReferenceExpandable { isDefault: Boolean! predicate: String key: String + carrier: String taxCategoryRef: Reference localizedDescriptionAllLocales: [LocalizedString!] localizedNameAllLocales: [LocalizedString!] @@ -9599,6 +9649,7 @@ type Store implements Versioned & ReferenceExpandable { distributionChannels: [Channel!]! supplyChannelsRef: [Reference!]! supplyChannels: [Channel!]! + storefront: Storefront createdAt: DateTime! lastModifiedAt: DateTime! custom: CustomFieldsType @@ -9606,6 +9657,21 @@ type Store implements Versioned & ReferenceExpandable { lastModifiedBy: Initiator } +type StoreCheckoutUrlTemplateSet implements MessagePayload { + checkoutUrlTemplate: String + type: String! +} + +type StoreContactUrlSet implements MessagePayload { + contactUrl: String + type: String! +} + +type StoreCookiePolicyUrlSet implements MessagePayload { + cookiePolicyUrl: String + type: String! +} + type StoreCountriesChanged implements MessagePayload { addedCountries: [StoreCountry!] removedCountries: [StoreCountry!] @@ -9633,6 +9699,7 @@ type StoreCreated implements MessagePayload { distributionChannels: [Channel!]! supplyChannels: [Channel!]! countries: [StoreCountry!] + storefront: Storefront distributionChannelsRef: [Reference!]! supplyChannelsRef: [Reference!]! productSelectionsRef: [Reference!]! @@ -9652,6 +9719,16 @@ type StoreDistributionChannelsChanged implements MessagePayload { type: String! } +type StoreFaqUrlSet implements MessagePayload { + faqUrl: String + type: String! +} + +type StoreImprintUrlSet implements MessagePayload { + imprintUrl: String + type: String! +} + type StoreLanguagesChanged implements MessagePayload { addedLanguages: [Locale!] removedLanguages: [Locale!] @@ -9686,6 +9763,16 @@ type StoreNameSet implements MessagePayload { type: String! } +type StoreOrderUrlTemplateSet implements MessagePayload { + orderUrlTemplate: String + type: String! +} + +type StorePrivacyPolicyUrlSet implements MessagePayload { + privacyPolicyUrl: String + type: String! +} + type StoreProductSelectionsChanged implements MessagePayload { addedProductSelections: [ProductSelectionSetting!] removedProductSelections: [ProductSelectionSetting!] @@ -9701,6 +9788,16 @@ type StoreQueryResult { results: [Store!]! } +type StoreRefundPolicyUrlSet implements MessagePayload { + refundPolicyUrl: String + type: String! +} + +type StoreShippingPolicyUrlSet implements MessagePayload { + shippingPolicyUrl: String + type: String! +} + type StoreSupplyChannelsChanged implements MessagePayload { addedSupplyChannels: [Channel!] removedSupplyChannels: [Channel!] @@ -9709,6 +9806,24 @@ type StoreSupplyChannelsChanged implements MessagePayload { type: String! } +type StoreTermsOfServiceUrlSet implements MessagePayload { + termsOfServiceUrl: String + type: String! +} + +type Storefront { + checkoutUrlTemplate: String + orderUrlTemplate: String + termsOfServiceUrl: String + privacyPolicyUrl: String + refundPolicyUrl: String + shippingPolicyUrl: String + cookiePolicyUrl: String + imprintUrl: String + faqUrl: String + contactUrl: String +} + type StringAttribute implements Attribute { value: String! name: String! @@ -10763,9 +10878,11 @@ interface ShippingRatePriceTier { enum AttributionSource { Export Import + ManagedCommerceMCP } enum McpServerType { CommerceMCP + UCPShopperMCP } enum McpServerAuthenticationMode { CommercetoolsIdentity @@ -11493,6 +11610,7 @@ input McpServerDraft { input McpServerConfigDraft { commerce: CommerceMcpServerConfigDraft + ucpShopper: UcpShopperMcpServerConfigDraft } input CommerceMcpServerConfigDraft { @@ -11503,6 +11621,17 @@ input CommerceMcpServerConfigDraft { toolOutputFormatting: McpServerToolOutputFormatting } +""" +Draft for a shopper-facing UCP MCP server. Mirrors the shared fields of +`CommerceMcpServerConfigDraft` without the response-shaping options the +skeleton does not yet support. +""" +input UcpShopperMcpServerConfigDraft { + majorVersion: String! + tools: [String!]! + toolCustomizations: [ToolCustomizationDraft!] +} + """ Draft for `ToolCustomization`. At least one of `description` or a non-empty `parameters` list MUST be present; parameter names within @@ -11963,6 +12092,7 @@ input AddCartShippingMethod { shippingRateInput: ShippingRateInputDraft custom: CustomFieldsDraft deliveries: [DeliveryDraft!] = [] + estimatedDelivery: EstimatedDeliveryDraft } input AddCartShoppingList { @@ -12852,6 +12982,7 @@ input CartUpdateAction { setCustomerId: SetCartCustomerId setDeleteDaysAfterLastModification: SetCartDeleteDaysAfterLastModification setDirectDiscounts: SetCartDirectDiscounts + setEstimatedDelivery: SetCartEstimatedDelivery setItemShippingAddressCustomField: SetCartItemShippingAddressCustomField setItemShippingAddressCustomType: SetCartItemShippingAddressCustomType setLineItemCustomField: SetCartLineItemCustomField @@ -13682,6 +13813,7 @@ input CreateStore { supplyChannels: [ResourceIdentifierInput!] productSelections: [ProductSelectionSettingDraft!] custom: CustomFieldsDraft + storefront: StorefrontInput } input CreateZone { @@ -14099,6 +14231,11 @@ input EnumValueInput { label: String! } +input EstimatedDeliveryDraft { + from: DateTime + until: DateTime +} + input EventBridgeDestinationInput { region: String! accountId: String! @@ -15320,6 +15457,7 @@ input ProductTailoringUpdateAction { setAttributeInAllVariants: SetProductTailoringAttributeInAllVariants setDescription: SetProductTailoringDescription setImageLabel: SetProductTailoringImageLabel + setKey: SetProductTailoringKey setMetaAttributes: SetProductTailoringMetaAttributes setMetaDescription: SetProductTailoringMetaDescription setMetaKeywords: SetProductTailoringMetaKeywords @@ -16336,6 +16474,7 @@ input SetCartCustomShippingMethod { taxCategory: ResourceIdentifierInput externalTaxRate: ExternalTaxRateDraft custom: CustomFieldsDraft + estimatedDelivery: EstimatedDeliveryDraft } input SetCartCustomType { @@ -16411,6 +16550,11 @@ input SetCartDiscountValidUntil { validUntil: DateTime } +input SetCartEstimatedDelivery { + estimatedDelivery: EstimatedDeliveryDraft + shippingKey: String +} + input SetCartItemShippingAddressCustomField { addressKey: String! name: String! @@ -16543,6 +16687,7 @@ input SetCartShippingCustomType { input SetCartShippingMethod { shippingMethod: ResourceIdentifierInput externalTaxRate: ExternalTaxRateDraft + estimatedDelivery: EstimatedDeliveryDraft } input SetCartShippingMethodTaxAmount { @@ -17758,6 +17903,10 @@ input SetProductTailoringImages { staged: Boolean = true } +input SetProductTailoringKey { + key: String +} + input SetProductTailoringMetaAttributes { metaDescription: [LocalizedStringItemInputType!] metaKeywords: [LocalizedStringItemInputType!] @@ -17996,6 +18145,10 @@ input SetSearchKeywords { staged: Boolean } +input SetShippingMethodCarrier { + carrier: String +} + input SetShippingMethodCustomField { name: String! value: String @@ -18185,6 +18338,7 @@ input SetStagedOrderCustomShippingMethod { taxCategory: ResourceIdentifierInput externalTaxRate: ExternalTaxRateDraft custom: CustomFieldsDraft + estimatedDelivery: EstimatedDeliveryDraft } input SetStagedOrderCustomType { @@ -18254,6 +18408,11 @@ input SetStagedOrderDirectDiscounts { discounts: [DirectDiscountDraft!]! } +input SetStagedOrderEstimatedDelivery { + estimatedDelivery: EstimatedDeliveryDraft + shippingKey: String +} + input SetStagedOrderItemShippingAddressCustomField { addressKey: String! name: String! @@ -18453,6 +18612,7 @@ input SetStagedOrderShippingCustomType { input SetStagedOrderShippingMethod { shippingMethod: ResourceIdentifierInput externalTaxRate: ExternalTaxRateDraft + estimatedDelivery: EstimatedDeliveryDraft } input SetStagedOrderShippingMethodTaxAmount { @@ -18539,6 +18699,18 @@ input SetStateTransitions { transitions: [ResourceIdentifierInput!] } +input SetStoreCheckoutUrlTemplate { + checkoutUrlTemplate: String +} + +input SetStoreContactUrl { + contactUrl: String +} + +input SetStoreCookiePolicyUrl { + cookiePolicyUrl: String +} + input SetStoreCountries { countries: [StoreCountryInput!] } @@ -18559,6 +18731,14 @@ input SetStoreDistributionChannels { distributionChannels: [ResourceIdentifierInput!] } +input SetStoreFaqUrl { + faqUrl: String +} + +input SetStoreImprintUrl { + imprintUrl: String +} + input SetStoreLanguages { languages: [Locale!] } @@ -18567,14 +18747,34 @@ input SetStoreName { name: [LocalizedStringItemInputType!] } +input SetStoreOrderUrlTemplate { + orderUrlTemplate: String +} + +input SetStorePrivacyPolicyUrl { + privacyPolicyUrl: String +} + input SetStoreProductSelections { productSelections: [ProductSelectionSettingInActionInput!] } +input SetStoreRefundPolicyUrl { + refundPolicyUrl: String +} + +input SetStoreShippingPolicyUrl { + shippingPolicyUrl: String +} + input SetStoreSupplyChannels { supplyChannels: [ResourceIdentifierInput!] } +input SetStoreTermsOfServiceUrl { + termsOfServiceUrl: String +} + input SetSubscriptionChanges { changes: [ChangeSubscriptionInput!]! } @@ -18756,6 +18956,7 @@ input ShippingMethodDraft { key: String custom: CustomFieldsDraft stores: [ResourceIdentifierInput!] + carrier: String } input ShippingMethodTargetDraft { @@ -18779,6 +18980,7 @@ input ShippingMethodUpdateAction { removeStore: RemoveShippingMethodStore removeShippingRate: RemoveShippingMethodShippingRate removeZone: RemoveShippingMethodZone + setCarrier: SetShippingMethodCarrier setCustomField: SetShippingMethodCustomField setCustomType: SetShippingMethodCustomType """This action is deprecated in favor of using 'setLocalizedDescription'""" @@ -18970,6 +19172,7 @@ input StagedOrderUpdateAction { setDeliveryCustomType: SetStagedOrderDeliveryCustomType setDeliveryItems: SetStagedOrderDeliveryItems setDirectDiscounts: SetStagedOrderDirectDiscounts + setEstimatedDelivery: SetStagedOrderEstimatedDelivery setItemShippingAddressCustomField: SetStagedOrderItemShippingAddressCustomField setItemShippingAddressCustomType: SetStagedOrderItemShippingAddressCustomType setLineItemCustomField: SetStagedOrderLineItemCustomField @@ -19105,13 +19308,36 @@ input StoreUpdateAction { removeDistributionChannel: RemoveStoreDistributionChannel removeSupplyChannel: RemoveStoreSupplyChannel setProductSelections: SetStoreProductSelections + setCheckoutUrlTemplate: SetStoreCheckoutUrlTemplate + setContactUrl: SetStoreContactUrl + setCookiePolicyUrl: SetStoreCookiePolicyUrl setCountries: SetStoreCountries setCustomField: SetStoreCustomField setCustomType: SetStoreCustomType setDistributionChannels: SetStoreDistributionChannels + setFaqUrl: SetStoreFaqUrl + setImprintUrl: SetStoreImprintUrl setLanguages: SetStoreLanguages setName: SetStoreName + setOrderUrlTemplate: SetStoreOrderUrlTemplate + setPrivacyPolicyUrl: SetStorePrivacyPolicyUrl + setRefundPolicyUrl: SetStoreRefundPolicyUrl + setShippingPolicyUrl: SetStoreShippingPolicyUrl setSupplyChannels: SetStoreSupplyChannels + setTermsOfServiceUrl: SetStoreTermsOfServiceUrl +} + +input StorefrontInput { + checkoutUrlTemplate: String + orderUrlTemplate: String + termsOfServiceUrl: String + privacyPolicyUrl: String + refundPolicyUrl: String + shippingPolicyUrl: String + cookiePolicyUrl: String + imprintUrl: String + faqUrl: String + contactUrl: String } input SubRateDraft { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsPost.java index a78b16f103d..6633a647c15 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsPost.java @@ -20,13 +20,20 @@ import tools.jackson.core.type.TypeReference; /** - *

Creates a Cart in the BusinessUnit referenced by businessUnitKey. As such, the businessUnit field on CartDraft is ignored for this request. Creating a Cart can fail with an InvalidOperation if the referenced ShippingMethod in the CartDraft has a predicate that does not match the Cart.

+ *

Creates a Cart in the BusinessUnit referenced by businessUnitKey. As such, the businessUnit field on CartDraft is ignored for this request.

*

Specific Error Codes:

* * *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsPostString.java index 879398083f3..e55295642aa 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsPostString.java @@ -21,13 +21,20 @@ import tools.jackson.core.type.TypeReference; /** - *

Creates a Cart in the BusinessUnit referenced by businessUnitKey. As such, the businessUnit field on CartDraft is ignored for this request. Creating a Cart can fail with an InvalidOperation if the referenced ShippingMethod in the CartDraft has a predicate that does not match the Cart.

+ *

Creates a Cart in the BusinessUnit referenced by businessUnitKey. As such, the businessUnit field on CartDraft is ignored for this request.

*

Specific Error Codes:

* * *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergePost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergePost.java index 2070f8535bd..346e1a9ce64 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergePost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergePost.java @@ -17,6 +17,14 @@ /** *

Merges items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart. For more information about merge mode behaviors, merge rules, and tax recalculation, see Merge a Cart.

+ * * *
*
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergePostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergePostString.java index a31b98a4a42..8d0c4bd001a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergePostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergePostString.java @@ -18,6 +18,14 @@ /** *

Merges items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart. For more information about merge mode behaviors, merge rules, and tax recalculation, see Merge a Cart.

+ * * *
*
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsPost.java index f8c4e289fc1..fbd0a6ec7fb 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsPost.java @@ -21,13 +21,6 @@ /** *

Creates a Cart in the Project.

- *

An InvalidOperation error is returned in one of the following cases:

- *
    - *
  1. If the referenced Shipping Method has a predicate that does not match the Cart.
  2. - *
  3. If the referenced Shipping Method is not active.
  4. - *
  5. If the referenced Shipping Method is associated with a Store that is different from the Cart's Store.
  6. - *
  7. If the referenced Shipping Method is associated with a Store and the Cart is not associated with any Store.
  8. - *
*

When using InventoryMode ReserveOnCart:

* * *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsPostString.java index 477db8d27ad..ae16e8eb445 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsPostString.java @@ -22,13 +22,6 @@ /** *

Creates a Cart in the Project.

- *

An InvalidOperation error is returned in one of the following cases:

- *
    - *
  1. If the referenced Shipping Method has a predicate that does not match the Cart.
  2. - *
  3. If the referenced Shipping Method is not active.
  4. - *
  5. If the referenced Shipping Method is associated with a Store that is different from the Cart's Store.
  6. - *
  7. If the referenced Shipping Method is associated with a Store and the Cart is not associated with any Store.
  8. - *
*

When using InventoryMode ReserveOnCart:

* * *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost.java index b0e630be5ea..5bbae0c1a9c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost.java @@ -18,6 +18,14 @@ /** *

Merges items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart.

*

If the Cart exists in the Project but does not have a store specified, or the store field references a different Store, a ResourceNotFound error is returned.

+ * *

For more information about merge mode behaviors, merge rules, and tax recalculation, see Merge a Cart.

* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString.java index 23be856c897..d50011f9471 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString.java @@ -19,6 +19,14 @@ /** *

Merges items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart.

*

If the Cart exists in the Project but does not have a store specified, or the store field references a different Store, a ResourceNotFound error is returned.

+ * *

For more information about merge mode behaviors, merge rules, and tax recalculation, see Merge a Cart.

* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsPost.java index 80c33cc0d13..6449fe84fd2 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsPost.java @@ -21,12 +21,6 @@ /** *

Creates a Cart in a Store.

- *

An InvalidOperation error is returned in one of the following cases:

- *
    - *
  1. If the referenced Shipping Method has a predicate that does not match the Cart.
  2. - *
  3. If the referenced Shipping Method is not active.
  4. - *
  5. If the referenced Shipping Method is associated with a Store that is different from the Cart's Store.
  6. - *
*

Specific Error Codes:

* * *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsPostString.java index ec92ac14448..96c0ecf28f7 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsPostString.java @@ -22,12 +22,6 @@ /** *

Creates a Cart in a Store.

- *

An InvalidOperation error is returned in one of the following cases:

- *
    - *
  1. If the referenced Shipping Method has a predicate that does not match the Cart.
  2. - *
  3. If the referenced Shipping Method is not active.
  4. - *
  5. If the referenced Shipping Method is associated with a Store that is different from the Cart's Store.
  6. - *
*

Specific Error Codes:

* * *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet.java new file mode 100644 index 00000000000..8548585ecad --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet.java @@ -0,0 +1,228 @@ + +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 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; + +import tools.jackson.core.type.TypeReference; + +/** + * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .discountCodes()
+ *            .withId("{ID}")
+ *            .get()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet 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 storeKey; + private String ID; + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet(final ApiHttpClient apiHttpClient, String projectKey, + String storeKey, String ID) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.ID = ID; + } + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet( + ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.ID = t.ID; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/discount-codes/%s", encodePathParam(this.projectKey), + encodePathParam(this.storeKey), 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.discount_code.DiscountCode.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.discount_code.DiscountCode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getStoreKey() { + return this.storeKey; + } + + public String getID() { + return this.ID; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setStoreKey(final String storeKey) { + this.storeKey = storeKey; + } + + 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet 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; + + ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet that = (ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(ID, that.ID) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).append(ID).toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet copy() { + return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead.java new file mode 100644 index 00000000000..d1c78c233f9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead.java @@ -0,0 +1,137 @@ + +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 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; + +import tools.jackson.core.type.TypeReference; + +/** + *

Checks if a DiscountCode exists with the provided id. Returns a 200 status if the DiscountCode exists, or a 404 status otherwise.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .discountCodes()
+ *            .withId("{ID}")
+ *            .head()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead + 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 storeKey; + private String ID; + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead(final ApiHttpClient apiHttpClient, String projectKey, + String storeKey, String ID) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.ID = ID; + } + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead( + ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.ID = t.ID; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/discount-codes/%s", encodePathParam(this.projectKey), + encodePathParam(this.storeKey), 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, tools.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute(final ApiHttpClient client) { + return execute(client, tools.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getStoreKey() { + return this.storeKey; + } + + public String getID() { + return this.ID; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setStoreKey(final String storeKey) { + this.storeKey = storeKey; + } + + 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; + + ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead that = (ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(ID, that.ID) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).append(ID).toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead copy() { + return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder.java new file mode 100644 index 00000000000..42c0508d3df --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.client; + +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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String storeKey; + private final String ID; + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder(final ApiHttpClient apiHttpClient, + final String projectKey, final String storeKey, final String ID) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.storeKey = storeKey; + this.ID = ID; + } + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet get() { + return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet(apiHttpClient, projectKey, storeKey, ID); + } + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead head() { + return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead(apiHttpClient, projectKey, storeKey, ID); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet.java new file mode 100644 index 00000000000..8083be4aad3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet.java @@ -0,0 +1,689 @@ + +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 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; + +import tools.jackson.core.type.TypeReference; + +/** + * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .discountCodes()
+ *            .get()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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; + private String storeKey; + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet(final ApiHttpClient apiHttpClient, String projectKey, + String storeKey) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + } + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet(ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/discount-codes", encodePathParam(this.projectKey), + encodePathParam(this.storeKey)); + 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.discount_code.DiscountCodePagedQueryResponse.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.discount_code.DiscountCodePagedQueryResponse.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getStoreKey() { + return this.storeKey; + } + + 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; + } + + public void setStoreKey(final String storeKey) { + this.storeKey = storeKey; + } + + /** + * set expand with the specified value + * @param expand value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withSort(final TValue sort) { + return copy().withQueryParam("sort", sort); + } + + /** + * add additional sort query parameter + * @param sort value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withLimit(final TValue limit) { + return copy().withQueryParam("limit", limit); + } + + /** + * add additional limit query parameter + * @param limit value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withOffset(final TValue offset) { + return copy().withQueryParam("offset", offset); + } + + /** + * add additional offset query parameter + * @param offset value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withWithTotal(final TValue withTotal) { + return copy().withQueryParam("withTotal", withTotal); + } + + /** + * add additional withTotal query parameter + * @param withTotal value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withWhere(final TValue where) { + return copy().withQueryParam("where", where); + } + + /** + * add additional where query parameter + * @param where value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet 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; + + ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet that = (ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(storeKey, that.storeKey).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet copy() { + return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead.java new file mode 100644 index 00000000000..78cb3e7c122 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead.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 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; + +import tools.jackson.core.type.TypeReference; + +/** + *

Checks if one or more DiscountCodes exist for the provided query predicate in a Store. Returns a 200 status if any DiscountCodes match the query predicate, or a 404 status otherwise.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .discountCodes()
+ *            .head()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead + 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 storeKey; + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead(final ApiHttpClient apiHttpClient, String projectKey, + String storeKey) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + } + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead(ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/discount-codes", encodePathParam(this.projectKey), + encodePathParam(this.storeKey)); + 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, tools.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute(final ApiHttpClient client) { + return execute(client, tools.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getStoreKey() { + return this.storeKey; + } + + public List getWhere() { + return this.getQueryParam("where"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setStoreKey(final String storeKey) { + this.storeKey = storeKey; + } + + /** + * set where with the specified value + * @param where value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead withWhere(final TValue where) { + return copy().withQueryParam("where", where); + } + + /** + * add additional where query parameter + * @param where value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead 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; + + ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead that = (ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(storeKey, that.storeKey).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead copy() { + return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet.java new file mode 100644 index 00000000000..3e0f94fd083 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet.java @@ -0,0 +1,231 @@ + +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 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; + +import tools.jackson.core.type.TypeReference; + +/** + * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .discountCodes()
+ *            .withKey("{key}")
+ *            .get()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet 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 storeKey; + private String key; + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet(final ApiHttpClient apiHttpClient, + String projectKey, String storeKey, String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.key = key; + } + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet( + ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.key = t.key; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/discount-codes/key=%s", + encodePathParam(this.projectKey), encodePathParam(this.storeKey), 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.discount_code.DiscountCode.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.discount_code.DiscountCode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getStoreKey() { + return this.storeKey; + } + + public String getKey() { + return this.key; + } + + public List getExpand() { + return this.getQueryParam("expand"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setStoreKey(final String storeKey) { + this.storeKey = storeKey; + } + + 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet withExpand(final TValue expand) { + return copy().withQueryParam("expand", expand); + } + + /** + * add additional expand query parameter + * @param expand value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet 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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet + */ + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet 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; + + ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet that = (ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).append(key).toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet copy() { + return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead.java new file mode 100644 index 00000000000..dd88f632c2e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead.java @@ -0,0 +1,138 @@ + +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 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; + +import tools.jackson.core.type.TypeReference; + +/** + *

Checks if a DiscountCode exists with the provided key. Returns a 200 status if the DiscountCode exists, or a 404 status otherwise.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .discountCodes()
+ *            .withKey("{key}")
+ *            .head()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead 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 storeKey; + private String key; + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead(final ApiHttpClient apiHttpClient, + String projectKey, String storeKey, String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.key = key; + } + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead( + ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.key = t.key; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/discount-codes/key=%s", + encodePathParam(this.projectKey), encodePathParam(this.storeKey), 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, tools.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute(final ApiHttpClient client) { + return execute(client, tools.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getStoreKey() { + return this.storeKey; + } + + public String getKey() { + return this.key; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setStoreKey(final String storeKey) { + this.storeKey = storeKey; + } + + 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; + + ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead that = (ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).append(key).toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead copy() { + return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder.java new file mode 100644 index 00000000000..aaadafe7f9f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.client; + +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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String storeKey; + private final String key; + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder(final ApiHttpClient apiHttpClient, + final String projectKey, final String storeKey, final String key) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.storeKey = storeKey; + this.key = key; + } + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet get() { + return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet(apiHttpClient, projectKey, storeKey, key); + } + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead head() { + return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead(apiHttpClient, projectKey, storeKey, key); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder.java new file mode 100644 index 00000000000..88185ed2f0e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder.java @@ -0,0 +1,39 @@ + +package com.commercetools.api.client; + +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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String storeKey; + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder(final ApiHttpClient apiHttpClient, + final String projectKey, final String storeKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.storeKey = storeKey; + } + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet get() { + return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet(apiHttpClient, projectKey, storeKey); + } + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead head() { + return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead(apiHttpClient, projectKey, storeKey); + } + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder withKey(String key) { + return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder(apiHttpClient, projectKey, + storeKey, key); + } + + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder withId(String ID) { + return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder(apiHttpClient, projectKey, storeKey, + ID); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPost.java index f207acace13..5366b4b2d72 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPost.java @@ -18,6 +18,12 @@ /** *

Authenticates a Customer associated with a Store.

*

Allows merging items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart. If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

+ *

The anonymous Cart is not merged in any of the following cases:

+ *
    + *
  • The referenced Shipping Method is not active.
  • + *
  • The referenced Shipping Method is scoped to a Store that differs from the Cart's Store.
  • + *
  • The referenced Shipping Method is scoped to a Store, but the Cart does not belong to a Store.
  • + *
*

If the Customer exists in the Project but the stores field references a different Store, this method returns an InvalidCredentials error.

* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPostString.java index c4a43b8a85a..287a4ab2318 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPostString.java @@ -19,6 +19,12 @@ /** *

Authenticates a Customer associated with a Store.

*

Allows merging items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart. If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

+ *

The anonymous Cart is not merged in any of the following cases:

+ *
    + *
  • The referenced Shipping Method is not active.
  • + *
  • The referenced Shipping Method is scoped to a Store that differs from the Cart's Store.
  • + *
  • The referenced Shipping Method is scoped to a Store, but the Cart does not belong to a Store.
  • + *
*

If the Customer exists in the Project but the stores field references a different Store, this method returns an InvalidCredentials error.

* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.java index 9e6572cdd71..fa8750d0905 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.java @@ -34,6 +34,10 @@ public ByProjectKeyInStoreKeyByStoreKeyCustomersRequestBuilder customers() { return new ByProjectKeyInStoreKeyByStoreKeyCustomersRequestBuilder(apiHttpClient, projectKey, storeKey); } + public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder discountCodes() { + return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder(apiHttpClient, projectKey, storeKey); + } + public ByProjectKeyInStoreKeyByStoreKeyMeRequestBuilder me() { return new ByProjectKeyInStoreKeyByStoreKeyMeRequestBuilder(apiHttpClient, projectKey, storeKey); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyStagedQuotesPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyStagedQuotesPost.java index d666c1e21bd..fb4bf5fc3e3 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyStagedQuotesPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyStagedQuotesPost.java @@ -21,6 +21,14 @@ /** *

Creates a StagedQuote in a Store.

+ *
    + *
  • InvalidOperation is returned in several cases, including the following: + *
      + *
    • The referenced Shipping Method is not active.
    • + *
    • The referenced Shipping Method is scoped to a Store that differs from the Store referenced by the Quote Request.
    • + *
    • The referenced Shipping Method is scoped to a Store, but the Quote Request does not belong to a Store.
    • + *
  • + *
* *
*
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyStagedQuotesPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyStagedQuotesPostString.java index 873c757377f..0dee81cd51c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyStagedQuotesPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyStagedQuotesPostString.java @@ -22,6 +22,14 @@ /** *

Creates a StagedQuote in a Store.

+ *
    + *
  • InvalidOperation is returned in several cases, including the following: + *
      + *
    • The referenced Shipping Method is not active.
    • + *
    • The referenced Shipping Method is scoped to a Store that differs from the Store referenced by the Quote Request.
    • + *
    • The referenced Shipping Method is scoped to a Store, but the Quote Request does not belong to a Store.
    • + *
  • + *
* *
*
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsByIDGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsByIDGet.java index 403ff7895aa..c3bb24d3558 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsByIDGet.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsByIDGet.java @@ -22,6 +22,7 @@ /** *

Retrieves a Variant Projection by its ID in the specified Store.

*

Only returns Variants belonging to Products distributed through the Store's configured channels.

+ *

If a ProductTailoring exists for the Product and the given Store, the returned Variant Projection includes the tailored Product name, slug, and description, along with the tailored Variant images, assets, and attributes. The staged query parameter selects either the current or staged tailored data. When no Product Tailoring exists for the Product and Store, the Variant Projection is returned without Product Tailoring data.

*

Required access scopes:

*
    *
  • To retrieve the current representation, the view_published_products:{projectKey} scope is required.

  • diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsGet.java index 1f740d0613a..41d7e4381bd 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsGet.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsGet.java @@ -22,6 +22,7 @@ /** *

    Queries Variant Projections in the specified Store.

    *

    Only Variants belonging to Products distributed through the Store's configured channels are returned. By default, this endpoint returns the current representation of Variants where the published flag is true.

    + *

    If a ProductTailoring exists for a Product and the given Store, the returned Variant Projections include the tailored Product name, slug, and description, along with the tailored Variant images, assets, and attributes. The staged query parameter selects either the current or staged tailored data. When no Product Tailoring exists for a Product and Store, the Variant Projection is returned without Product Tailoring data.

    *

    Required access scopes:

    *
      *
    • To retrieve the current representation of published Variants, the view_published_products:{projectKey} scope is required.

    • diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsKeyByKeyGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsKeyByKeyGet.java index c189508354f..b01fb1ea20f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsKeyByKeyGet.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsKeyByKeyGet.java @@ -22,6 +22,7 @@ /** *

      Retrieves a Variant Projection by its key in the specified Store.

      *

      Only returns Variants belonging to Products distributed through the Store's configured channels.

      + *

      If a ProductTailoring exists for the Product and the given Store, the returned Variant Projection includes the tailored Product name, slug, and description, along with the tailored Variant images, assets, and attributes. The staged query parameter selects either the current or staged tailored data. When no Product Tailoring exists for the Product and Store, the Variant Projection is returned without Product Tailoring data.

      *

      Required access scopes:

      *
        *
      • To retrieve the current representation, the view_published_products:{projectKey} scope is required.

      • diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPost.java index a48e958936c..afa9b0cdc7e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPost.java @@ -18,6 +18,12 @@ /** *

        Authenticates a global Customer.

        *

        Allows merging items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart. If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

        + *

        The anonymous Cart is not merged in any of the following cases:

        + *
          + *
        • The referenced Shipping Method is not active.
        • + *
        • The referenced Shipping Method is scoped to a Store that differs from the Cart's Store.
        • + *
        • The referenced Shipping Method is scoped to a Store, but the Cart does not belong to a Store.
        • + *
        *

        If an account with the given credentials is not found, an InvalidCredentials error is returned.

        * *
        diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPostString.java index f9418967b94..e1d8b606c10 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPostString.java @@ -19,6 +19,12 @@ /** *

        Authenticates a global Customer.

        *

        Allows merging items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart. If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

        + *

        The anonymous Cart is not merged in any of the following cases:

        + *
          + *
        • The referenced Shipping Method is not active.
        • + *
        • The referenced Shipping Method is scoped to a Store that differs from the Cart's Store.
        • + *
        • The referenced Shipping Method is scoped to a Store, but the Cart does not belong to a Store.
        • + *
        *

        If an account with the given credentials is not found, an InvalidCredentials error is returned.

        * *
        diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersByIDDelete.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersByIDDelete.java new file mode 100644 index 00000000000..6f24dd0ab08 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersByIDDelete.java @@ -0,0 +1,211 @@ + +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 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; + +import tools.jackson.core.type.TypeReference; + +/** + * + * + *
        + *
        + *
        {@code
        + *   CompletableFuture> result = apiRoot
        + *            .withProjectKey("{projectKey}")
        + *            .mcpServers()
        + *            .withId("{ID}")
        + *            .delete()
        + *            .withVersion(version)
        + *            .execute()
        + * }
        + *
        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyMcpServersByIDDelete + extends TypeApiMethod + implements com.commercetools.api.client.VersionedTrait, + com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String ID; + + public ByProjectKeyMcpServersByIDDelete(final ApiHttpClient apiHttpClient, String projectKey, String ID) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + } + + public ByProjectKeyMcpServersByIDDelete(ByProjectKeyMcpServersByIDDelete 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/mcp-servers/%s", encodePathParam(this.projectKey), + encodePathParam(this.ID)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.DELETE, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.mcp_server.McpServer.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.mcp_server.McpServer.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getID() { + return this.ID; + } + + public List getVersion() { + return this.getQueryParam("version"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setID(final String ID) { + this.ID = ID; + } + + /** + * set version with the specified value + * @param version value to be set + * @param value type + * @return ByProjectKeyMcpServersByIDDelete + */ + public ByProjectKeyMcpServersByIDDelete withVersion(final TValue version) { + return copy().withQueryParam("version", version); + } + + /** + * add additional version query parameter + * @param version value to be added + * @param value type + * @return ByProjectKeyMcpServersByIDDelete + */ + public ByProjectKeyMcpServersByIDDelete addVersion(final TValue version) { + return copy().addQueryParam("version", version); + } + + /** + * set version with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyMcpServersByIDDelete + */ + public ByProjectKeyMcpServersByIDDelete withVersion(final Supplier supplier) { + return copy().withQueryParam("version", supplier.get()); + } + + /** + * add additional version query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyMcpServersByIDDelete + */ + public ByProjectKeyMcpServersByIDDelete addVersion(final Supplier supplier) { + return copy().addQueryParam("version", supplier.get()); + } + + /** + * set version with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyMcpServersByIDDelete + */ + public ByProjectKeyMcpServersByIDDelete withVersion(final Function op) { + return copy().withQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * add additional version query parameter + * @param op builder for the value to be added + * @return ByProjectKeyMcpServersByIDDelete + */ + public ByProjectKeyMcpServersByIDDelete addVersion(final Function op) { + return copy().addQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * set version with the specified values + * @param version values to be set + * @param value type + * @return ByProjectKeyMcpServersByIDDelete + */ + public ByProjectKeyMcpServersByIDDelete withVersion(final Collection version) { + return copy().withoutQueryParam("version") + .addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional version query parameters + * @param version values to be added + * @param value type + * @return ByProjectKeyMcpServersByIDDelete + */ + public ByProjectKeyMcpServersByIDDelete addVersion(final Collection version) { + return copy().addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyMcpServersByIDDelete that = (ByProjectKeyMcpServersByIDDelete) 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 ByProjectKeyMcpServersByIDDelete copy() { + return new ByProjectKeyMcpServersByIDDelete(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersByIDGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersByIDGet.java new file mode 100644 index 00000000000..ec5507f4072 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersByIDGet.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 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; + +import tools.jackson.core.type.TypeReference; + +/** + * + * + *
        + *
        + *
        {@code
        + *   CompletableFuture> result = apiRoot
        + *            .withProjectKey("{projectKey}")
        + *            .mcpServers()
        + *            .withId("{ID}")
        + *            .get()
        + *            .execute()
        + * }
        + *
        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyMcpServersByIDGet + 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 ByProjectKeyMcpServersByIDGet(final ApiHttpClient apiHttpClient, String projectKey, String ID) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + } + + public ByProjectKeyMcpServersByIDGet(ByProjectKeyMcpServersByIDGet 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/mcp-servers/%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.mcp_server.McpServer.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.mcp_server.McpServer.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; + + ByProjectKeyMcpServersByIDGet that = (ByProjectKeyMcpServersByIDGet) 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 ByProjectKeyMcpServersByIDGet copy() { + return new ByProjectKeyMcpServersByIDGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersByIDPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersByIDPost.java new file mode 100644 index 00000000000..02bd4f7cdd2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersByIDPost.java @@ -0,0 +1,146 @@ + +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 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; + +import tools.jackson.core.type.TypeReference; + +/** + *

        Specific Error Codes:

        + * + * + *
        + *
        + *
        {@code
        + *   CompletableFuture> result = apiRoot
        + *            .withProjectKey("{projectKey}")
        + *            .mcpServers()
        + *            .withId("{ID}")
        + *            .post(null)
        + *            .execute()
        + * }
        + *
        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyMcpServersByIDPost extends + TypeBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String ID; + + private com.commercetools.api.models.mcp_server.McpServerUpdate mcpServerUpdate; + + public ByProjectKeyMcpServersByIDPost(final ApiHttpClient apiHttpClient, String projectKey, String ID, + com.commercetools.api.models.mcp_server.McpServerUpdate mcpServerUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + this.mcpServerUpdate = mcpServerUpdate; + } + + public ByProjectKeyMcpServersByIDPost(ByProjectKeyMcpServersByIDPost t) { + super(t); + this.projectKey = t.projectKey; + this.ID = t.ID; + this.mcpServerUpdate = t.mcpServerUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/mcp-servers/%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(mcpServerUpdate))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.mcp_server.McpServer.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.mcp_server.McpServer.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; + } + + public com.commercetools.api.models.mcp_server.McpServerUpdate getBody() { + return mcpServerUpdate; + } + + public ByProjectKeyMcpServersByIDPost withBody( + com.commercetools.api.models.mcp_server.McpServerUpdate mcpServerUpdate) { + ByProjectKeyMcpServersByIDPost t = copy(); + t.mcpServerUpdate = mcpServerUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyMcpServersByIDPost that = (ByProjectKeyMcpServersByIDPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(ID, that.ID) + .append(mcpServerUpdate, that.mcpServerUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(ID).append(mcpServerUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyMcpServersByIDPost copy() { + return new ByProjectKeyMcpServersByIDPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersByIDPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersByIDPostString.java new file mode 100644 index 00000000000..533e442a7a0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersByIDPostString.java @@ -0,0 +1,144 @@ + +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.List; +import java.util.concurrent.CompletableFuture; + +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; + +import tools.jackson.core.type.TypeReference; + +/** + *

        Specific Error Codes:

        + * + * + *
        + *
        + *
        {@code
        + *   CompletableFuture> result = apiRoot
        + *            .withProjectKey("{projectKey}")
        + *            .mcpServers()
        + *            .withId("{ID}")
        + *            .post("")
        + *            .execute()
        + * }
        + *
        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyMcpServersByIDPostString extends + StringBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String ID; + + private String mcpServerUpdate; + + public ByProjectKeyMcpServersByIDPostString(final ApiHttpClient apiHttpClient, String projectKey, String ID, + String mcpServerUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.ID = ID; + this.mcpServerUpdate = mcpServerUpdate; + } + + public ByProjectKeyMcpServersByIDPostString(ByProjectKeyMcpServersByIDPostString t) { + super(t); + this.projectKey = t.projectKey; + this.ID = t.ID; + this.mcpServerUpdate = t.mcpServerUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/mcp-servers/%s", this.projectKey, this.ID); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + mcpServerUpdate.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.mcp_server.McpServer.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.mcp_server.McpServer.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; + } + + public String getBody() { + return mcpServerUpdate; + } + + public ByProjectKeyMcpServersByIDPostString withBody(String mcpServerUpdate) { + ByProjectKeyMcpServersByIDPostString t = copy(); + t.mcpServerUpdate = mcpServerUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyMcpServersByIDPostString that = (ByProjectKeyMcpServersByIDPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(ID, that.ID) + .append(mcpServerUpdate, that.mcpServerUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(ID).append(mcpServerUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyMcpServersByIDPostString copy() { + return new ByProjectKeyMcpServersByIDPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersByIDRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersByIDRequestBuilder.java new file mode 100644 index 00000000000..5da563d052c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersByIDRequestBuilder.java @@ -0,0 +1,49 @@ + +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 ByProjectKeyMcpServersByIDRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String ID; + + public ByProjectKeyMcpServersByIDRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey, + final String ID) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.ID = ID; + } + + public ByProjectKeyMcpServersByIDGet get() { + return new ByProjectKeyMcpServersByIDGet(apiHttpClient, projectKey, ID); + } + + public ByProjectKeyMcpServersByIDPost post( + com.commercetools.api.models.mcp_server.McpServerUpdate mcpServerUpdate) { + return new ByProjectKeyMcpServersByIDPost(apiHttpClient, projectKey, ID, mcpServerUpdate); + } + + public ByProjectKeyMcpServersByIDPostString post(final String mcpServerUpdate) { + return new ByProjectKeyMcpServersByIDPostString(apiHttpClient, projectKey, ID, mcpServerUpdate); + } + + public ByProjectKeyMcpServersByIDPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.api.models.mcp_server.McpServerUpdateBuilder.of()).build()); + } + + public ByProjectKeyMcpServersByIDDelete delete() { + return new ByProjectKeyMcpServersByIDDelete(apiHttpClient, projectKey, ID); + } + + public ByProjectKeyMcpServersByIDDelete delete(TValue version) { + return delete().withVersion(version); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersGet.java new file mode 100644 index 00000000000..37f29bf8172 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersGet.java @@ -0,0 +1,448 @@ + +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 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; + +import tools.jackson.core.type.TypeReference; + +/** + * + * + *
        + *
        + *
        {@code
        + *   CompletableFuture> result = apiRoot
        + *            .withProjectKey("{projectKey}")
        + *            .mcpServers()
        + *            .get()
        + *            .execute()
        + * }
        + *
        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyMcpServersGet extends + TypeApiMethod + implements com.commercetools.api.client.SortableTrait, + com.commercetools.api.client.PagingTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + public ByProjectKeyMcpServersGet(final ApiHttpClient apiHttpClient, String projectKey) { + super(apiHttpClient); + this.projectKey = projectKey; + } + + public ByProjectKeyMcpServersGet(ByProjectKeyMcpServersGet t) { + super(t); + this.projectKey = t.projectKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/mcp-servers", 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.mcp_server.McpServerPagedQueryResponse.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.mcp_server.McpServerPagedQueryResponse.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + 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 void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + /** + * set sort with the specified value + * @param sort value to be set + * @param value type + * @return ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet withSort(final TValue sort) { + return copy().withQueryParam("sort", sort); + } + + /** + * add additional sort query parameter + * @param sort value to be added + * @param value type + * @return ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet withLimit(final TValue limit) { + return copy().withQueryParam("limit", limit); + } + + /** + * add additional limit query parameter + * @param limit value to be added + * @param value type + * @return ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet withOffset(final TValue offset) { + return copy().withQueryParam("offset", offset); + } + + /** + * add additional offset query parameter + * @param offset value to be added + * @param value type + * @return ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet withWithTotal(final TValue withTotal) { + return copy().withQueryParam("withTotal", withTotal); + } + + /** + * add additional withTotal query parameter + * @param withTotal value to be added + * @param value type + * @return ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet 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 ByProjectKeyMcpServersGet + */ + public ByProjectKeyMcpServersGet addWithTotal(final Collection withTotal) { + return copy().addQueryParams( + withTotal.stream().map(s -> new ParamEntry<>("withTotal", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyMcpServersGet that = (ByProjectKeyMcpServersGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); + } + + @Override + protected ByProjectKeyMcpServersGet copy() { + return new ByProjectKeyMcpServersGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersKeyByKeyDelete.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersKeyByKeyDelete.java new file mode 100644 index 00000000000..a1a37ec1078 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersKeyByKeyDelete.java @@ -0,0 +1,211 @@ + +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 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; + +import tools.jackson.core.type.TypeReference; + +/** + * + * + *
        + *
        + *
        {@code
        + *   CompletableFuture> result = apiRoot
        + *            .withProjectKey("{projectKey}")
        + *            .mcpServers()
        + *            .withKey("{key}")
        + *            .delete()
        + *            .withVersion(version)
        + *            .execute()
        + * }
        + *
        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyMcpServersKeyByKeyDelete + extends TypeApiMethod + implements com.commercetools.api.client.VersionedTrait, + com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + public ByProjectKeyMcpServersKeyByKeyDelete(final ApiHttpClient apiHttpClient, String projectKey, String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyMcpServersKeyByKeyDelete(ByProjectKeyMcpServersKeyByKeyDelete 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/mcp-servers/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.DELETE, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.mcp_server.McpServer.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.mcp_server.McpServer.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public List getVersion() { + return this.getQueryParam("version"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + /** + * set version with the specified value + * @param version value to be set + * @param value type + * @return ByProjectKeyMcpServersKeyByKeyDelete + */ + public ByProjectKeyMcpServersKeyByKeyDelete withVersion(final TValue version) { + return copy().withQueryParam("version", version); + } + + /** + * add additional version query parameter + * @param version value to be added + * @param value type + * @return ByProjectKeyMcpServersKeyByKeyDelete + */ + public ByProjectKeyMcpServersKeyByKeyDelete addVersion(final TValue version) { + return copy().addQueryParam("version", version); + } + + /** + * set version with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyMcpServersKeyByKeyDelete + */ + public ByProjectKeyMcpServersKeyByKeyDelete withVersion(final Supplier supplier) { + return copy().withQueryParam("version", supplier.get()); + } + + /** + * add additional version query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyMcpServersKeyByKeyDelete + */ + public ByProjectKeyMcpServersKeyByKeyDelete addVersion(final Supplier supplier) { + return copy().addQueryParam("version", supplier.get()); + } + + /** + * set version with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyMcpServersKeyByKeyDelete + */ + public ByProjectKeyMcpServersKeyByKeyDelete withVersion(final Function op) { + return copy().withQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * add additional version query parameter + * @param op builder for the value to be added + * @return ByProjectKeyMcpServersKeyByKeyDelete + */ + public ByProjectKeyMcpServersKeyByKeyDelete addVersion(final Function op) { + return copy().addQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * set version with the specified values + * @param version values to be set + * @param value type + * @return ByProjectKeyMcpServersKeyByKeyDelete + */ + public ByProjectKeyMcpServersKeyByKeyDelete withVersion(final Collection version) { + return copy().withoutQueryParam("version") + .addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional version query parameters + * @param version values to be added + * @param value type + * @return ByProjectKeyMcpServersKeyByKeyDelete + */ + public ByProjectKeyMcpServersKeyByKeyDelete addVersion(final Collection version) { + return copy().addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyMcpServersKeyByKeyDelete that = (ByProjectKeyMcpServersKeyByKeyDelete) 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 ByProjectKeyMcpServersKeyByKeyDelete copy() { + return new ByProjectKeyMcpServersKeyByKeyDelete(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersKeyByKeyGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersKeyByKeyGet.java new file mode 100644 index 00000000000..b090971c318 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersKeyByKeyGet.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 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; + +import tools.jackson.core.type.TypeReference; + +/** + * + * + *
        + *
        + *
        {@code
        + *   CompletableFuture> result = apiRoot
        + *            .withProjectKey("{projectKey}")
        + *            .mcpServers()
        + *            .withKey("{key}")
        + *            .get()
        + *            .execute()
        + * }
        + *
        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyMcpServersKeyByKeyGet + 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 ByProjectKeyMcpServersKeyByKeyGet(final ApiHttpClient apiHttpClient, String projectKey, String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyMcpServersKeyByKeyGet(ByProjectKeyMcpServersKeyByKeyGet 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/mcp-servers/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.mcp_server.McpServer.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.mcp_server.McpServer.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; + + ByProjectKeyMcpServersKeyByKeyGet that = (ByProjectKeyMcpServersKeyByKeyGet) 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 ByProjectKeyMcpServersKeyByKeyGet copy() { + return new ByProjectKeyMcpServersKeyByKeyGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersKeyByKeyPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersKeyByKeyPost.java new file mode 100644 index 00000000000..c609b690cab --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersKeyByKeyPost.java @@ -0,0 +1,146 @@ + +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 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; + +import tools.jackson.core.type.TypeReference; + +/** + *

        Specific Error Codes:

        + * + * + *
        + *
        + *
        {@code
        + *   CompletableFuture> result = apiRoot
        + *            .withProjectKey("{projectKey}")
        + *            .mcpServers()
        + *            .withKey("{key}")
        + *            .post(null)
        + *            .execute()
        + * }
        + *
        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyMcpServersKeyByKeyPost extends + TypeBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + private com.commercetools.api.models.mcp_server.McpServerUpdate mcpServerUpdate; + + public ByProjectKeyMcpServersKeyByKeyPost(final ApiHttpClient apiHttpClient, String projectKey, String key, + com.commercetools.api.models.mcp_server.McpServerUpdate mcpServerUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + this.mcpServerUpdate = mcpServerUpdate; + } + + public ByProjectKeyMcpServersKeyByKeyPost(ByProjectKeyMcpServersKeyByKeyPost t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + this.mcpServerUpdate = t.mcpServerUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/mcp-servers/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(mcpServerUpdate))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.mcp_server.McpServer.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.mcp_server.McpServer.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; + } + + public com.commercetools.api.models.mcp_server.McpServerUpdate getBody() { + return mcpServerUpdate; + } + + public ByProjectKeyMcpServersKeyByKeyPost withBody( + com.commercetools.api.models.mcp_server.McpServerUpdate mcpServerUpdate) { + ByProjectKeyMcpServersKeyByKeyPost t = copy(); + t.mcpServerUpdate = mcpServerUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyMcpServersKeyByKeyPost that = (ByProjectKeyMcpServersKeyByKeyPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(key, that.key) + .append(mcpServerUpdate, that.mcpServerUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).append(mcpServerUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyMcpServersKeyByKeyPost copy() { + return new ByProjectKeyMcpServersKeyByKeyPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersKeyByKeyPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersKeyByKeyPostString.java new file mode 100644 index 00000000000..f7f7d08b582 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersKeyByKeyPostString.java @@ -0,0 +1,144 @@ + +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.List; +import java.util.concurrent.CompletableFuture; + +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; + +import tools.jackson.core.type.TypeReference; + +/** + *

        Specific Error Codes:

        + * + * + *
        + *
        + *
        {@code
        + *   CompletableFuture> result = apiRoot
        + *            .withProjectKey("{projectKey}")
        + *            .mcpServers()
        + *            .withKey("{key}")
        + *            .post("")
        + *            .execute()
        + * }
        + *
        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyMcpServersKeyByKeyPostString extends + StringBodyApiMethod + implements com.commercetools.api.client.ConflictingTrait, + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + private String mcpServerUpdate; + + public ByProjectKeyMcpServersKeyByKeyPostString(final ApiHttpClient apiHttpClient, String projectKey, String key, + String mcpServerUpdate) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + this.mcpServerUpdate = mcpServerUpdate; + } + + public ByProjectKeyMcpServersKeyByKeyPostString(ByProjectKeyMcpServersKeyByKeyPostString t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + this.mcpServerUpdate = t.mcpServerUpdate; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/mcp-servers/key=%s", this.projectKey, this.key); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + mcpServerUpdate.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.mcp_server.McpServer.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.mcp_server.McpServer.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; + } + + public String getBody() { + return mcpServerUpdate; + } + + public ByProjectKeyMcpServersKeyByKeyPostString withBody(String mcpServerUpdate) { + ByProjectKeyMcpServersKeyByKeyPostString t = copy(); + t.mcpServerUpdate = mcpServerUpdate; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyMcpServersKeyByKeyPostString that = (ByProjectKeyMcpServersKeyByKeyPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(key, that.key) + .append(mcpServerUpdate, that.mcpServerUpdate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).append(mcpServerUpdate).toHashCode(); + } + + @Override + protected ByProjectKeyMcpServersKeyByKeyPostString copy() { + return new ByProjectKeyMcpServersKeyByKeyPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersKeyByKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersKeyByKeyRequestBuilder.java new file mode 100644 index 00000000000..44bb04bc56b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersKeyByKeyRequestBuilder.java @@ -0,0 +1,49 @@ + +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 ByProjectKeyMcpServersKeyByKeyRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String key; + + public ByProjectKeyMcpServersKeyByKeyRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey, + final String key) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyMcpServersKeyByKeyGet get() { + return new ByProjectKeyMcpServersKeyByKeyGet(apiHttpClient, projectKey, key); + } + + public ByProjectKeyMcpServersKeyByKeyPost post( + com.commercetools.api.models.mcp_server.McpServerUpdate mcpServerUpdate) { + return new ByProjectKeyMcpServersKeyByKeyPost(apiHttpClient, projectKey, key, mcpServerUpdate); + } + + public ByProjectKeyMcpServersKeyByKeyPostString post(final String mcpServerUpdate) { + return new ByProjectKeyMcpServersKeyByKeyPostString(apiHttpClient, projectKey, key, mcpServerUpdate); + } + + public ByProjectKeyMcpServersKeyByKeyPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.api.models.mcp_server.McpServerUpdateBuilder.of()).build()); + } + + public ByProjectKeyMcpServersKeyByKeyDelete delete() { + return new ByProjectKeyMcpServersKeyByKeyDelete(apiHttpClient, projectKey, key); + } + + public ByProjectKeyMcpServersKeyByKeyDelete delete(TValue version) { + return delete().withVersion(version); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersPost.java new file mode 100644 index 00000000000..74f01b20ce4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersPost.java @@ -0,0 +1,131 @@ + +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 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; + +import tools.jackson.core.type.TypeReference; + +/** + *

        Creates a new MCP Server for the Project.

        + *

        Specific Error Codes:

        + * + * + *
        + *
        + *
        {@code
        + *   CompletableFuture> result = apiRoot
        + *            .withProjectKey("{projectKey}")
        + *            .mcpServers()
        + *            .post(null)
        + *            .execute()
        + * }
        + *
        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyMcpServersPost extends + TypeBodyApiMethod + implements com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private com.commercetools.api.models.mcp_server.McpServerDraft mcpServerDraft; + + public ByProjectKeyMcpServersPost(final ApiHttpClient apiHttpClient, String projectKey, + com.commercetools.api.models.mcp_server.McpServerDraft mcpServerDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.mcpServerDraft = mcpServerDraft; + } + + public ByProjectKeyMcpServersPost(ByProjectKeyMcpServersPost t) { + super(t); + this.projectKey = t.projectKey; + this.mcpServerDraft = t.mcpServerDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/mcp-servers", 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(mcpServerDraft))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.mcp_server.McpServer.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.mcp_server.McpServer.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public com.commercetools.api.models.mcp_server.McpServerDraft getBody() { + return mcpServerDraft; + } + + public ByProjectKeyMcpServersPost withBody(com.commercetools.api.models.mcp_server.McpServerDraft mcpServerDraft) { + ByProjectKeyMcpServersPost t = copy(); + t.mcpServerDraft = mcpServerDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyMcpServersPost that = (ByProjectKeyMcpServersPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(mcpServerDraft, that.mcpServerDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(mcpServerDraft).toHashCode(); + } + + @Override + protected ByProjectKeyMcpServersPost copy() { + return new ByProjectKeyMcpServersPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersPostString.java new file mode 100644 index 00000000000..5a4d520db19 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersPostString.java @@ -0,0 +1,131 @@ + +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.List; +import java.util.concurrent.CompletableFuture; + +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; + +import tools.jackson.core.type.TypeReference; + +/** + *

        Creates a new MCP Server for the Project.

        + *

        Specific Error Codes:

        + * + * + *
        + *
        + *
        {@code
        + *   CompletableFuture> result = apiRoot
        + *            .withProjectKey("{projectKey}")
        + *            .mcpServers()
        + *            .post("")
        + *            .execute()
        + * }
        + *
        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyMcpServersPostString + extends StringBodyApiMethod + implements com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private String mcpServerDraft; + + public ByProjectKeyMcpServersPostString(final ApiHttpClient apiHttpClient, String projectKey, + String mcpServerDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.mcpServerDraft = mcpServerDraft; + } + + public ByProjectKeyMcpServersPostString(ByProjectKeyMcpServersPostString t) { + super(t); + this.projectKey = t.projectKey; + this.mcpServerDraft = t.mcpServerDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/mcp-servers", this.projectKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + mcpServerDraft.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.mcp_server.McpServer.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.mcp_server.McpServer.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public String getBody() { + return mcpServerDraft; + } + + public ByProjectKeyMcpServersPostString withBody(String mcpServerDraft) { + ByProjectKeyMcpServersPostString t = copy(); + t.mcpServerDraft = mcpServerDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyMcpServersPostString that = (ByProjectKeyMcpServersPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(mcpServerDraft, that.mcpServerDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(mcpServerDraft).toHashCode(); + } + + @Override + protected ByProjectKeyMcpServersPostString copy() { + return new ByProjectKeyMcpServersPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersRequestBuilder.java new file mode 100644 index 00000000000..96aeba6abd6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersRequestBuilder.java @@ -0,0 +1,49 @@ + +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 ByProjectKeyMcpServersRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyMcpServersRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyMcpServersGet get() { + return new ByProjectKeyMcpServersGet(apiHttpClient, projectKey); + } + + public ByProjectKeyMcpServersPost post(com.commercetools.api.models.mcp_server.McpServerDraft mcpServerDraft) { + return new ByProjectKeyMcpServersPost(apiHttpClient, projectKey, mcpServerDraft); + } + + public ByProjectKeyMcpServersPostString post(final String mcpServerDraft) { + return new ByProjectKeyMcpServersPostString(apiHttpClient, projectKey, mcpServerDraft); + } + + public ByProjectKeyMcpServersPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.api.models.mcp_server.McpServerDraftBuilder.of()).build()); + } + + public ByProjectKeyMcpServersTypesRequestBuilder types() { + return new ByProjectKeyMcpServersTypesRequestBuilder(apiHttpClient, projectKey); + } + + public ByProjectKeyMcpServersKeyByKeyRequestBuilder withKey(String key) { + return new ByProjectKeyMcpServersKeyByKeyRequestBuilder(apiHttpClient, projectKey, key); + } + + public ByProjectKeyMcpServersByIDRequestBuilder withId(String ID) { + return new ByProjectKeyMcpServersByIDRequestBuilder(apiHttpClient, projectKey, ID); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersTypesByMcpServerTypeGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersTypesByMcpServerTypeGet.java new file mode 100644 index 00000000000..af80ba1d323 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersTypesByMcpServerTypeGet.java @@ -0,0 +1,218 @@ + +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 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; + +import tools.jackson.core.type.TypeReference; + +/** + *

        Returns a single MCP Server type. When majorVersion is omitted, the latest major version is returned.

        + * + *
        + *
        + *
        {@code
        + *   CompletableFuture> result = apiRoot
        + *            .withProjectKey("{projectKey}")
        + *            .mcpServers()
        + *            .types()
        + *            .withMcpServerType("{mcpServerType}")
        + *            .get()
        + *            .execute()
        + * }
        + *
        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyMcpServersTypesByMcpServerTypeGet 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 mcpServerType; + + public ByProjectKeyMcpServersTypesByMcpServerTypeGet(final ApiHttpClient apiHttpClient, String projectKey, + String mcpServerType) { + super(apiHttpClient); + this.projectKey = projectKey; + this.mcpServerType = mcpServerType; + } + + public ByProjectKeyMcpServersTypesByMcpServerTypeGet(ByProjectKeyMcpServersTypesByMcpServerTypeGet t) { + super(t); + this.projectKey = t.projectKey; + this.mcpServerType = t.mcpServerType; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/mcp-servers/types/%s", encodePathParam(this.projectKey), + encodePathParam(this.mcpServerType)); + 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.mcp_server.McpServerType.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.mcp_server.McpServerType.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getMcpServerType() { + return this.mcpServerType; + } + + public List getMajorVersion() { + return this.getQueryParam("majorVersion"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setMcpServerType(final String mcpServerType) { + this.mcpServerType = mcpServerType; + } + + /** + * set majorVersion with the specified value + * @param majorVersion value to be set + * @param value type + * @return ByProjectKeyMcpServersTypesByMcpServerTypeGet + */ + public ByProjectKeyMcpServersTypesByMcpServerTypeGet withMajorVersion(final TValue majorVersion) { + return copy().withQueryParam("majorVersion", majorVersion); + } + + /** + * add additional majorVersion query parameter + * @param majorVersion value to be added + * @param value type + * @return ByProjectKeyMcpServersTypesByMcpServerTypeGet + */ + public ByProjectKeyMcpServersTypesByMcpServerTypeGet addMajorVersion(final TValue majorVersion) { + return copy().addQueryParam("majorVersion", majorVersion); + } + + /** + * set majorVersion with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyMcpServersTypesByMcpServerTypeGet + */ + public ByProjectKeyMcpServersTypesByMcpServerTypeGet withMajorVersion(final Supplier supplier) { + return copy().withQueryParam("majorVersion", supplier.get()); + } + + /** + * add additional majorVersion query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyMcpServersTypesByMcpServerTypeGet + */ + public ByProjectKeyMcpServersTypesByMcpServerTypeGet addMajorVersion(final Supplier supplier) { + return copy().addQueryParam("majorVersion", supplier.get()); + } + + /** + * set majorVersion with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyMcpServersTypesByMcpServerTypeGet + */ + public ByProjectKeyMcpServersTypesByMcpServerTypeGet withMajorVersion( + final Function op) { + return copy().withQueryParam("majorVersion", op.apply(new StringBuilder())); + } + + /** + * add additional majorVersion query parameter + * @param op builder for the value to be added + * @return ByProjectKeyMcpServersTypesByMcpServerTypeGet + */ + public ByProjectKeyMcpServersTypesByMcpServerTypeGet addMajorVersion( + final Function op) { + return copy().addQueryParam("majorVersion", op.apply(new StringBuilder())); + } + + /** + * set majorVersion with the specified values + * @param majorVersion values to be set + * @param value type + * @return ByProjectKeyMcpServersTypesByMcpServerTypeGet + */ + public ByProjectKeyMcpServersTypesByMcpServerTypeGet withMajorVersion( + final Collection majorVersion) { + return copy().withoutQueryParam("majorVersion") + .addQueryParams(majorVersion.stream() + .map(s -> new ParamEntry<>("majorVersion", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional majorVersion query parameters + * @param majorVersion values to be added + * @param value type + * @return ByProjectKeyMcpServersTypesByMcpServerTypeGet + */ + public ByProjectKeyMcpServersTypesByMcpServerTypeGet addMajorVersion( + final Collection majorVersion) { + return copy().addQueryParams(majorVersion.stream() + .map(s -> new ParamEntry<>("majorVersion", s.toString())) + .collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyMcpServersTypesByMcpServerTypeGet that = (ByProjectKeyMcpServersTypesByMcpServerTypeGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(mcpServerType, that.mcpServerType) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(mcpServerType).toHashCode(); + } + + @Override + protected ByProjectKeyMcpServersTypesByMcpServerTypeGet copy() { + return new ByProjectKeyMcpServersTypesByMcpServerTypeGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersTypesByMcpServerTypeRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersTypesByMcpServerTypeRequestBuilder.java new file mode 100644 index 00000000000..75f1741c277 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersTypesByMcpServerTypeRequestBuilder.java @@ -0,0 +1,25 @@ + +package com.commercetools.api.client; + +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 ByProjectKeyMcpServersTypesByMcpServerTypeRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String mcpServerType; + + public ByProjectKeyMcpServersTypesByMcpServerTypeRequestBuilder(final ApiHttpClient apiHttpClient, + final String projectKey, final String mcpServerType) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.mcpServerType = mcpServerType; + } + + public ByProjectKeyMcpServersTypesByMcpServerTypeGet get() { + return new ByProjectKeyMcpServersTypesByMcpServerTypeGet(apiHttpClient, projectKey, mcpServerType); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersTypesGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersTypesGet.java new file mode 100644 index 00000000000..5e8d090e27f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersTypesGet.java @@ -0,0 +1,108 @@ + +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 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; + +import tools.jackson.core.type.TypeReference; + +/** + *

        Returns the catalog of available MCP Server types, each with its major versions and the tools you can enable for them.

        + * + *
        + *
        + *
        {@code
        + *   CompletableFuture> result = apiRoot
        + *            .withProjectKey("{projectKey}")
        + *            .mcpServers()
        + *            .types()
        + *            .get()
        + *            .execute()
        + * }
        + *
        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyMcpServersTypesGet + extends TypeApiMethod + implements com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + public ByProjectKeyMcpServersTypesGet(final ApiHttpClient apiHttpClient, String projectKey) { + super(apiHttpClient); + this.projectKey = projectKey; + } + + public ByProjectKeyMcpServersTypesGet(ByProjectKeyMcpServersTypesGet t) { + super(t); + this.projectKey = t.projectKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/mcp-servers/types", 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, tools.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute(final ApiHttpClient client) { + return execute(client, tools.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyMcpServersTypesGet that = (ByProjectKeyMcpServersTypesGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); + } + + @Override + protected ByProjectKeyMcpServersTypesGet copy() { + return new ByProjectKeyMcpServersTypesGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersTypesRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersTypesRequestBuilder.java new file mode 100644 index 00000000000..238ff3e89e9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMcpServersTypesRequestBuilder.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.client; + +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 ByProjectKeyMcpServersTypesRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyMcpServersTypesRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyMcpServersTypesGet get() { + return new ByProjectKeyMcpServersTypesGet(apiHttpClient, projectKey); + } + + public ByProjectKeyMcpServersTypesByMcpServerTypeRequestBuilder withMcpServerType(String mcpServerType) { + return new ByProjectKeyMcpServersTypesByMcpServerTypeRequestBuilder(apiHttpClient, projectKey, mcpServerType); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMeCartsReplicatePost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMeCartsReplicatePost.java index 80cbca02a16..aa58960adc5 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMeCartsReplicatePost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMeCartsReplicatePost.java @@ -24,6 +24,12 @@ *
          *
        • MatchingPriceNotFound
        • *
        • MissingTaxRateForCountry
        • + *
        • InvalidOperation is returned in several cases, including the following: + *
            + *
          • The referenced Shipping Method is not active.
          • + *
          • The referenced Shipping Method is scoped to a Store that differs from the Cart's Store.
          • + *
          • The referenced Shipping Method is scoped to a Store, but the Cart does not belong to a Store.
          • + *
        • *
        * *
        diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMeCartsReplicatePostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMeCartsReplicatePostString.java index 1169c141815..f6697b1ebf6 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMeCartsReplicatePostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyMeCartsReplicatePostString.java @@ -25,6 +25,12 @@ *
          *
        • MatchingPriceNotFound
        • *
        • MissingTaxRateForCountry
        • + *
        • InvalidOperation is returned in several cases, including the following: + *
            + *
          • The referenced Shipping Method is not active.
          • + *
          • The referenced Shipping Method is scoped to a Store that differs from the Cart's Store.
          • + *
          • The referenced Shipping Method is scoped to a Store, but the Cart does not belong to a Store.
          • + *
        • *
        * *
        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 f87540718c7..40f86990895 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 @@ -32,7 +32,12 @@ *
      • DiscountCodeNonApplicable
      • *
      • ShippingMethodDoesNotMatchCart
      • *
      • InvalidItemShippingDetails
      • - *
      • InvalidOperation
      • + *
      • InvalidOperation is returned in several cases, including the following: + *
          + *
        • The referenced Shipping Method is not active.
        • + *
        • The referenced Shipping Method is scoped to a Store that differs from the Cart's Store.
        • + *
        • The referenced Shipping Method is scoped to a Store, but the Cart does not belong to a Store.
        • + *
      • *
      • MatchingPriceNotFound
      • *
      • MissingTaxRateForCountry
      • *
      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 140b9769a78..0e809ce395c 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 @@ -33,7 +33,12 @@ *
    • DiscountCodeNonApplicable
    • *
    • ShippingMethodDoesNotMatchCart
    • *
    • InvalidItemShippingDetails
    • - *
    • InvalidOperation
    • + *
    • InvalidOperation is returned in several cases, including the following: + *
        + *
      • The referenced Shipping Method is not active.
      • + *
      • The referenced Shipping Method is scoped to a Store that differs from the Cart's Store.
      • + *
      • The referenced Shipping Method is scoped to a Store, but the Cart does not belong to a Store.
      • + *
    • *
    • MatchingPriceNotFound
    • *
    • MissingTaxRateForCountry
    • *
    diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersQuotesPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersQuotesPost.java index 796fd03271f..c504af57d9f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersQuotesPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersQuotesPost.java @@ -22,7 +22,12 @@ * * diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersQuotesPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersQuotesPostString.java index 40bf3e3081e..5fcc59b608f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersQuotesPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersQuotesPostString.java @@ -23,7 +23,12 @@ * * 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 e3a0f03621c..41539153cb4 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 @@ -231,4 +231,8 @@ public ByProjectKeyAttributeGroupsRequestBuilder attributeGroups() { return new ByProjectKeyAttributeGroupsRequestBuilder(apiHttpClient, projectKey); } + public ByProjectKeyMcpServersRequestBuilder mcpServers() { + return new ByProjectKeyMcpServersRequestBuilder(apiHttpClient, projectKey); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStagedQuotesPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStagedQuotesPost.java index 4a607e6f086..fd3fe98cc36 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStagedQuotesPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStagedQuotesPost.java @@ -21,6 +21,14 @@ /** *

    Creates a StagedQuote in the Project.

    + *
      + *
    • InvalidOperation is returned in several cases, including the following: + *
        + *
      • The referenced Shipping Method is not active.
      • + *
      • The referenced Shipping Method is scoped to a Store that differs from the Store referenced by the Quote Request.
      • + *
      • The referenced Shipping Method is scoped to a Store, but the Quote Request does not belong to a Store.
      • + *
    • + *
    * *
    *
    diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStagedQuotesPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStagedQuotesPostString.java index 1292c2c52b0..57fd6841ae1 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStagedQuotesPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStagedQuotesPostString.java @@ -22,6 +22,14 @@ /** *

    Creates a StagedQuote in the Project.

    + *
      + *
    • InvalidOperation is returned in several cases, including the following: + *
        + *
      • The referenced Shipping Method is not active.
      • + *
      • The referenced Shipping Method is scoped to a Store that differs from the Store referenced by the Quote Request.
      • + *
      • The referenced Shipping Method is scoped to a Store, but the Quote Request does not belong to a Store.
      • + *
    • + *
    * *
    *
    diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRecalculateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRecalculateAction.java index 8a08db91dc6..f9c12463afc 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRecalculateAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRecalculateAction.java @@ -38,7 +38,7 @@ public interface CartRecalculateAction extends CartUpdateAction { /** *
      - *
    • Leave empty or set as false to update only the Prices and TaxRates of the Line Items.
    • + *
    • Leave empty or set as false to update only the Prices and TaxRates of the Line Items. Prices inside the variant are only updated if updateProductData is true.
    • *
    • Set as true to update the Product data (such as name, variant, productType, and Product Attributes) of the Line Items.
    • *
    * @return updateProductData @@ -49,7 +49,7 @@ public interface CartRecalculateAction extends CartUpdateAction { /** *
      - *
    • Leave empty or set as false to update only the Prices and TaxRates of the Line Items.
    • + *
    • Leave empty or set as false to update only the Prices and TaxRates of the Line Items. Prices inside the variant are only updated if updateProductData is true.
    • *
    • Set as true to update the Product data (such as name, variant, productType, and Product Attributes) of the Line Items.
    • *
    * @param updateProductData value to be set diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRecalculateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRecalculateActionBuilder.java index 97bee5e86c4..8e13397b761 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRecalculateActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRecalculateActionBuilder.java @@ -27,7 +27,7 @@ public class CartRecalculateActionBuilder implements Builder - *
  • Leave empty or set as false to update only the Prices and TaxRates of the Line Items.
  • + *
  • Leave empty or set as false to update only the Prices and TaxRates of the Line Items. Prices inside the variant are only updated if updateProductData is true.
  • *
  • Set as true to update the Product data (such as name, variant, productType, and Product Attributes) of the Line Items.
  • *
* @param updateProductData value to be set @@ -41,7 +41,7 @@ public CartRecalculateActionBuilder updateProductData(@Nullable final Boolean up /** *
    - *
  • Leave empty or set as false to update only the Prices and TaxRates of the Line Items.
  • + *
  • Leave empty or set as false to update only the Prices and TaxRates of the Line Items. Prices inside the variant are only updated if updateProductData is true.
  • *
  • Set as true to update the Product data (such as name, variant, productType, and Product Attributes) of the Line Items.
  • *
* @return updateProductData diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRecalculateActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRecalculateActionImpl.java index 86656eadd77..83ac3d50134 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRecalculateActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartRecalculateActionImpl.java @@ -54,7 +54,7 @@ public String getAction() { /** *
    - *
  • Leave empty or set as false to update only the Prices and TaxRates of the Line Items.
  • + *
  • Leave empty or set as false to update only the Prices and TaxRates of the Line Items. Prices inside the variant are only updated if updateProductData is true.
  • *
  • Set as true to update the Product data (such as name, variant, productType, and Product Attributes) of the Line Items.
  • *
*/ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCode.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCode.java index 68c0aa35aae..4d6794108cd 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCode.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCode.java @@ -15,6 +15,7 @@ import com.commercetools.api.models.common.LastModifiedBy; import com.commercetools.api.models.common.LocalizedString; import com.commercetools.api.models.common.Reference; +import com.commercetools.api.models.store.StoreKeyReference; import com.commercetools.api.models.type.CustomFields; import com.fasterxml.jackson.annotation.*; @@ -38,6 +39,7 @@ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z")) * .code("{code}") * .plusCartDiscounts(cartDiscountsBuilder -> cartDiscountsBuilder) + * .plusStores(storesBuilder -> storesBuilder) * .isActive(true) * .plusReferences(referencesBuilder -> referencesBuilder) * .plusGroups(groupsBuilder -> groupsBuilder) @@ -142,6 +144,16 @@ public interface DiscountCode @JsonProperty("cartDiscounts") public List getCartDiscounts(); + /** + *

Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.

+ *

The value of this field is eventually consistent.

+ * @return stores + */ + @NotNull + @Valid + @JsonProperty("stores") + public List getStores(); + /** *

DiscountCode can only be applied to Carts that match this predicate.

* @return cartPredicate @@ -314,6 +326,23 @@ public interface DiscountCode public void setCartDiscounts(final List cartDiscounts); + /** + *

Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.

+ *

The value of this field is eventually consistent.

+ * @param stores values to be set + */ + + @JsonIgnore + public void setStores(final StoreKeyReference... stores); + + /** + *

Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.

+ *

The value of this field is eventually consistent.

+ * @param stores values to be set + */ + + public void setStores(final List stores); + /** *

DiscountCode can only be applied to Carts that match this predicate.

* @param cartPredicate value to be set @@ -432,6 +461,7 @@ public static DiscountCode of(final DiscountCode template) { instance.setDescription(template.getDescription()); instance.setCode(template.getCode()); instance.setCartDiscounts(template.getCartDiscounts()); + instance.setStores(template.getStores()); instance.setCartPredicate(template.getCartPredicate()); instance.setIsActive(template.getIsActive()); instance.setReferences(template.getReferences()); @@ -475,6 +505,11 @@ public static DiscountCode deepCopy(@Nullable final DiscountCode template) { .map(com.commercetools.api.models.cart_discount.CartDiscountReference::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setStores(Optional.ofNullable(template.getStores()) + .map(t -> t.stream() + .map(com.commercetools.api.models.store.StoreKeyReference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); instance.setCartPredicate(template.getCartPredicate()); instance.setIsActive(template.getIsActive()); instance.setReferences(Optional.ofNullable(template.getReferences()) diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java index 63174933b4f..6fb511e436b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java @@ -22,6 +22,7 @@ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z")) * .code("{code}") * .plusCartDiscounts(cartDiscountsBuilder -> cartDiscountsBuilder) + * .plusStores(storesBuilder -> storesBuilder) * .isActive(true) * .plusReferences(referencesBuilder -> referencesBuilder) * .plusGroups(groupsBuilder -> groupsBuilder) @@ -59,6 +60,8 @@ public class DiscountCodeBuilder implements Builder { private java.util.List cartDiscounts; + private java.util.List stores; + @Nullable private String cartPredicate; @@ -387,6 +390,100 @@ public DiscountCodeBuilder setCartDiscounts( builder.apply(com.commercetools.api.models.cart_discount.CartDiscountReferenceBuilder.of())); } + /** + *

Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.

+ *

The value of this field is eventually consistent.

+ * @param stores value to be set + * @return Builder + */ + + public DiscountCodeBuilder stores(final com.commercetools.api.models.store.StoreKeyReference... stores) { + this.stores = new ArrayList<>(Arrays.asList(stores)); + return this; + } + + /** + *

Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.

+ *

The value of this field is eventually consistent.

+ * @param stores value to be set + * @return Builder + */ + + public DiscountCodeBuilder stores( + final java.util.List stores) { + this.stores = stores; + return this; + } + + /** + *

Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.

+ *

The value of this field is eventually consistent.

+ * @param stores value to be set + * @return Builder + */ + + public DiscountCodeBuilder plusStores(final com.commercetools.api.models.store.StoreKeyReference... stores) { + if (this.stores == null) { + this.stores = new ArrayList<>(); + } + this.stores.addAll(Arrays.asList(stores)); + return this; + } + + /** + *

Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.

+ *

The value of this field is eventually consistent.

+ * @param builder function to build the stores value + * @return Builder + */ + + public DiscountCodeBuilder plusStores( + Function builder) { + if (this.stores == null) { + this.stores = new ArrayList<>(); + } + this.stores.add(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.

+ *

The value of this field is eventually consistent.

+ * @param builder function to build the stores value + * @return Builder + */ + + public DiscountCodeBuilder withStores( + Function builder) { + this.stores = new ArrayList<>(); + this.stores.add(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.

+ *

The value of this field is eventually consistent.

+ * @param builder function to build the stores value + * @return Builder + */ + + public DiscountCodeBuilder addStores( + Function builder) { + return plusStores(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of())); + } + + /** + *

Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.

+ *

The value of this field is eventually consistent.

+ * @param builder function to build the stores value + * @return Builder + */ + + public DiscountCodeBuilder setStores( + Function builder) { + return stores(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of())); + } + /** *

DiscountCode can only be applied to Carts that match this predicate.

* @param cartPredicate value to be set @@ -710,6 +807,16 @@ public java.util.ListReference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.

+ *

The value of this field is eventually consistent.

+ * @return stores + */ + + public java.util.List getStores() { + return this.stores; + } + /** *

DiscountCode can only be applied to Carts that match this predicate.

* @return cartPredicate @@ -824,11 +931,12 @@ public DiscountCode build() { Objects.requireNonNull(lastModifiedAt, DiscountCode.class + ": lastModifiedAt is missing"); Objects.requireNonNull(code, DiscountCode.class + ": code is missing"); Objects.requireNonNull(cartDiscounts, DiscountCode.class + ": cartDiscounts is missing"); + Objects.requireNonNull(stores, DiscountCode.class + ": stores is missing"); Objects.requireNonNull(isActive, DiscountCode.class + ": isActive is missing"); Objects.requireNonNull(references, DiscountCode.class + ": references is missing"); Objects.requireNonNull(groups, DiscountCode.class + ": groups is missing"); return new DiscountCodeImpl(id, version, createdAt, lastModifiedAt, key, lastModifiedBy, createdBy, name, - description, code, cartDiscounts, cartPredicate, isActive, references, maxApplications, + description, code, cartDiscounts, stores, cartPredicate, isActive, references, maxApplications, maxApplicationsPerCustomer, custom, groups, validFrom, validUntil, applicationVersion); } @@ -838,7 +946,7 @@ public DiscountCode build() { */ public DiscountCode buildUnchecked() { return new DiscountCodeImpl(id, version, createdAt, lastModifiedAt, key, lastModifiedBy, createdBy, name, - description, code, cartDiscounts, cartPredicate, isActive, references, maxApplications, + description, code, cartDiscounts, stores, cartPredicate, isActive, references, maxApplications, maxApplicationsPerCustomer, custom, groups, validFrom, validUntil, applicationVersion); } @@ -868,6 +976,7 @@ public static DiscountCodeBuilder of(final DiscountCode template) { builder.description = template.getDescription(); builder.code = template.getCode(); builder.cartDiscounts = template.getCartDiscounts(); + builder.stores = template.getStores(); builder.cartPredicate = template.getCartPredicate(); builder.isActive = template.getIsActive(); builder.references = template.getReferences(); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java index 8ba50401b8b..4c65eea9ec5 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java @@ -45,6 +45,8 @@ public class DiscountCodeImpl implements DiscountCode, ModelBase { private java.util.List cartDiscounts; + private java.util.List stores; + private String cartPredicate; private Boolean isActive; @@ -79,6 +81,7 @@ public class DiscountCodeImpl implements DiscountCode, ModelBase { @JsonProperty("description") final com.commercetools.api.models.common.LocalizedString description, @JsonProperty("code") final String code, @JsonProperty("cartDiscounts") final java.util.List cartDiscounts, + @JsonProperty("stores") final java.util.List stores, @JsonProperty("cartPredicate") final String cartPredicate, @JsonProperty("isActive") final Boolean isActive, @JsonProperty("references") final java.util.List references, @JsonProperty("maxApplications") final Long maxApplications, @@ -99,6 +102,7 @@ public class DiscountCodeImpl implements DiscountCode, ModelBase { this.description = description; this.code = code; this.cartDiscounts = cartDiscounts; + this.stores = stores; this.cartPredicate = cartPredicate; this.isActive = isActive; this.references = references; @@ -205,6 +209,15 @@ public java.util.ListReference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.

+ *

The value of this field is eventually consistent.

+ */ + + public java.util.List getStores() { + return this.stores; + } + /** *

DiscountCode can only be applied to Carts that match this predicate.

*/ @@ -341,6 +354,14 @@ public void setCartDiscounts( this.cartDiscounts = cartDiscounts; } + public void setStores(final com.commercetools.api.models.store.StoreKeyReference... stores) { + this.stores = new ArrayList<>(Arrays.asList(stores)); + } + + public void setStores(final java.util.List stores) { + this.stores = stores; + } + public void setCartPredicate(final String cartPredicate) { this.cartPredicate = cartPredicate; } @@ -410,6 +431,7 @@ public boolean equals(Object o) { .append(description, that.description) .append(code, that.code) .append(cartDiscounts, that.cartDiscounts) + .append(stores, that.stores) .append(cartPredicate, that.cartPredicate) .append(isActive, that.isActive) .append(references, that.references) @@ -431,6 +453,7 @@ public boolean equals(Object o) { .append(description, that.description) .append(code, that.code) .append(cartDiscounts, that.cartDiscounts) + .append(stores, that.stores) .append(cartPredicate, that.cartPredicate) .append(isActive, that.isActive) .append(references, that.references) @@ -457,6 +480,7 @@ public int hashCode() { .append(description) .append(code) .append(cartDiscounts) + .append(stores) .append(cartPredicate) .append(isActive) .append(references) @@ -483,6 +507,7 @@ public String toString() { .append("description", description) .append("code", code) .append("cartDiscounts", cartDiscounts) + .append("stores", stores) .append("cartPredicate", cartPredicate) .append("isActive", isActive) .append("references", references) diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java index 7eb4188147b..1b25dd0427a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java @@ -823,6 +823,14 @@ public static com.commercetools.api.models.error.SyntaxErrorErrorBuilder syntaxE return com.commercetools.api.models.error.SyntaxErrorErrorBuilder.of(); } + /** + * builder for unauthorized subtype + * @return builder + */ + public static com.commercetools.api.models.error.UnauthorizedErrorBuilder unauthorizedBuilder() { + return com.commercetools.api.models.error.UnauthorizedErrorBuilder.of(); + } + /** * builder for validityLockConflict subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java index 471e29acf49..96dca0cbdce 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java @@ -375,6 +375,10 @@ public com.commercetools.api.models.error.SyntaxErrorErrorBuilder syntaxErrorBui return com.commercetools.api.models.error.SyntaxErrorErrorBuilder.of(); } + public com.commercetools.api.models.error.UnauthorizedErrorBuilder unauthorizedBuilder() { + return com.commercetools.api.models.error.UnauthorizedErrorBuilder.of(); + } + public com.commercetools.api.models.error.ValidityLockConflictErrorBuilder validityLockConflictBuilder() { return com.commercetools.api.models.error.ValidityLockConflictErrorBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java index fd0942f99b7..511b73dcf97 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java @@ -805,6 +805,14 @@ public static com.commercetools.api.models.error.GraphQLSyntaxErrorErrorBuilder return com.commercetools.api.models.error.GraphQLSyntaxErrorErrorBuilder.of(); } + /** + * builder for unauthorized subtype + * @return builder + */ + public static com.commercetools.api.models.error.GraphQLUnauthorizedErrorBuilder unauthorizedBuilder() { + return com.commercetools.api.models.error.GraphQLUnauthorizedErrorBuilder.of(); + } + /** * builder for validityLockConflict subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java index f34bd3fc4f1..63c034bd121 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java @@ -375,6 +375,10 @@ public com.commercetools.api.models.error.GraphQLSyntaxErrorErrorBuilder syntaxE return com.commercetools.api.models.error.GraphQLSyntaxErrorErrorBuilder.of(); } + public com.commercetools.api.models.error.GraphQLUnauthorizedErrorBuilder unauthorizedBuilder() { + return com.commercetools.api.models.error.GraphQLUnauthorizedErrorBuilder.of(); + } + public com.commercetools.api.models.error.GraphQLValidityLockConflictErrorBuilder validityLockConflictBuilder() { return com.commercetools.api.models.error.GraphQLValidityLockConflictErrorBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLUnauthorizedError.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLUnauthorizedError.java new file mode 100644 index 00000000000..5d5acb2e3a3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLUnauthorizedError.java @@ -0,0 +1,155 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Returned when one of the following conditions occurs:

+ *
    + *
  • A Customer reference (for example, associates[*].customer or inheritedAssociates[*].customer) is expanded on the My Business Unit endpoint.
  • + *
  • A Cart Discount cannot be modified due to missing permissions for its assigned Stores.
  • + *
+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GraphQLUnauthorizedError graphQLUnauthorizedError = GraphQLUnauthorizedError.builder()
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("Unauthorized") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = GraphQLUnauthorizedErrorImpl.class) +public interface GraphQLUnauthorizedError extends GraphQLErrorObject { + + /** + * discriminator value for GraphQLUnauthorizedError + */ + String UNAUTHORIZED = "Unauthorized"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ * @return storesWithoutPermission + */ + + @JsonProperty("storesWithoutPermission") + public List getStoresWithoutPermission(); + + /** + *

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ * @param storesWithoutPermission values to be set + */ + + @JsonIgnore + public void setStoresWithoutPermission(final String... storesWithoutPermission); + + /** + *

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ * @param storesWithoutPermission values to be set + */ + + public void setStoresWithoutPermission(final List storesWithoutPermission); + + /** + * factory method + * @return instance of GraphQLUnauthorizedError + */ + public static GraphQLUnauthorizedError of() { + return new GraphQLUnauthorizedErrorImpl(); + } + + /** + * factory method to create a shallow copy GraphQLUnauthorizedError + * @param template instance to be copied + * @return copy instance + */ + public static GraphQLUnauthorizedError of(final GraphQLUnauthorizedError template) { + GraphQLUnauthorizedErrorImpl instance = new GraphQLUnauthorizedErrorImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setStoresWithoutPermission(template.getStoresWithoutPermission()); + return instance; + } + + public GraphQLUnauthorizedError copyDeep(); + + /** + * factory method to create a deep copy of GraphQLUnauthorizedError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static GraphQLUnauthorizedError deepCopy(@Nullable final GraphQLUnauthorizedError template) { + if (template == null) { + return null; + } + GraphQLUnauthorizedErrorImpl instance = new GraphQLUnauthorizedErrorImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setStoresWithoutPermission( + Optional.ofNullable(template.getStoresWithoutPermission()).map(ArrayList::new).orElse(null)); + return instance; + } + + /** + * builder factory method for GraphQLUnauthorizedError + * @return builder + */ + public static GraphQLUnauthorizedErrorBuilder builder() { + return GraphQLUnauthorizedErrorBuilder.of(); + } + + /** + * create builder for GraphQLUnauthorizedError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GraphQLUnauthorizedErrorBuilder builder(final GraphQLUnauthorizedError template) { + return GraphQLUnauthorizedErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withGraphQLUnauthorizedError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/error/GraphQLUnauthorizedErrorBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLUnauthorizedErrorBuilder.java new file mode 100644 index 00000000000..63e6b527037 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLUnauthorizedErrorBuilder.java @@ -0,0 +1,153 @@ + +package com.commercetools.api.models.error; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * GraphQLUnauthorizedErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GraphQLUnauthorizedError graphQLUnauthorizedError = GraphQLUnauthorizedError.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GraphQLUnauthorizedErrorBuilder implements Builder { + + private Map values = new HashMap<>(); + + @Nullable + private java.util.List storesWithoutPermission; + + /** + *

Error-specific additional fields.

+ * @param values properties to be set + * @return Builder + */ + + public GraphQLUnauthorizedErrorBuilder values(final Map values) { + this.values = values; + return this; + } + + /** + *

Error-specific additional fields.

+ * @param key property name + * @param value property value + * @return Builder + */ + + public GraphQLUnauthorizedErrorBuilder addValue(final String key, final java.lang.Object value) { + if (this.values == null) { + values = new HashMap<>(); + } + values.put(key, value); + return this; + } + + /** + *

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ * @param storesWithoutPermission value to be set + * @return Builder + */ + + public GraphQLUnauthorizedErrorBuilder storesWithoutPermission(@Nullable final String... storesWithoutPermission) { + this.storesWithoutPermission = new ArrayList<>(Arrays.asList(storesWithoutPermission)); + return this; + } + + /** + *

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ * @param storesWithoutPermission value to be set + * @return Builder + */ + + public GraphQLUnauthorizedErrorBuilder storesWithoutPermission( + @Nullable final java.util.List storesWithoutPermission) { + this.storesWithoutPermission = storesWithoutPermission; + return this; + } + + /** + *

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ * @param storesWithoutPermission value to be set + * @return Builder + */ + + public GraphQLUnauthorizedErrorBuilder plusStoresWithoutPermission( + @Nullable final String... storesWithoutPermission) { + if (this.storesWithoutPermission == null) { + this.storesWithoutPermission = new ArrayList<>(); + } + this.storesWithoutPermission.addAll(Arrays.asList(storesWithoutPermission)); + return this; + } + + /** + *

Error-specific additional fields.

+ * @return pattern properties + */ + + public Map getValues() { + return this.values; + } + + /** + *

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ * @return storesWithoutPermission + */ + + @Nullable + public java.util.List getStoresWithoutPermission() { + return this.storesWithoutPermission; + } + + /** + * builds GraphQLUnauthorizedError with checking for non-null required values + * @return GraphQLUnauthorizedError + */ + public GraphQLUnauthorizedError build() { + return new GraphQLUnauthorizedErrorImpl(values, storesWithoutPermission); + } + + /** + * builds GraphQLUnauthorizedError without checking for non-null required values + * @return GraphQLUnauthorizedError + */ + public GraphQLUnauthorizedError buildUnchecked() { + return new GraphQLUnauthorizedErrorImpl(values, storesWithoutPermission); + } + + /** + * factory method for an instance of GraphQLUnauthorizedErrorBuilder + * @return builder + */ + public static GraphQLUnauthorizedErrorBuilder of() { + return new GraphQLUnauthorizedErrorBuilder(); + } + + /** + * create builder for GraphQLUnauthorizedError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GraphQLUnauthorizedErrorBuilder of(final GraphQLUnauthorizedError template) { + GraphQLUnauthorizedErrorBuilder builder = new GraphQLUnauthorizedErrorBuilder(); + builder.values = template.values(); + builder.storesWithoutPermission = template.getStoresWithoutPermission(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLUnauthorizedErrorImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLUnauthorizedErrorImpl.java new file mode 100644 index 00000000000..9231d5c31a6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLUnauthorizedErrorImpl.java @@ -0,0 +1,131 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Returned when one of the following conditions occurs:

+ *
    + *
  • A Customer reference (for example, associates[*].customer or inheritedAssociates[*].customer) is expanded on the My Business Unit endpoint.
  • + *
  • A Cart Discount cannot be modified due to missing permissions for its assigned Stores.
  • + *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GraphQLUnauthorizedErrorImpl implements GraphQLUnauthorizedError, ModelBase { + + private String code; + + private Map values; + + private java.util.List storesWithoutPermission; + + /** + * create instance with all properties + */ + @JsonCreator + GraphQLUnauthorizedErrorImpl(@JsonAnySetter @JsonProperty("values") final Map values, + @JsonProperty("storesWithoutPermission") final java.util.List storesWithoutPermission) { + this.values = values; + this.storesWithoutPermission = storesWithoutPermission; + this.code = UNAUTHORIZED; + } + + /** + * create empty instance + */ + public GraphQLUnauthorizedErrorImpl() { + this.code = UNAUTHORIZED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

Error-specific additional fields.

+ */ + + public Map values() { + return values; + } + + /** + *

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ */ + + public java.util.List getStoresWithoutPermission() { + return this.storesWithoutPermission; + } + + public void setValue(String key, java.lang.Object value) { + if (values == null) { + values = new HashMap<>(); + } + values.put(key, value); + } + + public void setStoresWithoutPermission(final String... storesWithoutPermission) { + this.storesWithoutPermission = new ArrayList<>(Arrays.asList(storesWithoutPermission)); + } + + public void setStoresWithoutPermission(final java.util.List storesWithoutPermission) { + this.storesWithoutPermission = storesWithoutPermission; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + GraphQLUnauthorizedErrorImpl that = (GraphQLUnauthorizedErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(values, that.values) + .append(storesWithoutPermission, that.storesWithoutPermission) + .append(code, that.code) + .append(values, that.values) + .append(storesWithoutPermission, that.storesWithoutPermission) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(values).append(storesWithoutPermission).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("values", values) + .append("storesWithoutPermission", storesWithoutPermission) + .build(); + } + + @Override + public GraphQLUnauthorizedError copyDeep() { + return GraphQLUnauthorizedError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/UnauthorizedError.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/UnauthorizedError.java new file mode 100644 index 00000000000..cc2c7549709 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/UnauthorizedError.java @@ -0,0 +1,173 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Returned when one of the following conditions occurs:

+ *
    + *
  • A Customer reference (for example, associates[*].customer or inheritedAssociates[*].customer) is expanded on the My Business Unit endpoint.
  • + *
  • A Cart Discount cannot be modified due to missing permissions for its assigned Stores.
  • + *
+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     UnauthorizedError unauthorizedError = UnauthorizedError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("Unauthorized") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = UnauthorizedErrorImpl.class) +public interface UnauthorizedError extends ErrorObject { + + /** + * discriminator value for UnauthorizedError + */ + String UNAUTHORIZED = "Unauthorized"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

"Customer reference expansion not permitted on my business unit" or "Not allowed to edit this CartDiscount."

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ * @return storesWithoutPermission + */ + + @JsonProperty("storesWithoutPermission") + public List getStoresWithoutPermission(); + + /** + *

"Customer reference expansion not permitted on my business unit" or "Not allowed to edit this CartDiscount."

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

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ * @param storesWithoutPermission values to be set + */ + + @JsonIgnore + public void setStoresWithoutPermission(final String... storesWithoutPermission); + + /** + *

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ * @param storesWithoutPermission values to be set + */ + + public void setStoresWithoutPermission(final List storesWithoutPermission); + + /** + * factory method + * @return instance of UnauthorizedError + */ + public static UnauthorizedError of() { + return new UnauthorizedErrorImpl(); + } + + /** + * factory method to create a shallow copy UnauthorizedError + * @param template instance to be copied + * @return copy instance + */ + public static UnauthorizedError of(final UnauthorizedError template) { + UnauthorizedErrorImpl instance = new UnauthorizedErrorImpl(); + instance.setMessage(template.getMessage()); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setStoresWithoutPermission(template.getStoresWithoutPermission()); + return instance; + } + + public UnauthorizedError copyDeep(); + + /** + * factory method to create a deep copy of UnauthorizedError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static UnauthorizedError deepCopy(@Nullable final UnauthorizedError template) { + if (template == null) { + return null; + } + UnauthorizedErrorImpl instance = new UnauthorizedErrorImpl(); + instance.setMessage(template.getMessage()); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setStoresWithoutPermission( + Optional.ofNullable(template.getStoresWithoutPermission()).map(ArrayList::new).orElse(null)); + return instance; + } + + /** + * builder factory method for UnauthorizedError + * @return builder + */ + public static UnauthorizedErrorBuilder builder() { + return UnauthorizedErrorBuilder.of(); + } + + /** + * create builder for UnauthorizedError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static UnauthorizedErrorBuilder builder(final UnauthorizedError template) { + return UnauthorizedErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withUnauthorizedError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/error/UnauthorizedErrorBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/UnauthorizedErrorBuilder.java new file mode 100644 index 00000000000..9fc7b25240e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/UnauthorizedErrorBuilder.java @@ -0,0 +1,177 @@ + +package com.commercetools.api.models.error; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * UnauthorizedErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     UnauthorizedError unauthorizedError = UnauthorizedError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class UnauthorizedErrorBuilder implements Builder { + + private String message; + + private Map values = new HashMap<>(); + + @Nullable + private java.util.List storesWithoutPermission; + + /** + *

"Customer reference expansion not permitted on my business unit" or "Not allowed to edit this CartDiscount."

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

Error-specific additional fields.

+ * @param values properties to be set + * @return Builder + */ + + public UnauthorizedErrorBuilder values(final Map values) { + this.values = values; + return this; + } + + /** + *

Error-specific additional fields.

+ * @param key property name + * @param value property value + * @return Builder + */ + + public UnauthorizedErrorBuilder addValue(final String key, final java.lang.Object value) { + if (this.values == null) { + values = new HashMap<>(); + } + values.put(key, value); + return this; + } + + /** + *

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ * @param storesWithoutPermission value to be set + * @return Builder + */ + + public UnauthorizedErrorBuilder storesWithoutPermission(@Nullable final String... storesWithoutPermission) { + this.storesWithoutPermission = new ArrayList<>(Arrays.asList(storesWithoutPermission)); + return this; + } + + /** + *

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ * @param storesWithoutPermission value to be set + * @return Builder + */ + + public UnauthorizedErrorBuilder storesWithoutPermission( + @Nullable final java.util.List storesWithoutPermission) { + this.storesWithoutPermission = storesWithoutPermission; + return this; + } + + /** + *

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ * @param storesWithoutPermission value to be set + * @return Builder + */ + + public UnauthorizedErrorBuilder plusStoresWithoutPermission(@Nullable final String... storesWithoutPermission) { + if (this.storesWithoutPermission == null) { + this.storesWithoutPermission = new ArrayList<>(); + } + this.storesWithoutPermission.addAll(Arrays.asList(storesWithoutPermission)); + return this; + } + + /** + *

"Customer reference expansion not permitted on my business unit" or "Not allowed to edit this CartDiscount."

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Error-specific additional fields.

+ * @return pattern properties + */ + + public Map getValues() { + return this.values; + } + + /** + *

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ * @return storesWithoutPermission + */ + + @Nullable + public java.util.List getStoresWithoutPermission() { + return this.storesWithoutPermission; + } + + /** + * builds UnauthorizedError with checking for non-null required values + * @return UnauthorizedError + */ + public UnauthorizedError build() { + Objects.requireNonNull(message, UnauthorizedError.class + ": message is missing"); + return new UnauthorizedErrorImpl(message, values, storesWithoutPermission); + } + + /** + * builds UnauthorizedError without checking for non-null required values + * @return UnauthorizedError + */ + public UnauthorizedError buildUnchecked() { + return new UnauthorizedErrorImpl(message, values, storesWithoutPermission); + } + + /** + * factory method for an instance of UnauthorizedErrorBuilder + * @return builder + */ + public static UnauthorizedErrorBuilder of() { + return new UnauthorizedErrorBuilder(); + } + + /** + * create builder for UnauthorizedError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static UnauthorizedErrorBuilder of(final UnauthorizedError template) { + UnauthorizedErrorBuilder builder = new UnauthorizedErrorBuilder(); + builder.message = template.getMessage(); + builder.values = template.values(); + builder.storesWithoutPermission = template.getStoresWithoutPermission(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/UnauthorizedErrorImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/UnauthorizedErrorImpl.java new file mode 100644 index 00000000000..b158eb3a65f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/UnauthorizedErrorImpl.java @@ -0,0 +1,154 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Returned when one of the following conditions occurs:

+ *
    + *
  • A Customer reference (for example, associates[*].customer or inheritedAssociates[*].customer) is expanded on the My Business Unit endpoint.
  • + *
  • A Cart Discount cannot be modified due to missing permissions for its assigned Stores.
  • + *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class UnauthorizedErrorImpl implements UnauthorizedError, ModelBase { + + private String code; + + private String message; + + private Map values; + + private java.util.List storesWithoutPermission; + + /** + * create instance with all properties + */ + @JsonCreator + UnauthorizedErrorImpl(@JsonProperty("message") final String message, + @JsonAnySetter @JsonProperty("values") final Map values, + @JsonProperty("storesWithoutPermission") final java.util.List storesWithoutPermission) { + this.message = message; + this.values = values; + this.storesWithoutPermission = storesWithoutPermission; + this.code = UNAUTHORIZED; + } + + /** + * create empty instance + */ + public UnauthorizedErrorImpl() { + this.code = UNAUTHORIZED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

"Customer reference expansion not permitted on my business unit" or "Not allowed to edit this CartDiscount."

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Error-specific additional fields.

+ */ + + public Map values() { + return values; + } + + /** + *

Keys of Stores for which the required permission to modify is missing.

+ *

This field is returned only for Cart Discounts.

+ */ + + public java.util.List getStoresWithoutPermission() { + return this.storesWithoutPermission; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setValue(String key, java.lang.Object value) { + if (values == null) { + values = new HashMap<>(); + } + values.put(key, value); + } + + public void setStoresWithoutPermission(final String... storesWithoutPermission) { + this.storesWithoutPermission = new ArrayList<>(Arrays.asList(storesWithoutPermission)); + } + + public void setStoresWithoutPermission(final java.util.List storesWithoutPermission) { + this.storesWithoutPermission = storesWithoutPermission; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + UnauthorizedErrorImpl that = (UnauthorizedErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(values, that.values) + .append(storesWithoutPermission, that.storesWithoutPermission) + .append(code, that.code) + .append(message, that.message) + .append(values, that.values) + .append(storesWithoutPermission, that.storesWithoutPermission) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(message) + .append(values) + .append(storesWithoutPermission) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .append("values", values) + .append("storesWithoutPermission", storesWithoutPermission) + .build(); + } + + @Override + public UnauthorizedError copyDeep() { + return UnauthorizedError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfig.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfig.java new file mode 100644 index 00000000000..586c40dd5bd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfig.java @@ -0,0 +1,242 @@ + +package com.commercetools.api.models.mcp_server; + +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 io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Connection configuration of a Commerce MCP Server. Exposes the Commerce MCP Server tools to AI agents.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CommerceMcpServerConfig commerceMcpServerConfig = CommerceMcpServerConfig.builder()
+ *             .majorVersion("{majorVersion}")
+ *             .url("{url}")
+ *             .plusTools(toolsBuilder -> toolsBuilder)
+ *             .plusToolCustomizations(toolCustomizationsBuilder -> toolCustomizationsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("CommerceMCP") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CommerceMcpServerConfigImpl.class) +public interface CommerceMcpServerConfig extends McpServerConfig { + + /** + * discriminator value for CommerceMcpServerConfig + */ + String COMMERCE_MCP = "CommerceMCP"; + + /** + *

Major version of this MCP Server type. Supported versions are v1 (deprecated) and v4.

+ * @return majorVersion + */ + @NotNull + @JsonProperty("majorVersion") + public String getMajorVersion(); + + /** + *

URL of the MCP Server. Generated by the system from the region, domain, Project key, and MCP Server key. Format: https://mcp.{region}.{domain}/projects/{projectKey}/{mcpServerKey}

+ * @return url + */ + @NotNull + @JsonProperty("url") + public String getUrl(); + + /** + *

List of tools enabled for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ * @return tools + */ + @NotNull + @JsonProperty("tools") + public List getTools(); + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @return toolCustomizations + */ + @NotNull + @Valid + @JsonProperty("toolCustomizations") + public List getToolCustomizations(); + + /** + *

Response field-filtering rules applied to tool responses.

+ * @return jsonOutputFiltering + */ + @Valid + @JsonProperty("jsonOutputFiltering") + public McpServerJsonOutputFiltering getJsonOutputFiltering(); + + /** + *

Output formatting applied to tool responses. When absent, responses are left untouched.

+ * @return toolOutputFormatting + */ + + @JsonProperty("toolOutputFormatting") + public McpServerToolOutputFormatting getToolOutputFormatting(); + + /** + *

Major version of this MCP Server type. Supported versions are v1 (deprecated) and v4.

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

URL of the MCP Server. Generated by the system from the region, domain, Project key, and MCP Server key. Format: https://mcp.{region}.{domain}/projects/{projectKey}/{mcpServerKey}

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

List of tools enabled for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ * @param tools values to be set + */ + + @JsonIgnore + public void setTools(final McpServerTool... tools); + + /** + *

List of tools enabled for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ * @param tools values to be set + */ + + public void setTools(final List tools); + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param toolCustomizations values to be set + */ + + @JsonIgnore + public void setToolCustomizations(final ToolCustomization... toolCustomizations); + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param toolCustomizations values to be set + */ + + public void setToolCustomizations(final List toolCustomizations); + + /** + *

Response field-filtering rules applied to tool responses.

+ * @param jsonOutputFiltering value to be set + */ + + public void setJsonOutputFiltering(final McpServerJsonOutputFiltering jsonOutputFiltering); + + /** + *

Output formatting applied to tool responses. When absent, responses are left untouched.

+ * @param toolOutputFormatting value to be set + */ + + public void setToolOutputFormatting(final McpServerToolOutputFormatting toolOutputFormatting); + + /** + * factory method + * @return instance of CommerceMcpServerConfig + */ + public static CommerceMcpServerConfig of() { + return new CommerceMcpServerConfigImpl(); + } + + /** + * factory method to create a shallow copy CommerceMcpServerConfig + * @param template instance to be copied + * @return copy instance + */ + public static CommerceMcpServerConfig of(final CommerceMcpServerConfig template) { + CommerceMcpServerConfigImpl instance = new CommerceMcpServerConfigImpl(); + instance.setMajorVersion(template.getMajorVersion()); + instance.setUrl(template.getUrl()); + instance.setTools(template.getTools()); + instance.setToolCustomizations(template.getToolCustomizations()); + instance.setJsonOutputFiltering(template.getJsonOutputFiltering()); + instance.setToolOutputFormatting(template.getToolOutputFormatting()); + return instance; + } + + public CommerceMcpServerConfig copyDeep(); + + /** + * factory method to create a deep copy of CommerceMcpServerConfig + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CommerceMcpServerConfig deepCopy(@Nullable final CommerceMcpServerConfig template) { + if (template == null) { + return null; + } + CommerceMcpServerConfigImpl instance = new CommerceMcpServerConfigImpl(); + instance.setMajorVersion(template.getMajorVersion()); + instance.setUrl(template.getUrl()); + instance.setTools(Optional.ofNullable(template.getTools()).map(ArrayList::new).orElse(null)); + instance.setToolCustomizations(Optional.ofNullable(template.getToolCustomizations()) + .map(t -> t.stream() + .map(com.commercetools.api.models.mcp_server.ToolCustomization::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setJsonOutputFiltering(com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering + .deepCopy(template.getJsonOutputFiltering())); + instance.setToolOutputFormatting(template.getToolOutputFormatting()); + return instance; + } + + /** + * builder factory method for CommerceMcpServerConfig + * @return builder + */ + public static CommerceMcpServerConfigBuilder builder() { + return CommerceMcpServerConfigBuilder.of(); + } + + /** + * create builder for CommerceMcpServerConfig instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CommerceMcpServerConfigBuilder builder(final CommerceMcpServerConfig template) { + return CommerceMcpServerConfigBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCommerceMcpServerConfig(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/CommerceMcpServerConfigBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigBuilder.java new file mode 100644 index 00000000000..87444c5a298 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigBuilder.java @@ -0,0 +1,349 @@ + +package com.commercetools.api.models.mcp_server; + +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; + +/** + * CommerceMcpServerConfigBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CommerceMcpServerConfig commerceMcpServerConfig = CommerceMcpServerConfig.builder()
+ *             .majorVersion("{majorVersion}")
+ *             .url("{url}")
+ *             .plusTools(toolsBuilder -> toolsBuilder)
+ *             .plusToolCustomizations(toolCustomizationsBuilder -> toolCustomizationsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CommerceMcpServerConfigBuilder implements Builder { + + private String majorVersion; + + private String url; + + private java.util.List tools; + + private java.util.List toolCustomizations; + + @Nullable + private com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering jsonOutputFiltering; + + @Nullable + private com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting toolOutputFormatting; + + /** + *

Major version of this MCP Server type. Supported versions are v1 (deprecated) and v4.

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

URL of the MCP Server. Generated by the system from the region, domain, Project key, and MCP Server key. Format: https://mcp.{region}.{domain}/projects/{projectKey}/{mcpServerKey}

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

List of tools enabled for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ * @param tools value to be set + * @return Builder + */ + + public CommerceMcpServerConfigBuilder tools(final com.commercetools.api.models.mcp_server.McpServerTool... tools) { + this.tools = new ArrayList<>(Arrays.asList(tools)); + return this; + } + + /** + *

List of tools enabled for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ * @param tools value to be set + * @return Builder + */ + + public CommerceMcpServerConfigBuilder tools( + final java.util.List tools) { + this.tools = tools; + return this; + } + + /** + *

List of tools enabled for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ * @param tools value to be set + * @return Builder + */ + + public CommerceMcpServerConfigBuilder plusTools( + final com.commercetools.api.models.mcp_server.McpServerTool... tools) { + if (this.tools == null) { + this.tools = new ArrayList<>(); + } + this.tools.addAll(Arrays.asList(tools)); + return this; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param toolCustomizations value to be set + * @return Builder + */ + + public CommerceMcpServerConfigBuilder toolCustomizations( + final com.commercetools.api.models.mcp_server.ToolCustomization... toolCustomizations) { + this.toolCustomizations = new ArrayList<>(Arrays.asList(toolCustomizations)); + return this; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param toolCustomizations value to be set + * @return Builder + */ + + public CommerceMcpServerConfigBuilder toolCustomizations( + final java.util.List toolCustomizations) { + this.toolCustomizations = toolCustomizations; + return this; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param toolCustomizations value to be set + * @return Builder + */ + + public CommerceMcpServerConfigBuilder plusToolCustomizations( + final com.commercetools.api.models.mcp_server.ToolCustomization... toolCustomizations) { + if (this.toolCustomizations == null) { + this.toolCustomizations = new ArrayList<>(); + } + this.toolCustomizations.addAll(Arrays.asList(toolCustomizations)); + return this; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param builder function to build the toolCustomizations value + * @return Builder + */ + + public CommerceMcpServerConfigBuilder plusToolCustomizations( + Function builder) { + if (this.toolCustomizations == null) { + this.toolCustomizations = new ArrayList<>(); + } + this.toolCustomizations + .add(builder.apply(com.commercetools.api.models.mcp_server.ToolCustomizationBuilder.of()).build()); + return this; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param builder function to build the toolCustomizations value + * @return Builder + */ + + public CommerceMcpServerConfigBuilder withToolCustomizations( + Function builder) { + this.toolCustomizations = new ArrayList<>(); + this.toolCustomizations + .add(builder.apply(com.commercetools.api.models.mcp_server.ToolCustomizationBuilder.of()).build()); + return this; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param builder function to build the toolCustomizations value + * @return Builder + */ + + public CommerceMcpServerConfigBuilder addToolCustomizations( + Function builder) { + return plusToolCustomizations( + builder.apply(com.commercetools.api.models.mcp_server.ToolCustomizationBuilder.of())); + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param builder function to build the toolCustomizations value + * @return Builder + */ + + public CommerceMcpServerConfigBuilder setToolCustomizations( + Function builder) { + return toolCustomizations(builder.apply(com.commercetools.api.models.mcp_server.ToolCustomizationBuilder.of())); + } + + /** + *

Response field-filtering rules applied to tool responses.

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

Response field-filtering rules applied to tool responses.

+ * @param builder function to build the jsonOutputFiltering value + * @return Builder + */ + + public CommerceMcpServerConfigBuilder withJsonOutputFiltering( + Function builder) { + this.jsonOutputFiltering = builder + .apply(com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringBuilder.of()); + return this; + } + + /** + *

Response field-filtering rules applied to tool responses.

+ * @param jsonOutputFiltering value to be set + * @return Builder + */ + + public CommerceMcpServerConfigBuilder jsonOutputFiltering( + @Nullable final com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering jsonOutputFiltering) { + this.jsonOutputFiltering = jsonOutputFiltering; + return this; + } + + /** + *

Output formatting applied to tool responses. When absent, responses are left untouched.

+ * @param toolOutputFormatting value to be set + * @return Builder + */ + + public CommerceMcpServerConfigBuilder toolOutputFormatting( + @Nullable final com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting toolOutputFormatting) { + this.toolOutputFormatting = toolOutputFormatting; + return this; + } + + /** + *

Major version of this MCP Server type. Supported versions are v1 (deprecated) and v4.

+ * @return majorVersion + */ + + public String getMajorVersion() { + return this.majorVersion; + } + + /** + *

URL of the MCP Server. Generated by the system from the region, domain, Project key, and MCP Server key. Format: https://mcp.{region}.{domain}/projects/{projectKey}/{mcpServerKey}

+ * @return url + */ + + public String getUrl() { + return this.url; + } + + /** + *

List of tools enabled for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ * @return tools + */ + + public java.util.List getTools() { + return this.tools; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @return toolCustomizations + */ + + public java.util.List getToolCustomizations() { + return this.toolCustomizations; + } + + /** + *

Response field-filtering rules applied to tool responses.

+ * @return jsonOutputFiltering + */ + + @Nullable + public com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering getJsonOutputFiltering() { + return this.jsonOutputFiltering; + } + + /** + *

Output formatting applied to tool responses. When absent, responses are left untouched.

+ * @return toolOutputFormatting + */ + + @Nullable + public com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting getToolOutputFormatting() { + return this.toolOutputFormatting; + } + + /** + * builds CommerceMcpServerConfig with checking for non-null required values + * @return CommerceMcpServerConfig + */ + public CommerceMcpServerConfig build() { + Objects.requireNonNull(majorVersion, CommerceMcpServerConfig.class + ": majorVersion is missing"); + Objects.requireNonNull(url, CommerceMcpServerConfig.class + ": url is missing"); + Objects.requireNonNull(tools, CommerceMcpServerConfig.class + ": tools is missing"); + Objects.requireNonNull(toolCustomizations, CommerceMcpServerConfig.class + ": toolCustomizations is missing"); + return new CommerceMcpServerConfigImpl(majorVersion, url, tools, toolCustomizations, jsonOutputFiltering, + toolOutputFormatting); + } + + /** + * builds CommerceMcpServerConfig without checking for non-null required values + * @return CommerceMcpServerConfig + */ + public CommerceMcpServerConfig buildUnchecked() { + return new CommerceMcpServerConfigImpl(majorVersion, url, tools, toolCustomizations, jsonOutputFiltering, + toolOutputFormatting); + } + + /** + * factory method for an instance of CommerceMcpServerConfigBuilder + * @return builder + */ + public static CommerceMcpServerConfigBuilder of() { + return new CommerceMcpServerConfigBuilder(); + } + + /** + * create builder for CommerceMcpServerConfig instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CommerceMcpServerConfigBuilder of(final CommerceMcpServerConfig template) { + CommerceMcpServerConfigBuilder builder = new CommerceMcpServerConfigBuilder(); + builder.majorVersion = template.getMajorVersion(); + builder.url = template.getUrl(); + builder.tools = template.getTools(); + builder.toolCustomizations = template.getToolCustomizations(); + builder.jsonOutputFiltering = template.getJsonOutputFiltering(); + builder.toolOutputFormatting = template.getToolOutputFormatting(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigDraft.java new file mode 100644 index 00000000000..95233cdba40 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigDraft.java @@ -0,0 +1,223 @@ + +package com.commercetools.api.models.mcp_server; + +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 io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Connection configuration for creating or updating a Commerce MCP Server.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CommerceMcpServerConfigDraft commerceMcpServerConfigDraft = CommerceMcpServerConfigDraft.builder()
+ *             .majorVersion("{majorVersion}")
+ *             .plusTools(toolsBuilder -> toolsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("CommerceMCP") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CommerceMcpServerConfigDraftImpl.class) +public interface CommerceMcpServerConfigDraft + extends McpServerConfigDraft, io.vrap.rmf.base.client.Draft { + + /** + * discriminator value for CommerceMcpServerConfigDraft + */ + String COMMERCE_MCP = "CommerceMCP"; + + /** + *

Major version of this MCP Server type. Supported versions are v1 (deprecated) and v4.

+ * @return majorVersion + */ + @NotNull + @JsonProperty("majorVersion") + public String getMajorVersion(); + + /** + *

List of tools to enable for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ * @return tools + */ + @NotNull + @JsonProperty("tools") + public List getTools(); + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @return toolCustomizations + */ + @Valid + @JsonProperty("toolCustomizations") + public List getToolCustomizations(); + + /** + *

Response field-filtering rules applied to tool responses.

+ * @return jsonOutputFiltering + */ + @Valid + @JsonProperty("jsonOutputFiltering") + public McpServerJsonOutputFiltering getJsonOutputFiltering(); + + /** + *

Output formatting applied to tool responses. When absent, responses are left untouched.

+ * @return toolOutputFormatting + */ + + @JsonProperty("toolOutputFormatting") + public McpServerToolOutputFormatting getToolOutputFormatting(); + + /** + *

Major version of this MCP Server type. Supported versions are v1 (deprecated) and v4.

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

List of tools to enable for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ * @param tools values to be set + */ + + @JsonIgnore + public void setTools(final McpServerTool... tools); + + /** + *

List of tools to enable for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ * @param tools values to be set + */ + + public void setTools(final List tools); + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param toolCustomizations values to be set + */ + + @JsonIgnore + public void setToolCustomizations(final ToolCustomization... toolCustomizations); + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param toolCustomizations values to be set + */ + + public void setToolCustomizations(final List toolCustomizations); + + /** + *

Response field-filtering rules applied to tool responses.

+ * @param jsonOutputFiltering value to be set + */ + + public void setJsonOutputFiltering(final McpServerJsonOutputFiltering jsonOutputFiltering); + + /** + *

Output formatting applied to tool responses. When absent, responses are left untouched.

+ * @param toolOutputFormatting value to be set + */ + + public void setToolOutputFormatting(final McpServerToolOutputFormatting toolOutputFormatting); + + /** + * factory method + * @return instance of CommerceMcpServerConfigDraft + */ + public static CommerceMcpServerConfigDraft of() { + return new CommerceMcpServerConfigDraftImpl(); + } + + /** + * factory method to create a shallow copy CommerceMcpServerConfigDraft + * @param template instance to be copied + * @return copy instance + */ + public static CommerceMcpServerConfigDraft of(final CommerceMcpServerConfigDraft template) { + CommerceMcpServerConfigDraftImpl instance = new CommerceMcpServerConfigDraftImpl(); + instance.setMajorVersion(template.getMajorVersion()); + instance.setTools(template.getTools()); + instance.setToolCustomizations(template.getToolCustomizations()); + instance.setJsonOutputFiltering(template.getJsonOutputFiltering()); + instance.setToolOutputFormatting(template.getToolOutputFormatting()); + return instance; + } + + public CommerceMcpServerConfigDraft copyDeep(); + + /** + * factory method to create a deep copy of CommerceMcpServerConfigDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CommerceMcpServerConfigDraft deepCopy(@Nullable final CommerceMcpServerConfigDraft template) { + if (template == null) { + return null; + } + CommerceMcpServerConfigDraftImpl instance = new CommerceMcpServerConfigDraftImpl(); + instance.setMajorVersion(template.getMajorVersion()); + instance.setTools(Optional.ofNullable(template.getTools()).map(ArrayList::new).orElse(null)); + instance.setToolCustomizations(Optional.ofNullable(template.getToolCustomizations()) + .map(t -> t.stream() + .map(com.commercetools.api.models.mcp_server.ToolCustomization::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setJsonOutputFiltering(com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering + .deepCopy(template.getJsonOutputFiltering())); + instance.setToolOutputFormatting(template.getToolOutputFormatting()); + return instance; + } + + /** + * builder factory method for CommerceMcpServerConfigDraft + * @return builder + */ + public static CommerceMcpServerConfigDraftBuilder builder() { + return CommerceMcpServerConfigDraftBuilder.of(); + } + + /** + * create builder for CommerceMcpServerConfigDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CommerceMcpServerConfigDraftBuilder builder(final CommerceMcpServerConfigDraft template) { + return CommerceMcpServerConfigDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCommerceMcpServerConfigDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/CommerceMcpServerConfigDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigDraftBuilder.java new file mode 100644 index 00000000000..18518c0078a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigDraftBuilder.java @@ -0,0 +1,325 @@ + +package com.commercetools.api.models.mcp_server; + +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; + +/** + * CommerceMcpServerConfigDraftBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CommerceMcpServerConfigDraft commerceMcpServerConfigDraft = CommerceMcpServerConfigDraft.builder()
+ *             .majorVersion("{majorVersion}")
+ *             .plusTools(toolsBuilder -> toolsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CommerceMcpServerConfigDraftBuilder implements Builder { + + private String majorVersion; + + private java.util.List tools; + + @Nullable + private java.util.List toolCustomizations; + + @Nullable + private com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering jsonOutputFiltering; + + @Nullable + private com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting toolOutputFormatting; + + /** + *

Major version of this MCP Server type. Supported versions are v1 (deprecated) and v4.

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

List of tools to enable for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ * @param tools value to be set + * @return Builder + */ + + public CommerceMcpServerConfigDraftBuilder tools( + final com.commercetools.api.models.mcp_server.McpServerTool... tools) { + this.tools = new ArrayList<>(Arrays.asList(tools)); + return this; + } + + /** + *

List of tools to enable for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ * @param tools value to be set + * @return Builder + */ + + public CommerceMcpServerConfigDraftBuilder tools( + final java.util.List tools) { + this.tools = tools; + return this; + } + + /** + *

List of tools to enable for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ * @param tools value to be set + * @return Builder + */ + + public CommerceMcpServerConfigDraftBuilder plusTools( + final com.commercetools.api.models.mcp_server.McpServerTool... tools) { + if (this.tools == null) { + this.tools = new ArrayList<>(); + } + this.tools.addAll(Arrays.asList(tools)); + return this; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param toolCustomizations value to be set + * @return Builder + */ + + public CommerceMcpServerConfigDraftBuilder toolCustomizations( + @Nullable final com.commercetools.api.models.mcp_server.ToolCustomization... toolCustomizations) { + this.toolCustomizations = new ArrayList<>(Arrays.asList(toolCustomizations)); + return this; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param toolCustomizations value to be set + * @return Builder + */ + + public CommerceMcpServerConfigDraftBuilder toolCustomizations( + @Nullable final java.util.List toolCustomizations) { + this.toolCustomizations = toolCustomizations; + return this; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param toolCustomizations value to be set + * @return Builder + */ + + public CommerceMcpServerConfigDraftBuilder plusToolCustomizations( + @Nullable final com.commercetools.api.models.mcp_server.ToolCustomization... toolCustomizations) { + if (this.toolCustomizations == null) { + this.toolCustomizations = new ArrayList<>(); + } + this.toolCustomizations.addAll(Arrays.asList(toolCustomizations)); + return this; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param builder function to build the toolCustomizations value + * @return Builder + */ + + public CommerceMcpServerConfigDraftBuilder plusToolCustomizations( + Function builder) { + if (this.toolCustomizations == null) { + this.toolCustomizations = new ArrayList<>(); + } + this.toolCustomizations + .add(builder.apply(com.commercetools.api.models.mcp_server.ToolCustomizationBuilder.of()).build()); + return this; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param builder function to build the toolCustomizations value + * @return Builder + */ + + public CommerceMcpServerConfigDraftBuilder withToolCustomizations( + Function builder) { + this.toolCustomizations = new ArrayList<>(); + this.toolCustomizations + .add(builder.apply(com.commercetools.api.models.mcp_server.ToolCustomizationBuilder.of()).build()); + return this; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param builder function to build the toolCustomizations value + * @return Builder + */ + + public CommerceMcpServerConfigDraftBuilder addToolCustomizations( + Function builder) { + return plusToolCustomizations( + builder.apply(com.commercetools.api.models.mcp_server.ToolCustomizationBuilder.of())); + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @param builder function to build the toolCustomizations value + * @return Builder + */ + + public CommerceMcpServerConfigDraftBuilder setToolCustomizations( + Function builder) { + return toolCustomizations(builder.apply(com.commercetools.api.models.mcp_server.ToolCustomizationBuilder.of())); + } + + /** + *

Response field-filtering rules applied to tool responses.

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

Response field-filtering rules applied to tool responses.

+ * @param builder function to build the jsonOutputFiltering value + * @return Builder + */ + + public CommerceMcpServerConfigDraftBuilder withJsonOutputFiltering( + Function builder) { + this.jsonOutputFiltering = builder + .apply(com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringBuilder.of()); + return this; + } + + /** + *

Response field-filtering rules applied to tool responses.

+ * @param jsonOutputFiltering value to be set + * @return Builder + */ + + public CommerceMcpServerConfigDraftBuilder jsonOutputFiltering( + @Nullable final com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering jsonOutputFiltering) { + this.jsonOutputFiltering = jsonOutputFiltering; + return this; + } + + /** + *

Output formatting applied to tool responses. When absent, responses are left untouched.

+ * @param toolOutputFormatting value to be set + * @return Builder + */ + + public CommerceMcpServerConfigDraftBuilder toolOutputFormatting( + @Nullable final com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting toolOutputFormatting) { + this.toolOutputFormatting = toolOutputFormatting; + return this; + } + + /** + *

Major version of this MCP Server type. Supported versions are v1 (deprecated) and v4.

+ * @return majorVersion + */ + + public String getMajorVersion() { + return this.majorVersion; + } + + /** + *

List of tools to enable for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ * @return tools + */ + + public java.util.List getTools() { + return this.tools; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ * @return toolCustomizations + */ + + @Nullable + public java.util.List getToolCustomizations() { + return this.toolCustomizations; + } + + /** + *

Response field-filtering rules applied to tool responses.

+ * @return jsonOutputFiltering + */ + + @Nullable + public com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering getJsonOutputFiltering() { + return this.jsonOutputFiltering; + } + + /** + *

Output formatting applied to tool responses. When absent, responses are left untouched.

+ * @return toolOutputFormatting + */ + + @Nullable + public com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting getToolOutputFormatting() { + return this.toolOutputFormatting; + } + + /** + * builds CommerceMcpServerConfigDraft with checking for non-null required values + * @return CommerceMcpServerConfigDraft + */ + public CommerceMcpServerConfigDraft build() { + Objects.requireNonNull(majorVersion, CommerceMcpServerConfigDraft.class + ": majorVersion is missing"); + Objects.requireNonNull(tools, CommerceMcpServerConfigDraft.class + ": tools is missing"); + return new CommerceMcpServerConfigDraftImpl(majorVersion, tools, toolCustomizations, jsonOutputFiltering, + toolOutputFormatting); + } + + /** + * builds CommerceMcpServerConfigDraft without checking for non-null required values + * @return CommerceMcpServerConfigDraft + */ + public CommerceMcpServerConfigDraft buildUnchecked() { + return new CommerceMcpServerConfigDraftImpl(majorVersion, tools, toolCustomizations, jsonOutputFiltering, + toolOutputFormatting); + } + + /** + * factory method for an instance of CommerceMcpServerConfigDraftBuilder + * @return builder + */ + public static CommerceMcpServerConfigDraftBuilder of() { + return new CommerceMcpServerConfigDraftBuilder(); + } + + /** + * create builder for CommerceMcpServerConfigDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CommerceMcpServerConfigDraftBuilder of(final CommerceMcpServerConfigDraft template) { + CommerceMcpServerConfigDraftBuilder builder = new CommerceMcpServerConfigDraftBuilder(); + builder.majorVersion = template.getMajorVersion(); + builder.tools = template.getTools(); + builder.toolCustomizations = template.getToolCustomizations(); + builder.jsonOutputFiltering = template.getJsonOutputFiltering(); + builder.toolOutputFormatting = template.getToolOutputFormatting(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigDraftImpl.java new file mode 100644 index 00000000000..7bd0dcb68ac --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigDraftImpl.java @@ -0,0 +1,193 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Connection configuration for creating or updating a Commerce MCP Server.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CommerceMcpServerConfigDraftImpl implements CommerceMcpServerConfigDraft, ModelBase { + + private String type; + + private String majorVersion; + + private java.util.List tools; + + private java.util.List toolCustomizations; + + private com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering jsonOutputFiltering; + + private com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting toolOutputFormatting; + + /** + * create instance with all properties + */ + @JsonCreator + CommerceMcpServerConfigDraftImpl(@JsonProperty("majorVersion") final String majorVersion, + @JsonProperty("tools") final java.util.List tools, + @JsonProperty("toolCustomizations") final java.util.List toolCustomizations, + @JsonProperty("jsonOutputFiltering") final com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering jsonOutputFiltering, + @JsonProperty("toolOutputFormatting") final com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting toolOutputFormatting) { + this.majorVersion = majorVersion; + this.tools = tools; + this.toolCustomizations = toolCustomizations; + this.jsonOutputFiltering = jsonOutputFiltering; + this.toolOutputFormatting = toolOutputFormatting; + this.type = COMMERCE_MCP; + } + + /** + * create empty instance + */ + public CommerceMcpServerConfigDraftImpl() { + this.type = COMMERCE_MCP; + } + + /** + *

MCP Server type. Determines the shape of the configuration and the set of tools available for this MCP Server.

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

Major version of this MCP Server type. Supported versions are v1 (deprecated) and v4.

+ */ + + public String getMajorVersion() { + return this.majorVersion; + } + + /** + *

List of tools to enable for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ */ + + public java.util.List getTools() { + return this.tools; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ */ + + public java.util.List getToolCustomizations() { + return this.toolCustomizations; + } + + /** + *

Response field-filtering rules applied to tool responses.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering getJsonOutputFiltering() { + return this.jsonOutputFiltering; + } + + /** + *

Output formatting applied to tool responses. When absent, responses are left untouched.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting getToolOutputFormatting() { + return this.toolOutputFormatting; + } + + public void setMajorVersion(final String majorVersion) { + this.majorVersion = majorVersion; + } + + public void setTools(final com.commercetools.api.models.mcp_server.McpServerTool... tools) { + this.tools = new ArrayList<>(Arrays.asList(tools)); + } + + public void setTools(final java.util.List tools) { + this.tools = tools; + } + + public void setToolCustomizations( + final com.commercetools.api.models.mcp_server.ToolCustomization... toolCustomizations) { + this.toolCustomizations = new ArrayList<>(Arrays.asList(toolCustomizations)); + } + + public void setToolCustomizations( + final java.util.List toolCustomizations) { + this.toolCustomizations = toolCustomizations; + } + + public void setJsonOutputFiltering( + final com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering jsonOutputFiltering) { + this.jsonOutputFiltering = jsonOutputFiltering; + } + + public void setToolOutputFormatting( + final com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting toolOutputFormatting) { + this.toolOutputFormatting = toolOutputFormatting; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CommerceMcpServerConfigDraftImpl that = (CommerceMcpServerConfigDraftImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(majorVersion, that.majorVersion) + .append(tools, that.tools) + .append(toolCustomizations, that.toolCustomizations) + .append(jsonOutputFiltering, that.jsonOutputFiltering) + .append(toolOutputFormatting, that.toolOutputFormatting) + .append(type, that.type) + .append(majorVersion, that.majorVersion) + .append(tools, that.tools) + .append(toolCustomizations, that.toolCustomizations) + .append(jsonOutputFiltering, that.jsonOutputFiltering) + .append(toolOutputFormatting, that.toolOutputFormatting) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(majorVersion) + .append(tools) + .append(toolCustomizations) + .append(jsonOutputFiltering) + .append(toolOutputFormatting) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("majorVersion", majorVersion) + .append("tools", tools) + .append("toolCustomizations", toolCustomizations) + .append("jsonOutputFiltering", jsonOutputFiltering) + .append("toolOutputFormatting", toolOutputFormatting) + .build(); + } + + @Override + public CommerceMcpServerConfigDraft copyDeep() { + return CommerceMcpServerConfigDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigImpl.java new file mode 100644 index 00000000000..43e92a48054 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigImpl.java @@ -0,0 +1,213 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Connection configuration of a Commerce MCP Server. Exposes the Commerce MCP Server tools to AI agents.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CommerceMcpServerConfigImpl implements CommerceMcpServerConfig, ModelBase { + + private String type; + + private String majorVersion; + + private String url; + + private java.util.List tools; + + private java.util.List toolCustomizations; + + private com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering jsonOutputFiltering; + + private com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting toolOutputFormatting; + + /** + * create instance with all properties + */ + @JsonCreator + CommerceMcpServerConfigImpl(@JsonProperty("majorVersion") final String majorVersion, + @JsonProperty("url") final String url, + @JsonProperty("tools") final java.util.List tools, + @JsonProperty("toolCustomizations") final java.util.List toolCustomizations, + @JsonProperty("jsonOutputFiltering") final com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering jsonOutputFiltering, + @JsonProperty("toolOutputFormatting") final com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting toolOutputFormatting) { + this.majorVersion = majorVersion; + this.url = url; + this.tools = tools; + this.toolCustomizations = toolCustomizations; + this.jsonOutputFiltering = jsonOutputFiltering; + this.toolOutputFormatting = toolOutputFormatting; + this.type = COMMERCE_MCP; + } + + /** + * create empty instance + */ + public CommerceMcpServerConfigImpl() { + this.type = COMMERCE_MCP; + } + + /** + *

MCP Server type. Determines the shape of the configuration and the set of tools available for this MCP Server.

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

Major version of this MCP Server type. Supported versions are v1 (deprecated) and v4.

+ */ + + public String getMajorVersion() { + return this.majorVersion; + } + + /** + *

URL of the MCP Server. Generated by the system from the region, domain, Project key, and MCP Server key. Format: https://mcp.{region}.{domain}/projects/{projectKey}/{mcpServerKey}

+ */ + + public String getUrl() { + return this.url; + } + + /** + *

List of tools enabled for this MCP Server. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders. To reduce the number of LLM turns and improve overall performance, it is advisable to expose only the tools that are necessary, or at least minimize the exposure of tools that are unlikely to be used.

+ */ + + public java.util.List getTools() { + return this.tools; + } + + /** + *

Per-tool customizations applied at tools/list and tools/call time, such as overriding a tool's description or constraining its parameters.

+ */ + + public java.util.List getToolCustomizations() { + return this.toolCustomizations; + } + + /** + *

Response field-filtering rules applied to tool responses.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering getJsonOutputFiltering() { + return this.jsonOutputFiltering; + } + + /** + *

Output formatting applied to tool responses. When absent, responses are left untouched.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting getToolOutputFormatting() { + return this.toolOutputFormatting; + } + + public void setMajorVersion(final String majorVersion) { + this.majorVersion = majorVersion; + } + + public void setUrl(final String url) { + this.url = url; + } + + public void setTools(final com.commercetools.api.models.mcp_server.McpServerTool... tools) { + this.tools = new ArrayList<>(Arrays.asList(tools)); + } + + public void setTools(final java.util.List tools) { + this.tools = tools; + } + + public void setToolCustomizations( + final com.commercetools.api.models.mcp_server.ToolCustomization... toolCustomizations) { + this.toolCustomizations = new ArrayList<>(Arrays.asList(toolCustomizations)); + } + + public void setToolCustomizations( + final java.util.List toolCustomizations) { + this.toolCustomizations = toolCustomizations; + } + + public void setJsonOutputFiltering( + final com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering jsonOutputFiltering) { + this.jsonOutputFiltering = jsonOutputFiltering; + } + + public void setToolOutputFormatting( + final com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting toolOutputFormatting) { + this.toolOutputFormatting = toolOutputFormatting; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CommerceMcpServerConfigImpl that = (CommerceMcpServerConfigImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(majorVersion, that.majorVersion) + .append(url, that.url) + .append(tools, that.tools) + .append(toolCustomizations, that.toolCustomizations) + .append(jsonOutputFiltering, that.jsonOutputFiltering) + .append(toolOutputFormatting, that.toolOutputFormatting) + .append(type, that.type) + .append(majorVersion, that.majorVersion) + .append(url, that.url) + .append(tools, that.tools) + .append(toolCustomizations, that.toolCustomizations) + .append(jsonOutputFiltering, that.jsonOutputFiltering) + .append(toolOutputFormatting, that.toolOutputFormatting) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(majorVersion) + .append(url) + .append(tools) + .append(toolCustomizations) + .append(jsonOutputFiltering) + .append(toolOutputFormatting) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("majorVersion", majorVersion) + .append("url", url) + .append("tools", tools) + .append("toolCustomizations", toolCustomizations) + .append("jsonOutputFiltering", jsonOutputFiltering) + .append("toolOutputFormatting", toolOutputFormatting) + .build(); + } + + @Override + public CommerceMcpServerConfig copyDeep() { + return CommerceMcpServerConfig.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServer.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServer.java new file mode 100644 index 00000000000..9f62c2f74f1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServer.java @@ -0,0 +1,310 @@ + +package com.commercetools.api.models.mcp_server; + +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 io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Represents an MCP Server configuration that exposes a set of tools to AI agents via the Model Context Protocol.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServer mcpServer = McpServer.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}")
+ *             .state(McpServerState.ENABLED)
+ *             .mcpServer(mcpServerBuilder -> mcpServerBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = McpServerImpl.class) +public interface McpServer extends BaseResource { + + /** + *

Unique identifier of the MCP Server.

+ * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

Current version of the MCP Server.

+ * @return version + */ + @NotNull + @JsonProperty("version") + public Long getVersion(); + + /** + *

Date and time (UTC) the MCP Server was initially created.

+ * @return createdAt + */ + @NotNull + @JsonProperty("createdAt") + public ZonedDateTime getCreatedAt(); + + /** + *

Date and time (UTC) the MCP Server was last updated.

+ * @return lastModifiedAt + */ + @NotNull + @JsonProperty("lastModifiedAt") + public ZonedDateTime getLastModifiedAt(); + + /** + *

IDs and references that last modified the MCP Server.

+ * @return lastModifiedBy + */ + @Valid + @JsonProperty("lastModifiedBy") + public LastModifiedBy getLastModifiedBy(); + + /** + *

IDs and references that created the MCP Server.

+ * @return createdBy + */ + @Valid + @JsonProperty("createdBy") + public CreatedBy getCreatedBy(); + + /** + *

User-defined unique identifier of the MCP Server within a Project.

+ * @return key + */ + @NotNull + @JsonProperty("key") + public String getKey(); + + /** + *

Name of the MCP Server.

+ * @return name + */ + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

Description of the MCP Server.

+ * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

State of the MCP Server. A Disabled MCP Server rejects all AI agent tool requests.

+ * @return state + */ + @NotNull + @JsonProperty("state") + public McpServerState getState(); + + /** + *

Configuration of the MCP Server connection.

+ * @return mcpServer + */ + @NotNull + @Valid + @JsonProperty("mcpServer") + public McpServerConfig getMcpServer(); + + /** + *

Unique identifier of the MCP Server.

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

Current version of the MCP Server.

+ * @param version value to be set + */ + + public void setVersion(final Long version); + + /** + *

Date and time (UTC) the MCP Server was initially created.

+ * @param createdAt value to be set + */ + + public void setCreatedAt(final ZonedDateTime createdAt); + + /** + *

Date and time (UTC) the MCP Server was last updated.

+ * @param lastModifiedAt value to be set + */ + + public void setLastModifiedAt(final ZonedDateTime lastModifiedAt); + + /** + *

IDs and references that last modified the MCP Server.

+ * @param lastModifiedBy value to be set + */ + + public void setLastModifiedBy(final LastModifiedBy lastModifiedBy); + + /** + *

IDs and references that created the MCP Server.

+ * @param createdBy value to be set + */ + + public void setCreatedBy(final CreatedBy createdBy); + + /** + *

User-defined unique identifier of the MCP Server within a Project.

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

Name of the MCP Server.

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

Description of the MCP Server.

+ * @param description value to be set + */ + + public void setDescription(final LocalizedString description); + + /** + *

State of the MCP Server. A Disabled MCP Server rejects all AI agent tool requests.

+ * @param state value to be set + */ + + public void setState(final McpServerState state); + + /** + *

Configuration of the MCP Server connection.

+ * @param mcpServer value to be set + */ + + public void setMcpServer(final McpServerConfig mcpServer); + + /** + * factory method + * @return instance of McpServer + */ + public static McpServer of() { + return new McpServerImpl(); + } + + /** + * factory method to create a shallow copy McpServer + * @param template instance to be copied + * @return copy instance + */ + public static McpServer of(final McpServer template) { + McpServerImpl instance = new McpServerImpl(); + 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.setKey(template.getKey()); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setState(template.getState()); + instance.setMcpServer(template.getMcpServer()); + return instance; + } + + public McpServer copyDeep(); + + /** + * factory method to create a deep copy of McpServer + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServer deepCopy(@Nullable final McpServer template) { + if (template == null) { + return null; + } + McpServerImpl instance = new McpServerImpl(); + 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.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.setState(template.getState()); + instance.setMcpServer( + com.commercetools.api.models.mcp_server.McpServerConfig.deepCopy(template.getMcpServer())); + return instance; + } + + /** + * builder factory method for McpServer + * @return builder + */ + public static McpServerBuilder builder() { + return McpServerBuilder.of(); + } + + /** + * create builder for McpServer instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerBuilder builder(final McpServer template) { + return McpServerBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServer(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerAddToolAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolAction.java new file mode 100644 index 00000000000..755f14144c3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolAction.java @@ -0,0 +1,130 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Adds a single tool to the MCP Server's list of enabled tools. Has no effect if the tool is already present.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerAddToolAction mcpServerAddToolAction = McpServerAddToolAction.builder()
+ *             .tool(McpServerTool.ALL)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("addTool") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = McpServerAddToolActionImpl.class) +public interface McpServerAddToolAction extends McpServerUpdateAction { + + /** + * discriminator value for McpServerAddToolAction + */ + String ADD_TOOL = "addTool"; + + /** + *

Name of the tool to add, such as read_products or create_orders.

+ * @return tool + */ + @NotNull + @JsonProperty("tool") + public McpServerTool getTool(); + + /** + *

Name of the tool to add, such as read_products or create_orders.

+ * @param tool value to be set + */ + + public void setTool(final McpServerTool tool); + + /** + * factory method + * @return instance of McpServerAddToolAction + */ + public static McpServerAddToolAction of() { + return new McpServerAddToolActionImpl(); + } + + /** + * factory method to create a shallow copy McpServerAddToolAction + * @param template instance to be copied + * @return copy instance + */ + public static McpServerAddToolAction of(final McpServerAddToolAction template) { + McpServerAddToolActionImpl instance = new McpServerAddToolActionImpl(); + instance.setTool(template.getTool()); + return instance; + } + + public McpServerAddToolAction copyDeep(); + + /** + * factory method to create a deep copy of McpServerAddToolAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerAddToolAction deepCopy(@Nullable final McpServerAddToolAction template) { + if (template == null) { + return null; + } + McpServerAddToolActionImpl instance = new McpServerAddToolActionImpl(); + instance.setTool(template.getTool()); + return instance; + } + + /** + * builder factory method for McpServerAddToolAction + * @return builder + */ + public static McpServerAddToolActionBuilder builder() { + return McpServerAddToolActionBuilder.of(); + } + + /** + * create builder for McpServerAddToolAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerAddToolActionBuilder builder(final McpServerAddToolAction template) { + return McpServerAddToolActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerAddToolAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerAddToolActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolActionBuilder.java new file mode 100644 index 00000000000..9cee35cbe96 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolActionBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * McpServerAddToolActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerAddToolAction mcpServerAddToolAction = McpServerAddToolAction.builder()
+ *             .tool(McpServerTool.ALL)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerAddToolActionBuilder implements Builder { + + private com.commercetools.api.models.mcp_server.McpServerTool tool; + + /** + *

Name of the tool to add, such as read_products or create_orders.

+ * @param tool value to be set + * @return Builder + */ + + public McpServerAddToolActionBuilder tool(final com.commercetools.api.models.mcp_server.McpServerTool tool) { + this.tool = tool; + return this; + } + + /** + *

Name of the tool to add, such as read_products or create_orders.

+ * @return tool + */ + + public com.commercetools.api.models.mcp_server.McpServerTool getTool() { + return this.tool; + } + + /** + * builds McpServerAddToolAction with checking for non-null required values + * @return McpServerAddToolAction + */ + public McpServerAddToolAction build() { + Objects.requireNonNull(tool, McpServerAddToolAction.class + ": tool is missing"); + return new McpServerAddToolActionImpl(tool); + } + + /** + * builds McpServerAddToolAction without checking for non-null required values + * @return McpServerAddToolAction + */ + public McpServerAddToolAction buildUnchecked() { + return new McpServerAddToolActionImpl(tool); + } + + /** + * factory method for an instance of McpServerAddToolActionBuilder + * @return builder + */ + public static McpServerAddToolActionBuilder of() { + return new McpServerAddToolActionBuilder(); + } + + /** + * create builder for McpServerAddToolAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerAddToolActionBuilder of(final McpServerAddToolAction template) { + McpServerAddToolActionBuilder builder = new McpServerAddToolActionBuilder(); + builder.tool = template.getTool(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolActionImpl.java new file mode 100644 index 00000000000..fff677ab598 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolActionImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Adds a single tool to the MCP Server's list of enabled tools. Has no effect if the tool is already present.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerAddToolActionImpl implements McpServerAddToolAction, ModelBase { + + private String action; + + private com.commercetools.api.models.mcp_server.McpServerTool tool; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerAddToolActionImpl(@JsonProperty("tool") final com.commercetools.api.models.mcp_server.McpServerTool tool) { + this.tool = tool; + this.action = ADD_TOOL; + } + + /** + * create empty instance + */ + public McpServerAddToolActionImpl() { + this.action = ADD_TOOL; + } + + /** + *

Identifies the update action to perform, such as addTool, removeTool, or setTools.

+ */ + + public String getAction() { + return this.action; + } + + /** + *

Name of the tool to add, such as read_products or create_orders.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerTool getTool() { + return this.tool; + } + + public void setTool(final com.commercetools.api.models.mcp_server.McpServerTool tool) { + this.tool = tool; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + McpServerAddToolActionImpl that = (McpServerAddToolActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(tool, that.tool) + .append(action, that.action) + .append(tool, that.tool) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(tool).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("tool", tool) + .build(); + } + + @Override + public McpServerAddToolAction copyDeep() { + return McpServerAddToolAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolCustomizationAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolCustomizationAction.java new file mode 100644 index 00000000000..959d92aa448 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolCustomizationAction.java @@ -0,0 +1,135 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Adds a single tool customization to the MCP Server. Returns an InvalidOperation error if a customization for the same tool already exists.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerAddToolCustomizationAction mcpServerAddToolCustomizationAction = McpServerAddToolCustomizationAction.builder()
+ *             .toolCustomization(toolCustomizationBuilder -> toolCustomizationBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("addToolCustomization") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = McpServerAddToolCustomizationActionImpl.class) +public interface McpServerAddToolCustomizationAction extends McpServerUpdateAction { + + /** + * discriminator value for McpServerAddToolCustomizationAction + */ + String ADD_TOOL_CUSTOMIZATION = "addToolCustomization"; + + /** + *

Tool customization to add.

+ * @return toolCustomization + */ + @NotNull + @Valid + @JsonProperty("toolCustomization") + public ToolCustomization getToolCustomization(); + + /** + *

Tool customization to add.

+ * @param toolCustomization value to be set + */ + + public void setToolCustomization(final ToolCustomization toolCustomization); + + /** + * factory method + * @return instance of McpServerAddToolCustomizationAction + */ + public static McpServerAddToolCustomizationAction of() { + return new McpServerAddToolCustomizationActionImpl(); + } + + /** + * factory method to create a shallow copy McpServerAddToolCustomizationAction + * @param template instance to be copied + * @return copy instance + */ + public static McpServerAddToolCustomizationAction of(final McpServerAddToolCustomizationAction template) { + McpServerAddToolCustomizationActionImpl instance = new McpServerAddToolCustomizationActionImpl(); + instance.setToolCustomization(template.getToolCustomization()); + return instance; + } + + public McpServerAddToolCustomizationAction copyDeep(); + + /** + * factory method to create a deep copy of McpServerAddToolCustomizationAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerAddToolCustomizationAction deepCopy( + @Nullable final McpServerAddToolCustomizationAction template) { + if (template == null) { + return null; + } + McpServerAddToolCustomizationActionImpl instance = new McpServerAddToolCustomizationActionImpl(); + instance.setToolCustomization( + com.commercetools.api.models.mcp_server.ToolCustomization.deepCopy(template.getToolCustomization())); + return instance; + } + + /** + * builder factory method for McpServerAddToolCustomizationAction + * @return builder + */ + public static McpServerAddToolCustomizationActionBuilder builder() { + return McpServerAddToolCustomizationActionBuilder.of(); + } + + /** + * create builder for McpServerAddToolCustomizationAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerAddToolCustomizationActionBuilder builder( + final McpServerAddToolCustomizationAction template) { + return McpServerAddToolCustomizationActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerAddToolCustomizationAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerAddToolCustomizationActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolCustomizationActionBuilder.java new file mode 100644 index 00000000000..ae4ba184ec9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolCustomizationActionBuilder.java @@ -0,0 +1,110 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * McpServerAddToolCustomizationActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerAddToolCustomizationAction mcpServerAddToolCustomizationAction = McpServerAddToolCustomizationAction.builder()
+ *             .toolCustomization(toolCustomizationBuilder -> toolCustomizationBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerAddToolCustomizationActionBuilder implements Builder { + + private com.commercetools.api.models.mcp_server.ToolCustomization toolCustomization; + + /** + *

Tool customization to add.

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

Tool customization to add.

+ * @param builder function to build the toolCustomization value + * @return Builder + */ + + public McpServerAddToolCustomizationActionBuilder withToolCustomization( + Function builder) { + this.toolCustomization = builder.apply(com.commercetools.api.models.mcp_server.ToolCustomizationBuilder.of()); + return this; + } + + /** + *

Tool customization to add.

+ * @param toolCustomization value to be set + * @return Builder + */ + + public McpServerAddToolCustomizationActionBuilder toolCustomization( + final com.commercetools.api.models.mcp_server.ToolCustomization toolCustomization) { + this.toolCustomization = toolCustomization; + return this; + } + + /** + *

Tool customization to add.

+ * @return toolCustomization + */ + + public com.commercetools.api.models.mcp_server.ToolCustomization getToolCustomization() { + return this.toolCustomization; + } + + /** + * builds McpServerAddToolCustomizationAction with checking for non-null required values + * @return McpServerAddToolCustomizationAction + */ + public McpServerAddToolCustomizationAction build() { + Objects.requireNonNull(toolCustomization, + McpServerAddToolCustomizationAction.class + ": toolCustomization is missing"); + return new McpServerAddToolCustomizationActionImpl(toolCustomization); + } + + /** + * builds McpServerAddToolCustomizationAction without checking for non-null required values + * @return McpServerAddToolCustomizationAction + */ + public McpServerAddToolCustomizationAction buildUnchecked() { + return new McpServerAddToolCustomizationActionImpl(toolCustomization); + } + + /** + * factory method for an instance of McpServerAddToolCustomizationActionBuilder + * @return builder + */ + public static McpServerAddToolCustomizationActionBuilder of() { + return new McpServerAddToolCustomizationActionBuilder(); + } + + /** + * create builder for McpServerAddToolCustomizationAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerAddToolCustomizationActionBuilder of(final McpServerAddToolCustomizationAction template) { + McpServerAddToolCustomizationActionBuilder builder = new McpServerAddToolCustomizationActionBuilder(); + builder.toolCustomization = template.getToolCustomization(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolCustomizationActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolCustomizationActionImpl.java new file mode 100644 index 00000000000..be1a6b75bf5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolCustomizationActionImpl.java @@ -0,0 +1,101 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Adds a single tool customization to the MCP Server. Returns an InvalidOperation error if a customization for the same tool already exists.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerAddToolCustomizationActionImpl implements McpServerAddToolCustomizationAction, ModelBase { + + private String action; + + private com.commercetools.api.models.mcp_server.ToolCustomization toolCustomization; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerAddToolCustomizationActionImpl( + @JsonProperty("toolCustomization") final com.commercetools.api.models.mcp_server.ToolCustomization toolCustomization) { + this.toolCustomization = toolCustomization; + this.action = ADD_TOOL_CUSTOMIZATION; + } + + /** + * create empty instance + */ + public McpServerAddToolCustomizationActionImpl() { + this.action = ADD_TOOL_CUSTOMIZATION; + } + + /** + *

Identifies the update action to perform, such as addTool, removeTool, or setTools.

+ */ + + public String getAction() { + return this.action; + } + + /** + *

Tool customization to add.

+ */ + + public com.commercetools.api.models.mcp_server.ToolCustomization getToolCustomization() { + return this.toolCustomization; + } + + public void setToolCustomization( + final com.commercetools.api.models.mcp_server.ToolCustomization toolCustomization) { + this.toolCustomization = toolCustomization; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + McpServerAddToolCustomizationActionImpl that = (McpServerAddToolCustomizationActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(toolCustomization, that.toolCustomization) + .append(action, that.action) + .append(toolCustomization, that.toolCustomization) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(toolCustomization).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("toolCustomization", toolCustomization) + .build(); + } + + @Override + public McpServerAddToolCustomizationAction copyDeep() { + return McpServerAddToolCustomizationAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerBuilder.java new file mode 100644 index 00000000000..43af6f2f414 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerBuilder.java @@ -0,0 +1,447 @@ + +package com.commercetools.api.models.mcp_server; + +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; + +/** + * McpServerBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServer mcpServer = McpServer.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}")
+ *             .state(McpServerState.ENABLED)
+ *             .mcpServer(mcpServerBuilder -> mcpServerBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerBuilder 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 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.mcp_server.McpServerState state; + + private com.commercetools.api.models.mcp_server.McpServerConfig mcpServer; + + /** + *

Unique identifier of the MCP Server.

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

Current version of the MCP Server.

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

Date and time (UTC) the MCP Server was initially created.

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

Date and time (UTC) the MCP Server was last updated.

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

IDs and references that last modified the MCP Server.

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

IDs and references that last modified the MCP Server.

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

IDs and references that last modified the MCP Server.

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

IDs and references that created the MCP Server.

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

IDs and references that created the MCP Server.

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

IDs and references that created the MCP Server.

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

User-defined unique identifier of the MCP Server within a Project.

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

Name of the MCP Server.

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

Name of the MCP Server.

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

Name of the MCP Server.

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

Description of the MCP Server.

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

Description of the MCP Server.

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

Description of the MCP Server.

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

State of the MCP Server. A Disabled MCP Server rejects all AI agent tool requests.

+ * @param state value to be set + * @return Builder + */ + + public McpServerBuilder state(final com.commercetools.api.models.mcp_server.McpServerState state) { + this.state = state; + return this; + } + + /** + *

Configuration of the MCP Server connection.

+ * @param mcpServer value to be set + * @return Builder + */ + + public McpServerBuilder mcpServer(final com.commercetools.api.models.mcp_server.McpServerConfig mcpServer) { + this.mcpServer = mcpServer; + return this; + } + + /** + *

Configuration of the MCP Server connection.

+ * @param builder function to build the mcpServer value + * @return Builder + */ + + public McpServerBuilder mcpServer( + Function> builder) { + this.mcpServer = builder.apply(com.commercetools.api.models.mcp_server.McpServerConfigBuilder.of()).build(); + return this; + } + + /** + *

Unique identifier of the MCP Server.

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

Current version of the MCP Server.

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

Date and time (UTC) the MCP Server was initially created.

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

Date and time (UTC) the MCP Server was last updated.

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

IDs and references that last modified the MCP Server.

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

IDs and references that created the MCP Server.

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

User-defined unique identifier of the MCP Server within a Project.

+ * @return key + */ + + public String getKey() { + return this.key; + } + + /** + *

Name of the MCP Server.

+ * @return name + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getName() { + return this.name; + } + + /** + *

Description of the MCP Server.

+ * @return description + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + *

State of the MCP Server. A Disabled MCP Server rejects all AI agent tool requests.

+ * @return state + */ + + public com.commercetools.api.models.mcp_server.McpServerState getState() { + return this.state; + } + + /** + *

Configuration of the MCP Server connection.

+ * @return mcpServer + */ + + public com.commercetools.api.models.mcp_server.McpServerConfig getMcpServer() { + return this.mcpServer; + } + + /** + * builds McpServer with checking for non-null required values + * @return McpServer + */ + public McpServer build() { + Objects.requireNonNull(id, McpServer.class + ": id is missing"); + Objects.requireNonNull(version, McpServer.class + ": version is missing"); + Objects.requireNonNull(createdAt, McpServer.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, McpServer.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(key, McpServer.class + ": key is missing"); + Objects.requireNonNull(state, McpServer.class + ": state is missing"); + Objects.requireNonNull(mcpServer, McpServer.class + ": mcpServer is missing"); + return new McpServerImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, name, + description, state, mcpServer); + } + + /** + * builds McpServer without checking for non-null required values + * @return McpServer + */ + public McpServer buildUnchecked() { + return new McpServerImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, name, + description, state, mcpServer); + } + + /** + * factory method for an instance of McpServerBuilder + * @return builder + */ + public static McpServerBuilder of() { + return new McpServerBuilder(); + } + + /** + * create builder for McpServer instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerBuilder of(final McpServer template) { + McpServerBuilder builder = new McpServerBuilder(); + 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.key = template.getKey(); + builder.name = template.getName(); + builder.description = template.getDescription(); + builder.state = template.getState(); + builder.mcpServer = template.getMcpServer(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfig.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfig.java new file mode 100644 index 00000000000..57e48e49f23 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfig.java @@ -0,0 +1,96 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Connection configuration of an MCP Server. The type discriminator determines the concrete configuration shape and the set of tools available for this MCP Server. Only CommerceMcpServerConfig is supported.

+ * + *
+ * Example to create a subtype instance using the builder pattern + *
+ *

+ *     McpServerConfig mcpServerConfig = McpServerConfig.commerceMcpBuilder()
+ *             majorVersion("{majorVersion}")
+ *             url("{url}")
+ *             plusTools(toolsBuilder -> toolsBuilder)
+ *             plusToolCustomizations(toolCustomizationsBuilder -> toolCustomizationsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", defaultImpl = McpServerConfigImpl.class, visible = true) +@JsonDeserialize(as = McpServerConfigImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface McpServerConfig { + + /** + *

MCP Server type. Determines the shape of the configuration and the set of tools available for this MCP Server.

+ * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + public McpServerConfig copyDeep(); + + /** + * factory method to create a deep copy of McpServerConfig + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerConfig deepCopy(@Nullable final McpServerConfig template) { + if (template == null) { + return null; + } + + if (!(template instanceof McpServerConfigImpl)) { + return template.copyDeep(); + } + McpServerConfigImpl instance = new McpServerConfigImpl(); + return instance; + } + + /** + * builder for commerceMcp subtype + * @return builder + */ + public static com.commercetools.api.models.mcp_server.CommerceMcpServerConfigBuilder commerceMcpBuilder() { + return com.commercetools.api.models.mcp_server.CommerceMcpServerConfigBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerConfig(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerConfigBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfigBuilder.java new file mode 100644 index 00000000000..b3ff7c98878 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfigBuilder.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * McpServerConfigBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerConfigBuilder { + + public com.commercetools.api.models.mcp_server.CommerceMcpServerConfigBuilder commerceMcpBuilder() { + return com.commercetools.api.models.mcp_server.CommerceMcpServerConfigBuilder.of(); + } + + /** + * factory method for an instance of McpServerConfigBuilder + * @return builder + */ + public static McpServerConfigBuilder of() { + return new McpServerConfigBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfigDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfigDraft.java new file mode 100644 index 00000000000..a31873c6a44 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfigDraft.java @@ -0,0 +1,94 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Connection configuration for creating or updating an MCP Server. The type discriminator determines the concrete configuration shape and the set of tools available for this MCP Server. Only CommerceMcpServerConfigDraft is supported.

+ * + *
+ * Example to create a subtype instance using the builder pattern + *
+ *

+ *     McpServerConfigDraft mcpServerConfigDraft = McpServerConfigDraft.commerceMcpBuilder()
+ *             majorVersion("{majorVersion}")
+ *             plusTools(toolsBuilder -> toolsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", defaultImpl = McpServerConfigDraftImpl.class, visible = true) +@JsonDeserialize(as = McpServerConfigDraftImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface McpServerConfigDraft { + + /** + *

MCP Server type. Determines the shape of the configuration and the set of tools available for this MCP Server.

+ * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + public McpServerConfigDraft copyDeep(); + + /** + * factory method to create a deep copy of McpServerConfigDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerConfigDraft deepCopy(@Nullable final McpServerConfigDraft template) { + if (template == null) { + return null; + } + + if (!(template instanceof McpServerConfigDraftImpl)) { + return template.copyDeep(); + } + McpServerConfigDraftImpl instance = new McpServerConfigDraftImpl(); + return instance; + } + + /** + * builder for commerceMcp subtype + * @return builder + */ + public static com.commercetools.api.models.mcp_server.CommerceMcpServerConfigDraftBuilder commerceMcpBuilder() { + return com.commercetools.api.models.mcp_server.CommerceMcpServerConfigDraftBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerConfigDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerConfigDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfigDraftBuilder.java new file mode 100644 index 00000000000..ab659388d92 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfigDraftBuilder.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * McpServerConfigDraftBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerConfigDraftBuilder { + + public com.commercetools.api.models.mcp_server.CommerceMcpServerConfigDraftBuilder commerceMcpBuilder() { + return com.commercetools.api.models.mcp_server.CommerceMcpServerConfigDraftBuilder.of(); + } + + /** + * factory method for an instance of McpServerConfigDraftBuilder + * @return builder + */ + public static McpServerConfigDraftBuilder of() { + return new McpServerConfigDraftBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfigDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfigDraftImpl.java new file mode 100644 index 00000000000..c1bdabba38c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfigDraftImpl.java @@ -0,0 +1,77 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Connection configuration for creating or updating an MCP Server. The type discriminator determines the concrete configuration shape and the set of tools available for this MCP Server. Only CommerceMcpServerConfigDraft is supported.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerConfigDraftImpl implements McpServerConfigDraft, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerConfigDraftImpl(@JsonProperty("type") final String type) { + this.type = type; + } + + /** + * create empty instance + */ + public McpServerConfigDraftImpl() { + } + + /** + *

MCP Server type. Determines the shape of the configuration and the set of tools available for this MCP Server.

+ */ + + 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; + + McpServerConfigDraftImpl that = (McpServerConfigDraftImpl) 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 McpServerConfigDraft copyDeep() { + return McpServerConfigDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfigImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfigImpl.java new file mode 100644 index 00000000000..562aec6f23d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerConfigImpl.java @@ -0,0 +1,77 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Connection configuration of an MCP Server. The type discriminator determines the concrete configuration shape and the set of tools available for this MCP Server. Only CommerceMcpServerConfig is supported.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerConfigImpl implements McpServerConfig, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerConfigImpl(@JsonProperty("type") final String type) { + this.type = type; + } + + /** + * create empty instance + */ + public McpServerConfigImpl() { + } + + /** + *

MCP Server type. Determines the shape of the configuration and the set of tools available for this MCP Server.

+ */ + + 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; + + McpServerConfigImpl that = (McpServerConfigImpl) 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 McpServerConfig copyDeep() { + return McpServerConfig.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerDraft.java new file mode 100644 index 00000000000..b7c1b0ab20b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerDraft.java @@ -0,0 +1,198 @@ + +package com.commercetools.api.models.mcp_server; + +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 io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Draft representation for creating a new MCP Server.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerDraft mcpServerDraft = McpServerDraft.builder()
+ *             .key("{key}")
+ *             .mcpServer(mcpServerBuilder -> mcpServerBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = McpServerDraftImpl.class) +public interface McpServerDraft extends io.vrap.rmf.base.client.Draft { + + /** + *

User-defined unique identifier for the MCP Server. Must be unique within the Project.

+ * @return key + */ + @NotNull + @JsonProperty("key") + public String getKey(); + + /** + *

Name of the MCP Server.

+ * @return name + */ + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

Description of the MCP Server.

+ * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

State of the MCP Server.

+ * @return state + */ + + @JsonProperty("state") + public McpServerState getState(); + + /** + *

Configuration of the MCP Server connection.

+ * @return mcpServer + */ + @NotNull + @Valid + @JsonProperty("mcpServer") + public McpServerConfigDraft getMcpServer(); + + /** + *

User-defined unique identifier for the MCP Server. Must be unique within the Project.

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

Name of the MCP Server.

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

Description of the MCP Server.

+ * @param description value to be set + */ + + public void setDescription(final LocalizedString description); + + /** + *

State of the MCP Server.

+ * @param state value to be set + */ + + public void setState(final McpServerState state); + + /** + *

Configuration of the MCP Server connection.

+ * @param mcpServer value to be set + */ + + public void setMcpServer(final McpServerConfigDraft mcpServer); + + /** + * factory method + * @return instance of McpServerDraft + */ + public static McpServerDraft of() { + return new McpServerDraftImpl(); + } + + /** + * factory method to create a shallow copy McpServerDraft + * @param template instance to be copied + * @return copy instance + */ + public static McpServerDraft of(final McpServerDraft template) { + McpServerDraftImpl instance = new McpServerDraftImpl(); + instance.setKey(template.getKey()); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setState(template.getState()); + instance.setMcpServer(template.getMcpServer()); + return instance; + } + + public McpServerDraft copyDeep(); + + /** + * factory method to create a deep copy of McpServerDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerDraft deepCopy(@Nullable final McpServerDraft template) { + if (template == null) { + return null; + } + McpServerDraftImpl instance = new McpServerDraftImpl(); + 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.setState(template.getState()); + instance.setMcpServer( + com.commercetools.api.models.mcp_server.McpServerConfigDraft.deepCopy(template.getMcpServer())); + return instance; + } + + /** + * builder factory method for McpServerDraft + * @return builder + */ + public static McpServerDraftBuilder builder() { + return McpServerDraftBuilder.of(); + } + + /** + * create builder for McpServerDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerDraftBuilder builder(final McpServerDraft template) { + return McpServerDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerDraftBuilder.java new file mode 100644 index 00000000000..79925cbf607 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerDraftBuilder.java @@ -0,0 +1,248 @@ + +package com.commercetools.api.models.mcp_server; + +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; + +/** + * McpServerDraftBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerDraft mcpServerDraft = McpServerDraft.builder()
+ *             .key("{key}")
+ *             .mcpServer(mcpServerBuilder -> mcpServerBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerDraftBuilder implements Builder { + + private String key; + + @Nullable + private com.commercetools.api.models.common.LocalizedString name; + + @Nullable + private com.commercetools.api.models.common.LocalizedString description; + + @Nullable + private com.commercetools.api.models.mcp_server.McpServerState state; + + private com.commercetools.api.models.mcp_server.McpServerConfigDraft mcpServer; + + /** + *

User-defined unique identifier for the MCP Server. Must be unique within the Project.

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

Name of the MCP Server.

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

Name of the MCP Server.

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

Name of the MCP Server.

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

Description of the MCP Server.

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

Description of the MCP Server.

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

Description of the MCP Server.

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

State of the MCP Server.

+ * @param state value to be set + * @return Builder + */ + + public McpServerDraftBuilder state(@Nullable final com.commercetools.api.models.mcp_server.McpServerState state) { + this.state = state; + return this; + } + + /** + *

Configuration of the MCP Server connection.

+ * @param mcpServer value to be set + * @return Builder + */ + + public McpServerDraftBuilder mcpServer( + final com.commercetools.api.models.mcp_server.McpServerConfigDraft mcpServer) { + this.mcpServer = mcpServer; + return this; + } + + /** + *

Configuration of the MCP Server connection.

+ * @param builder function to build the mcpServer value + * @return Builder + */ + + public McpServerDraftBuilder mcpServer( + Function> builder) { + this.mcpServer = builder.apply(com.commercetools.api.models.mcp_server.McpServerConfigDraftBuilder.of()) + .build(); + return this; + } + + /** + *

User-defined unique identifier for the MCP Server. Must be unique within the Project.

+ * @return key + */ + + public String getKey() { + return this.key; + } + + /** + *

Name of the MCP Server.

+ * @return name + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getName() { + return this.name; + } + + /** + *

Description of the MCP Server.

+ * @return description + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + *

State of the MCP Server.

+ * @return state + */ + + @Nullable + public com.commercetools.api.models.mcp_server.McpServerState getState() { + return this.state; + } + + /** + *

Configuration of the MCP Server connection.

+ * @return mcpServer + */ + + public com.commercetools.api.models.mcp_server.McpServerConfigDraft getMcpServer() { + return this.mcpServer; + } + + /** + * builds McpServerDraft with checking for non-null required values + * @return McpServerDraft + */ + public McpServerDraft build() { + Objects.requireNonNull(key, McpServerDraft.class + ": key is missing"); + Objects.requireNonNull(mcpServer, McpServerDraft.class + ": mcpServer is missing"); + return new McpServerDraftImpl(key, name, description, state, mcpServer); + } + + /** + * builds McpServerDraft without checking for non-null required values + * @return McpServerDraft + */ + public McpServerDraft buildUnchecked() { + return new McpServerDraftImpl(key, name, description, state, mcpServer); + } + + /** + * factory method for an instance of McpServerDraftBuilder + * @return builder + */ + public static McpServerDraftBuilder of() { + return new McpServerDraftBuilder(); + } + + /** + * create builder for McpServerDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerDraftBuilder of(final McpServerDraft template) { + McpServerDraftBuilder builder = new McpServerDraftBuilder(); + builder.key = template.getKey(); + builder.name = template.getName(); + builder.description = template.getDescription(); + builder.state = template.getState(); + builder.mcpServer = template.getMcpServer(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerDraftImpl.java new file mode 100644 index 00000000000..cd066614ae3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerDraftImpl.java @@ -0,0 +1,165 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Draft representation for creating a new MCP Server.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerDraftImpl implements McpServerDraft, 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.mcp_server.McpServerState state; + + private com.commercetools.api.models.mcp_server.McpServerConfigDraft mcpServer; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerDraftImpl(@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("state") final com.commercetools.api.models.mcp_server.McpServerState state, + @JsonProperty("mcpServer") final com.commercetools.api.models.mcp_server.McpServerConfigDraft mcpServer) { + this.key = key; + this.name = name; + this.description = description; + this.state = state; + this.mcpServer = mcpServer; + } + + /** + * create empty instance + */ + public McpServerDraftImpl() { + } + + /** + *

User-defined unique identifier for the MCP Server. Must be unique within the Project.

+ */ + + public String getKey() { + return this.key; + } + + /** + *

Name of the MCP Server.

+ */ + + public com.commercetools.api.models.common.LocalizedString getName() { + return this.name; + } + + /** + *

Description of the MCP Server.

+ */ + + public com.commercetools.api.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + *

State of the MCP Server.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerState getState() { + return this.state; + } + + /** + *

Configuration of the MCP Server connection.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerConfigDraft getMcpServer() { + return this.mcpServer; + } + + 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 setState(final com.commercetools.api.models.mcp_server.McpServerState state) { + this.state = state; + } + + public void setMcpServer(final com.commercetools.api.models.mcp_server.McpServerConfigDraft mcpServer) { + this.mcpServer = mcpServer; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + McpServerDraftImpl that = (McpServerDraftImpl) o; + + return new EqualsBuilder().append(key, that.key) + .append(name, that.name) + .append(description, that.description) + .append(state, that.state) + .append(mcpServer, that.mcpServer) + .append(key, that.key) + .append(name, that.name) + .append(description, that.description) + .append(state, that.state) + .append(mcpServer, that.mcpServer) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(key) + .append(name) + .append(description) + .append(state) + .append(mcpServer) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("key", key) + .append("name", name) + .append("description", description) + .append("state", state) + .append("mcpServer", mcpServer) + .build(); + } + + @Override + public McpServerDraft copyDeep() { + return McpServerDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerImpl.java new file mode 100644 index 00000000000..b1e1c7a328e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerImpl.java @@ -0,0 +1,284 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Represents an MCP Server configuration that exposes a set of tools to AI agents via the Model Context Protocol.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerImpl implements McpServer, 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 String key; + + private com.commercetools.api.models.common.LocalizedString name; + + private com.commercetools.api.models.common.LocalizedString description; + + private com.commercetools.api.models.mcp_server.McpServerState state; + + private com.commercetools.api.models.mcp_server.McpServerConfig mcpServer; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerImpl(@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("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("state") final com.commercetools.api.models.mcp_server.McpServerState state, + @JsonProperty("mcpServer") final com.commercetools.api.models.mcp_server.McpServerConfig mcpServer) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.key = key; + this.name = name; + this.description = description; + this.state = state; + this.mcpServer = mcpServer; + } + + /** + * create empty instance + */ + public McpServerImpl() { + } + + /** + *

Unique identifier of the MCP Server.

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

Current version of the MCP Server.

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

Date and time (UTC) the MCP Server was initially created.

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

Date and time (UTC) the MCP Server was last updated.

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

IDs and references that last modified the MCP Server.

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

IDs and references that created the MCP Server.

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

User-defined unique identifier of the MCP Server within a Project.

+ */ + + public String getKey() { + return this.key; + } + + /** + *

Name of the MCP Server.

+ */ + + public com.commercetools.api.models.common.LocalizedString getName() { + return this.name; + } + + /** + *

Description of the MCP Server.

+ */ + + public com.commercetools.api.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + *

State of the MCP Server. A Disabled MCP Server rejects all AI agent tool requests.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerState getState() { + return this.state; + } + + /** + *

Configuration of the MCP Server connection.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerConfig getMcpServer() { + return this.mcpServer; + } + + 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 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 setState(final com.commercetools.api.models.mcp_server.McpServerState state) { + this.state = state; + } + + public void setMcpServer(final com.commercetools.api.models.mcp_server.McpServerConfig mcpServer) { + this.mcpServer = mcpServer; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + McpServerImpl that = (McpServerImpl) 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(key, that.key) + .append(name, that.name) + .append(description, that.description) + .append(state, that.state) + .append(mcpServer, that.mcpServer) + .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(key, that.key) + .append(name, that.name) + .append(description, that.description) + .append(state, that.state) + .append(mcpServer, that.mcpServer) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(key) + .append(name) + .append(description) + .append(state) + .append(mcpServer) + .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("key", key) + .append("name", name) + .append("description", description) + .append("state", state) + .append("mcpServer", mcpServer) + .build(); + } + + @Override + public McpServer copyDeep() { + return McpServer.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFiltering.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFiltering.java new file mode 100644 index 00000000000..576dd6a2d52 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFiltering.java @@ -0,0 +1,185 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import tools.jackson.databind.annotation.*; + +/** + *

Response field-filtering rules applied to tools/call results on the MCP Server. Every field is optional; an empty object filters nothing.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerJsonOutputFiltering mcpServerJsonOutputFiltering = McpServerJsonOutputFiltering.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = McpServerJsonOutputFilteringImpl.class) +public interface McpServerJsonOutputFiltering { + + /** + *

Fields whose values are replaced with a placeholder. The field itself is kept.

+ * @return redact + */ + @Valid + @JsonProperty("redact") + public McpServerJsonOutputFilteringMatcher getRedact(); + + /** + *

Fields that are removed entirely from the response.

+ * @return drop + */ + @Valid + @JsonProperty("drop") + public McpServerJsonOutputFilteringMatcher getDrop(); + + /** + *

Exact dotted paths kept even when they would otherwise match redact or drop.

+ * @return fieldPathsToKeep + */ + + @JsonProperty("fieldPathsToKeep") + public List getFieldPathsToKeep(); + + /** + *

Placeholder written in place of redacted values. When unset, the MCP Server applies its own default ([REDACTED]).

+ * @return redactedWith + */ + + @JsonProperty("redactedWith") + public String getRedactedWith(); + + /** + *

Fields whose values are replaced with a placeholder. The field itself is kept.

+ * @param redact value to be set + */ + + public void setRedact(final McpServerJsonOutputFilteringMatcher redact); + + /** + *

Fields that are removed entirely from the response.

+ * @param drop value to be set + */ + + public void setDrop(final McpServerJsonOutputFilteringMatcher drop); + + /** + *

Exact dotted paths kept even when they would otherwise match redact or drop.

+ * @param fieldPathsToKeep values to be set + */ + + @JsonIgnore + public void setFieldPathsToKeep(final String... fieldPathsToKeep); + + /** + *

Exact dotted paths kept even when they would otherwise match redact or drop.

+ * @param fieldPathsToKeep values to be set + */ + + public void setFieldPathsToKeep(final List fieldPathsToKeep); + + /** + *

Placeholder written in place of redacted values. When unset, the MCP Server applies its own default ([REDACTED]).

+ * @param redactedWith value to be set + */ + + public void setRedactedWith(final String redactedWith); + + /** + * factory method + * @return instance of McpServerJsonOutputFiltering + */ + public static McpServerJsonOutputFiltering of() { + return new McpServerJsonOutputFilteringImpl(); + } + + /** + * factory method to create a shallow copy McpServerJsonOutputFiltering + * @param template instance to be copied + * @return copy instance + */ + public static McpServerJsonOutputFiltering of(final McpServerJsonOutputFiltering template) { + McpServerJsonOutputFilteringImpl instance = new McpServerJsonOutputFilteringImpl(); + instance.setRedact(template.getRedact()); + instance.setDrop(template.getDrop()); + instance.setFieldPathsToKeep(template.getFieldPathsToKeep()); + instance.setRedactedWith(template.getRedactedWith()); + return instance; + } + + public McpServerJsonOutputFiltering copyDeep(); + + /** + * factory method to create a deep copy of McpServerJsonOutputFiltering + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerJsonOutputFiltering deepCopy(@Nullable final McpServerJsonOutputFiltering template) { + if (template == null) { + return null; + } + McpServerJsonOutputFilteringImpl instance = new McpServerJsonOutputFilteringImpl(); + instance.setRedact( + com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher.deepCopy(template.getRedact())); + instance.setDrop( + com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher.deepCopy(template.getDrop())); + instance.setFieldPathsToKeep( + Optional.ofNullable(template.getFieldPathsToKeep()).map(ArrayList::new).orElse(null)); + instance.setRedactedWith(template.getRedactedWith()); + return instance; + } + + /** + * builder factory method for McpServerJsonOutputFiltering + * @return builder + */ + public static McpServerJsonOutputFilteringBuilder builder() { + return McpServerJsonOutputFilteringBuilder.of(); + } + + /** + * create builder for McpServerJsonOutputFiltering instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerJsonOutputFilteringBuilder builder(final McpServerJsonOutputFiltering template) { + return McpServerJsonOutputFilteringBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerJsonOutputFiltering(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerJsonOutputFilteringBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringBuilder.java new file mode 100644 index 00000000000..43d428e3df7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringBuilder.java @@ -0,0 +1,242 @@ + +package com.commercetools.api.models.mcp_server; + +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; + +/** + * McpServerJsonOutputFilteringBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerJsonOutputFiltering mcpServerJsonOutputFiltering = McpServerJsonOutputFiltering.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerJsonOutputFilteringBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher redact; + + @Nullable + private com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher drop; + + @Nullable + private java.util.List fieldPathsToKeep; + + @Nullable + private String redactedWith; + + /** + *

Fields whose values are replaced with a placeholder. The field itself is kept.

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

Fields whose values are replaced with a placeholder. The field itself is kept.

+ * @param builder function to build the redact value + * @return Builder + */ + + public McpServerJsonOutputFilteringBuilder withRedact( + Function builder) { + this.redact = builder + .apply(com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcherBuilder.of()); + return this; + } + + /** + *

Fields whose values are replaced with a placeholder. The field itself is kept.

+ * @param redact value to be set + * @return Builder + */ + + public McpServerJsonOutputFilteringBuilder redact( + @Nullable final com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher redact) { + this.redact = redact; + return this; + } + + /** + *

Fields that are removed entirely from the response.

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

Fields that are removed entirely from the response.

+ * @param builder function to build the drop value + * @return Builder + */ + + public McpServerJsonOutputFilteringBuilder withDrop( + Function builder) { + this.drop = builder + .apply(com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcherBuilder.of()); + return this; + } + + /** + *

Fields that are removed entirely from the response.

+ * @param drop value to be set + * @return Builder + */ + + public McpServerJsonOutputFilteringBuilder drop( + @Nullable final com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher drop) { + this.drop = drop; + return this; + } + + /** + *

Exact dotted paths kept even when they would otherwise match redact or drop.

+ * @param fieldPathsToKeep value to be set + * @return Builder + */ + + public McpServerJsonOutputFilteringBuilder fieldPathsToKeep(@Nullable final String... fieldPathsToKeep) { + this.fieldPathsToKeep = new ArrayList<>(Arrays.asList(fieldPathsToKeep)); + return this; + } + + /** + *

Exact dotted paths kept even when they would otherwise match redact or drop.

+ * @param fieldPathsToKeep value to be set + * @return Builder + */ + + public McpServerJsonOutputFilteringBuilder fieldPathsToKeep( + @Nullable final java.util.List fieldPathsToKeep) { + this.fieldPathsToKeep = fieldPathsToKeep; + return this; + } + + /** + *

Exact dotted paths kept even when they would otherwise match redact or drop.

+ * @param fieldPathsToKeep value to be set + * @return Builder + */ + + public McpServerJsonOutputFilteringBuilder plusFieldPathsToKeep(@Nullable final String... fieldPathsToKeep) { + if (this.fieldPathsToKeep == null) { + this.fieldPathsToKeep = new ArrayList<>(); + } + this.fieldPathsToKeep.addAll(Arrays.asList(fieldPathsToKeep)); + return this; + } + + /** + *

Placeholder written in place of redacted values. When unset, the MCP Server applies its own default ([REDACTED]).

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

Fields whose values are replaced with a placeholder. The field itself is kept.

+ * @return redact + */ + + @Nullable + public com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher getRedact() { + return this.redact; + } + + /** + *

Fields that are removed entirely from the response.

+ * @return drop + */ + + @Nullable + public com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher getDrop() { + return this.drop; + } + + /** + *

Exact dotted paths kept even when they would otherwise match redact or drop.

+ * @return fieldPathsToKeep + */ + + @Nullable + public java.util.List getFieldPathsToKeep() { + return this.fieldPathsToKeep; + } + + /** + *

Placeholder written in place of redacted values. When unset, the MCP Server applies its own default ([REDACTED]).

+ * @return redactedWith + */ + + @Nullable + public String getRedactedWith() { + return this.redactedWith; + } + + /** + * builds McpServerJsonOutputFiltering with checking for non-null required values + * @return McpServerJsonOutputFiltering + */ + public McpServerJsonOutputFiltering build() { + return new McpServerJsonOutputFilteringImpl(redact, drop, fieldPathsToKeep, redactedWith); + } + + /** + * builds McpServerJsonOutputFiltering without checking for non-null required values + * @return McpServerJsonOutputFiltering + */ + public McpServerJsonOutputFiltering buildUnchecked() { + return new McpServerJsonOutputFilteringImpl(redact, drop, fieldPathsToKeep, redactedWith); + } + + /** + * factory method for an instance of McpServerJsonOutputFilteringBuilder + * @return builder + */ + public static McpServerJsonOutputFilteringBuilder of() { + return new McpServerJsonOutputFilteringBuilder(); + } + + /** + * create builder for McpServerJsonOutputFiltering instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerJsonOutputFilteringBuilder of(final McpServerJsonOutputFiltering template) { + McpServerJsonOutputFilteringBuilder builder = new McpServerJsonOutputFilteringBuilder(); + builder.redact = template.getRedact(); + builder.drop = template.getDrop(); + builder.fieldPathsToKeep = template.getFieldPathsToKeep(); + builder.redactedWith = template.getRedactedWith(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringImpl.java new file mode 100644 index 00000000000..05882007736 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringImpl.java @@ -0,0 +1,150 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Response field-filtering rules applied to tools/call results on the MCP Server. Every field is optional; an empty object filters nothing.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerJsonOutputFilteringImpl implements McpServerJsonOutputFiltering, ModelBase { + + private com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher redact; + + private com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher drop; + + private java.util.List fieldPathsToKeep; + + private String redactedWith; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerJsonOutputFilteringImpl( + @JsonProperty("redact") final com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher redact, + @JsonProperty("drop") final com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher drop, + @JsonProperty("fieldPathsToKeep") final java.util.List fieldPathsToKeep, + @JsonProperty("redactedWith") final String redactedWith) { + this.redact = redact; + this.drop = drop; + this.fieldPathsToKeep = fieldPathsToKeep; + this.redactedWith = redactedWith; + } + + /** + * create empty instance + */ + public McpServerJsonOutputFilteringImpl() { + } + + /** + *

Fields whose values are replaced with a placeholder. The field itself is kept.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher getRedact() { + return this.redact; + } + + /** + *

Fields that are removed entirely from the response.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher getDrop() { + return this.drop; + } + + /** + *

Exact dotted paths kept even when they would otherwise match redact or drop.

+ */ + + public java.util.List getFieldPathsToKeep() { + return this.fieldPathsToKeep; + } + + /** + *

Placeholder written in place of redacted values. When unset, the MCP Server applies its own default ([REDACTED]).

+ */ + + public String getRedactedWith() { + return this.redactedWith; + } + + public void setRedact(final com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher redact) { + this.redact = redact; + } + + public void setDrop(final com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcher drop) { + this.drop = drop; + } + + public void setFieldPathsToKeep(final String... fieldPathsToKeep) { + this.fieldPathsToKeep = new ArrayList<>(Arrays.asList(fieldPathsToKeep)); + } + + public void setFieldPathsToKeep(final java.util.List fieldPathsToKeep) { + this.fieldPathsToKeep = fieldPathsToKeep; + } + + public void setRedactedWith(final String redactedWith) { + this.redactedWith = redactedWith; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + McpServerJsonOutputFilteringImpl that = (McpServerJsonOutputFilteringImpl) o; + + return new EqualsBuilder().append(redact, that.redact) + .append(drop, that.drop) + .append(fieldPathsToKeep, that.fieldPathsToKeep) + .append(redactedWith, that.redactedWith) + .append(redact, that.redact) + .append(drop, that.drop) + .append(fieldPathsToKeep, that.fieldPathsToKeep) + .append(redactedWith, that.redactedWith) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(redact) + .append(drop) + .append(fieldPathsToKeep) + .append(redactedWith) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("redact", redact) + .append("drop", drop) + .append("fieldPathsToKeep", fieldPathsToKeep) + .append("redactedWith", redactedWith) + .build(); + } + + @Override + public McpServerJsonOutputFiltering copyDeep() { + return McpServerJsonOutputFiltering.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringMatcher.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringMatcher.java new file mode 100644 index 00000000000..79b6d276e0f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringMatcher.java @@ -0,0 +1,188 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import tools.jackson.databind.annotation.*; + +/** + *

One match group for McpServerJsonOutputFiltering. Selects fields three ways, each with a fixed case-sensitivity rule. All fields are optional.

+ *
    + *
  • fieldPaths: exact dotted path, for example customer.password. Matched case-sensitively.
  • + *
  • fieldNames: exact field name at any depth, for example password. Matched case-sensitively.
  • + *
  • fieldNameContains: substring of a field name at any depth, for example secret catching clientSecret. Matched case-insensitively to widen the net.
  • + *
+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerJsonOutputFilteringMatcher mcpServerJsonOutputFilteringMatcher = McpServerJsonOutputFilteringMatcher.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = McpServerJsonOutputFilteringMatcherImpl.class) +public interface McpServerJsonOutputFilteringMatcher { + + /** + *

Exact dotted paths to match, for example customer.password. Matched case-sensitively.

+ * @return fieldPaths + */ + + @JsonProperty("fieldPaths") + public List getFieldPaths(); + + /** + *

Exact field names to match at any depth, for example password. Matched case-sensitively.

+ * @return fieldNames + */ + + @JsonProperty("fieldNames") + public List getFieldNames(); + + /** + *

Substrings to match against field names at any depth, for example secret. Matched case-insensitively.

+ * @return fieldNameContains + */ + + @JsonProperty("fieldNameContains") + public List getFieldNameContains(); + + /** + *

Exact dotted paths to match, for example customer.password. Matched case-sensitively.

+ * @param fieldPaths values to be set + */ + + @JsonIgnore + public void setFieldPaths(final String... fieldPaths); + + /** + *

Exact dotted paths to match, for example customer.password. Matched case-sensitively.

+ * @param fieldPaths values to be set + */ + + public void setFieldPaths(final List fieldPaths); + + /** + *

Exact field names to match at any depth, for example password. Matched case-sensitively.

+ * @param fieldNames values to be set + */ + + @JsonIgnore + public void setFieldNames(final String... fieldNames); + + /** + *

Exact field names to match at any depth, for example password. Matched case-sensitively.

+ * @param fieldNames values to be set + */ + + public void setFieldNames(final List fieldNames); + + /** + *

Substrings to match against field names at any depth, for example secret. Matched case-insensitively.

+ * @param fieldNameContains values to be set + */ + + @JsonIgnore + public void setFieldNameContains(final String... fieldNameContains); + + /** + *

Substrings to match against field names at any depth, for example secret. Matched case-insensitively.

+ * @param fieldNameContains values to be set + */ + + public void setFieldNameContains(final List fieldNameContains); + + /** + * factory method + * @return instance of McpServerJsonOutputFilteringMatcher + */ + public static McpServerJsonOutputFilteringMatcher of() { + return new McpServerJsonOutputFilteringMatcherImpl(); + } + + /** + * factory method to create a shallow copy McpServerJsonOutputFilteringMatcher + * @param template instance to be copied + * @return copy instance + */ + public static McpServerJsonOutputFilteringMatcher of(final McpServerJsonOutputFilteringMatcher template) { + McpServerJsonOutputFilteringMatcherImpl instance = new McpServerJsonOutputFilteringMatcherImpl(); + instance.setFieldPaths(template.getFieldPaths()); + instance.setFieldNames(template.getFieldNames()); + instance.setFieldNameContains(template.getFieldNameContains()); + return instance; + } + + public McpServerJsonOutputFilteringMatcher copyDeep(); + + /** + * factory method to create a deep copy of McpServerJsonOutputFilteringMatcher + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerJsonOutputFilteringMatcher deepCopy( + @Nullable final McpServerJsonOutputFilteringMatcher template) { + if (template == null) { + return null; + } + McpServerJsonOutputFilteringMatcherImpl instance = new McpServerJsonOutputFilteringMatcherImpl(); + instance.setFieldPaths(Optional.ofNullable(template.getFieldPaths()).map(ArrayList::new).orElse(null)); + instance.setFieldNames(Optional.ofNullable(template.getFieldNames()).map(ArrayList::new).orElse(null)); + instance.setFieldNameContains( + Optional.ofNullable(template.getFieldNameContains()).map(ArrayList::new).orElse(null)); + return instance; + } + + /** + * builder factory method for McpServerJsonOutputFilteringMatcher + * @return builder + */ + public static McpServerJsonOutputFilteringMatcherBuilder builder() { + return McpServerJsonOutputFilteringMatcherBuilder.of(); + } + + /** + * create builder for McpServerJsonOutputFilteringMatcher instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerJsonOutputFilteringMatcherBuilder builder( + final McpServerJsonOutputFilteringMatcher template) { + return McpServerJsonOutputFilteringMatcherBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerJsonOutputFilteringMatcher(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerJsonOutputFilteringMatcherBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringMatcherBuilder.java new file mode 100644 index 00000000000..195c0ba695d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringMatcherBuilder.java @@ -0,0 +1,211 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * McpServerJsonOutputFilteringMatcherBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerJsonOutputFilteringMatcher mcpServerJsonOutputFilteringMatcher = McpServerJsonOutputFilteringMatcher.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerJsonOutputFilteringMatcherBuilder implements Builder { + + @Nullable + private java.util.List fieldPaths; + + @Nullable + private java.util.List fieldNames; + + @Nullable + private java.util.List fieldNameContains; + + /** + *

Exact dotted paths to match, for example customer.password. Matched case-sensitively.

+ * @param fieldPaths value to be set + * @return Builder + */ + + public McpServerJsonOutputFilteringMatcherBuilder fieldPaths(@Nullable final String... fieldPaths) { + this.fieldPaths = new ArrayList<>(Arrays.asList(fieldPaths)); + return this; + } + + /** + *

Exact dotted paths to match, for example customer.password. Matched case-sensitively.

+ * @param fieldPaths value to be set + * @return Builder + */ + + public McpServerJsonOutputFilteringMatcherBuilder fieldPaths(@Nullable final java.util.List fieldPaths) { + this.fieldPaths = fieldPaths; + return this; + } + + /** + *

Exact dotted paths to match, for example customer.password. Matched case-sensitively.

+ * @param fieldPaths value to be set + * @return Builder + */ + + public McpServerJsonOutputFilteringMatcherBuilder plusFieldPaths(@Nullable final String... fieldPaths) { + if (this.fieldPaths == null) { + this.fieldPaths = new ArrayList<>(); + } + this.fieldPaths.addAll(Arrays.asList(fieldPaths)); + return this; + } + + /** + *

Exact field names to match at any depth, for example password. Matched case-sensitively.

+ * @param fieldNames value to be set + * @return Builder + */ + + public McpServerJsonOutputFilteringMatcherBuilder fieldNames(@Nullable final String... fieldNames) { + this.fieldNames = new ArrayList<>(Arrays.asList(fieldNames)); + return this; + } + + /** + *

Exact field names to match at any depth, for example password. Matched case-sensitively.

+ * @param fieldNames value to be set + * @return Builder + */ + + public McpServerJsonOutputFilteringMatcherBuilder fieldNames(@Nullable final java.util.List fieldNames) { + this.fieldNames = fieldNames; + return this; + } + + /** + *

Exact field names to match at any depth, for example password. Matched case-sensitively.

+ * @param fieldNames value to be set + * @return Builder + */ + + public McpServerJsonOutputFilteringMatcherBuilder plusFieldNames(@Nullable final String... fieldNames) { + if (this.fieldNames == null) { + this.fieldNames = new ArrayList<>(); + } + this.fieldNames.addAll(Arrays.asList(fieldNames)); + return this; + } + + /** + *

Substrings to match against field names at any depth, for example secret. Matched case-insensitively.

+ * @param fieldNameContains value to be set + * @return Builder + */ + + public McpServerJsonOutputFilteringMatcherBuilder fieldNameContains(@Nullable final String... fieldNameContains) { + this.fieldNameContains = new ArrayList<>(Arrays.asList(fieldNameContains)); + return this; + } + + /** + *

Substrings to match against field names at any depth, for example secret. Matched case-insensitively.

+ * @param fieldNameContains value to be set + * @return Builder + */ + + public McpServerJsonOutputFilteringMatcherBuilder fieldNameContains( + @Nullable final java.util.List fieldNameContains) { + this.fieldNameContains = fieldNameContains; + return this; + } + + /** + *

Substrings to match against field names at any depth, for example secret. Matched case-insensitively.

+ * @param fieldNameContains value to be set + * @return Builder + */ + + public McpServerJsonOutputFilteringMatcherBuilder plusFieldNameContains( + @Nullable final String... fieldNameContains) { + if (this.fieldNameContains == null) { + this.fieldNameContains = new ArrayList<>(); + } + this.fieldNameContains.addAll(Arrays.asList(fieldNameContains)); + return this; + } + + /** + *

Exact dotted paths to match, for example customer.password. Matched case-sensitively.

+ * @return fieldPaths + */ + + @Nullable + public java.util.List getFieldPaths() { + return this.fieldPaths; + } + + /** + *

Exact field names to match at any depth, for example password. Matched case-sensitively.

+ * @return fieldNames + */ + + @Nullable + public java.util.List getFieldNames() { + return this.fieldNames; + } + + /** + *

Substrings to match against field names at any depth, for example secret. Matched case-insensitively.

+ * @return fieldNameContains + */ + + @Nullable + public java.util.List getFieldNameContains() { + return this.fieldNameContains; + } + + /** + * builds McpServerJsonOutputFilteringMatcher with checking for non-null required values + * @return McpServerJsonOutputFilteringMatcher + */ + public McpServerJsonOutputFilteringMatcher build() { + return new McpServerJsonOutputFilteringMatcherImpl(fieldPaths, fieldNames, fieldNameContains); + } + + /** + * builds McpServerJsonOutputFilteringMatcher without checking for non-null required values + * @return McpServerJsonOutputFilteringMatcher + */ + public McpServerJsonOutputFilteringMatcher buildUnchecked() { + return new McpServerJsonOutputFilteringMatcherImpl(fieldPaths, fieldNames, fieldNameContains); + } + + /** + * factory method for an instance of McpServerJsonOutputFilteringMatcherBuilder + * @return builder + */ + public static McpServerJsonOutputFilteringMatcherBuilder of() { + return new McpServerJsonOutputFilteringMatcherBuilder(); + } + + /** + * create builder for McpServerJsonOutputFilteringMatcher instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerJsonOutputFilteringMatcherBuilder of(final McpServerJsonOutputFilteringMatcher template) { + McpServerJsonOutputFilteringMatcherBuilder builder = new McpServerJsonOutputFilteringMatcherBuilder(); + builder.fieldPaths = template.getFieldPaths(); + builder.fieldNames = template.getFieldNames(); + builder.fieldNameContains = template.getFieldNameContains(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringMatcherImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringMatcherImpl.java new file mode 100644 index 00000000000..7db96dcde34 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringMatcherImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

One match group for McpServerJsonOutputFiltering. Selects fields three ways, each with a fixed case-sensitivity rule. All fields are optional.

+ *
    + *
  • fieldPaths: exact dotted path, for example customer.password. Matched case-sensitively.
  • + *
  • fieldNames: exact field name at any depth, for example password. Matched case-sensitively.
  • + *
  • fieldNameContains: substring of a field name at any depth, for example secret catching clientSecret. Matched case-insensitively to widen the net.
  • + *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerJsonOutputFilteringMatcherImpl implements McpServerJsonOutputFilteringMatcher, ModelBase { + + private java.util.List fieldPaths; + + private java.util.List fieldNames; + + private java.util.List fieldNameContains; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerJsonOutputFilteringMatcherImpl(@JsonProperty("fieldPaths") final java.util.List fieldPaths, + @JsonProperty("fieldNames") final java.util.List fieldNames, + @JsonProperty("fieldNameContains") final java.util.List fieldNameContains) { + this.fieldPaths = fieldPaths; + this.fieldNames = fieldNames; + this.fieldNameContains = fieldNameContains; + } + + /** + * create empty instance + */ + public McpServerJsonOutputFilteringMatcherImpl() { + } + + /** + *

Exact dotted paths to match, for example customer.password. Matched case-sensitively.

+ */ + + public java.util.List getFieldPaths() { + return this.fieldPaths; + } + + /** + *

Exact field names to match at any depth, for example password. Matched case-sensitively.

+ */ + + public java.util.List getFieldNames() { + return this.fieldNames; + } + + /** + *

Substrings to match against field names at any depth, for example secret. Matched case-insensitively.

+ */ + + public java.util.List getFieldNameContains() { + return this.fieldNameContains; + } + + public void setFieldPaths(final String... fieldPaths) { + this.fieldPaths = new ArrayList<>(Arrays.asList(fieldPaths)); + } + + public void setFieldPaths(final java.util.List fieldPaths) { + this.fieldPaths = fieldPaths; + } + + public void setFieldNames(final String... fieldNames) { + this.fieldNames = new ArrayList<>(Arrays.asList(fieldNames)); + } + + public void setFieldNames(final java.util.List fieldNames) { + this.fieldNames = fieldNames; + } + + public void setFieldNameContains(final String... fieldNameContains) { + this.fieldNameContains = new ArrayList<>(Arrays.asList(fieldNameContains)); + } + + public void setFieldNameContains(final java.util.List fieldNameContains) { + this.fieldNameContains = fieldNameContains; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + McpServerJsonOutputFilteringMatcherImpl that = (McpServerJsonOutputFilteringMatcherImpl) o; + + return new EqualsBuilder().append(fieldPaths, that.fieldPaths) + .append(fieldNames, that.fieldNames) + .append(fieldNameContains, that.fieldNameContains) + .append(fieldPaths, that.fieldPaths) + .append(fieldNames, that.fieldNames) + .append(fieldNameContains, that.fieldNameContains) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(fieldPaths).append(fieldNames).append(fieldNameContains).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("fieldPaths", fieldPaths) + .append("fieldNames", fieldNames) + .append("fieldNameContains", fieldNameContains) + .build(); + } + + @Override + public McpServerJsonOutputFilteringMatcher copyDeep() { + return McpServerJsonOutputFilteringMatcher.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerPagedQueryResponse.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerPagedQueryResponse.java new file mode 100644 index 00000000000..3531679e7c1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerPagedQueryResponse.java @@ -0,0 +1,210 @@ + +package com.commercetools.api.models.mcp_server; + +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 io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

PagedQueryResult with results containing an array of McpServer.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerPagedQueryResponse mcpServerPagedQueryResponse = McpServerPagedQueryResponse.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 = McpServerPagedQueryResponseImpl.class) +public interface McpServerPagedQueryResponse { + + /** + *

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 field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false.

+ * @return total + */ + + @JsonProperty("total") + public Long getTotal(); + + /** + *

MCP Servers 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 field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false.

+ * @param total value to be set + */ + + public void setTotal(final Long total); + + /** + *

MCP Servers matching the query.

+ * @param results values to be set + */ + + @JsonIgnore + public void setResults(final McpServer... results); + + /** + *

MCP Servers matching the query.

+ * @param results values to be set + */ + + public void setResults(final List results); + + /** + * factory method + * @return instance of McpServerPagedQueryResponse + */ + public static McpServerPagedQueryResponse of() { + return new McpServerPagedQueryResponseImpl(); + } + + /** + * factory method to create a shallow copy McpServerPagedQueryResponse + * @param template instance to be copied + * @return copy instance + */ + public static McpServerPagedQueryResponse of(final McpServerPagedQueryResponse template) { + McpServerPagedQueryResponseImpl instance = new McpServerPagedQueryResponseImpl(); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + instance.setCount(template.getCount()); + instance.setTotal(template.getTotal()); + instance.setResults(template.getResults()); + return instance; + } + + public McpServerPagedQueryResponse copyDeep(); + + /** + * factory method to create a deep copy of McpServerPagedQueryResponse + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerPagedQueryResponse deepCopy(@Nullable final McpServerPagedQueryResponse template) { + if (template == null) { + return null; + } + McpServerPagedQueryResponseImpl instance = new McpServerPagedQueryResponseImpl(); + 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.mcp_server.McpServer::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for McpServerPagedQueryResponse + * @return builder + */ + public static McpServerPagedQueryResponseBuilder builder() { + return McpServerPagedQueryResponseBuilder.of(); + } + + /** + * create builder for McpServerPagedQueryResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerPagedQueryResponseBuilder builder(final McpServerPagedQueryResponse template) { + return McpServerPagedQueryResponseBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerPagedQueryResponse(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerPagedQueryResponseBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerPagedQueryResponseBuilder.java new file mode 100644 index 00000000000..f250fdc0e32 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerPagedQueryResponseBuilder.java @@ -0,0 +1,263 @@ + +package com.commercetools.api.models.mcp_server; + +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; + +/** + * McpServerPagedQueryResponseBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerPagedQueryResponse mcpServerPagedQueryResponse = McpServerPagedQueryResponse.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 McpServerPagedQueryResponseBuilder 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 McpServerPagedQueryResponseBuilder limit(final Long limit) { + this.limit = limit; + return this; + } + + /** + *

Number of elements skipped.

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

Actual number of results returned.

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

Total number of results matching the query. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false.

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

MCP Servers matching the query.

+ * @param results value to be set + * @return Builder + */ + + public McpServerPagedQueryResponseBuilder results( + final com.commercetools.api.models.mcp_server.McpServer... results) { + this.results = new ArrayList<>(Arrays.asList(results)); + return this; + } + + /** + *

MCP Servers matching the query.

+ * @param results value to be set + * @return Builder + */ + + public McpServerPagedQueryResponseBuilder results( + final java.util.List results) { + this.results = results; + return this; + } + + /** + *

MCP Servers matching the query.

+ * @param results value to be set + * @return Builder + */ + + public McpServerPagedQueryResponseBuilder plusResults( + final com.commercetools.api.models.mcp_server.McpServer... results) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.addAll(Arrays.asList(results)); + return this; + } + + /** + *

MCP Servers matching the query.

+ * @param builder function to build the results value + * @return Builder + */ + + public McpServerPagedQueryResponseBuilder plusResults( + Function builder) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(builder.apply(com.commercetools.api.models.mcp_server.McpServerBuilder.of()).build()); + return this; + } + + /** + *

MCP Servers matching the query.

+ * @param builder function to build the results value + * @return Builder + */ + + public McpServerPagedQueryResponseBuilder withResults( + Function builder) { + this.results = new ArrayList<>(); + this.results.add(builder.apply(com.commercetools.api.models.mcp_server.McpServerBuilder.of()).build()); + return this; + } + + /** + *

MCP Servers matching the query.

+ * @param builder function to build the results value + * @return Builder + */ + + public McpServerPagedQueryResponseBuilder addResults( + Function builder) { + return plusResults(builder.apply(com.commercetools.api.models.mcp_server.McpServerBuilder.of())); + } + + /** + *

MCP Servers matching the query.

+ * @param builder function to build the results value + * @return Builder + */ + + public McpServerPagedQueryResponseBuilder setResults( + Function builder) { + return results(builder.apply(com.commercetools.api.models.mcp_server.McpServerBuilder.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 field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false.

+ * @return total + */ + + @Nullable + public Long getTotal() { + return this.total; + } + + /** + *

MCP Servers matching the query.

+ * @return results + */ + + public java.util.List getResults() { + return this.results; + } + + /** + * builds McpServerPagedQueryResponse with checking for non-null required values + * @return McpServerPagedQueryResponse + */ + public McpServerPagedQueryResponse build() { + Objects.requireNonNull(limit, McpServerPagedQueryResponse.class + ": limit is missing"); + Objects.requireNonNull(offset, McpServerPagedQueryResponse.class + ": offset is missing"); + Objects.requireNonNull(count, McpServerPagedQueryResponse.class + ": count is missing"); + Objects.requireNonNull(results, McpServerPagedQueryResponse.class + ": results is missing"); + return new McpServerPagedQueryResponseImpl(limit, offset, count, total, results); + } + + /** + * builds McpServerPagedQueryResponse without checking for non-null required values + * @return McpServerPagedQueryResponse + */ + public McpServerPagedQueryResponse buildUnchecked() { + return new McpServerPagedQueryResponseImpl(limit, offset, count, total, results); + } + + /** + * factory method for an instance of McpServerPagedQueryResponseBuilder + * @return builder + */ + public static McpServerPagedQueryResponseBuilder of() { + return new McpServerPagedQueryResponseBuilder(); + } + + /** + * create builder for McpServerPagedQueryResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerPagedQueryResponseBuilder of(final McpServerPagedQueryResponse template) { + McpServerPagedQueryResponseBuilder builder = new McpServerPagedQueryResponseBuilder(); + 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/mcp_server/McpServerPagedQueryResponseImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerPagedQueryResponseImpl.java new file mode 100644 index 00000000000..2d96974cea1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerPagedQueryResponseImpl.java @@ -0,0 +1,167 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

PagedQueryResult with results containing an array of McpServer.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerPagedQueryResponseImpl implements McpServerPagedQueryResponse, ModelBase { + + private Long limit; + + private Long offset; + + private Long count; + + private Long total; + + private java.util.List results; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerPagedQueryResponseImpl(@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 McpServerPagedQueryResponseImpl() { + } + + /** + *

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 field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false.

+ */ + + public Long getTotal() { + return this.total; + } + + /** + *

MCP Servers 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.mcp_server.McpServer... 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; + + McpServerPagedQueryResponseImpl that = (McpServerPagedQueryResponseImpl) 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 McpServerPagedQueryResponse copyDeep() { + return McpServerPagedQueryResponse.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolAction.java new file mode 100644 index 00000000000..8ade99cf82f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolAction.java @@ -0,0 +1,130 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Removes a single tool from the MCP Server's list of enabled tools. Returns an InvalidOperation error if the tool is not in the current list.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerRemoveToolAction mcpServerRemoveToolAction = McpServerRemoveToolAction.builder()
+ *             .tool(McpServerTool.ALL)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("removeTool") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = McpServerRemoveToolActionImpl.class) +public interface McpServerRemoveToolAction extends McpServerUpdateAction { + + /** + * discriminator value for McpServerRemoveToolAction + */ + String REMOVE_TOOL = "removeTool"; + + /** + *

Name of the tool to remove, such as read_products or create_orders.

+ * @return tool + */ + @NotNull + @JsonProperty("tool") + public McpServerTool getTool(); + + /** + *

Name of the tool to remove, such as read_products or create_orders.

+ * @param tool value to be set + */ + + public void setTool(final McpServerTool tool); + + /** + * factory method + * @return instance of McpServerRemoveToolAction + */ + public static McpServerRemoveToolAction of() { + return new McpServerRemoveToolActionImpl(); + } + + /** + * factory method to create a shallow copy McpServerRemoveToolAction + * @param template instance to be copied + * @return copy instance + */ + public static McpServerRemoveToolAction of(final McpServerRemoveToolAction template) { + McpServerRemoveToolActionImpl instance = new McpServerRemoveToolActionImpl(); + instance.setTool(template.getTool()); + return instance; + } + + public McpServerRemoveToolAction copyDeep(); + + /** + * factory method to create a deep copy of McpServerRemoveToolAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerRemoveToolAction deepCopy(@Nullable final McpServerRemoveToolAction template) { + if (template == null) { + return null; + } + McpServerRemoveToolActionImpl instance = new McpServerRemoveToolActionImpl(); + instance.setTool(template.getTool()); + return instance; + } + + /** + * builder factory method for McpServerRemoveToolAction + * @return builder + */ + public static McpServerRemoveToolActionBuilder builder() { + return McpServerRemoveToolActionBuilder.of(); + } + + /** + * create builder for McpServerRemoveToolAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerRemoveToolActionBuilder builder(final McpServerRemoveToolAction template) { + return McpServerRemoveToolActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerRemoveToolAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerRemoveToolActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolActionBuilder.java new file mode 100644 index 00000000000..301288d1d73 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolActionBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * McpServerRemoveToolActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerRemoveToolAction mcpServerRemoveToolAction = McpServerRemoveToolAction.builder()
+ *             .tool(McpServerTool.ALL)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerRemoveToolActionBuilder implements Builder { + + private com.commercetools.api.models.mcp_server.McpServerTool tool; + + /** + *

Name of the tool to remove, such as read_products or create_orders.

+ * @param tool value to be set + * @return Builder + */ + + public McpServerRemoveToolActionBuilder tool(final com.commercetools.api.models.mcp_server.McpServerTool tool) { + this.tool = tool; + return this; + } + + /** + *

Name of the tool to remove, such as read_products or create_orders.

+ * @return tool + */ + + public com.commercetools.api.models.mcp_server.McpServerTool getTool() { + return this.tool; + } + + /** + * builds McpServerRemoveToolAction with checking for non-null required values + * @return McpServerRemoveToolAction + */ + public McpServerRemoveToolAction build() { + Objects.requireNonNull(tool, McpServerRemoveToolAction.class + ": tool is missing"); + return new McpServerRemoveToolActionImpl(tool); + } + + /** + * builds McpServerRemoveToolAction without checking for non-null required values + * @return McpServerRemoveToolAction + */ + public McpServerRemoveToolAction buildUnchecked() { + return new McpServerRemoveToolActionImpl(tool); + } + + /** + * factory method for an instance of McpServerRemoveToolActionBuilder + * @return builder + */ + public static McpServerRemoveToolActionBuilder of() { + return new McpServerRemoveToolActionBuilder(); + } + + /** + * create builder for McpServerRemoveToolAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerRemoveToolActionBuilder of(final McpServerRemoveToolAction template) { + McpServerRemoveToolActionBuilder builder = new McpServerRemoveToolActionBuilder(); + builder.tool = template.getTool(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolActionImpl.java new file mode 100644 index 00000000000..48a5d78d027 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolActionImpl.java @@ -0,0 +1,100 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Removes a single tool from the MCP Server's list of enabled tools. Returns an InvalidOperation error if the tool is not in the current list.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerRemoveToolActionImpl implements McpServerRemoveToolAction, ModelBase { + + private String action; + + private com.commercetools.api.models.mcp_server.McpServerTool tool; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerRemoveToolActionImpl( + @JsonProperty("tool") final com.commercetools.api.models.mcp_server.McpServerTool tool) { + this.tool = tool; + this.action = REMOVE_TOOL; + } + + /** + * create empty instance + */ + public McpServerRemoveToolActionImpl() { + this.action = REMOVE_TOOL; + } + + /** + *

Identifies the update action to perform, such as addTool, removeTool, or setTools.

+ */ + + public String getAction() { + return this.action; + } + + /** + *

Name of the tool to remove, such as read_products or create_orders.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerTool getTool() { + return this.tool; + } + + public void setTool(final com.commercetools.api.models.mcp_server.McpServerTool tool) { + this.tool = tool; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + McpServerRemoveToolActionImpl that = (McpServerRemoveToolActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(tool, that.tool) + .append(action, that.action) + .append(tool, that.tool) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(tool).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("tool", tool) + .build(); + } + + @Override + public McpServerRemoveToolAction copyDeep() { + return McpServerRemoveToolAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolCustomizationAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolCustomizationAction.java new file mode 100644 index 00000000000..4cfa5653069 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolCustomizationAction.java @@ -0,0 +1,136 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Removes the tool customization matching the given tool name. Has no effect if no customization exists for that tool.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerRemoveToolCustomizationAction mcpServerRemoveToolCustomizationAction = McpServerRemoveToolCustomizationAction.builder()
+ *             .toolCustomization(toolCustomizationBuilder -> toolCustomizationBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("removeToolCustomization") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = McpServerRemoveToolCustomizationActionImpl.class) +public interface McpServerRemoveToolCustomizationAction extends McpServerUpdateAction { + + /** + * discriminator value for McpServerRemoveToolCustomizationAction + */ + String REMOVE_TOOL_CUSTOMIZATION = "removeToolCustomization"; + + /** + *

Identifies the tool customization to remove by its tool name.

+ * @return toolCustomization + */ + @NotNull + @Valid + @JsonProperty("toolCustomization") + public RemoveToolCustomizationTarget getToolCustomization(); + + /** + *

Identifies the tool customization to remove by its tool name.

+ * @param toolCustomization value to be set + */ + + public void setToolCustomization(final RemoveToolCustomizationTarget toolCustomization); + + /** + * factory method + * @return instance of McpServerRemoveToolCustomizationAction + */ + public static McpServerRemoveToolCustomizationAction of() { + return new McpServerRemoveToolCustomizationActionImpl(); + } + + /** + * factory method to create a shallow copy McpServerRemoveToolCustomizationAction + * @param template instance to be copied + * @return copy instance + */ + public static McpServerRemoveToolCustomizationAction of(final McpServerRemoveToolCustomizationAction template) { + McpServerRemoveToolCustomizationActionImpl instance = new McpServerRemoveToolCustomizationActionImpl(); + instance.setToolCustomization(template.getToolCustomization()); + return instance; + } + + public McpServerRemoveToolCustomizationAction copyDeep(); + + /** + * factory method to create a deep copy of McpServerRemoveToolCustomizationAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerRemoveToolCustomizationAction deepCopy( + @Nullable final McpServerRemoveToolCustomizationAction template) { + if (template == null) { + return null; + } + McpServerRemoveToolCustomizationActionImpl instance = new McpServerRemoveToolCustomizationActionImpl(); + instance.setToolCustomization(com.commercetools.api.models.mcp_server.RemoveToolCustomizationTarget + .deepCopy(template.getToolCustomization())); + return instance; + } + + /** + * builder factory method for McpServerRemoveToolCustomizationAction + * @return builder + */ + public static McpServerRemoveToolCustomizationActionBuilder builder() { + return McpServerRemoveToolCustomizationActionBuilder.of(); + } + + /** + * create builder for McpServerRemoveToolCustomizationAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerRemoveToolCustomizationActionBuilder builder( + final McpServerRemoveToolCustomizationAction template) { + return McpServerRemoveToolCustomizationActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerRemoveToolCustomizationAction( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerRemoveToolCustomizationActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolCustomizationActionBuilder.java new file mode 100644 index 00000000000..f0451f5dcd9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolCustomizationActionBuilder.java @@ -0,0 +1,113 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * McpServerRemoveToolCustomizationActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerRemoveToolCustomizationAction mcpServerRemoveToolCustomizationAction = McpServerRemoveToolCustomizationAction.builder()
+ *             .toolCustomization(toolCustomizationBuilder -> toolCustomizationBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerRemoveToolCustomizationActionBuilder implements Builder { + + private com.commercetools.api.models.mcp_server.RemoveToolCustomizationTarget toolCustomization; + + /** + *

Identifies the tool customization to remove by its tool name.

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

Identifies the tool customization to remove by its tool name.

+ * @param builder function to build the toolCustomization value + * @return Builder + */ + + public McpServerRemoveToolCustomizationActionBuilder withToolCustomization( + Function builder) { + this.toolCustomization = builder + .apply(com.commercetools.api.models.mcp_server.RemoveToolCustomizationTargetBuilder.of()); + return this; + } + + /** + *

Identifies the tool customization to remove by its tool name.

+ * @param toolCustomization value to be set + * @return Builder + */ + + public McpServerRemoveToolCustomizationActionBuilder toolCustomization( + final com.commercetools.api.models.mcp_server.RemoveToolCustomizationTarget toolCustomization) { + this.toolCustomization = toolCustomization; + return this; + } + + /** + *

Identifies the tool customization to remove by its tool name.

+ * @return toolCustomization + */ + + public com.commercetools.api.models.mcp_server.RemoveToolCustomizationTarget getToolCustomization() { + return this.toolCustomization; + } + + /** + * builds McpServerRemoveToolCustomizationAction with checking for non-null required values + * @return McpServerRemoveToolCustomizationAction + */ + public McpServerRemoveToolCustomizationAction build() { + Objects.requireNonNull(toolCustomization, + McpServerRemoveToolCustomizationAction.class + ": toolCustomization is missing"); + return new McpServerRemoveToolCustomizationActionImpl(toolCustomization); + } + + /** + * builds McpServerRemoveToolCustomizationAction without checking for non-null required values + * @return McpServerRemoveToolCustomizationAction + */ + public McpServerRemoveToolCustomizationAction buildUnchecked() { + return new McpServerRemoveToolCustomizationActionImpl(toolCustomization); + } + + /** + * factory method for an instance of McpServerRemoveToolCustomizationActionBuilder + * @return builder + */ + public static McpServerRemoveToolCustomizationActionBuilder of() { + return new McpServerRemoveToolCustomizationActionBuilder(); + } + + /** + * create builder for McpServerRemoveToolCustomizationAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerRemoveToolCustomizationActionBuilder of( + final McpServerRemoveToolCustomizationAction template) { + McpServerRemoveToolCustomizationActionBuilder builder = new McpServerRemoveToolCustomizationActionBuilder(); + builder.toolCustomization = template.getToolCustomization(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolCustomizationActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolCustomizationActionImpl.java new file mode 100644 index 00000000000..5617903a118 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolCustomizationActionImpl.java @@ -0,0 +1,101 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Removes the tool customization matching the given tool name. Has no effect if no customization exists for that tool.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerRemoveToolCustomizationActionImpl implements McpServerRemoveToolCustomizationAction, ModelBase { + + private String action; + + private com.commercetools.api.models.mcp_server.RemoveToolCustomizationTarget toolCustomization; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerRemoveToolCustomizationActionImpl( + @JsonProperty("toolCustomization") final com.commercetools.api.models.mcp_server.RemoveToolCustomizationTarget toolCustomization) { + this.toolCustomization = toolCustomization; + this.action = REMOVE_TOOL_CUSTOMIZATION; + } + + /** + * create empty instance + */ + public McpServerRemoveToolCustomizationActionImpl() { + this.action = REMOVE_TOOL_CUSTOMIZATION; + } + + /** + *

Identifies the update action to perform, such as addTool, removeTool, or setTools.

+ */ + + public String getAction() { + return this.action; + } + + /** + *

Identifies the tool customization to remove by its tool name.

+ */ + + public com.commercetools.api.models.mcp_server.RemoveToolCustomizationTarget getToolCustomization() { + return this.toolCustomization; + } + + public void setToolCustomization( + final com.commercetools.api.models.mcp_server.RemoveToolCustomizationTarget toolCustomization) { + this.toolCustomization = toolCustomization; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + McpServerRemoveToolCustomizationActionImpl that = (McpServerRemoveToolCustomizationActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(toolCustomization, that.toolCustomization) + .append(action, that.action) + .append(toolCustomization, that.toolCustomization) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(toolCustomization).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("toolCustomization", toolCustomization) + .build(); + } + + @Override + public McpServerRemoveToolCustomizationAction copyDeep() { + return McpServerRemoveToolCustomizationAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetDescriptionAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetDescriptionAction.java new file mode 100644 index 00000000000..56b9243ac11 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetDescriptionAction.java @@ -0,0 +1,131 @@ + +package com.commercetools.api.models.mcp_server; + +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 io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import tools.jackson.databind.annotation.*; + +/** + *

Sets the localized description of the MCP Server.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerSetDescriptionAction mcpServerSetDescriptionAction = McpServerSetDescriptionAction.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 = McpServerSetDescriptionActionImpl.class) +public interface McpServerSetDescriptionAction extends McpServerUpdateAction { + + /** + * discriminator value for McpServerSetDescriptionAction + */ + String SET_DESCRIPTION = "setDescription"; + + /** + *

Value to set. If empty or absent, the existing description is removed.

+ * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

Value to set. If empty or absent, the existing description is removed.

+ * @param description value to be set + */ + + public void setDescription(final LocalizedString description); + + /** + * factory method + * @return instance of McpServerSetDescriptionAction + */ + public static McpServerSetDescriptionAction of() { + return new McpServerSetDescriptionActionImpl(); + } + + /** + * factory method to create a shallow copy McpServerSetDescriptionAction + * @param template instance to be copied + * @return copy instance + */ + public static McpServerSetDescriptionAction of(final McpServerSetDescriptionAction template) { + McpServerSetDescriptionActionImpl instance = new McpServerSetDescriptionActionImpl(); + instance.setDescription(template.getDescription()); + return instance; + } + + public McpServerSetDescriptionAction copyDeep(); + + /** + * factory method to create a deep copy of McpServerSetDescriptionAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerSetDescriptionAction deepCopy(@Nullable final McpServerSetDescriptionAction template) { + if (template == null) { + return null; + } + McpServerSetDescriptionActionImpl instance = new McpServerSetDescriptionActionImpl(); + instance.setDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getDescription())); + return instance; + } + + /** + * builder factory method for McpServerSetDescriptionAction + * @return builder + */ + public static McpServerSetDescriptionActionBuilder builder() { + return McpServerSetDescriptionActionBuilder.of(); + } + + /** + * create builder for McpServerSetDescriptionAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerSetDescriptionActionBuilder builder(final McpServerSetDescriptionAction template) { + return McpServerSetDescriptionActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerSetDescriptionAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerSetDescriptionActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetDescriptionActionBuilder.java new file mode 100644 index 00000000000..2b08069a077 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetDescriptionActionBuilder.java @@ -0,0 +1,110 @@ + +package com.commercetools.api.models.mcp_server; + +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; + +/** + * McpServerSetDescriptionActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerSetDescriptionAction mcpServerSetDescriptionAction = McpServerSetDescriptionAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerSetDescriptionActionBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.common.LocalizedString description; + + /** + *

Value to set. If empty or absent, the existing description is removed.

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

Value to set. If empty or absent, the existing description is removed.

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

Value to set. If empty or absent, the existing description is removed.

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

Value to set. If empty or absent, the existing description is removed.

+ * @return description + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + * builds McpServerSetDescriptionAction with checking for non-null required values + * @return McpServerSetDescriptionAction + */ + public McpServerSetDescriptionAction build() { + return new McpServerSetDescriptionActionImpl(description); + } + + /** + * builds McpServerSetDescriptionAction without checking for non-null required values + * @return McpServerSetDescriptionAction + */ + public McpServerSetDescriptionAction buildUnchecked() { + return new McpServerSetDescriptionActionImpl(description); + } + + /** + * factory method for an instance of McpServerSetDescriptionActionBuilder + * @return builder + */ + public static McpServerSetDescriptionActionBuilder of() { + return new McpServerSetDescriptionActionBuilder(); + } + + /** + * create builder for McpServerSetDescriptionAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerSetDescriptionActionBuilder of(final McpServerSetDescriptionAction template) { + McpServerSetDescriptionActionBuilder builder = new McpServerSetDescriptionActionBuilder(); + builder.description = template.getDescription(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetDescriptionActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetDescriptionActionImpl.java new file mode 100644 index 00000000000..25c08a210e9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetDescriptionActionImpl.java @@ -0,0 +1,100 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Sets the localized description of the MCP Server.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerSetDescriptionActionImpl implements McpServerSetDescriptionAction, ModelBase { + + private String action; + + private com.commercetools.api.models.common.LocalizedString description; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerSetDescriptionActionImpl( + @JsonProperty("description") final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + this.action = SET_DESCRIPTION; + } + + /** + * create empty instance + */ + public McpServerSetDescriptionActionImpl() { + this.action = SET_DESCRIPTION; + } + + /** + *

Identifies the update action to perform, such as addTool, removeTool, or setTools.

+ */ + + public String getAction() { + return this.action; + } + + /** + *

Value to set. If empty or absent, the existing description is 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; + + McpServerSetDescriptionActionImpl that = (McpServerSetDescriptionActionImpl) 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 McpServerSetDescriptionAction copyDeep() { + return McpServerSetDescriptionAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetJsonOutputFilteringAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetJsonOutputFilteringAction.java new file mode 100644 index 00000000000..4a14b50132a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetJsonOutputFilteringAction.java @@ -0,0 +1,132 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import tools.jackson.databind.annotation.*; + +/** + *

Sets the response field-filtering rules applied to tool responses.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerSetJsonOutputFilteringAction mcpServerSetJsonOutputFilteringAction = McpServerSetJsonOutputFilteringAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("setJsonOutputFiltering") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = McpServerSetJsonOutputFilteringActionImpl.class) +public interface McpServerSetJsonOutputFilteringAction extends McpServerUpdateAction { + + /** + * discriminator value for McpServerSetJsonOutputFilteringAction + */ + String SET_JSON_OUTPUT_FILTERING = "setJsonOutputFiltering"; + + /** + *

Value to set. The existing configuration is entirely replaced with this value. If absent, the existing filtering configuration is removed.

+ * @return jsonOutputFiltering + */ + @Valid + @JsonProperty("jsonOutputFiltering") + public McpServerJsonOutputFiltering getJsonOutputFiltering(); + + /** + *

Value to set. The existing configuration is entirely replaced with this value. If absent, the existing filtering configuration is removed.

+ * @param jsonOutputFiltering value to be set + */ + + public void setJsonOutputFiltering(final McpServerJsonOutputFiltering jsonOutputFiltering); + + /** + * factory method + * @return instance of McpServerSetJsonOutputFilteringAction + */ + public static McpServerSetJsonOutputFilteringAction of() { + return new McpServerSetJsonOutputFilteringActionImpl(); + } + + /** + * factory method to create a shallow copy McpServerSetJsonOutputFilteringAction + * @param template instance to be copied + * @return copy instance + */ + public static McpServerSetJsonOutputFilteringAction of(final McpServerSetJsonOutputFilteringAction template) { + McpServerSetJsonOutputFilteringActionImpl instance = new McpServerSetJsonOutputFilteringActionImpl(); + instance.setJsonOutputFiltering(template.getJsonOutputFiltering()); + return instance; + } + + public McpServerSetJsonOutputFilteringAction copyDeep(); + + /** + * factory method to create a deep copy of McpServerSetJsonOutputFilteringAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerSetJsonOutputFilteringAction deepCopy( + @Nullable final McpServerSetJsonOutputFilteringAction template) { + if (template == null) { + return null; + } + McpServerSetJsonOutputFilteringActionImpl instance = new McpServerSetJsonOutputFilteringActionImpl(); + instance.setJsonOutputFiltering(com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering + .deepCopy(template.getJsonOutputFiltering())); + return instance; + } + + /** + * builder factory method for McpServerSetJsonOutputFilteringAction + * @return builder + */ + public static McpServerSetJsonOutputFilteringActionBuilder builder() { + return McpServerSetJsonOutputFilteringActionBuilder.of(); + } + + /** + * create builder for McpServerSetJsonOutputFilteringAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerSetJsonOutputFilteringActionBuilder builder( + final McpServerSetJsonOutputFilteringAction template) { + return McpServerSetJsonOutputFilteringActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerSetJsonOutputFilteringAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerSetJsonOutputFilteringActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetJsonOutputFilteringActionBuilder.java new file mode 100644 index 00000000000..6f53055f78d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetJsonOutputFilteringActionBuilder.java @@ -0,0 +1,114 @@ + +package com.commercetools.api.models.mcp_server; + +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; + +/** + * McpServerSetJsonOutputFilteringActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerSetJsonOutputFilteringAction mcpServerSetJsonOutputFilteringAction = McpServerSetJsonOutputFilteringAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerSetJsonOutputFilteringActionBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering jsonOutputFiltering; + + /** + *

Value to set. The existing configuration is entirely replaced with this value. If absent, the existing filtering configuration is removed.

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

Value to set. The existing configuration is entirely replaced with this value. If absent, the existing filtering configuration is removed.

+ * @param builder function to build the jsonOutputFiltering value + * @return Builder + */ + + public McpServerSetJsonOutputFilteringActionBuilder withJsonOutputFiltering( + Function builder) { + this.jsonOutputFiltering = builder + .apply(com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringBuilder.of()); + return this; + } + + /** + *

Value to set. The existing configuration is entirely replaced with this value. If absent, the existing filtering configuration is removed.

+ * @param jsonOutputFiltering value to be set + * @return Builder + */ + + public McpServerSetJsonOutputFilteringActionBuilder jsonOutputFiltering( + @Nullable final com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering jsonOutputFiltering) { + this.jsonOutputFiltering = jsonOutputFiltering; + return this; + } + + /** + *

Value to set. The existing configuration is entirely replaced with this value. If absent, the existing filtering configuration is removed.

+ * @return jsonOutputFiltering + */ + + @Nullable + public com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering getJsonOutputFiltering() { + return this.jsonOutputFiltering; + } + + /** + * builds McpServerSetJsonOutputFilteringAction with checking for non-null required values + * @return McpServerSetJsonOutputFilteringAction + */ + public McpServerSetJsonOutputFilteringAction build() { + return new McpServerSetJsonOutputFilteringActionImpl(jsonOutputFiltering); + } + + /** + * builds McpServerSetJsonOutputFilteringAction without checking for non-null required values + * @return McpServerSetJsonOutputFilteringAction + */ + public McpServerSetJsonOutputFilteringAction buildUnchecked() { + return new McpServerSetJsonOutputFilteringActionImpl(jsonOutputFiltering); + } + + /** + * factory method for an instance of McpServerSetJsonOutputFilteringActionBuilder + * @return builder + */ + public static McpServerSetJsonOutputFilteringActionBuilder of() { + return new McpServerSetJsonOutputFilteringActionBuilder(); + } + + /** + * create builder for McpServerSetJsonOutputFilteringAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerSetJsonOutputFilteringActionBuilder of( + final McpServerSetJsonOutputFilteringAction template) { + McpServerSetJsonOutputFilteringActionBuilder builder = new McpServerSetJsonOutputFilteringActionBuilder(); + builder.jsonOutputFiltering = template.getJsonOutputFiltering(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetJsonOutputFilteringActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetJsonOutputFilteringActionImpl.java new file mode 100644 index 00000000000..3160b042a84 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetJsonOutputFilteringActionImpl.java @@ -0,0 +1,101 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Sets the response field-filtering rules applied to tool responses.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerSetJsonOutputFilteringActionImpl implements McpServerSetJsonOutputFilteringAction, ModelBase { + + private String action; + + private com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering jsonOutputFiltering; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerSetJsonOutputFilteringActionImpl( + @JsonProperty("jsonOutputFiltering") final com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering jsonOutputFiltering) { + this.jsonOutputFiltering = jsonOutputFiltering; + this.action = SET_JSON_OUTPUT_FILTERING; + } + + /** + * create empty instance + */ + public McpServerSetJsonOutputFilteringActionImpl() { + this.action = SET_JSON_OUTPUT_FILTERING; + } + + /** + *

Identifies the update action to perform, such as addTool, removeTool, or setTools.

+ */ + + public String getAction() { + return this.action; + } + + /** + *

Value to set. The existing configuration is entirely replaced with this value. If absent, the existing filtering configuration is removed.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering getJsonOutputFiltering() { + return this.jsonOutputFiltering; + } + + public void setJsonOutputFiltering( + final com.commercetools.api.models.mcp_server.McpServerJsonOutputFiltering jsonOutputFiltering) { + this.jsonOutputFiltering = jsonOutputFiltering; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + McpServerSetJsonOutputFilteringActionImpl that = (McpServerSetJsonOutputFilteringActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(jsonOutputFiltering, that.jsonOutputFiltering) + .append(action, that.action) + .append(jsonOutputFiltering, that.jsonOutputFiltering) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(jsonOutputFiltering).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("jsonOutputFiltering", jsonOutputFiltering) + .build(); + } + + @Override + public McpServerSetJsonOutputFilteringAction copyDeep() { + return McpServerSetJsonOutputFilteringAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetNameAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetNameAction.java new file mode 100644 index 00000000000..2dedaa1e2a2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetNameAction.java @@ -0,0 +1,130 @@ + +package com.commercetools.api.models.mcp_server; + +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 io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import tools.jackson.databind.annotation.*; + +/** + *

Sets the localized name of the MCP Server.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerSetNameAction mcpServerSetNameAction = McpServerSetNameAction.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 = McpServerSetNameActionImpl.class) +public interface McpServerSetNameAction extends McpServerUpdateAction { + + /** + * discriminator value for McpServerSetNameAction + */ + String SET_NAME = "setName"; + + /** + *

Value to set. If empty or absent, the existing name is removed.

+ * @return name + */ + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

Value to set. If empty or absent, the existing name is removed.

+ * @param name value to be set + */ + + public void setName(final LocalizedString name); + + /** + * factory method + * @return instance of McpServerSetNameAction + */ + public static McpServerSetNameAction of() { + return new McpServerSetNameActionImpl(); + } + + /** + * factory method to create a shallow copy McpServerSetNameAction + * @param template instance to be copied + * @return copy instance + */ + public static McpServerSetNameAction of(final McpServerSetNameAction template) { + McpServerSetNameActionImpl instance = new McpServerSetNameActionImpl(); + instance.setName(template.getName()); + return instance; + } + + public McpServerSetNameAction copyDeep(); + + /** + * factory method to create a deep copy of McpServerSetNameAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerSetNameAction deepCopy(@Nullable final McpServerSetNameAction template) { + if (template == null) { + return null; + } + McpServerSetNameActionImpl instance = new McpServerSetNameActionImpl(); + instance.setName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getName())); + return instance; + } + + /** + * builder factory method for McpServerSetNameAction + * @return builder + */ + public static McpServerSetNameActionBuilder builder() { + return McpServerSetNameActionBuilder.of(); + } + + /** + * create builder for McpServerSetNameAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerSetNameActionBuilder builder(final McpServerSetNameAction template) { + return McpServerSetNameActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerSetNameAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerSetNameActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetNameActionBuilder.java new file mode 100644 index 00000000000..3f6b46e2390 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetNameActionBuilder.java @@ -0,0 +1,110 @@ + +package com.commercetools.api.models.mcp_server; + +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; + +/** + * McpServerSetNameActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerSetNameAction mcpServerSetNameAction = McpServerSetNameAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerSetNameActionBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.common.LocalizedString name; + + /** + *

Value to set. If empty or absent, the existing name is removed.

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

Value to set. If empty or absent, the existing name is removed.

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

Value to set. If empty or absent, the existing name is removed.

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

Value to set. If empty or absent, the existing name is removed.

+ * @return name + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getName() { + return this.name; + } + + /** + * builds McpServerSetNameAction with checking for non-null required values + * @return McpServerSetNameAction + */ + public McpServerSetNameAction build() { + return new McpServerSetNameActionImpl(name); + } + + /** + * builds McpServerSetNameAction without checking for non-null required values + * @return McpServerSetNameAction + */ + public McpServerSetNameAction buildUnchecked() { + return new McpServerSetNameActionImpl(name); + } + + /** + * factory method for an instance of McpServerSetNameActionBuilder + * @return builder + */ + public static McpServerSetNameActionBuilder of() { + return new McpServerSetNameActionBuilder(); + } + + /** + * create builder for McpServerSetNameAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerSetNameActionBuilder of(final McpServerSetNameAction template) { + McpServerSetNameActionBuilder builder = new McpServerSetNameActionBuilder(); + builder.name = template.getName(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetNameActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetNameActionImpl.java new file mode 100644 index 00000000000..d3ac7abff89 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetNameActionImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Sets the localized name of the MCP Server.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerSetNameActionImpl implements McpServerSetNameAction, ModelBase { + + private String action; + + private com.commercetools.api.models.common.LocalizedString name; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerSetNameActionImpl(@JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + this.action = SET_NAME; + } + + /** + * create empty instance + */ + public McpServerSetNameActionImpl() { + this.action = SET_NAME; + } + + /** + *

Identifies the update action to perform, such as addTool, removeTool, or setTools.

+ */ + + public String getAction() { + return this.action; + } + + /** + *

Value to set. If empty or absent, the existing name is 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; + + McpServerSetNameActionImpl that = (McpServerSetNameActionImpl) 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 McpServerSetNameAction copyDeep() { + return McpServerSetNameAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetStateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetStateAction.java new file mode 100644 index 00000000000..208bef5f6a3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetStateAction.java @@ -0,0 +1,130 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Sets the state of the MCP Server. A Disabled MCP Server rejects all AI agent tool requests.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerSetStateAction mcpServerSetStateAction = McpServerSetStateAction.builder()
+ *             .state(McpServerState.ENABLED)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("setState") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = McpServerSetStateActionImpl.class) +public interface McpServerSetStateAction extends McpServerUpdateAction { + + /** + * discriminator value for McpServerSetStateAction + */ + String SET_STATE = "setState"; + + /** + *

New state to set.

+ * @return state + */ + @NotNull + @JsonProperty("state") + public McpServerState getState(); + + /** + *

New state to set.

+ * @param state value to be set + */ + + public void setState(final McpServerState state); + + /** + * factory method + * @return instance of McpServerSetStateAction + */ + public static McpServerSetStateAction of() { + return new McpServerSetStateActionImpl(); + } + + /** + * factory method to create a shallow copy McpServerSetStateAction + * @param template instance to be copied + * @return copy instance + */ + public static McpServerSetStateAction of(final McpServerSetStateAction template) { + McpServerSetStateActionImpl instance = new McpServerSetStateActionImpl(); + instance.setState(template.getState()); + return instance; + } + + public McpServerSetStateAction copyDeep(); + + /** + * factory method to create a deep copy of McpServerSetStateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerSetStateAction deepCopy(@Nullable final McpServerSetStateAction template) { + if (template == null) { + return null; + } + McpServerSetStateActionImpl instance = new McpServerSetStateActionImpl(); + instance.setState(template.getState()); + return instance; + } + + /** + * builder factory method for McpServerSetStateAction + * @return builder + */ + public static McpServerSetStateActionBuilder builder() { + return McpServerSetStateActionBuilder.of(); + } + + /** + * create builder for McpServerSetStateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerSetStateActionBuilder builder(final McpServerSetStateAction template) { + return McpServerSetStateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerSetStateAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerSetStateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetStateActionBuilder.java new file mode 100644 index 00000000000..8e88bf17086 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetStateActionBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * McpServerSetStateActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerSetStateAction mcpServerSetStateAction = McpServerSetStateAction.builder()
+ *             .state(McpServerState.ENABLED)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerSetStateActionBuilder implements Builder { + + private com.commercetools.api.models.mcp_server.McpServerState state; + + /** + *

New state to set.

+ * @param state value to be set + * @return Builder + */ + + public McpServerSetStateActionBuilder state(final com.commercetools.api.models.mcp_server.McpServerState state) { + this.state = state; + return this; + } + + /** + *

New state to set.

+ * @return state + */ + + public com.commercetools.api.models.mcp_server.McpServerState getState() { + return this.state; + } + + /** + * builds McpServerSetStateAction with checking for non-null required values + * @return McpServerSetStateAction + */ + public McpServerSetStateAction build() { + Objects.requireNonNull(state, McpServerSetStateAction.class + ": state is missing"); + return new McpServerSetStateActionImpl(state); + } + + /** + * builds McpServerSetStateAction without checking for non-null required values + * @return McpServerSetStateAction + */ + public McpServerSetStateAction buildUnchecked() { + return new McpServerSetStateActionImpl(state); + } + + /** + * factory method for an instance of McpServerSetStateActionBuilder + * @return builder + */ + public static McpServerSetStateActionBuilder of() { + return new McpServerSetStateActionBuilder(); + } + + /** + * create builder for McpServerSetStateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerSetStateActionBuilder of(final McpServerSetStateAction template) { + McpServerSetStateActionBuilder builder = new McpServerSetStateActionBuilder(); + builder.state = template.getState(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetStateActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetStateActionImpl.java new file mode 100644 index 00000000000..e23526df2e1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetStateActionImpl.java @@ -0,0 +1,100 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Sets the state of the MCP Server. A Disabled MCP Server rejects all AI agent tool requests.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerSetStateActionImpl implements McpServerSetStateAction, ModelBase { + + private String action; + + private com.commercetools.api.models.mcp_server.McpServerState state; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerSetStateActionImpl( + @JsonProperty("state") final com.commercetools.api.models.mcp_server.McpServerState state) { + this.state = state; + this.action = SET_STATE; + } + + /** + * create empty instance + */ + public McpServerSetStateActionImpl() { + this.action = SET_STATE; + } + + /** + *

Identifies the update action to perform, such as addTool, removeTool, or setTools.

+ */ + + public String getAction() { + return this.action; + } + + /** + *

New state to set.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerState getState() { + return this.state; + } + + public void setState(final com.commercetools.api.models.mcp_server.McpServerState state) { + this.state = state; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + McpServerSetStateActionImpl that = (McpServerSetStateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(state, that.state) + .append(action, that.action) + .append(state, that.state) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(state).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("state", state) + .build(); + } + + @Override + public McpServerSetStateAction copyDeep() { + return McpServerSetStateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolCustomizationsAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolCustomizationsAction.java new file mode 100644 index 00000000000..298222b6e05 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolCustomizationsAction.java @@ -0,0 +1,147 @@ + +package com.commercetools.api.models.mcp_server; + +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 io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Replaces the entire list of tool customizations on the MCP Server.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerSetToolCustomizationsAction mcpServerSetToolCustomizationsAction = McpServerSetToolCustomizationsAction.builder()
+ *             .plusToolCustomizations(toolCustomizationsBuilder -> toolCustomizationsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("setToolCustomizations") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = McpServerSetToolCustomizationsActionImpl.class) +public interface McpServerSetToolCustomizationsAction extends McpServerUpdateAction { + + /** + * discriminator value for McpServerSetToolCustomizationsAction + */ + String SET_TOOL_CUSTOMIZATIONS = "setToolCustomizations"; + + /** + *

New list of tool customizations. Replaces the existing list entirely.

+ * @return toolCustomizations + */ + @NotNull + @Valid + @JsonProperty("toolCustomizations") + public List getToolCustomizations(); + + /** + *

New list of tool customizations. Replaces the existing list entirely.

+ * @param toolCustomizations values to be set + */ + + @JsonIgnore + public void setToolCustomizations(final ToolCustomization... toolCustomizations); + + /** + *

New list of tool customizations. Replaces the existing list entirely.

+ * @param toolCustomizations values to be set + */ + + public void setToolCustomizations(final List toolCustomizations); + + /** + * factory method + * @return instance of McpServerSetToolCustomizationsAction + */ + public static McpServerSetToolCustomizationsAction of() { + return new McpServerSetToolCustomizationsActionImpl(); + } + + /** + * factory method to create a shallow copy McpServerSetToolCustomizationsAction + * @param template instance to be copied + * @return copy instance + */ + public static McpServerSetToolCustomizationsAction of(final McpServerSetToolCustomizationsAction template) { + McpServerSetToolCustomizationsActionImpl instance = new McpServerSetToolCustomizationsActionImpl(); + instance.setToolCustomizations(template.getToolCustomizations()); + return instance; + } + + public McpServerSetToolCustomizationsAction copyDeep(); + + /** + * factory method to create a deep copy of McpServerSetToolCustomizationsAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerSetToolCustomizationsAction deepCopy( + @Nullable final McpServerSetToolCustomizationsAction template) { + if (template == null) { + return null; + } + McpServerSetToolCustomizationsActionImpl instance = new McpServerSetToolCustomizationsActionImpl(); + instance.setToolCustomizations(Optional.ofNullable(template.getToolCustomizations()) + .map(t -> t.stream() + .map(com.commercetools.api.models.mcp_server.ToolCustomization::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for McpServerSetToolCustomizationsAction + * @return builder + */ + public static McpServerSetToolCustomizationsActionBuilder builder() { + return McpServerSetToolCustomizationsActionBuilder.of(); + } + + /** + * create builder for McpServerSetToolCustomizationsAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerSetToolCustomizationsActionBuilder builder( + final McpServerSetToolCustomizationsAction template) { + return McpServerSetToolCustomizationsActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerSetToolCustomizationsAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerSetToolCustomizationsActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolCustomizationsActionBuilder.java new file mode 100644 index 00000000000..8869a383546 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolCustomizationsActionBuilder.java @@ -0,0 +1,165 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * McpServerSetToolCustomizationsActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerSetToolCustomizationsAction mcpServerSetToolCustomizationsAction = McpServerSetToolCustomizationsAction.builder()
+ *             .plusToolCustomizations(toolCustomizationsBuilder -> toolCustomizationsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerSetToolCustomizationsActionBuilder implements Builder { + + private java.util.List toolCustomizations; + + /** + *

New list of tool customizations. Replaces the existing list entirely.

+ * @param toolCustomizations value to be set + * @return Builder + */ + + public McpServerSetToolCustomizationsActionBuilder toolCustomizations( + final com.commercetools.api.models.mcp_server.ToolCustomization... toolCustomizations) { + this.toolCustomizations = new ArrayList<>(Arrays.asList(toolCustomizations)); + return this; + } + + /** + *

New list of tool customizations. Replaces the existing list entirely.

+ * @param toolCustomizations value to be set + * @return Builder + */ + + public McpServerSetToolCustomizationsActionBuilder toolCustomizations( + final java.util.List toolCustomizations) { + this.toolCustomizations = toolCustomizations; + return this; + } + + /** + *

New list of tool customizations. Replaces the existing list entirely.

+ * @param toolCustomizations value to be set + * @return Builder + */ + + public McpServerSetToolCustomizationsActionBuilder plusToolCustomizations( + final com.commercetools.api.models.mcp_server.ToolCustomization... toolCustomizations) { + if (this.toolCustomizations == null) { + this.toolCustomizations = new ArrayList<>(); + } + this.toolCustomizations.addAll(Arrays.asList(toolCustomizations)); + return this; + } + + /** + *

New list of tool customizations. Replaces the existing list entirely.

+ * @param builder function to build the toolCustomizations value + * @return Builder + */ + + public McpServerSetToolCustomizationsActionBuilder plusToolCustomizations( + Function builder) { + if (this.toolCustomizations == null) { + this.toolCustomizations = new ArrayList<>(); + } + this.toolCustomizations + .add(builder.apply(com.commercetools.api.models.mcp_server.ToolCustomizationBuilder.of()).build()); + return this; + } + + /** + *

New list of tool customizations. Replaces the existing list entirely.

+ * @param builder function to build the toolCustomizations value + * @return Builder + */ + + public McpServerSetToolCustomizationsActionBuilder withToolCustomizations( + Function builder) { + this.toolCustomizations = new ArrayList<>(); + this.toolCustomizations + .add(builder.apply(com.commercetools.api.models.mcp_server.ToolCustomizationBuilder.of()).build()); + return this; + } + + /** + *

New list of tool customizations. Replaces the existing list entirely.

+ * @param builder function to build the toolCustomizations value + * @return Builder + */ + + public McpServerSetToolCustomizationsActionBuilder addToolCustomizations( + Function builder) { + return plusToolCustomizations( + builder.apply(com.commercetools.api.models.mcp_server.ToolCustomizationBuilder.of())); + } + + /** + *

New list of tool customizations. Replaces the existing list entirely.

+ * @param builder function to build the toolCustomizations value + * @return Builder + */ + + public McpServerSetToolCustomizationsActionBuilder setToolCustomizations( + Function builder) { + return toolCustomizations(builder.apply(com.commercetools.api.models.mcp_server.ToolCustomizationBuilder.of())); + } + + /** + *

New list of tool customizations. Replaces the existing list entirely.

+ * @return toolCustomizations + */ + + public java.util.List getToolCustomizations() { + return this.toolCustomizations; + } + + /** + * builds McpServerSetToolCustomizationsAction with checking for non-null required values + * @return McpServerSetToolCustomizationsAction + */ + public McpServerSetToolCustomizationsAction build() { + Objects.requireNonNull(toolCustomizations, + McpServerSetToolCustomizationsAction.class + ": toolCustomizations is missing"); + return new McpServerSetToolCustomizationsActionImpl(toolCustomizations); + } + + /** + * builds McpServerSetToolCustomizationsAction without checking for non-null required values + * @return McpServerSetToolCustomizationsAction + */ + public McpServerSetToolCustomizationsAction buildUnchecked() { + return new McpServerSetToolCustomizationsActionImpl(toolCustomizations); + } + + /** + * factory method for an instance of McpServerSetToolCustomizationsActionBuilder + * @return builder + */ + public static McpServerSetToolCustomizationsActionBuilder of() { + return new McpServerSetToolCustomizationsActionBuilder(); + } + + /** + * create builder for McpServerSetToolCustomizationsAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerSetToolCustomizationsActionBuilder of(final McpServerSetToolCustomizationsAction template) { + McpServerSetToolCustomizationsActionBuilder builder = new McpServerSetToolCustomizationsActionBuilder(); + builder.toolCustomizations = template.getToolCustomizations(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolCustomizationsActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolCustomizationsActionImpl.java new file mode 100644 index 00000000000..cb05be8c522 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolCustomizationsActionImpl.java @@ -0,0 +1,106 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Replaces the entire list of tool customizations on the MCP Server.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerSetToolCustomizationsActionImpl implements McpServerSetToolCustomizationsAction, ModelBase { + + private String action; + + private java.util.List toolCustomizations; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerSetToolCustomizationsActionImpl( + @JsonProperty("toolCustomizations") final java.util.List toolCustomizations) { + this.toolCustomizations = toolCustomizations; + this.action = SET_TOOL_CUSTOMIZATIONS; + } + + /** + * create empty instance + */ + public McpServerSetToolCustomizationsActionImpl() { + this.action = SET_TOOL_CUSTOMIZATIONS; + } + + /** + *

Identifies the update action to perform, such as addTool, removeTool, or setTools.

+ */ + + public String getAction() { + return this.action; + } + + /** + *

New list of tool customizations. Replaces the existing list entirely.

+ */ + + public java.util.List getToolCustomizations() { + return this.toolCustomizations; + } + + public void setToolCustomizations( + final com.commercetools.api.models.mcp_server.ToolCustomization... toolCustomizations) { + this.toolCustomizations = new ArrayList<>(Arrays.asList(toolCustomizations)); + } + + public void setToolCustomizations( + final java.util.List toolCustomizations) { + this.toolCustomizations = toolCustomizations; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + McpServerSetToolCustomizationsActionImpl that = (McpServerSetToolCustomizationsActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(toolCustomizations, that.toolCustomizations) + .append(action, that.action) + .append(toolCustomizations, that.toolCustomizations) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(toolCustomizations).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("toolCustomizations", toolCustomizations) + .build(); + } + + @Override + public McpServerSetToolCustomizationsAction copyDeep() { + return McpServerSetToolCustomizationsAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolOutputFormattingAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolOutputFormattingAction.java new file mode 100644 index 00000000000..d5e392bd0e6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolOutputFormattingAction.java @@ -0,0 +1,131 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import tools.jackson.databind.annotation.*; + +/** + *

Sets the output formatting applied to tool responses.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerSetToolOutputFormattingAction mcpServerSetToolOutputFormattingAction = McpServerSetToolOutputFormattingAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("setToolOutputFormatting") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = McpServerSetToolOutputFormattingActionImpl.class) +public interface McpServerSetToolOutputFormattingAction extends McpServerUpdateAction { + + /** + * discriminator value for McpServerSetToolOutputFormattingAction + */ + String SET_TOOL_OUTPUT_FORMATTING = "setToolOutputFormatting"; + + /** + *

Value to set. If absent, the existing formatting is removed.

+ * @return toolOutputFormatting + */ + + @JsonProperty("toolOutputFormatting") + public McpServerToolOutputFormatting getToolOutputFormatting(); + + /** + *

Value to set. If absent, the existing formatting is removed.

+ * @param toolOutputFormatting value to be set + */ + + public void setToolOutputFormatting(final McpServerToolOutputFormatting toolOutputFormatting); + + /** + * factory method + * @return instance of McpServerSetToolOutputFormattingAction + */ + public static McpServerSetToolOutputFormattingAction of() { + return new McpServerSetToolOutputFormattingActionImpl(); + } + + /** + * factory method to create a shallow copy McpServerSetToolOutputFormattingAction + * @param template instance to be copied + * @return copy instance + */ + public static McpServerSetToolOutputFormattingAction of(final McpServerSetToolOutputFormattingAction template) { + McpServerSetToolOutputFormattingActionImpl instance = new McpServerSetToolOutputFormattingActionImpl(); + instance.setToolOutputFormatting(template.getToolOutputFormatting()); + return instance; + } + + public McpServerSetToolOutputFormattingAction copyDeep(); + + /** + * factory method to create a deep copy of McpServerSetToolOutputFormattingAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerSetToolOutputFormattingAction deepCopy( + @Nullable final McpServerSetToolOutputFormattingAction template) { + if (template == null) { + return null; + } + McpServerSetToolOutputFormattingActionImpl instance = new McpServerSetToolOutputFormattingActionImpl(); + instance.setToolOutputFormatting(template.getToolOutputFormatting()); + return instance; + } + + /** + * builder factory method for McpServerSetToolOutputFormattingAction + * @return builder + */ + public static McpServerSetToolOutputFormattingActionBuilder builder() { + return McpServerSetToolOutputFormattingActionBuilder.of(); + } + + /** + * create builder for McpServerSetToolOutputFormattingAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerSetToolOutputFormattingActionBuilder builder( + final McpServerSetToolOutputFormattingAction template) { + return McpServerSetToolOutputFormattingActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerSetToolOutputFormattingAction( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerSetToolOutputFormattingActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolOutputFormattingActionBuilder.java new file mode 100644 index 00000000000..57fc1590200 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolOutputFormattingActionBuilder.java @@ -0,0 +1,86 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * McpServerSetToolOutputFormattingActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerSetToolOutputFormattingAction mcpServerSetToolOutputFormattingAction = McpServerSetToolOutputFormattingAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerSetToolOutputFormattingActionBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting toolOutputFormatting; + + /** + *

Value to set. If absent, the existing formatting is removed.

+ * @param toolOutputFormatting value to be set + * @return Builder + */ + + public McpServerSetToolOutputFormattingActionBuilder toolOutputFormatting( + @Nullable final com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting toolOutputFormatting) { + this.toolOutputFormatting = toolOutputFormatting; + return this; + } + + /** + *

Value to set. If absent, the existing formatting is removed.

+ * @return toolOutputFormatting + */ + + @Nullable + public com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting getToolOutputFormatting() { + return this.toolOutputFormatting; + } + + /** + * builds McpServerSetToolOutputFormattingAction with checking for non-null required values + * @return McpServerSetToolOutputFormattingAction + */ + public McpServerSetToolOutputFormattingAction build() { + return new McpServerSetToolOutputFormattingActionImpl(toolOutputFormatting); + } + + /** + * builds McpServerSetToolOutputFormattingAction without checking for non-null required values + * @return McpServerSetToolOutputFormattingAction + */ + public McpServerSetToolOutputFormattingAction buildUnchecked() { + return new McpServerSetToolOutputFormattingActionImpl(toolOutputFormatting); + } + + /** + * factory method for an instance of McpServerSetToolOutputFormattingActionBuilder + * @return builder + */ + public static McpServerSetToolOutputFormattingActionBuilder of() { + return new McpServerSetToolOutputFormattingActionBuilder(); + } + + /** + * create builder for McpServerSetToolOutputFormattingAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerSetToolOutputFormattingActionBuilder of( + final McpServerSetToolOutputFormattingAction template) { + McpServerSetToolOutputFormattingActionBuilder builder = new McpServerSetToolOutputFormattingActionBuilder(); + builder.toolOutputFormatting = template.getToolOutputFormatting(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolOutputFormattingActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolOutputFormattingActionImpl.java new file mode 100644 index 00000000000..1573a978109 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolOutputFormattingActionImpl.java @@ -0,0 +1,101 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Sets the output formatting applied to tool responses.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerSetToolOutputFormattingActionImpl implements McpServerSetToolOutputFormattingAction, ModelBase { + + private String action; + + private com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting toolOutputFormatting; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerSetToolOutputFormattingActionImpl( + @JsonProperty("toolOutputFormatting") final com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting toolOutputFormatting) { + this.toolOutputFormatting = toolOutputFormatting; + this.action = SET_TOOL_OUTPUT_FORMATTING; + } + + /** + * create empty instance + */ + public McpServerSetToolOutputFormattingActionImpl() { + this.action = SET_TOOL_OUTPUT_FORMATTING; + } + + /** + *

Identifies the update action to perform, such as addTool, removeTool, or setTools.

+ */ + + public String getAction() { + return this.action; + } + + /** + *

Value to set. If absent, the existing formatting is removed.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting getToolOutputFormatting() { + return this.toolOutputFormatting; + } + + public void setToolOutputFormatting( + final com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting toolOutputFormatting) { + this.toolOutputFormatting = toolOutputFormatting; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + McpServerSetToolOutputFormattingActionImpl that = (McpServerSetToolOutputFormattingActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(toolOutputFormatting, that.toolOutputFormatting) + .append(action, that.action) + .append(toolOutputFormatting, that.toolOutputFormatting) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(toolOutputFormatting).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("toolOutputFormatting", toolOutputFormatting) + .build(); + } + + @Override + public McpServerSetToolOutputFormattingAction copyDeep() { + return McpServerSetToolOutputFormattingAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolsAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolsAction.java new file mode 100644 index 00000000000..a80eafe8bd7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolsAction.java @@ -0,0 +1,138 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Replaces the entire list of tools enabled for the MCP Server.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerSetToolsAction mcpServerSetToolsAction = McpServerSetToolsAction.builder()
+ *             .plusTools(toolsBuilder -> toolsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("setTools") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = McpServerSetToolsActionImpl.class) +public interface McpServerSetToolsAction extends McpServerUpdateAction { + + /** + * discriminator value for McpServerSetToolsAction + */ + String SET_TOOLS = "setTools"; + + /** + *

New list of tools to set. Replaces the existing tools list entirely. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders.

+ * @return tools + */ + @NotNull + @JsonProperty("tools") + public List getTools(); + + /** + *

New list of tools to set. Replaces the existing tools list entirely. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders.

+ * @param tools values to be set + */ + + @JsonIgnore + public void setTools(final McpServerTool... tools); + + /** + *

New list of tools to set. Replaces the existing tools list entirely. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders.

+ * @param tools values to be set + */ + + public void setTools(final List tools); + + /** + * factory method + * @return instance of McpServerSetToolsAction + */ + public static McpServerSetToolsAction of() { + return new McpServerSetToolsActionImpl(); + } + + /** + * factory method to create a shallow copy McpServerSetToolsAction + * @param template instance to be copied + * @return copy instance + */ + public static McpServerSetToolsAction of(final McpServerSetToolsAction template) { + McpServerSetToolsActionImpl instance = new McpServerSetToolsActionImpl(); + instance.setTools(template.getTools()); + return instance; + } + + public McpServerSetToolsAction copyDeep(); + + /** + * factory method to create a deep copy of McpServerSetToolsAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerSetToolsAction deepCopy(@Nullable final McpServerSetToolsAction template) { + if (template == null) { + return null; + } + McpServerSetToolsActionImpl instance = new McpServerSetToolsActionImpl(); + instance.setTools(Optional.ofNullable(template.getTools()).map(ArrayList::new).orElse(null)); + return instance; + } + + /** + * builder factory method for McpServerSetToolsAction + * @return builder + */ + public static McpServerSetToolsActionBuilder builder() { + return McpServerSetToolsActionBuilder.of(); + } + + /** + * create builder for McpServerSetToolsAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerSetToolsActionBuilder builder(final McpServerSetToolsAction template) { + return McpServerSetToolsActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerSetToolsAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerSetToolsActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolsActionBuilder.java new file mode 100644 index 00000000000..ffa647adf96 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolsActionBuilder.java @@ -0,0 +1,109 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * McpServerSetToolsActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerSetToolsAction mcpServerSetToolsAction = McpServerSetToolsAction.builder()
+ *             .plusTools(toolsBuilder -> toolsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerSetToolsActionBuilder implements Builder { + + private java.util.List tools; + + /** + *

New list of tools to set. Replaces the existing tools list entirely. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders.

+ * @param tools value to be set + * @return Builder + */ + + public McpServerSetToolsActionBuilder tools(final com.commercetools.api.models.mcp_server.McpServerTool... tools) { + this.tools = new ArrayList<>(Arrays.asList(tools)); + return this; + } + + /** + *

New list of tools to set. Replaces the existing tools list entirely. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders.

+ * @param tools value to be set + * @return Builder + */ + + public McpServerSetToolsActionBuilder tools( + final java.util.List tools) { + this.tools = tools; + return this; + } + + /** + *

New list of tools to set. Replaces the existing tools list entirely. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders.

+ * @param tools value to be set + * @return Builder + */ + + public McpServerSetToolsActionBuilder plusTools( + final com.commercetools.api.models.mcp_server.McpServerTool... tools) { + if (this.tools == null) { + this.tools = new ArrayList<>(); + } + this.tools.addAll(Arrays.asList(tools)); + return this; + } + + /** + *

New list of tools to set. Replaces the existing tools list entirely. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders.

+ * @return tools + */ + + public java.util.List getTools() { + return this.tools; + } + + /** + * builds McpServerSetToolsAction with checking for non-null required values + * @return McpServerSetToolsAction + */ + public McpServerSetToolsAction build() { + Objects.requireNonNull(tools, McpServerSetToolsAction.class + ": tools is missing"); + return new McpServerSetToolsActionImpl(tools); + } + + /** + * builds McpServerSetToolsAction without checking for non-null required values + * @return McpServerSetToolsAction + */ + public McpServerSetToolsAction buildUnchecked() { + return new McpServerSetToolsActionImpl(tools); + } + + /** + * factory method for an instance of McpServerSetToolsActionBuilder + * @return builder + */ + public static McpServerSetToolsActionBuilder of() { + return new McpServerSetToolsActionBuilder(); + } + + /** + * create builder for McpServerSetToolsAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerSetToolsActionBuilder of(final McpServerSetToolsAction template) { + McpServerSetToolsActionBuilder builder = new McpServerSetToolsActionBuilder(); + builder.tools = template.getTools(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolsActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolsActionImpl.java new file mode 100644 index 00000000000..e7d12486969 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolsActionImpl.java @@ -0,0 +1,104 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Replaces the entire list of tools enabled for the MCP Server.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerSetToolsActionImpl implements McpServerSetToolsAction, ModelBase { + + private String action; + + private java.util.List tools; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerSetToolsActionImpl( + @JsonProperty("tools") final java.util.List tools) { + this.tools = tools; + this.action = SET_TOOLS; + } + + /** + * create empty instance + */ + public McpServerSetToolsActionImpl() { + this.action = SET_TOOLS; + } + + /** + *

Identifies the update action to perform, such as addTool, removeTool, or setTools.

+ */ + + public String getAction() { + return this.action; + } + + /** + *

New list of tools to set. Replaces the existing tools list entirely. Use all to enable all available tools, or specify individual tool names such as read_products or create_orders.

+ */ + + public java.util.List getTools() { + return this.tools; + } + + public void setTools(final com.commercetools.api.models.mcp_server.McpServerTool... tools) { + this.tools = new ArrayList<>(Arrays.asList(tools)); + } + + public void setTools(final java.util.List tools) { + this.tools = tools; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + McpServerSetToolsActionImpl that = (McpServerSetToolsActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(tools, that.tools) + .append(action, that.action) + .append(tools, that.tools) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(tools).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("tools", tools) + .build(); + } + + @Override + public McpServerSetToolsAction copyDeep() { + return McpServerSetToolsAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerState.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerState.java new file mode 100644 index 00000000000..0af71bd39e1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerState.java @@ -0,0 +1,115 @@ + +package com.commercetools.api.models.mcp_server; + +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; + +/** + *

State of the MCP Server. A Disabled MCP Server rejects all AI agent tool requests while keeping its configuration editable. Defaults to Enabled when not provided on creation.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface McpServerState extends JsonEnum { + + /** +

The MCP Server is active and accepts AI agent tool requests.

*/ + McpServerState ENABLED = McpServerStateEnum.ENABLED; + /** +

The MCP Server rejects all AI agent tool requests while keeping its configuration editable.

*/ + McpServerState DISABLED = McpServerStateEnum.DISABLED; + + /** + * possible values of McpServerState + */ + enum McpServerStateEnum implements McpServerState { + /** + * Enabled + */ + ENABLED("Enabled"), + + /** + * Disabled + */ + DISABLED("Disabled"); + private final String jsonName; + + private McpServerStateEnum(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 McpServerState + * 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 McpServerState findEnum(String value) { + return findEnumViaJsonName(value).orElse(new McpServerState() { + @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 McpServerState[] values() { + return McpServerStateEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTool.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTool.java new file mode 100644 index 00000000000..9e87beb1164 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTool.java @@ -0,0 +1,1075 @@ + +package com.commercetools.api.models.mcp_server; + +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; + +/** + *

Identifies a tool that can be enabled on an MCP Server. For more information about the functions of each tool, see Commerce MCP Server tools.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface McpServerTool extends JsonEnum { + + /** +

Enables all available tools, including read, create, and update operations. For security and performance, enable this only when broad access is required.

*/ + McpServerTool ALL = McpServerToolEnum.ALL; + /** +

Enables all read-only tools.

*/ + McpServerTool READ_ALL = McpServerToolEnum.READ_ALL; + /** +

Creates Applications.

*/ + McpServerTool CREATE_APPLICATIONS = McpServerToolEnum.CREATE_APPLICATIONS; + /** +

Reads Applications.

*/ + McpServerTool READ_APPLICATIONS = McpServerToolEnum.READ_APPLICATIONS; + /** +

Updates Applications.

*/ + McpServerTool UPDATE_APPLICATIONS = McpServerToolEnum.UPDATE_APPLICATIONS; + /** +

Creates Attribute Groups.

*/ + McpServerTool CREATE_ATTRIBUTE_GROUPS = McpServerToolEnum.CREATE_ATTRIBUTE_GROUPS; + /** +

Reads Attribute Groups.

*/ + McpServerTool READ_ATTRIBUTE_GROUPS = McpServerToolEnum.READ_ATTRIBUTE_GROUPS; + /** +

Updates Attribute Groups.

*/ + McpServerTool UPDATE_ATTRIBUTE_GROUPS = McpServerToolEnum.UPDATE_ATTRIBUTE_GROUPS; + /** +

Creates resources in bulk.

*/ + McpServerTool CREATE_BULK = McpServerToolEnum.CREATE_BULK; + /** +

Updates resources in bulk.

*/ + McpServerTool UPDATE_BULK = McpServerToolEnum.UPDATE_BULK; + /** +

Creates Business Units.

*/ + McpServerTool CREATE_BUSINESS_UNITS = McpServerToolEnum.CREATE_BUSINESS_UNITS; + /** +

Reads Business Units.

*/ + McpServerTool READ_BUSINESS_UNITS = McpServerToolEnum.READ_BUSINESS_UNITS; + /** +

Updates Business Units.

*/ + McpServerTool UPDATE_BUSINESS_UNITS = McpServerToolEnum.UPDATE_BUSINESS_UNITS; + /** +

Creates Cart Discounts.

*/ + McpServerTool CREATE_CART_DISCOUNTS = McpServerToolEnum.CREATE_CART_DISCOUNTS; + /** +

Reads Cart Discounts.

*/ + McpServerTool READ_CART_DISCOUNTS = McpServerToolEnum.READ_CART_DISCOUNTS; + /** +

Updates Cart Discounts.

*/ + McpServerTool UPDATE_CART_DISCOUNTS = McpServerToolEnum.UPDATE_CART_DISCOUNTS; + /** +

Creates Carts.

*/ + McpServerTool CREATE_CARTS = McpServerToolEnum.CREATE_CARTS; + /** +

Reads Carts.

*/ + McpServerTool READ_CARTS = McpServerToolEnum.READ_CARTS; + /** +

Updates Carts.

*/ + McpServerTool UPDATE_CARTS = McpServerToolEnum.UPDATE_CARTS; + /** +

Replicates an existing Cart or Order into a new Cart.

*/ + McpServerTool REPLICATE_CARTS = McpServerToolEnum.REPLICATE_CARTS; + /** +

Creates Categories.

*/ + McpServerTool CREATE_CATEGORIES = McpServerToolEnum.CREATE_CATEGORIES; + /** +

Reads Categories.

*/ + McpServerTool READ_CATEGORIES = McpServerToolEnum.READ_CATEGORIES; + /** +

Updates Categories.

*/ + McpServerTool UPDATE_CATEGORIES = McpServerToolEnum.UPDATE_CATEGORIES; + /** +

Creates Channels.

*/ + McpServerTool CREATE_CHANNELS = McpServerToolEnum.CREATE_CHANNELS; + /** +

Reads Channels.

*/ + McpServerTool READ_CHANNELS = McpServerToolEnum.READ_CHANNELS; + /** +

Updates Channels.

*/ + McpServerTool UPDATE_CHANNELS = McpServerToolEnum.UPDATE_CHANNELS; + /** +

Creates Custom Objects.

*/ + McpServerTool CREATE_CUSTOM_OBJECTS = McpServerToolEnum.CREATE_CUSTOM_OBJECTS; + /** +

Reads Custom Objects.

*/ + McpServerTool READ_CUSTOM_OBJECTS = McpServerToolEnum.READ_CUSTOM_OBJECTS; + /** +

Updates Custom Objects.

*/ + McpServerTool UPDATE_CUSTOM_OBJECTS = McpServerToolEnum.UPDATE_CUSTOM_OBJECTS; + /** +

Creates Customer Groups.

*/ + McpServerTool CREATE_CUSTOMER_GROUPS = McpServerToolEnum.CREATE_CUSTOMER_GROUPS; + /** +

Reads Customer Groups.

*/ + McpServerTool READ_CUSTOMER_GROUPS = McpServerToolEnum.READ_CUSTOMER_GROUPS; + /** +

Updates Customer Groups.

*/ + McpServerTool UPDATE_CUSTOMER_GROUPS = McpServerToolEnum.UPDATE_CUSTOMER_GROUPS; + /** +

Searches for Customers.

*/ + McpServerTool READ_CUSTOMER_SEARCH = McpServerToolEnum.READ_CUSTOMER_SEARCH; + /** +

Creates Customers.

*/ + McpServerTool CREATE_CUSTOMERS = McpServerToolEnum.CREATE_CUSTOMERS; + /** +

Reads Customers.

*/ + McpServerTool READ_CUSTOMERS = McpServerToolEnum.READ_CUSTOMERS; + /** +

Updates Customers.

*/ + McpServerTool UPDATE_CUSTOMERS = McpServerToolEnum.UPDATE_CUSTOMERS; + /** +

Creates Discount Codes.

*/ + McpServerTool CREATE_DISCOUNT_CODES = McpServerToolEnum.CREATE_DISCOUNT_CODES; + /** +

Reads Discount Codes.

*/ + McpServerTool READ_DISCOUNT_CODES = McpServerToolEnum.READ_DISCOUNT_CODES; + /** +

Updates Discount Codes.

*/ + McpServerTool UPDATE_DISCOUNT_CODES = McpServerToolEnum.UPDATE_DISCOUNT_CODES; + /** +

Creates API Extensions.

*/ + McpServerTool CREATE_EXTENSIONS = McpServerToolEnum.CREATE_EXTENSIONS; + /** +

Reads API Extensions.

*/ + McpServerTool READ_EXTENSIONS = McpServerToolEnum.READ_EXTENSIONS; + /** +

Updates API Extensions.

*/ + McpServerTool UPDATE_EXTENSIONS = McpServerToolEnum.UPDATE_EXTENSIONS; + /** +

Creates Inventory.

*/ + McpServerTool CREATE_INVENTORY = McpServerToolEnum.CREATE_INVENTORY; + /** +

Reads Inventory.

*/ + McpServerTool READ_INVENTORY = McpServerToolEnum.READ_INVENTORY; + /** +

Updates Inventory.

*/ + McpServerTool UPDATE_INVENTORY = McpServerToolEnum.UPDATE_INVENTORY; + /** +

Reads Messages.

*/ + McpServerTool READ_MESSAGES = McpServerToolEnum.READ_MESSAGES; + /** +

Creates Orders.

*/ + McpServerTool CREATE_ORDERS = McpServerToolEnum.CREATE_ORDERS; + /** +

Reads Orders.

*/ + McpServerTool READ_ORDERS = McpServerToolEnum.READ_ORDERS; + /** +

Updates Orders.

*/ + McpServerTool UPDATE_ORDERS = McpServerToolEnum.UPDATE_ORDERS; + /** +

Creates Payment Integrations.

*/ + McpServerTool CREATE_PAYMENT_INTEGRATIONS = McpServerToolEnum.CREATE_PAYMENT_INTEGRATIONS; + /** +

Reads Payment Integrations.

*/ + McpServerTool READ_PAYMENT_INTEGRATIONS = McpServerToolEnum.READ_PAYMENT_INTEGRATIONS; + /** +

Updates Payment Integrations.

*/ + McpServerTool UPDATE_PAYMENT_INTEGRATIONS = McpServerToolEnum.UPDATE_PAYMENT_INTEGRATIONS; + /** +

Updates Payment Intents.

*/ + McpServerTool UPDATE_PAYMENT_INTENTS = McpServerToolEnum.UPDATE_PAYMENT_INTENTS; + /** +

Creates Payment Methods.

*/ + McpServerTool CREATE_PAYMENT_METHODS = McpServerToolEnum.CREATE_PAYMENT_METHODS; + /** +

Reads Payment Methods.

*/ + McpServerTool READ_PAYMENT_METHODS = McpServerToolEnum.READ_PAYMENT_METHODS; + /** +

Updates Payment Methods.

*/ + McpServerTool UPDATE_PAYMENT_METHODS = McpServerToolEnum.UPDATE_PAYMENT_METHODS; + /** +

Creates Payments.

*/ + McpServerTool CREATE_PAYMENTS = McpServerToolEnum.CREATE_PAYMENTS; + /** +

Reads Payments.

*/ + McpServerTool READ_PAYMENTS = McpServerToolEnum.READ_PAYMENTS; + /** +

Updates Payments.

*/ + McpServerTool UPDATE_PAYMENTS = McpServerToolEnum.UPDATE_PAYMENTS; + /** +

Creates Product Discounts.

*/ + McpServerTool CREATE_PRODUCT_DISCOUNTS = McpServerToolEnum.CREATE_PRODUCT_DISCOUNTS; + /** +

Reads Product Discounts.

*/ + McpServerTool READ_PRODUCT_DISCOUNTS = McpServerToolEnum.READ_PRODUCT_DISCOUNTS; + /** +

Updates Product Discounts.

*/ + McpServerTool UPDATE_PRODUCT_DISCOUNTS = McpServerToolEnum.UPDATE_PRODUCT_DISCOUNTS; + /** +

Reads Product Projections.

*/ + McpServerTool READ_PRODUCT_PROJECTIONS = McpServerToolEnum.READ_PRODUCT_PROJECTIONS; + /** +

Searches for Products.

*/ + McpServerTool READ_PRODUCT_SEARCH = McpServerToolEnum.READ_PRODUCT_SEARCH; + /** +

Creates Product Selections.

*/ + McpServerTool CREATE_PRODUCT_SELECTIONS = McpServerToolEnum.CREATE_PRODUCT_SELECTIONS; + /** +

Reads Product Selections.

*/ + McpServerTool READ_PRODUCT_SELECTIONS = McpServerToolEnum.READ_PRODUCT_SELECTIONS; + /** +

Updates Product Selections.

*/ + McpServerTool UPDATE_PRODUCT_SELECTIONS = McpServerToolEnum.UPDATE_PRODUCT_SELECTIONS; + /** +

Creates Product Tailoring.

*/ + McpServerTool CREATE_PRODUCT_TAILORING = McpServerToolEnum.CREATE_PRODUCT_TAILORING; + /** +

Reads Product Tailoring.

*/ + McpServerTool READ_PRODUCT_TAILORING = McpServerToolEnum.READ_PRODUCT_TAILORING; + /** +

Updates Product Tailoring.

*/ + McpServerTool UPDATE_PRODUCT_TAILORING = McpServerToolEnum.UPDATE_PRODUCT_TAILORING; + /** +

Creates Product Types.

*/ + McpServerTool CREATE_PRODUCT_TYPES = McpServerToolEnum.CREATE_PRODUCT_TYPES; + /** +

Reads Product Types.

*/ + McpServerTool READ_PRODUCT_TYPES = McpServerToolEnum.READ_PRODUCT_TYPES; + /** +

Updates Product Types.

*/ + McpServerTool UPDATE_PRODUCT_TYPES = McpServerToolEnum.UPDATE_PRODUCT_TYPES; + /** +

Creates Products.

*/ + McpServerTool CREATE_PRODUCTS = McpServerToolEnum.CREATE_PRODUCTS; + /** +

Reads Products.

*/ + McpServerTool READ_PRODUCTS = McpServerToolEnum.READ_PRODUCTS; + /** +

Updates Products.

*/ + McpServerTool UPDATE_PRODUCTS = McpServerToolEnum.UPDATE_PRODUCTS; + /** +

Reads Project settings.

*/ + McpServerTool READ_PROJECT = McpServerToolEnum.READ_PROJECT; + /** +

Updates Project settings.

*/ + McpServerTool UPDATE_PROJECT = McpServerToolEnum.UPDATE_PROJECT; + /** +

Creates Quote Requests.

*/ + McpServerTool CREATE_QUOTE_REQUESTS = McpServerToolEnum.CREATE_QUOTE_REQUESTS; + /** +

Reads Quote Requests.

*/ + McpServerTool READ_QUOTE_REQUESTS = McpServerToolEnum.READ_QUOTE_REQUESTS; + /** +

Updates Quote Requests.

*/ + McpServerTool UPDATE_QUOTE_REQUESTS = McpServerToolEnum.UPDATE_QUOTE_REQUESTS; + /** +

Creates Quotes.

*/ + McpServerTool CREATE_QUOTES = McpServerToolEnum.CREATE_QUOTES; + /** +

Reads Quotes.

*/ + McpServerTool READ_QUOTES = McpServerToolEnum.READ_QUOTES; + /** +

Updates Quotes.

*/ + McpServerTool UPDATE_QUOTES = McpServerToolEnum.UPDATE_QUOTES; + /** +

Creates Recurring Orders.

*/ + McpServerTool CREATE_RECURRING_ORDERS = McpServerToolEnum.CREATE_RECURRING_ORDERS; + /** +

Reads Recurring Orders.

*/ + McpServerTool READ_RECURRING_ORDERS = McpServerToolEnum.READ_RECURRING_ORDERS; + /** +

Updates Recurring Orders.

*/ + McpServerTool UPDATE_RECURRING_ORDERS = McpServerToolEnum.UPDATE_RECURRING_ORDERS; + /** +

Creates Reviews.

*/ + McpServerTool CREATE_REVIEWS = McpServerToolEnum.CREATE_REVIEWS; + /** +

Reads Reviews.

*/ + McpServerTool READ_REVIEWS = McpServerToolEnum.READ_REVIEWS; + /** +

Updates Reviews.

*/ + McpServerTool UPDATE_REVIEWS = McpServerToolEnum.UPDATE_REVIEWS; + /** +

Creates Shipping Methods.

*/ + McpServerTool CREATE_SHIPPING_METHODS = McpServerToolEnum.CREATE_SHIPPING_METHODS; + /** +

Reads Shipping Methods.

*/ + McpServerTool READ_SHIPPING_METHODS = McpServerToolEnum.READ_SHIPPING_METHODS; + /** +

Updates Shipping Methods.

*/ + McpServerTool UPDATE_SHIPPING_METHODS = McpServerToolEnum.UPDATE_SHIPPING_METHODS; + /** +

Creates Shopping Lists.

*/ + McpServerTool CREATE_SHOPPING_LISTS = McpServerToolEnum.CREATE_SHOPPING_LISTS; + /** +

Reads Shopping Lists.

*/ + McpServerTool READ_SHOPPING_LISTS = McpServerToolEnum.READ_SHOPPING_LISTS; + /** +

Updates Shopping Lists.

*/ + McpServerTool UPDATE_SHOPPING_LISTS = McpServerToolEnum.UPDATE_SHOPPING_LISTS; + /** +

Creates Staged Quotes.

*/ + McpServerTool CREATE_STAGED_QUOTES = McpServerToolEnum.CREATE_STAGED_QUOTES; + /** +

Reads Staged Quotes.

*/ + McpServerTool READ_STAGED_QUOTES = McpServerToolEnum.READ_STAGED_QUOTES; + /** +

Updates Staged Quotes.

*/ + McpServerTool UPDATE_STAGED_QUOTES = McpServerToolEnum.UPDATE_STAGED_QUOTES; + /** +

Creates Standalone Prices.

*/ + McpServerTool CREATE_STANDALONE_PRICES = McpServerToolEnum.CREATE_STANDALONE_PRICES; + /** +

Reads Standalone Prices.

*/ + McpServerTool READ_STANDALONE_PRICES = McpServerToolEnum.READ_STANDALONE_PRICES; + /** +

Updates Standalone Prices.

*/ + McpServerTool UPDATE_STANDALONE_PRICES = McpServerToolEnum.UPDATE_STANDALONE_PRICES; + /** +

Creates States.

*/ + McpServerTool CREATE_STATES = McpServerToolEnum.CREATE_STATES; + /** +

Reads States.

*/ + McpServerTool READ_STATES = McpServerToolEnum.READ_STATES; + /** +

Updates States.

*/ + McpServerTool UPDATE_STATES = McpServerToolEnum.UPDATE_STATES; + /** +

Creates Stores.

*/ + McpServerTool CREATE_STORES = McpServerToolEnum.CREATE_STORES; + /** +

Reads Stores.

*/ + McpServerTool READ_STORES = McpServerToolEnum.READ_STORES; + /** +

Updates Stores.

*/ + McpServerTool UPDATE_STORES = McpServerToolEnum.UPDATE_STORES; + /** +

Creates Subscriptions.

*/ + McpServerTool CREATE_SUBSCRIPTIONS = McpServerToolEnum.CREATE_SUBSCRIPTIONS; + /** +

Reads Subscriptions.

*/ + McpServerTool READ_SUBSCRIPTIONS = McpServerToolEnum.READ_SUBSCRIPTIONS; + /** +

Updates Subscriptions.

*/ + McpServerTool UPDATE_SUBSCRIPTIONS = McpServerToolEnum.UPDATE_SUBSCRIPTIONS; + /** +

Creates Tax Categories.

*/ + McpServerTool CREATE_TAX_CATEGORIES = McpServerToolEnum.CREATE_TAX_CATEGORIES; + /** +

Reads Tax Categories.

*/ + McpServerTool READ_TAX_CATEGORIES = McpServerToolEnum.READ_TAX_CATEGORIES; + /** +

Updates Tax Categories.

*/ + McpServerTool UPDATE_TAX_CATEGORIES = McpServerToolEnum.UPDATE_TAX_CATEGORIES; + /** +

Creates Transactions.

*/ + McpServerTool CREATE_TRANSACTIONS = McpServerToolEnum.CREATE_TRANSACTIONS; + /** +

Reads Transactions.

*/ + McpServerTool READ_TRANSACTIONS = McpServerToolEnum.READ_TRANSACTIONS; + /** +

Creates Types.

*/ + McpServerTool CREATE_TYPES = McpServerToolEnum.CREATE_TYPES; + /** +

Reads Types.

*/ + McpServerTool READ_TYPES = McpServerToolEnum.READ_TYPES; + /** +

Updates Types.

*/ + McpServerTool UPDATE_TYPES = McpServerToolEnum.UPDATE_TYPES; + /** +

Creates Zones.

*/ + McpServerTool CREATE_ZONES = McpServerToolEnum.CREATE_ZONES; + /** +

Reads Zones.

*/ + McpServerTool READ_ZONES = McpServerToolEnum.READ_ZONES; + /** +

Updates Zones.

*/ + McpServerTool UPDATE_ZONES = McpServerToolEnum.UPDATE_ZONES; + + /** + * possible values of McpServerTool + */ + enum McpServerToolEnum implements McpServerTool { + /** + * all + */ + ALL("all"), + + /** + * read_all + */ + READ_ALL("read_all"), + + /** + * create_applications + */ + CREATE_APPLICATIONS("create_applications"), + + /** + * read_applications + */ + READ_APPLICATIONS("read_applications"), + + /** + * update_applications + */ + UPDATE_APPLICATIONS("update_applications"), + + /** + * create_attribute_groups + */ + CREATE_ATTRIBUTE_GROUPS("create_attribute_groups"), + + /** + * read_attribute_groups + */ + READ_ATTRIBUTE_GROUPS("read_attribute_groups"), + + /** + * update_attribute_groups + */ + UPDATE_ATTRIBUTE_GROUPS("update_attribute_groups"), + + /** + * create_bulk + */ + CREATE_BULK("create_bulk"), + + /** + * update_bulk + */ + UPDATE_BULK("update_bulk"), + + /** + * create_business_units + */ + CREATE_BUSINESS_UNITS("create_business_units"), + + /** + * read_business_units + */ + READ_BUSINESS_UNITS("read_business_units"), + + /** + * update_business_units + */ + UPDATE_BUSINESS_UNITS("update_business_units"), + + /** + * create_cart_discounts + */ + CREATE_CART_DISCOUNTS("create_cart_discounts"), + + /** + * read_cart_discounts + */ + READ_CART_DISCOUNTS("read_cart_discounts"), + + /** + * update_cart_discounts + */ + UPDATE_CART_DISCOUNTS("update_cart_discounts"), + + /** + * create_carts + */ + CREATE_CARTS("create_carts"), + + /** + * read_carts + */ + READ_CARTS("read_carts"), + + /** + * update_carts + */ + UPDATE_CARTS("update_carts"), + + /** + * replicate_carts + */ + REPLICATE_CARTS("replicate_carts"), + + /** + * create_categories + */ + CREATE_CATEGORIES("create_categories"), + + /** + * read_categories + */ + READ_CATEGORIES("read_categories"), + + /** + * update_categories + */ + UPDATE_CATEGORIES("update_categories"), + + /** + * create_channels + */ + CREATE_CHANNELS("create_channels"), + + /** + * read_channels + */ + READ_CHANNELS("read_channels"), + + /** + * update_channels + */ + UPDATE_CHANNELS("update_channels"), + + /** + * create_custom_objects + */ + CREATE_CUSTOM_OBJECTS("create_custom_objects"), + + /** + * read_custom_objects + */ + READ_CUSTOM_OBJECTS("read_custom_objects"), + + /** + * update_custom_objects + */ + UPDATE_CUSTOM_OBJECTS("update_custom_objects"), + + /** + * create_customer_groups + */ + CREATE_CUSTOMER_GROUPS("create_customer_groups"), + + /** + * read_customer_groups + */ + READ_CUSTOMER_GROUPS("read_customer_groups"), + + /** + * update_customer_groups + */ + UPDATE_CUSTOMER_GROUPS("update_customer_groups"), + + /** + * read_customer_search + */ + READ_CUSTOMER_SEARCH("read_customer_search"), + + /** + * create_customers + */ + CREATE_CUSTOMERS("create_customers"), + + /** + * read_customers + */ + READ_CUSTOMERS("read_customers"), + + /** + * update_customers + */ + UPDATE_CUSTOMERS("update_customers"), + + /** + * create_discount_codes + */ + CREATE_DISCOUNT_CODES("create_discount_codes"), + + /** + * read_discount_codes + */ + READ_DISCOUNT_CODES("read_discount_codes"), + + /** + * update_discount_codes + */ + UPDATE_DISCOUNT_CODES("update_discount_codes"), + + /** + * create_extensions + */ + CREATE_EXTENSIONS("create_extensions"), + + /** + * read_extensions + */ + READ_EXTENSIONS("read_extensions"), + + /** + * update_extensions + */ + UPDATE_EXTENSIONS("update_extensions"), + + /** + * create_inventory + */ + CREATE_INVENTORY("create_inventory"), + + /** + * read_inventory + */ + READ_INVENTORY("read_inventory"), + + /** + * update_inventory + */ + UPDATE_INVENTORY("update_inventory"), + + /** + * read_messages + */ + READ_MESSAGES("read_messages"), + + /** + * create_orders + */ + CREATE_ORDERS("create_orders"), + + /** + * read_orders + */ + READ_ORDERS("read_orders"), + + /** + * update_orders + */ + UPDATE_ORDERS("update_orders"), + + /** + * create_payment_integrations + */ + CREATE_PAYMENT_INTEGRATIONS("create_payment_integrations"), + + /** + * read_payment_integrations + */ + READ_PAYMENT_INTEGRATIONS("read_payment_integrations"), + + /** + * update_payment_integrations + */ + UPDATE_PAYMENT_INTEGRATIONS("update_payment_integrations"), + + /** + * update_payment_intents + */ + UPDATE_PAYMENT_INTENTS("update_payment_intents"), + + /** + * create_payment_methods + */ + CREATE_PAYMENT_METHODS("create_payment_methods"), + + /** + * read_payment_methods + */ + READ_PAYMENT_METHODS("read_payment_methods"), + + /** + * update_payment_methods + */ + UPDATE_PAYMENT_METHODS("update_payment_methods"), + + /** + * create_payments + */ + CREATE_PAYMENTS("create_payments"), + + /** + * read_payments + */ + READ_PAYMENTS("read_payments"), + + /** + * update_payments + */ + UPDATE_PAYMENTS("update_payments"), + + /** + * create_product_discounts + */ + CREATE_PRODUCT_DISCOUNTS("create_product_discounts"), + + /** + * read_product_discounts + */ + READ_PRODUCT_DISCOUNTS("read_product_discounts"), + + /** + * update_product_discounts + */ + UPDATE_PRODUCT_DISCOUNTS("update_product_discounts"), + + /** + * read_product_projections + */ + READ_PRODUCT_PROJECTIONS("read_product_projections"), + + /** + * read_product_search + */ + READ_PRODUCT_SEARCH("read_product_search"), + + /** + * create_product_selections + */ + CREATE_PRODUCT_SELECTIONS("create_product_selections"), + + /** + * read_product_selections + */ + READ_PRODUCT_SELECTIONS("read_product_selections"), + + /** + * update_product_selections + */ + UPDATE_PRODUCT_SELECTIONS("update_product_selections"), + + /** + * create_product_tailoring + */ + CREATE_PRODUCT_TAILORING("create_product_tailoring"), + + /** + * read_product_tailoring + */ + READ_PRODUCT_TAILORING("read_product_tailoring"), + + /** + * update_product_tailoring + */ + UPDATE_PRODUCT_TAILORING("update_product_tailoring"), + + /** + * create_product_types + */ + CREATE_PRODUCT_TYPES("create_product_types"), + + /** + * read_product_types + */ + READ_PRODUCT_TYPES("read_product_types"), + + /** + * update_product_types + */ + UPDATE_PRODUCT_TYPES("update_product_types"), + + /** + * create_products + */ + CREATE_PRODUCTS("create_products"), + + /** + * read_products + */ + READ_PRODUCTS("read_products"), + + /** + * update_products + */ + UPDATE_PRODUCTS("update_products"), + + /** + * read_project + */ + READ_PROJECT("read_project"), + + /** + * update_project + */ + UPDATE_PROJECT("update_project"), + + /** + * create_quote_requests + */ + CREATE_QUOTE_REQUESTS("create_quote_requests"), + + /** + * read_quote_requests + */ + READ_QUOTE_REQUESTS("read_quote_requests"), + + /** + * update_quote_requests + */ + UPDATE_QUOTE_REQUESTS("update_quote_requests"), + + /** + * create_quotes + */ + CREATE_QUOTES("create_quotes"), + + /** + * read_quotes + */ + READ_QUOTES("read_quotes"), + + /** + * update_quotes + */ + UPDATE_QUOTES("update_quotes"), + + /** + * create_recurring_orders + */ + CREATE_RECURRING_ORDERS("create_recurring_orders"), + + /** + * read_recurring_orders + */ + READ_RECURRING_ORDERS("read_recurring_orders"), + + /** + * update_recurring_orders + */ + UPDATE_RECURRING_ORDERS("update_recurring_orders"), + + /** + * create_reviews + */ + CREATE_REVIEWS("create_reviews"), + + /** + * read_reviews + */ + READ_REVIEWS("read_reviews"), + + /** + * update_reviews + */ + UPDATE_REVIEWS("update_reviews"), + + /** + * create_shipping_methods + */ + CREATE_SHIPPING_METHODS("create_shipping_methods"), + + /** + * read_shipping_methods + */ + READ_SHIPPING_METHODS("read_shipping_methods"), + + /** + * update_shipping_methods + */ + UPDATE_SHIPPING_METHODS("update_shipping_methods"), + + /** + * create_shopping_lists + */ + CREATE_SHOPPING_LISTS("create_shopping_lists"), + + /** + * read_shopping_lists + */ + READ_SHOPPING_LISTS("read_shopping_lists"), + + /** + * update_shopping_lists + */ + UPDATE_SHOPPING_LISTS("update_shopping_lists"), + + /** + * create_staged_quotes + */ + CREATE_STAGED_QUOTES("create_staged_quotes"), + + /** + * read_staged_quotes + */ + READ_STAGED_QUOTES("read_staged_quotes"), + + /** + * update_staged_quotes + */ + UPDATE_STAGED_QUOTES("update_staged_quotes"), + + /** + * create_standalone_prices + */ + CREATE_STANDALONE_PRICES("create_standalone_prices"), + + /** + * read_standalone_prices + */ + READ_STANDALONE_PRICES("read_standalone_prices"), + + /** + * update_standalone_prices + */ + UPDATE_STANDALONE_PRICES("update_standalone_prices"), + + /** + * create_states + */ + CREATE_STATES("create_states"), + + /** + * read_states + */ + READ_STATES("read_states"), + + /** + * update_states + */ + UPDATE_STATES("update_states"), + + /** + * create_stores + */ + CREATE_STORES("create_stores"), + + /** + * read_stores + */ + READ_STORES("read_stores"), + + /** + * update_stores + */ + UPDATE_STORES("update_stores"), + + /** + * create_subscriptions + */ + CREATE_SUBSCRIPTIONS("create_subscriptions"), + + /** + * read_subscriptions + */ + READ_SUBSCRIPTIONS("read_subscriptions"), + + /** + * update_subscriptions + */ + UPDATE_SUBSCRIPTIONS("update_subscriptions"), + + /** + * create_tax_categories + */ + CREATE_TAX_CATEGORIES("create_tax_categories"), + + /** + * read_tax_categories + */ + READ_TAX_CATEGORIES("read_tax_categories"), + + /** + * update_tax_categories + */ + UPDATE_TAX_CATEGORIES("update_tax_categories"), + + /** + * create_transactions + */ + CREATE_TRANSACTIONS("create_transactions"), + + /** + * read_transactions + */ + READ_TRANSACTIONS("read_transactions"), + + /** + * create_types + */ + CREATE_TYPES("create_types"), + + /** + * read_types + */ + READ_TYPES("read_types"), + + /** + * update_types + */ + UPDATE_TYPES("update_types"), + + /** + * create_zones + */ + CREATE_ZONES("create_zones"), + + /** + * read_zones + */ + READ_ZONES("read_zones"), + + /** + * update_zones + */ + UPDATE_ZONES("update_zones"); + private final String jsonName; + + private McpServerToolEnum(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 McpServerTool + * 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 McpServerTool findEnum(String value) { + return findEnumViaJsonName(value).orElse(new McpServerTool() { + @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 McpServerTool[] values() { + return McpServerToolEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerToolOutputFormatting.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerToolOutputFormatting.java new file mode 100644 index 00000000000..1e4a11d9122 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerToolOutputFormatting.java @@ -0,0 +1,110 @@ + +package com.commercetools.api.models.mcp_server; + +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; + +/** + *

Output formatting applied to every tools/call response on the MCP Server. The value names the conversion performed; when the field is absent, the response content shape is left untouched.

+ *
    + *
  • JsonToTabular: converts JSON tool output into a tabular representation.
  • + *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface McpServerToolOutputFormatting extends JsonEnum { + + /** +

Converts JSON tool output into a tabular representation to reduce token count.

*/ + McpServerToolOutputFormatting JSON_TO_TABULAR = McpServerToolOutputFormattingEnum.JSON_TO_TABULAR; + + /** + * possible values of McpServerToolOutputFormatting + */ + enum McpServerToolOutputFormattingEnum implements McpServerToolOutputFormatting { + /** + * JsonToTabular + */ + JSON_TO_TABULAR("JsonToTabular"); + private final String jsonName; + + private McpServerToolOutputFormattingEnum(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 McpServerToolOutputFormatting + * 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 McpServerToolOutputFormatting findEnum(String value) { + return findEnumViaJsonName(value).orElse(new McpServerToolOutputFormatting() { + @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 McpServerToolOutputFormatting[] values() { + return McpServerToolOutputFormattingEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerType.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerType.java new file mode 100644 index 00000000000..5af4cecadc5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerType.java @@ -0,0 +1,175 @@ + +package com.commercetools.api.models.mcp_server; + +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 io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Describes an MCP Server type and one of its major versions, including the catalog of tools available for it. Use this catalog to discover which tools you can enable on a McpServer of this type.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerType mcpServerType = McpServerType.builder()
+ *             .type("{type}")
+ *             .majorVersion("{majorVersion}")
+ *             .plusTools(toolsBuilder -> toolsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = McpServerTypeImpl.class) +public interface McpServerType { + + /** + *

Identifier of the MCP Server type, such as CommerceMCP.

+ * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

Major version of the MCP Server type, such as v4.

+ * @return majorVersion + */ + @NotNull + @JsonProperty("majorVersion") + public String getMajorVersion(); + + /** + *

Tools available for this MCP Server type and major version.

+ * @return tools + */ + @NotNull + @Valid + @JsonProperty("tools") + public List getTools(); + + /** + *

Identifier of the MCP Server type, such as CommerceMCP.

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

Major version of the MCP Server type, such as v4.

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

Tools available for this MCP Server type and major version.

+ * @param tools values to be set + */ + + @JsonIgnore + public void setTools(final McpServerTypeTool... tools); + + /** + *

Tools available for this MCP Server type and major version.

+ * @param tools values to be set + */ + + public void setTools(final List tools); + + /** + * factory method + * @return instance of McpServerType + */ + public static McpServerType of() { + return new McpServerTypeImpl(); + } + + /** + * factory method to create a shallow copy McpServerType + * @param template instance to be copied + * @return copy instance + */ + public static McpServerType of(final McpServerType template) { + McpServerTypeImpl instance = new McpServerTypeImpl(); + instance.setType(template.getType()); + instance.setMajorVersion(template.getMajorVersion()); + instance.setTools(template.getTools()); + return instance; + } + + public McpServerType copyDeep(); + + /** + * factory method to create a deep copy of McpServerType + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerType deepCopy(@Nullable final McpServerType template) { + if (template == null) { + return null; + } + McpServerTypeImpl instance = new McpServerTypeImpl(); + instance.setType(template.getType()); + instance.setMajorVersion(template.getMajorVersion()); + instance.setTools(Optional.ofNullable(template.getTools()) + .map(t -> t.stream() + .map(com.commercetools.api.models.mcp_server.McpServerTypeTool::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for McpServerType + * @return builder + */ + public static McpServerTypeBuilder builder() { + return McpServerTypeBuilder.of(); + } + + /** + * create builder for McpServerType instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerTypeBuilder builder(final McpServerType template) { + return McpServerTypeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerType(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerTypeBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeBuilder.java new file mode 100644 index 00000000000..fdeea32e582 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeBuilder.java @@ -0,0 +1,209 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * McpServerTypeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerType mcpServerType = McpServerType.builder()
+ *             .type("{type}")
+ *             .majorVersion("{majorVersion}")
+ *             .plusTools(toolsBuilder -> toolsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerTypeBuilder implements Builder { + + private String type; + + private String majorVersion; + + private java.util.List tools; + + /** + *

Identifier of the MCP Server type, such as CommerceMCP.

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

Major version of the MCP Server type, such as v4.

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

Tools available for this MCP Server type and major version.

+ * @param tools value to be set + * @return Builder + */ + + public McpServerTypeBuilder tools(final com.commercetools.api.models.mcp_server.McpServerTypeTool... tools) { + this.tools = new ArrayList<>(Arrays.asList(tools)); + return this; + } + + /** + *

Tools available for this MCP Server type and major version.

+ * @param tools value to be set + * @return Builder + */ + + public McpServerTypeBuilder tools( + final java.util.List tools) { + this.tools = tools; + return this; + } + + /** + *

Tools available for this MCP Server type and major version.

+ * @param tools value to be set + * @return Builder + */ + + public McpServerTypeBuilder plusTools(final com.commercetools.api.models.mcp_server.McpServerTypeTool... tools) { + if (this.tools == null) { + this.tools = new ArrayList<>(); + } + this.tools.addAll(Arrays.asList(tools)); + return this; + } + + /** + *

Tools available for this MCP Server type and major version.

+ * @param builder function to build the tools value + * @return Builder + */ + + public McpServerTypeBuilder plusTools( + Function builder) { + if (this.tools == null) { + this.tools = new ArrayList<>(); + } + this.tools.add(builder.apply(com.commercetools.api.models.mcp_server.McpServerTypeToolBuilder.of()).build()); + return this; + } + + /** + *

Tools available for this MCP Server type and major version.

+ * @param builder function to build the tools value + * @return Builder + */ + + public McpServerTypeBuilder withTools( + Function builder) { + this.tools = new ArrayList<>(); + this.tools.add(builder.apply(com.commercetools.api.models.mcp_server.McpServerTypeToolBuilder.of()).build()); + return this; + } + + /** + *

Tools available for this MCP Server type and major version.

+ * @param builder function to build the tools value + * @return Builder + */ + + public McpServerTypeBuilder addTools( + Function builder) { + return plusTools(builder.apply(com.commercetools.api.models.mcp_server.McpServerTypeToolBuilder.of())); + } + + /** + *

Tools available for this MCP Server type and major version.

+ * @param builder function to build the tools value + * @return Builder + */ + + public McpServerTypeBuilder setTools( + Function builder) { + return tools(builder.apply(com.commercetools.api.models.mcp_server.McpServerTypeToolBuilder.of())); + } + + /** + *

Identifier of the MCP Server type, such as CommerceMCP.

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

Major version of the MCP Server type, such as v4.

+ * @return majorVersion + */ + + public String getMajorVersion() { + return this.majorVersion; + } + + /** + *

Tools available for this MCP Server type and major version.

+ * @return tools + */ + + public java.util.List getTools() { + return this.tools; + } + + /** + * builds McpServerType with checking for non-null required values + * @return McpServerType + */ + public McpServerType build() { + Objects.requireNonNull(type, McpServerType.class + ": type is missing"); + Objects.requireNonNull(majorVersion, McpServerType.class + ": majorVersion is missing"); + Objects.requireNonNull(tools, McpServerType.class + ": tools is missing"); + return new McpServerTypeImpl(type, majorVersion, tools); + } + + /** + * builds McpServerType without checking for non-null required values + * @return McpServerType + */ + public McpServerType buildUnchecked() { + return new McpServerTypeImpl(type, majorVersion, tools); + } + + /** + * factory method for an instance of McpServerTypeBuilder + * @return builder + */ + public static McpServerTypeBuilder of() { + return new McpServerTypeBuilder(); + } + + /** + * create builder for McpServerType instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerTypeBuilder of(final McpServerType template) { + McpServerTypeBuilder builder = new McpServerTypeBuilder(); + builder.type = template.getType(); + builder.majorVersion = template.getMajorVersion(); + builder.tools = template.getTools(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeImpl.java new file mode 100644 index 00000000000..ffb47336dfa --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeImpl.java @@ -0,0 +1,125 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Describes an MCP Server type and one of its major versions, including the catalog of tools available for it. Use this catalog to discover which tools you can enable on a McpServer of this type.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerTypeImpl implements McpServerType, ModelBase { + + private String type; + + private String majorVersion; + + private java.util.List tools; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerTypeImpl(@JsonProperty("type") final String type, @JsonProperty("majorVersion") final String majorVersion, + @JsonProperty("tools") final java.util.List tools) { + this.type = type; + this.majorVersion = majorVersion; + this.tools = tools; + } + + /** + * create empty instance + */ + public McpServerTypeImpl() { + } + + /** + *

Identifier of the MCP Server type, such as CommerceMCP.

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

Major version of the MCP Server type, such as v4.

+ */ + + public String getMajorVersion() { + return this.majorVersion; + } + + /** + *

Tools available for this MCP Server type and major version.

+ */ + + public java.util.List getTools() { + return this.tools; + } + + public void setType(final String type) { + this.type = type; + } + + public void setMajorVersion(final String majorVersion) { + this.majorVersion = majorVersion; + } + + public void setTools(final com.commercetools.api.models.mcp_server.McpServerTypeTool... tools) { + this.tools = new ArrayList<>(Arrays.asList(tools)); + } + + public void setTools(final java.util.List tools) { + this.tools = tools; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + McpServerTypeImpl that = (McpServerTypeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(majorVersion, that.majorVersion) + .append(tools, that.tools) + .append(type, that.type) + .append(majorVersion, that.majorVersion) + .append(tools, that.tools) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(majorVersion).append(tools).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("majorVersion", majorVersion) + .append("tools", tools) + .build(); + } + + @Override + public McpServerType copyDeep() { + return McpServerType.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeTool.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeTool.java new file mode 100644 index 00000000000..223d49ec9d6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeTool.java @@ -0,0 +1,183 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Describes a single tool available for an MCP Server type and major version.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerTypeTool mcpServerTypeTool = McpServerTypeTool.builder()
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = McpServerTypeToolImpl.class) +public interface McpServerTypeTool { + + /** + *

Identifier of the tool, such as read_products or create_orders. Matches a value of McpServerTool.

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

Human-readable description of what the tool does. Omitted when no description is available.

+ * @return description + */ + + @JsonProperty("description") + public String getDescription(); + + /** + *

Whether the tool reads (read) or modifies (write) data.

+ * @return operationType + */ + + @JsonProperty("operationType") + public String getOperationType(); + + /** + *

Group identifiers the tool belongs to, such as all or read_all. Empty when the tool belongs to no group.

+ * @return groups + */ + + @JsonProperty("groups") + public List getGroups(); + + /** + *

Identifier of the tool, such as read_products or create_orders. Matches a value of McpServerTool.

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

Human-readable description of what the tool does. Omitted when no description is available.

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

Whether the tool reads (read) or modifies (write) data.

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

Group identifiers the tool belongs to, such as all or read_all. Empty when the tool belongs to no group.

+ * @param groups values to be set + */ + + @JsonIgnore + public void setGroups(final String... groups); + + /** + *

Group identifiers the tool belongs to, such as all or read_all. Empty when the tool belongs to no group.

+ * @param groups values to be set + */ + + public void setGroups(final List groups); + + /** + * factory method + * @return instance of McpServerTypeTool + */ + public static McpServerTypeTool of() { + return new McpServerTypeToolImpl(); + } + + /** + * factory method to create a shallow copy McpServerTypeTool + * @param template instance to be copied + * @return copy instance + */ + public static McpServerTypeTool of(final McpServerTypeTool template) { + McpServerTypeToolImpl instance = new McpServerTypeToolImpl(); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setOperationType(template.getOperationType()); + instance.setGroups(template.getGroups()); + return instance; + } + + public McpServerTypeTool copyDeep(); + + /** + * factory method to create a deep copy of McpServerTypeTool + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerTypeTool deepCopy(@Nullable final McpServerTypeTool template) { + if (template == null) { + return null; + } + McpServerTypeToolImpl instance = new McpServerTypeToolImpl(); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setOperationType(template.getOperationType()); + instance.setGroups(Optional.ofNullable(template.getGroups()).map(ArrayList::new).orElse(null)); + return instance; + } + + /** + * builder factory method for McpServerTypeTool + * @return builder + */ + public static McpServerTypeToolBuilder builder() { + return McpServerTypeToolBuilder.of(); + } + + /** + * create builder for McpServerTypeTool instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerTypeToolBuilder builder(final McpServerTypeTool template) { + return McpServerTypeToolBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerTypeTool(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerTypeToolBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeToolBuilder.java new file mode 100644 index 00000000000..062f5774d3d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeToolBuilder.java @@ -0,0 +1,184 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * McpServerTypeToolBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerTypeTool mcpServerTypeTool = McpServerTypeTool.builder()
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerTypeToolBuilder implements Builder { + + private String name; + + @Nullable + private String description; + + @Nullable + private String operationType; + + @Nullable + private java.util.List groups; + + /** + *

Identifier of the tool, such as read_products or create_orders. Matches a value of McpServerTool.

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

Human-readable description of what the tool does. Omitted when no description is available.

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

Whether the tool reads (read) or modifies (write) data.

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

Group identifiers the tool belongs to, such as all or read_all. Empty when the tool belongs to no group.

+ * @param groups value to be set + * @return Builder + */ + + public McpServerTypeToolBuilder groups(@Nullable final String... groups) { + this.groups = new ArrayList<>(Arrays.asList(groups)); + return this; + } + + /** + *

Group identifiers the tool belongs to, such as all or read_all. Empty when the tool belongs to no group.

+ * @param groups value to be set + * @return Builder + */ + + public McpServerTypeToolBuilder groups(@Nullable final java.util.List groups) { + this.groups = groups; + return this; + } + + /** + *

Group identifiers the tool belongs to, such as all or read_all. Empty when the tool belongs to no group.

+ * @param groups value to be set + * @return Builder + */ + + public McpServerTypeToolBuilder plusGroups(@Nullable final String... groups) { + if (this.groups == null) { + this.groups = new ArrayList<>(); + } + this.groups.addAll(Arrays.asList(groups)); + return this; + } + + /** + *

Identifier of the tool, such as read_products or create_orders. Matches a value of McpServerTool.

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

Human-readable description of what the tool does. Omitted when no description is available.

+ * @return description + */ + + @Nullable + public String getDescription() { + return this.description; + } + + /** + *

Whether the tool reads (read) or modifies (write) data.

+ * @return operationType + */ + + @Nullable + public String getOperationType() { + return this.operationType; + } + + /** + *

Group identifiers the tool belongs to, such as all or read_all. Empty when the tool belongs to no group.

+ * @return groups + */ + + @Nullable + public java.util.List getGroups() { + return this.groups; + } + + /** + * builds McpServerTypeTool with checking for non-null required values + * @return McpServerTypeTool + */ + public McpServerTypeTool build() { + Objects.requireNonNull(name, McpServerTypeTool.class + ": name is missing"); + return new McpServerTypeToolImpl(name, description, operationType, groups); + } + + /** + * builds McpServerTypeTool without checking for non-null required values + * @return McpServerTypeTool + */ + public McpServerTypeTool buildUnchecked() { + return new McpServerTypeToolImpl(name, description, operationType, groups); + } + + /** + * factory method for an instance of McpServerTypeToolBuilder + * @return builder + */ + public static McpServerTypeToolBuilder of() { + return new McpServerTypeToolBuilder(); + } + + /** + * create builder for McpServerTypeTool instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerTypeToolBuilder of(final McpServerTypeTool template) { + McpServerTypeToolBuilder builder = new McpServerTypeToolBuilder(); + builder.name = template.getName(); + builder.description = template.getDescription(); + builder.operationType = template.getOperationType(); + builder.groups = template.getGroups(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeToolImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeToolImpl.java new file mode 100644 index 00000000000..3c8eb40a672 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeToolImpl.java @@ -0,0 +1,149 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Describes a single tool available for an MCP Server type and major version.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerTypeToolImpl implements McpServerTypeTool, ModelBase { + + private String name; + + private String description; + + private String operationType; + + private java.util.List groups; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerTypeToolImpl(@JsonProperty("name") final String name, + @JsonProperty("description") final String description, + @JsonProperty("operationType") final String operationType, + @JsonProperty("groups") final java.util.List groups) { + this.name = name; + this.description = description; + this.operationType = operationType; + this.groups = groups; + } + + /** + * create empty instance + */ + public McpServerTypeToolImpl() { + } + + /** + *

Identifier of the tool, such as read_products or create_orders. Matches a value of McpServerTool.

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

Human-readable description of what the tool does. Omitted when no description is available.

+ */ + + public String getDescription() { + return this.description; + } + + /** + *

Whether the tool reads (read) or modifies (write) data.

+ */ + + public String getOperationType() { + return this.operationType; + } + + /** + *

Group identifiers the tool belongs to, such as all or read_all. Empty when the tool belongs to no group.

+ */ + + public java.util.List getGroups() { + return this.groups; + } + + public void setName(final String name) { + this.name = name; + } + + public void setDescription(final String description) { + this.description = description; + } + + public void setOperationType(final String operationType) { + this.operationType = operationType; + } + + public void setGroups(final String... groups) { + this.groups = new ArrayList<>(Arrays.asList(groups)); + } + + public void setGroups(final java.util.List groups) { + this.groups = groups; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + McpServerTypeToolImpl that = (McpServerTypeToolImpl) o; + + return new EqualsBuilder().append(name, that.name) + .append(description, that.description) + .append(operationType, that.operationType) + .append(groups, that.groups) + .append(name, that.name) + .append(description, that.description) + .append(operationType, that.operationType) + .append(groups, that.groups) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(name) + .append(description) + .append(operationType) + .append(groups) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("name", name) + .append("description", description) + .append("operationType", operationType) + .append("groups", groups) + .build(); + } + + @Override + public McpServerTypeTool copyDeep() { + return McpServerTypeTool.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdate.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdate.java new file mode 100644 index 00000000000..3755e369d5b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdate.java @@ -0,0 +1,157 @@ + +package com.commercetools.api.models.mcp_server; + +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 io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Update payload for an MCP Server. Specifies the expected version and the update actions to apply.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerUpdate mcpServerUpdate = McpServerUpdate.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 = McpServerUpdateImpl.class) +public interface McpServerUpdate { + + /** + *

Expected version of the MCP Server on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

+ * @return version + */ + @NotNull + @JsonProperty("version") + public Long getVersion(); + + /** + *

Update actions to be performed on the MCP Server.

+ * @return actions + */ + @NotNull + @Valid + @JsonProperty("actions") + public List getActions(); + + /** + *

Expected version of the MCP Server on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

+ * @param version value to be set + */ + + public void setVersion(final Long version); + + /** + *

Update actions to be performed on the MCP Server.

+ * @param actions values to be set + */ + + @JsonIgnore + public void setActions(final McpServerUpdateAction... actions); + + /** + *

Update actions to be performed on the MCP Server.

+ * @param actions values to be set + */ + + public void setActions(final List actions); + + /** + * factory method + * @return instance of McpServerUpdate + */ + public static McpServerUpdate of() { + return new McpServerUpdateImpl(); + } + + /** + * factory method to create a shallow copy McpServerUpdate + * @param template instance to be copied + * @return copy instance + */ + public static McpServerUpdate of(final McpServerUpdate template) { + McpServerUpdateImpl instance = new McpServerUpdateImpl(); + instance.setVersion(template.getVersion()); + instance.setActions(template.getActions()); + return instance; + } + + public McpServerUpdate copyDeep(); + + /** + * factory method to create a deep copy of McpServerUpdate + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerUpdate deepCopy(@Nullable final McpServerUpdate template) { + if (template == null) { + return null; + } + McpServerUpdateImpl instance = new McpServerUpdateImpl(); + instance.setVersion(template.getVersion()); + instance.setActions(Optional.ofNullable(template.getActions()) + .map(t -> t.stream() + .map(com.commercetools.api.models.mcp_server.McpServerUpdateAction::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for McpServerUpdate + * @return builder + */ + public static McpServerUpdateBuilder builder() { + return McpServerUpdateBuilder.of(); + } + + /** + * create builder for McpServerUpdate instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerUpdateBuilder builder(final McpServerUpdate template) { + return McpServerUpdateBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerUpdate(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerUpdateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdateAction.java new file mode 100644 index 00000000000..e9c26eefff8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdateAction.java @@ -0,0 +1,173 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Base type for MCP Server update actions. The action discriminator identifies the concrete update action to perform.

+ * + *
+ * Example to create a subtype instance using the builder pattern + *
+ *

+ *     McpServerUpdateAction mcpServerUpdateAction = McpServerUpdateAction.addToolBuilder()
+ *             tool(McpServerTool.ALL)
+ *             .build()
+ * 
+ *
+ */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "action", defaultImpl = McpServerUpdateActionImpl.class, visible = true) +@JsonDeserialize(as = McpServerUpdateActionImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface McpServerUpdateAction { + + /** + *

Identifies the update action to perform, such as addTool, removeTool, or setTools.

+ * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + public McpServerUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of McpServerUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static McpServerUpdateAction deepCopy(@Nullable final McpServerUpdateAction template) { + if (template == null) { + return null; + } + + if (!(template instanceof McpServerUpdateActionImpl)) { + return template.copyDeep(); + } + McpServerUpdateActionImpl instance = new McpServerUpdateActionImpl(); + return instance; + } + + /** + * builder for addTool subtype + * @return builder + */ + public static com.commercetools.api.models.mcp_server.McpServerAddToolActionBuilder addToolBuilder() { + return com.commercetools.api.models.mcp_server.McpServerAddToolActionBuilder.of(); + } + + /** + * builder for addToolCustomization subtype + * @return builder + */ + public static com.commercetools.api.models.mcp_server.McpServerAddToolCustomizationActionBuilder addToolCustomizationBuilder() { + return com.commercetools.api.models.mcp_server.McpServerAddToolCustomizationActionBuilder.of(); + } + + /** + * builder for removeTool subtype + * @return builder + */ + public static com.commercetools.api.models.mcp_server.McpServerRemoveToolActionBuilder removeToolBuilder() { + return com.commercetools.api.models.mcp_server.McpServerRemoveToolActionBuilder.of(); + } + + /** + * builder for removeToolCustomization subtype + * @return builder + */ + public static com.commercetools.api.models.mcp_server.McpServerRemoveToolCustomizationActionBuilder removeToolCustomizationBuilder() { + return com.commercetools.api.models.mcp_server.McpServerRemoveToolCustomizationActionBuilder.of(); + } + + /** + * builder for setDescription subtype + * @return builder + */ + public static com.commercetools.api.models.mcp_server.McpServerSetDescriptionActionBuilder setDescriptionBuilder() { + return com.commercetools.api.models.mcp_server.McpServerSetDescriptionActionBuilder.of(); + } + + /** + * builder for setJsonOutputFiltering subtype + * @return builder + */ + public static com.commercetools.api.models.mcp_server.McpServerSetJsonOutputFilteringActionBuilder setJsonOutputFilteringBuilder() { + return com.commercetools.api.models.mcp_server.McpServerSetJsonOutputFilteringActionBuilder.of(); + } + + /** + * builder for setName subtype + * @return builder + */ + public static com.commercetools.api.models.mcp_server.McpServerSetNameActionBuilder setNameBuilder() { + return com.commercetools.api.models.mcp_server.McpServerSetNameActionBuilder.of(); + } + + /** + * builder for setState subtype + * @return builder + */ + public static com.commercetools.api.models.mcp_server.McpServerSetStateActionBuilder setStateBuilder() { + return com.commercetools.api.models.mcp_server.McpServerSetStateActionBuilder.of(); + } + + /** + * builder for setToolCustomizations subtype + * @return builder + */ + public static com.commercetools.api.models.mcp_server.McpServerSetToolCustomizationsActionBuilder setToolCustomizationsBuilder() { + return com.commercetools.api.models.mcp_server.McpServerSetToolCustomizationsActionBuilder.of(); + } + + /** + * builder for setToolOutputFormatting subtype + * @return builder + */ + public static com.commercetools.api.models.mcp_server.McpServerSetToolOutputFormattingActionBuilder setToolOutputFormattingBuilder() { + return com.commercetools.api.models.mcp_server.McpServerSetToolOutputFormattingActionBuilder.of(); + } + + /** + * builder for setTools subtype + * @return builder + */ + public static com.commercetools.api.models.mcp_server.McpServerSetToolsActionBuilder setToolsBuilder() { + return com.commercetools.api.models.mcp_server.McpServerSetToolsActionBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMcpServerUpdateAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/McpServerUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdateActionBuilder.java new file mode 100644 index 00000000000..f1b331bafc1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdateActionBuilder.java @@ -0,0 +1,66 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * McpServerUpdateActionBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerUpdateActionBuilder { + + public com.commercetools.api.models.mcp_server.McpServerAddToolActionBuilder addToolBuilder() { + return com.commercetools.api.models.mcp_server.McpServerAddToolActionBuilder.of(); + } + + public com.commercetools.api.models.mcp_server.McpServerAddToolCustomizationActionBuilder addToolCustomizationBuilder() { + return com.commercetools.api.models.mcp_server.McpServerAddToolCustomizationActionBuilder.of(); + } + + public com.commercetools.api.models.mcp_server.McpServerRemoveToolActionBuilder removeToolBuilder() { + return com.commercetools.api.models.mcp_server.McpServerRemoveToolActionBuilder.of(); + } + + public com.commercetools.api.models.mcp_server.McpServerRemoveToolCustomizationActionBuilder removeToolCustomizationBuilder() { + return com.commercetools.api.models.mcp_server.McpServerRemoveToolCustomizationActionBuilder.of(); + } + + public com.commercetools.api.models.mcp_server.McpServerSetDescriptionActionBuilder setDescriptionBuilder() { + return com.commercetools.api.models.mcp_server.McpServerSetDescriptionActionBuilder.of(); + } + + public com.commercetools.api.models.mcp_server.McpServerSetJsonOutputFilteringActionBuilder setJsonOutputFilteringBuilder() { + return com.commercetools.api.models.mcp_server.McpServerSetJsonOutputFilteringActionBuilder.of(); + } + + public com.commercetools.api.models.mcp_server.McpServerSetNameActionBuilder setNameBuilder() { + return com.commercetools.api.models.mcp_server.McpServerSetNameActionBuilder.of(); + } + + public com.commercetools.api.models.mcp_server.McpServerSetStateActionBuilder setStateBuilder() { + return com.commercetools.api.models.mcp_server.McpServerSetStateActionBuilder.of(); + } + + public com.commercetools.api.models.mcp_server.McpServerSetToolCustomizationsActionBuilder setToolCustomizationsBuilder() { + return com.commercetools.api.models.mcp_server.McpServerSetToolCustomizationsActionBuilder.of(); + } + + public com.commercetools.api.models.mcp_server.McpServerSetToolOutputFormattingActionBuilder setToolOutputFormattingBuilder() { + return com.commercetools.api.models.mcp_server.McpServerSetToolOutputFormattingActionBuilder.of(); + } + + public com.commercetools.api.models.mcp_server.McpServerSetToolsActionBuilder setToolsBuilder() { + return com.commercetools.api.models.mcp_server.McpServerSetToolsActionBuilder.of(); + } + + /** + * factory method for an instance of McpServerUpdateActionBuilder + * @return builder + */ + public static McpServerUpdateActionBuilder of() { + return new McpServerUpdateActionBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdateActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdateActionImpl.java new file mode 100644 index 00000000000..7dde06b655b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdateActionImpl.java @@ -0,0 +1,77 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Base type for MCP Server update actions. The action discriminator identifies the concrete update action to perform.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerUpdateActionImpl implements McpServerUpdateAction, ModelBase { + + private String action; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerUpdateActionImpl(@JsonProperty("action") final String action) { + this.action = action; + } + + /** + * create empty instance + */ + public McpServerUpdateActionImpl() { + } + + /** + *

Identifies the update action to perform, such as addTool, removeTool, or setTools.

+ */ + + 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; + + McpServerUpdateActionImpl that = (McpServerUpdateActionImpl) 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 McpServerUpdateAction copyDeep() { + return McpServerUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdateBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdateBuilder.java new file mode 100644 index 00000000000..23f7781e1ea --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdateBuilder.java @@ -0,0 +1,166 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * McpServerUpdateBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     McpServerUpdate mcpServerUpdate = McpServerUpdate.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 McpServerUpdateBuilder implements Builder { + + private Long version; + + private java.util.List actions; + + /** + *

Expected version of the MCP Server on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

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

Update actions to be performed on the MCP Server.

+ * @param actions value to be set + * @return Builder + */ + + public McpServerUpdateBuilder actions( + final com.commercetools.api.models.mcp_server.McpServerUpdateAction... actions) { + this.actions = new ArrayList<>(Arrays.asList(actions)); + return this; + } + + /** + *

Update actions to be performed on the MCP Server.

+ * @param actions value to be set + * @return Builder + */ + + public McpServerUpdateBuilder actions( + final java.util.List actions) { + this.actions = actions; + return this; + } + + /** + *

Update actions to be performed on the MCP Server.

+ * @param actions value to be set + * @return Builder + */ + + public McpServerUpdateBuilder plusActions( + final com.commercetools.api.models.mcp_server.McpServerUpdateAction... actions) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions.addAll(Arrays.asList(actions)); + return this; + } + + /** + *

Update actions to be performed on the MCP Server.

+ * @param builder function to build the actions value + * @return Builder + */ + + public McpServerUpdateBuilder plusActions( + Function> builder) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions + .add(builder.apply(com.commercetools.api.models.mcp_server.McpServerUpdateActionBuilder.of()).build()); + return this; + } + + /** + *

Update actions to be performed on the MCP Server.

+ * @param builder function to build the actions value + * @return Builder + */ + + public McpServerUpdateBuilder withActions( + Function> builder) { + this.actions = new ArrayList<>(); + this.actions + .add(builder.apply(com.commercetools.api.models.mcp_server.McpServerUpdateActionBuilder.of()).build()); + return this; + } + + /** + *

Expected version of the MCP Server on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

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

Update actions to be performed on the MCP Server.

+ * @return actions + */ + + public java.util.List getActions() { + return this.actions; + } + + /** + * builds McpServerUpdate with checking for non-null required values + * @return McpServerUpdate + */ + public McpServerUpdate build() { + Objects.requireNonNull(version, McpServerUpdate.class + ": version is missing"); + Objects.requireNonNull(actions, McpServerUpdate.class + ": actions is missing"); + return new McpServerUpdateImpl(version, actions); + } + + /** + * builds McpServerUpdate without checking for non-null required values + * @return McpServerUpdate + */ + public McpServerUpdate buildUnchecked() { + return new McpServerUpdateImpl(version, actions); + } + + /** + * factory method for an instance of McpServerUpdateBuilder + * @return builder + */ + public static McpServerUpdateBuilder of() { + return new McpServerUpdateBuilder(); + } + + /** + * create builder for McpServerUpdate instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static McpServerUpdateBuilder of(final McpServerUpdate template) { + McpServerUpdateBuilder builder = new McpServerUpdateBuilder(); + 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/mcp_server/McpServerUpdateImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdateImpl.java new file mode 100644 index 00000000000..acc834e0ea1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdateImpl.java @@ -0,0 +1,108 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Update payload for an MCP Server. Specifies the expected version and the update actions to apply.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class McpServerUpdateImpl implements McpServerUpdate, ModelBase { + + private Long version; + + private java.util.List actions; + + /** + * create instance with all properties + */ + @JsonCreator + McpServerUpdateImpl(@JsonProperty("version") final Long version, + @JsonProperty("actions") final java.util.List actions) { + this.version = version; + this.actions = actions; + } + + /** + * create empty instance + */ + public McpServerUpdateImpl() { + } + + /** + *

Expected version of the MCP Server on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

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

Update actions to be performed on the MCP Server.

+ */ + + 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.mcp_server.McpServerUpdateAction... 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; + + McpServerUpdateImpl that = (McpServerUpdateImpl) 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 McpServerUpdate copyDeep() { + return McpServerUpdate.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ParameterOverride.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ParameterOverride.java new file mode 100644 index 00000000000..1f11188c570 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ParameterOverride.java @@ -0,0 +1,200 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Override applied to a single parameter of a tool's input schema. At least one of description, const, default, or allowedTypes must be present. const is mutually exclusive with both default and allowedTypes. Parameter values are JSON values.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ParameterOverride parameterOverride = ParameterOverride.builder()
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ParameterOverrideImpl.class) +public interface ParameterOverride { + + /** + *

Name of the parameter in the tool's input schema to override.

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

Replacement description for the parameter, shown to the AI agent.

+ * @return description + */ + + @JsonProperty("description") + public String getDescription(); + + /** + *

Pins the parameter to a fixed value. Mutually exclusive with default and allowedTypes.

+ * @return const + */ + + @JsonProperty("const") + public Object getConst(); + + /** + *

Default value applied when the caller omits the parameter. Mutually exclusive with const.

+ * @return default + */ + + @JsonProperty("default") + public Object getDefault(); + + /** + *

Restricts accepted values to this set. Mutually exclusive with const.

+ * @return allowedTypes + */ + + @JsonProperty("allowedTypes") + public List getAllowedTypes(); + + /** + *

Name of the parameter in the tool's input schema to override.

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

Replacement description for the parameter, shown to the AI agent.

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

Pins the parameter to a fixed value. Mutually exclusive with default and allowedTypes.

+ * @param _const value to be set + */ + + public void setConst(final Object _const); + + /** + *

Default value applied when the caller omits the parameter. Mutually exclusive with const.

+ * @param _default value to be set + */ + + public void setDefault(final Object _default); + + /** + *

Restricts accepted values to this set. Mutually exclusive with const.

+ * @param allowedTypes values to be set + */ + + @JsonIgnore + public void setAllowedTypes(final Object... allowedTypes); + + /** + *

Restricts accepted values to this set. Mutually exclusive with const.

+ * @param allowedTypes values to be set + */ + + public void setAllowedTypes(final List allowedTypes); + + /** + * factory method + * @return instance of ParameterOverride + */ + public static ParameterOverride of() { + return new ParameterOverrideImpl(); + } + + /** + * factory method to create a shallow copy ParameterOverride + * @param template instance to be copied + * @return copy instance + */ + public static ParameterOverride of(final ParameterOverride template) { + ParameterOverrideImpl instance = new ParameterOverrideImpl(); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setConst(template.getConst()); + instance.setDefault(template.getDefault()); + instance.setAllowedTypes(template.getAllowedTypes()); + return instance; + } + + public ParameterOverride copyDeep(); + + /** + * factory method to create a deep copy of ParameterOverride + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ParameterOverride deepCopy(@Nullable final ParameterOverride template) { + if (template == null) { + return null; + } + ParameterOverrideImpl instance = new ParameterOverrideImpl(); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setConst(template.getConst()); + instance.setDefault(template.getDefault()); + instance.setAllowedTypes(Optional.ofNullable(template.getAllowedTypes()).map(ArrayList::new).orElse(null)); + return instance; + } + + /** + * builder factory method for ParameterOverride + * @return builder + */ + public static ParameterOverrideBuilder builder() { + return ParameterOverrideBuilder.of(); + } + + /** + * create builder for ParameterOverride instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ParameterOverrideBuilder builder(final ParameterOverride template) { + return ParameterOverrideBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withParameterOverride(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/ParameterOverrideBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ParameterOverrideBuilder.java new file mode 100644 index 00000000000..141ed3e6d4e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ParameterOverrideBuilder.java @@ -0,0 +1,209 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ParameterOverrideBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ParameterOverride parameterOverride = ParameterOverride.builder()
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ParameterOverrideBuilder implements Builder { + + private String name; + + @Nullable + private String description; + + @Nullable + private java.lang.Object _const; + + @Nullable + private java.lang.Object _default; + + @Nullable + private java.util.List allowedTypes; + + /** + *

Name of the parameter in the tool's input schema to override.

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

Replacement description for the parameter, shown to the AI agent.

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

Pins the parameter to a fixed value. Mutually exclusive with default and allowedTypes.

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

Default value applied when the caller omits the parameter. Mutually exclusive with const.

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

Restricts accepted values to this set. Mutually exclusive with const.

+ * @param allowedTypes value to be set + * @return Builder + */ + + public ParameterOverrideBuilder allowedTypes(@Nullable final java.lang.Object... allowedTypes) { + this.allowedTypes = new ArrayList<>(Arrays.asList(allowedTypes)); + return this; + } + + /** + *

Restricts accepted values to this set. Mutually exclusive with const.

+ * @param allowedTypes value to be set + * @return Builder + */ + + public ParameterOverrideBuilder allowedTypes(@Nullable final java.util.List allowedTypes) { + this.allowedTypes = allowedTypes; + return this; + } + + /** + *

Restricts accepted values to this set. Mutually exclusive with const.

+ * @param allowedTypes value to be set + * @return Builder + */ + + public ParameterOverrideBuilder plusAllowedTypes(@Nullable final java.lang.Object... allowedTypes) { + if (this.allowedTypes == null) { + this.allowedTypes = new ArrayList<>(); + } + this.allowedTypes.addAll(Arrays.asList(allowedTypes)); + return this; + } + + /** + *

Name of the parameter in the tool's input schema to override.

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

Replacement description for the parameter, shown to the AI agent.

+ * @return description + */ + + @Nullable + public String getDescription() { + return this.description; + } + + /** + *

Pins the parameter to a fixed value. Mutually exclusive with default and allowedTypes.

+ * @return const + */ + + @Nullable + public java.lang.Object getConst() { + return this._const; + } + + /** + *

Default value applied when the caller omits the parameter. Mutually exclusive with const.

+ * @return default + */ + + @Nullable + public java.lang.Object getDefault() { + return this._default; + } + + /** + *

Restricts accepted values to this set. Mutually exclusive with const.

+ * @return allowedTypes + */ + + @Nullable + public java.util.List getAllowedTypes() { + return this.allowedTypes; + } + + /** + * builds ParameterOverride with checking for non-null required values + * @return ParameterOverride + */ + public ParameterOverride build() { + Objects.requireNonNull(name, ParameterOverride.class + ": name is missing"); + return new ParameterOverrideImpl(name, description, _const, _default, allowedTypes); + } + + /** + * builds ParameterOverride without checking for non-null required values + * @return ParameterOverride + */ + public ParameterOverride buildUnchecked() { + return new ParameterOverrideImpl(name, description, _const, _default, allowedTypes); + } + + /** + * factory method for an instance of ParameterOverrideBuilder + * @return builder + */ + public static ParameterOverrideBuilder of() { + return new ParameterOverrideBuilder(); + } + + /** + * create builder for ParameterOverride instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ParameterOverrideBuilder of(final ParameterOverride template) { + ParameterOverrideBuilder builder = new ParameterOverrideBuilder(); + builder.name = template.getName(); + builder.description = template.getDescription(); + builder._const = template.getConst(); + builder._default = template.getDefault(); + builder.allowedTypes = template.getAllowedTypes(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ParameterOverrideImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ParameterOverrideImpl.java new file mode 100644 index 00000000000..6d011db062c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ParameterOverrideImpl.java @@ -0,0 +1,168 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Override applied to a single parameter of a tool's input schema. At least one of description, const, default, or allowedTypes must be present. const is mutually exclusive with both default and allowedTypes. Parameter values are JSON values.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ParameterOverrideImpl implements ParameterOverride, ModelBase { + + private String name; + + private String description; + + private java.lang.Object _const; + + private java.lang.Object _default; + + private java.util.List allowedTypes; + + /** + * create instance with all properties + */ + @JsonCreator + ParameterOverrideImpl(@JsonProperty("name") final String name, + @JsonProperty("description") final String description, @JsonProperty("const") final java.lang.Object _const, + @JsonProperty("default") final java.lang.Object _default, + @JsonProperty("allowedTypes") final java.util.List allowedTypes) { + this.name = name; + this.description = description; + this._const = _const; + this._default = _default; + this.allowedTypes = allowedTypes; + } + + /** + * create empty instance + */ + public ParameterOverrideImpl() { + } + + /** + *

Name of the parameter in the tool's input schema to override.

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

Replacement description for the parameter, shown to the AI agent.

+ */ + + public String getDescription() { + return this.description; + } + + /** + *

Pins the parameter to a fixed value. Mutually exclusive with default and allowedTypes.

+ */ + + public java.lang.Object getConst() { + return this._const; + } + + /** + *

Default value applied when the caller omits the parameter. Mutually exclusive with const.

+ */ + + public java.lang.Object getDefault() { + return this._default; + } + + /** + *

Restricts accepted values to this set. Mutually exclusive with const.

+ */ + + public java.util.List getAllowedTypes() { + return this.allowedTypes; + } + + public void setName(final String name) { + this.name = name; + } + + public void setDescription(final String description) { + this.description = description; + } + + public void setConst(final java.lang.Object _const) { + this._const = _const; + } + + public void setDefault(final java.lang.Object _default) { + this._default = _default; + } + + public void setAllowedTypes(final java.lang.Object... allowedTypes) { + this.allowedTypes = new ArrayList<>(Arrays.asList(allowedTypes)); + } + + public void setAllowedTypes(final java.util.List allowedTypes) { + this.allowedTypes = allowedTypes; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ParameterOverrideImpl that = (ParameterOverrideImpl) o; + + return new EqualsBuilder().append(name, that.name) + .append(description, that.description) + .append(_const, that._const) + .append(_default, that._default) + .append(allowedTypes, that.allowedTypes) + .append(name, that.name) + .append(description, that.description) + .append(_const, that._const) + .append(_default, that._default) + .append(allowedTypes, that.allowedTypes) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(name) + .append(description) + .append(_const) + .append(_default) + .append(allowedTypes) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("name", name) + .append("description", description) + .append("const", _const) + .append("default", _default) + .append("allowedTypes", allowedTypes) + .build(); + } + + @Override + public ParameterOverride copyDeep() { + return ParameterOverride.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/RemoveToolCustomizationTarget.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/RemoveToolCustomizationTarget.java new file mode 100644 index 00000000000..a4bc8b28be3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/RemoveToolCustomizationTarget.java @@ -0,0 +1,124 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Identifies a tool customization to remove by its tool name.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     RemoveToolCustomizationTarget removeToolCustomizationTarget = RemoveToolCustomizationTarget.builder()
+ *             .tool(McpServerTool.ALL)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RemoveToolCustomizationTargetImpl.class) +public interface RemoveToolCustomizationTarget { + + /** + *

Name of the tool whose customization is removed.

+ * @return tool + */ + @NotNull + @JsonProperty("tool") + public McpServerTool getTool(); + + /** + *

Name of the tool whose customization is removed.

+ * @param tool value to be set + */ + + public void setTool(final McpServerTool tool); + + /** + * factory method + * @return instance of RemoveToolCustomizationTarget + */ + public static RemoveToolCustomizationTarget of() { + return new RemoveToolCustomizationTargetImpl(); + } + + /** + * factory method to create a shallow copy RemoveToolCustomizationTarget + * @param template instance to be copied + * @return copy instance + */ + public static RemoveToolCustomizationTarget of(final RemoveToolCustomizationTarget template) { + RemoveToolCustomizationTargetImpl instance = new RemoveToolCustomizationTargetImpl(); + instance.setTool(template.getTool()); + return instance; + } + + public RemoveToolCustomizationTarget copyDeep(); + + /** + * factory method to create a deep copy of RemoveToolCustomizationTarget + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RemoveToolCustomizationTarget deepCopy(@Nullable final RemoveToolCustomizationTarget template) { + if (template == null) { + return null; + } + RemoveToolCustomizationTargetImpl instance = new RemoveToolCustomizationTargetImpl(); + instance.setTool(template.getTool()); + return instance; + } + + /** + * builder factory method for RemoveToolCustomizationTarget + * @return builder + */ + public static RemoveToolCustomizationTargetBuilder builder() { + return RemoveToolCustomizationTargetBuilder.of(); + } + + /** + * create builder for RemoveToolCustomizationTarget instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RemoveToolCustomizationTargetBuilder builder(final RemoveToolCustomizationTarget template) { + return RemoveToolCustomizationTargetBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRemoveToolCustomizationTarget(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/RemoveToolCustomizationTargetBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/RemoveToolCustomizationTargetBuilder.java new file mode 100644 index 00000000000..074a033c269 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/RemoveToolCustomizationTargetBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.api.models.mcp_server; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RemoveToolCustomizationTargetBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     RemoveToolCustomizationTarget removeToolCustomizationTarget = RemoveToolCustomizationTarget.builder()
+ *             .tool(McpServerTool.ALL)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RemoveToolCustomizationTargetBuilder implements Builder { + + private com.commercetools.api.models.mcp_server.McpServerTool tool; + + /** + *

Name of the tool whose customization is removed.

+ * @param tool value to be set + * @return Builder + */ + + public RemoveToolCustomizationTargetBuilder tool(final com.commercetools.api.models.mcp_server.McpServerTool tool) { + this.tool = tool; + return this; + } + + /** + *

Name of the tool whose customization is removed.

+ * @return tool + */ + + public com.commercetools.api.models.mcp_server.McpServerTool getTool() { + return this.tool; + } + + /** + * builds RemoveToolCustomizationTarget with checking for non-null required values + * @return RemoveToolCustomizationTarget + */ + public RemoveToolCustomizationTarget build() { + Objects.requireNonNull(tool, RemoveToolCustomizationTarget.class + ": tool is missing"); + return new RemoveToolCustomizationTargetImpl(tool); + } + + /** + * builds RemoveToolCustomizationTarget without checking for non-null required values + * @return RemoveToolCustomizationTarget + */ + public RemoveToolCustomizationTarget buildUnchecked() { + return new RemoveToolCustomizationTargetImpl(tool); + } + + /** + * factory method for an instance of RemoveToolCustomizationTargetBuilder + * @return builder + */ + public static RemoveToolCustomizationTargetBuilder of() { + return new RemoveToolCustomizationTargetBuilder(); + } + + /** + * create builder for RemoveToolCustomizationTarget instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RemoveToolCustomizationTargetBuilder of(final RemoveToolCustomizationTarget template) { + RemoveToolCustomizationTargetBuilder builder = new RemoveToolCustomizationTargetBuilder(); + builder.tool = template.getTool(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/RemoveToolCustomizationTargetImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/RemoveToolCustomizationTargetImpl.java new file mode 100644 index 00000000000..a8eb4b3fc77 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/RemoveToolCustomizationTargetImpl.java @@ -0,0 +1,82 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Identifies a tool customization to remove by its tool name.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RemoveToolCustomizationTargetImpl implements RemoveToolCustomizationTarget, ModelBase { + + private com.commercetools.api.models.mcp_server.McpServerTool tool; + + /** + * create instance with all properties + */ + @JsonCreator + RemoveToolCustomizationTargetImpl( + @JsonProperty("tool") final com.commercetools.api.models.mcp_server.McpServerTool tool) { + this.tool = tool; + } + + /** + * create empty instance + */ + public RemoveToolCustomizationTargetImpl() { + } + + /** + *

Name of the tool whose customization is removed.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerTool getTool() { + return this.tool; + } + + public void setTool(final com.commercetools.api.models.mcp_server.McpServerTool tool) { + this.tool = tool; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RemoveToolCustomizationTargetImpl that = (RemoveToolCustomizationTargetImpl) o; + + return new EqualsBuilder().append(tool, that.tool).append(tool, that.tool).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(tool).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("tool", tool).build(); + } + + @Override + public RemoveToolCustomizationTarget copyDeep() { + return RemoveToolCustomizationTarget.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ToolCustomization.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ToolCustomization.java new file mode 100644 index 00000000000..34ee8cfe390 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ToolCustomization.java @@ -0,0 +1,172 @@ + +package com.commercetools.api.models.mcp_server; + +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 io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

Customization applied to a single tool at tools/list and tools/call time. At least one of description or a non-empty parameters list must be present; a customization with neither has no effect and is rejected. Parameter names within parameters must be unique.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ToolCustomization toolCustomization = ToolCustomization.builder()
+ *             .tool(McpServerTool.ALL)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ToolCustomizationImpl.class) +public interface ToolCustomization { + + /** + *

Name of the tool to customize, such as read_products or create_orders. Must be one of the tools enabled on the MCP Server.

+ * @return tool + */ + @NotNull + @JsonProperty("tool") + public McpServerTool getTool(); + + /** + *

Replacement description for the tool, shown to the AI agent.

+ * @return description + */ + + @JsonProperty("description") + public String getDescription(); + + /** + *

Overrides applied to individual parameters of the tool's input schema.

+ * @return parameters + */ + @Valid + @JsonProperty("parameters") + public List getParameters(); + + /** + *

Name of the tool to customize, such as read_products or create_orders. Must be one of the tools enabled on the MCP Server.

+ * @param tool value to be set + */ + + public void setTool(final McpServerTool tool); + + /** + *

Replacement description for the tool, shown to the AI agent.

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

Overrides applied to individual parameters of the tool's input schema.

+ * @param parameters values to be set + */ + + @JsonIgnore + public void setParameters(final ParameterOverride... parameters); + + /** + *

Overrides applied to individual parameters of the tool's input schema.

+ * @param parameters values to be set + */ + + public void setParameters(final List parameters); + + /** + * factory method + * @return instance of ToolCustomization + */ + public static ToolCustomization of() { + return new ToolCustomizationImpl(); + } + + /** + * factory method to create a shallow copy ToolCustomization + * @param template instance to be copied + * @return copy instance + */ + public static ToolCustomization of(final ToolCustomization template) { + ToolCustomizationImpl instance = new ToolCustomizationImpl(); + instance.setTool(template.getTool()); + instance.setDescription(template.getDescription()); + instance.setParameters(template.getParameters()); + return instance; + } + + public ToolCustomization copyDeep(); + + /** + * factory method to create a deep copy of ToolCustomization + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ToolCustomization deepCopy(@Nullable final ToolCustomization template) { + if (template == null) { + return null; + } + ToolCustomizationImpl instance = new ToolCustomizationImpl(); + instance.setTool(template.getTool()); + instance.setDescription(template.getDescription()); + instance.setParameters(Optional.ofNullable(template.getParameters()) + .map(t -> t.stream() + .map(com.commercetools.api.models.mcp_server.ParameterOverride::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for ToolCustomization + * @return builder + */ + public static ToolCustomizationBuilder builder() { + return ToolCustomizationBuilder.of(); + } + + /** + * create builder for ToolCustomization instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ToolCustomizationBuilder builder(final ToolCustomization template) { + return ToolCustomizationBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withToolCustomization(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/mcp_server/ToolCustomizationBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ToolCustomizationBuilder.java new file mode 100644 index 00000000000..94329507a4e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ToolCustomizationBuilder.java @@ -0,0 +1,215 @@ + +package com.commercetools.api.models.mcp_server; + +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; + +/** + * ToolCustomizationBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ToolCustomization toolCustomization = ToolCustomization.builder()
+ *             .tool(McpServerTool.ALL)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ToolCustomizationBuilder implements Builder { + + private com.commercetools.api.models.mcp_server.McpServerTool tool; + + @Nullable + private String description; + + @Nullable + private java.util.List parameters; + + /** + *

Name of the tool to customize, such as read_products or create_orders. Must be one of the tools enabled on the MCP Server.

+ * @param tool value to be set + * @return Builder + */ + + public ToolCustomizationBuilder tool(final com.commercetools.api.models.mcp_server.McpServerTool tool) { + this.tool = tool; + return this; + } + + /** + *

Replacement description for the tool, shown to the AI agent.

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

Overrides applied to individual parameters of the tool's input schema.

+ * @param parameters value to be set + * @return Builder + */ + + public ToolCustomizationBuilder parameters( + @Nullable final com.commercetools.api.models.mcp_server.ParameterOverride... parameters) { + this.parameters = new ArrayList<>(Arrays.asList(parameters)); + return this; + } + + /** + *

Overrides applied to individual parameters of the tool's input schema.

+ * @param parameters value to be set + * @return Builder + */ + + public ToolCustomizationBuilder parameters( + @Nullable final java.util.List parameters) { + this.parameters = parameters; + return this; + } + + /** + *

Overrides applied to individual parameters of the tool's input schema.

+ * @param parameters value to be set + * @return Builder + */ + + public ToolCustomizationBuilder plusParameters( + @Nullable final com.commercetools.api.models.mcp_server.ParameterOverride... parameters) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); + } + this.parameters.addAll(Arrays.asList(parameters)); + return this; + } + + /** + *

Overrides applied to individual parameters of the tool's input schema.

+ * @param builder function to build the parameters value + * @return Builder + */ + + public ToolCustomizationBuilder plusParameters( + Function builder) { + if (this.parameters == null) { + this.parameters = new ArrayList<>(); + } + this.parameters + .add(builder.apply(com.commercetools.api.models.mcp_server.ParameterOverrideBuilder.of()).build()); + return this; + } + + /** + *

Overrides applied to individual parameters of the tool's input schema.

+ * @param builder function to build the parameters value + * @return Builder + */ + + public ToolCustomizationBuilder withParameters( + Function builder) { + this.parameters = new ArrayList<>(); + this.parameters + .add(builder.apply(com.commercetools.api.models.mcp_server.ParameterOverrideBuilder.of()).build()); + return this; + } + + /** + *

Overrides applied to individual parameters of the tool's input schema.

+ * @param builder function to build the parameters value + * @return Builder + */ + + public ToolCustomizationBuilder addParameters( + Function builder) { + return plusParameters(builder.apply(com.commercetools.api.models.mcp_server.ParameterOverrideBuilder.of())); + } + + /** + *

Overrides applied to individual parameters of the tool's input schema.

+ * @param builder function to build the parameters value + * @return Builder + */ + + public ToolCustomizationBuilder setParameters( + Function builder) { + return parameters(builder.apply(com.commercetools.api.models.mcp_server.ParameterOverrideBuilder.of())); + } + + /** + *

Name of the tool to customize, such as read_products or create_orders. Must be one of the tools enabled on the MCP Server.

+ * @return tool + */ + + public com.commercetools.api.models.mcp_server.McpServerTool getTool() { + return this.tool; + } + + /** + *

Replacement description for the tool, shown to the AI agent.

+ * @return description + */ + + @Nullable + public String getDescription() { + return this.description; + } + + /** + *

Overrides applied to individual parameters of the tool's input schema.

+ * @return parameters + */ + + @Nullable + public java.util.List getParameters() { + return this.parameters; + } + + /** + * builds ToolCustomization with checking for non-null required values + * @return ToolCustomization + */ + public ToolCustomization build() { + Objects.requireNonNull(tool, ToolCustomization.class + ": tool is missing"); + return new ToolCustomizationImpl(tool, description, parameters); + } + + /** + * builds ToolCustomization without checking for non-null required values + * @return ToolCustomization + */ + public ToolCustomization buildUnchecked() { + return new ToolCustomizationImpl(tool, description, parameters); + } + + /** + * factory method for an instance of ToolCustomizationBuilder + * @return builder + */ + public static ToolCustomizationBuilder of() { + return new ToolCustomizationBuilder(); + } + + /** + * create builder for ToolCustomization instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ToolCustomizationBuilder of(final ToolCustomization template) { + ToolCustomizationBuilder builder = new ToolCustomizationBuilder(); + builder.tool = template.getTool(); + builder.description = template.getDescription(); + builder.parameters = template.getParameters(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ToolCustomizationImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ToolCustomizationImpl.java new file mode 100644 index 00000000000..19ca86acb9a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/mcp_server/ToolCustomizationImpl.java @@ -0,0 +1,127 @@ + +package com.commercetools.api.models.mcp_server; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

Customization applied to a single tool at tools/list and tools/call time. At least one of description or a non-empty parameters list must be present; a customization with neither has no effect and is rejected. Parameter names within parameters must be unique.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ToolCustomizationImpl implements ToolCustomization, ModelBase { + + private com.commercetools.api.models.mcp_server.McpServerTool tool; + + private String description; + + private java.util.List parameters; + + /** + * create instance with all properties + */ + @JsonCreator + ToolCustomizationImpl(@JsonProperty("tool") final com.commercetools.api.models.mcp_server.McpServerTool tool, + @JsonProperty("description") final String description, + @JsonProperty("parameters") final java.util.List parameters) { + this.tool = tool; + this.description = description; + this.parameters = parameters; + } + + /** + * create empty instance + */ + public ToolCustomizationImpl() { + } + + /** + *

Name of the tool to customize, such as read_products or create_orders. Must be one of the tools enabled on the MCP Server.

+ */ + + public com.commercetools.api.models.mcp_server.McpServerTool getTool() { + return this.tool; + } + + /** + *

Replacement description for the tool, shown to the AI agent.

+ */ + + public String getDescription() { + return this.description; + } + + /** + *

Overrides applied to individual parameters of the tool's input schema.

+ */ + + public java.util.List getParameters() { + return this.parameters; + } + + public void setTool(final com.commercetools.api.models.mcp_server.McpServerTool tool) { + this.tool = tool; + } + + public void setDescription(final String description) { + this.description = description; + } + + public void setParameters(final com.commercetools.api.models.mcp_server.ParameterOverride... parameters) { + this.parameters = new ArrayList<>(Arrays.asList(parameters)); + } + + public void setParameters( + final java.util.List parameters) { + this.parameters = parameters; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ToolCustomizationImpl that = (ToolCustomizationImpl) o; + + return new EqualsBuilder().append(tool, that.tool) + .append(description, that.description) + .append(parameters, that.parameters) + .append(tool, that.tool) + .append(description, that.description) + .append(parameters, that.parameters) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(tool).append(description).append(parameters).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("tool", tool) + .append("description", description) + .append("parameters", parameters) + .build(); + } + + @Override + public ToolCustomization copyDeep() { + return ToolCustomization.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRecalculateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRecalculateAction.java index 245c65066fd..968b80a9b4c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRecalculateAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRecalculateAction.java @@ -38,8 +38,8 @@ public interface MyCartRecalculateAction extends MyCartUpdateAction { /** *
    - *
  • Leave empty or set to false to only update the Prices and TaxRates of the Line Items.
  • - *
  • Set to true to update the Line Items' product data (like name, variant and productType) also.
  • + *
  • Leave empty or set as false to update only the Prices and TaxRates of the Line Items. Prices inside the variant are only updated if updateProductData is true.
  • + *
  • Set as true to update the Product data (such as name, variant, productType, and Product Attributes) of the Line Items.
  • *
* @return updateProductData */ @@ -49,8 +49,8 @@ public interface MyCartRecalculateAction extends MyCartUpdateAction { /** *
    - *
  • Leave empty or set to false to only update the Prices and TaxRates of the Line Items.
  • - *
  • Set to true to update the Line Items' product data (like name, variant and productType) also.
  • + *
  • Leave empty or set as false to update only the Prices and TaxRates of the Line Items. Prices inside the variant are only updated if updateProductData is true.
  • + *
  • Set as true to update the Product data (such as name, variant, productType, and Product Attributes) of the Line Items.
  • *
* @param updateProductData value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRecalculateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRecalculateActionBuilder.java index 128bc468155..1a77d0a004b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRecalculateActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRecalculateActionBuilder.java @@ -27,8 +27,8 @@ public class MyCartRecalculateActionBuilder implements Builder - *
  • Leave empty or set to false to only update the Prices and TaxRates of the Line Items.
  • - *
  • Set to true to update the Line Items' product data (like name, variant and productType) also.
  • + *
  • Leave empty or set as false to update only the Prices and TaxRates of the Line Items. Prices inside the variant are only updated if updateProductData is true.
  • + *
  • Set as true to update the Product data (such as name, variant, productType, and Product Attributes) of the Line Items.
  • * * @param updateProductData value to be set * @return Builder @@ -41,8 +41,8 @@ public MyCartRecalculateActionBuilder updateProductData(@Nullable final Boolean /** *
      - *
    • Leave empty or set to false to only update the Prices and TaxRates of the Line Items.
    • - *
    • Set to true to update the Line Items' product data (like name, variant and productType) also.
    • + *
    • Leave empty or set as false to update only the Prices and TaxRates of the Line Items. Prices inside the variant are only updated if updateProductData is true.
    • + *
    • Set as true to update the Product data (such as name, variant, productType, and Product Attributes) of the Line Items.
    • *
    * @return updateProductData */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRecalculateActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRecalculateActionImpl.java index 50921303b5f..dff78176751 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRecalculateActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartRecalculateActionImpl.java @@ -54,8 +54,8 @@ public String getAction() { /** *
      - *
    • Leave empty or set to false to only update the Prices and TaxRates of the Line Items.
    • - *
    • Set to true to update the Line Items' product data (like name, variant and productType) also.
    • + *
    • Leave empty or set as false to update only the Prices and TaxRates of the Line Items. Prices inside the variant are only updated if updateProductData is true.
    • + *
    • Set as true to update the Product data (such as name, variant, productType, and Product Attributes) of the Line Items.
    • *
    */ 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 8b530346626..c1b0f845b54 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 @@ -2221,6 +2221,14 @@ public static com.commercetools.api.models.message.ProductTailoringImagesSetMess return com.commercetools.api.models.message.ProductTailoringImagesSetMessageBuilder.of(); } + /** + * builder for productTailoringKeySet subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringKeySetMessageBuilder productTailoringKeySetBuilder() { + return com.commercetools.api.models.message.ProductTailoringKeySetMessageBuilder.of(); + } + /** * builder for productTailoringNameSet 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 ea8acc07c31..a4ee6a69de9 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 @@ -1003,6 +1003,10 @@ public com.commercetools.api.models.message.ProductTailoringImagesSetMessageBuil return com.commercetools.api.models.message.ProductTailoringImagesSetMessageBuilder.of(); } + public com.commercetools.api.models.message.ProductTailoringKeySetMessageBuilder productTailoringKeySetBuilder() { + return com.commercetools.api.models.message.ProductTailoringKeySetMessageBuilder.of(); + } + public com.commercetools.api.models.message.ProductTailoringNameSetMessageBuilder productTailoringNameSetBuilder() { return com.commercetools.api.models.message.ProductTailoringNameSetMessageBuilder.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 c6aa4990c12..dfbb4f13f7f 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 @@ -2047,6 +2047,14 @@ public static com.commercetools.api.models.message.ProductTailoringImagesSetMess return com.commercetools.api.models.message.ProductTailoringImagesSetMessagePayloadBuilder.of(); } + /** + * builder for productTailoringKeySet subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringKeySetMessagePayloadBuilder productTailoringKeySetBuilder() { + return com.commercetools.api.models.message.ProductTailoringKeySetMessagePayloadBuilder.of(); + } + /** * builder for productTailoringNameSet 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 adf3ce8f99e..a91a57016da 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 @@ -1005,6 +1005,10 @@ public com.commercetools.api.models.message.ProductTailoringImagesSetMessagePayl return com.commercetools.api.models.message.ProductTailoringImagesSetMessagePayloadBuilder.of(); } + public com.commercetools.api.models.message.ProductTailoringKeySetMessagePayloadBuilder productTailoringKeySetBuilder() { + return com.commercetools.api.models.message.ProductTailoringKeySetMessagePayloadBuilder.of(); + } + public com.commercetools.api.models.message.ProductTailoringNameSetMessagePayloadBuilder productTailoringNameSetBuilder() { return com.commercetools.api.models.message.ProductTailoringNameSetMessagePayloadBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessage.java new file mode 100644 index 00000000000..55d2749fbe5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessage.java @@ -0,0 +1,233 @@ + +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.product.ProductReference; +import com.commercetools.api.models.store.StoreKeyReference; +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

    Generated after a successful Product Tailoring Set Key update action.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ProductTailoringKeySetMessage productTailoringKeySetMessage = ProductTailoringKeySetMessage.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)
    + *             .store(storeBuilder -> storeBuilder)
    + *             .product(productBuilder -> productBuilder)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("ProductTailoringKeySet") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringKeySetMessageImpl.class) +public interface ProductTailoringKeySetMessage extends Message { + + /** + * discriminator value for ProductTailoringKeySetMessage + */ + String PRODUCT_TAILORING_KEY_SET = "ProductTailoringKeySet"; + + /** + *

    The Store to which the Product Tailoring belongs.

    + * @return store + */ + @NotNull + @Valid + @JsonProperty("store") + public StoreKeyReference getStore(); + + /** + *

    User-defined unique identifier of the Product this Product Tailoring belongs to.

    + * @return productKey + */ + + @JsonProperty("productKey") + public String getProductKey(); + + /** + *

    Reference to the Product the Product Tailoring belongs to.

    + * @return product + */ + @NotNull + @Valid + @JsonProperty("product") + public ProductReference getProduct(); + + /** + *

    key value of the ProductTailoring after the Set Key update action.

    + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

    key value of the ProductTailoring before the Set Key update action.

    + * @return oldKey + */ + + @JsonProperty("oldKey") + public String getOldKey(); + + /** + *

    The Store to which the Product Tailoring belongs.

    + * @param store value to be set + */ + + public void setStore(final StoreKeyReference store); + + /** + *

    User-defined unique identifier of the Product this Product Tailoring belongs to.

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

    Reference to the Product the Product Tailoring belongs to.

    + * @param product value to be set + */ + + public void setProduct(final ProductReference product); + + /** + *

    key value of the ProductTailoring after the Set Key update action.

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

    key value of the ProductTailoring before the Set Key update action.

    + * @param oldKey value to be set + */ + + public void setOldKey(final String oldKey); + + /** + * factory method + * @return instance of ProductTailoringKeySetMessage + */ + public static ProductTailoringKeySetMessage of() { + return new ProductTailoringKeySetMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringKeySetMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringKeySetMessage of(final ProductTailoringKeySetMessage template) { + ProductTailoringKeySetMessageImpl instance = new ProductTailoringKeySetMessageImpl(); + 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.setStore(template.getStore()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + instance.setKey(template.getKey()); + instance.setOldKey(template.getOldKey()); + return instance; + } + + public ProductTailoringKeySetMessage copyDeep(); + + /** + * factory method to create a deep copy of ProductTailoringKeySetMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringKeySetMessage deepCopy(@Nullable final ProductTailoringKeySetMessage template) { + if (template == null) { + return null; + } + ProductTailoringKeySetMessageImpl instance = new ProductTailoringKeySetMessageImpl(); + 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.setStore(com.commercetools.api.models.store.StoreKeyReference.deepCopy(template.getStore())); + instance.setProductKey(template.getProductKey()); + instance.setProduct(com.commercetools.api.models.product.ProductReference.deepCopy(template.getProduct())); + instance.setKey(template.getKey()); + instance.setOldKey(template.getOldKey()); + return instance; + } + + /** + * builder factory method for ProductTailoringKeySetMessage + * @return builder + */ + public static ProductTailoringKeySetMessageBuilder builder() { + return ProductTailoringKeySetMessageBuilder.of(); + } + + /** + * create builder for ProductTailoringKeySetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringKeySetMessageBuilder builder(final ProductTailoringKeySetMessage template) { + return ProductTailoringKeySetMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringKeySetMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/ProductTailoringKeySetMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessageBuilder.java new file mode 100644 index 00000000000..b43b1667c39 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessageBuilder.java @@ -0,0 +1,579 @@ + +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; + +/** + * ProductTailoringKeySetMessageBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ProductTailoringKeySetMessage productTailoringKeySetMessage = ProductTailoringKeySetMessage.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)
    + *             .store(storeBuilder -> storeBuilder)
    + *             .product(productBuilder -> productBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringKeySetMessageBuilder 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.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + @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 ProductTailoringKeySetMessageBuilder 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 ProductTailoringKeySetMessageBuilder 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 ProductTailoringKeySetMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

    Value of createdAt.

    + * @param lastModifiedAt value to be set + * @return Builder + */ + + public ProductTailoringKeySetMessageBuilder 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 ProductTailoringKeySetMessageBuilder 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 ProductTailoringKeySetMessageBuilder 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 ProductTailoringKeySetMessageBuilder 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 ProductTailoringKeySetMessageBuilder 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 ProductTailoringKeySetMessageBuilder 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 ProductTailoringKeySetMessageBuilder 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 ProductTailoringKeySetMessageBuilder 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 ProductTailoringKeySetMessageBuilder 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 ProductTailoringKeySetMessageBuilder 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 ProductTailoringKeySetMessageBuilder 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 ProductTailoringKeySetMessageBuilder 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 ProductTailoringKeySetMessageBuilder 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 ProductTailoringKeySetMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

    The Store to which the Product Tailoring belongs.

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

    The Store to which the Product Tailoring belongs.

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

    The Store to which the Product Tailoring belongs.

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

    User-defined unique identifier of the Product this Product Tailoring belongs to.

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

    Reference to the Product the Product Tailoring belongs to.

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

    Reference to the Product the Product Tailoring belongs to.

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

    Reference to the Product the Product Tailoring belongs to.

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

    key value of the ProductTailoring after the Set Key update action.

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

    key value of the ProductTailoring before the Set Key update action.

    + * @param oldKey value to be set + * @return Builder + */ + + public ProductTailoringKeySetMessageBuilder 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; + } + + /** + *

    The Store to which the Product Tailoring belongs.

    + * @return store + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

    User-defined unique identifier of the Product this Product Tailoring belongs to.

    + * @return productKey + */ + + @Nullable + public String getProductKey() { + return this.productKey; + } + + /** + *

    Reference to the Product the Product Tailoring belongs to.

    + * @return product + */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

    key value of the ProductTailoring after the Set Key update action.

    + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

    key value of the ProductTailoring before the Set Key update action.

    + * @return oldKey + */ + + @Nullable + public String getOldKey() { + return this.oldKey; + } + + /** + * builds ProductTailoringKeySetMessage with checking for non-null required values + * @return ProductTailoringKeySetMessage + */ + public ProductTailoringKeySetMessage build() { + Objects.requireNonNull(id, ProductTailoringKeySetMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductTailoringKeySetMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductTailoringKeySetMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, ProductTailoringKeySetMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, ProductTailoringKeySetMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductTailoringKeySetMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, ProductTailoringKeySetMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(store, ProductTailoringKeySetMessage.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoringKeySetMessage.class + ": product is missing"); + return new ProductTailoringKeySetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, product, key, + oldKey); + } + + /** + * builds ProductTailoringKeySetMessage without checking for non-null required values + * @return ProductTailoringKeySetMessage + */ + public ProductTailoringKeySetMessage buildUnchecked() { + return new ProductTailoringKeySetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, product, key, + oldKey); + } + + /** + * factory method for an instance of ProductTailoringKeySetMessageBuilder + * @return builder + */ + public static ProductTailoringKeySetMessageBuilder of() { + return new ProductTailoringKeySetMessageBuilder(); + } + + /** + * create builder for ProductTailoringKeySetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringKeySetMessageBuilder of(final ProductTailoringKeySetMessage template) { + ProductTailoringKeySetMessageBuilder builder = new ProductTailoringKeySetMessageBuilder(); + 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.store = template.getStore(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + 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/ProductTailoringKeySetMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessageImpl.java new file mode 100644 index 00000000000..70f0fca8335 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessageImpl.java @@ -0,0 +1,380 @@ + +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 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; + +import tools.jackson.databind.annotation.*; + +/** + *

    Generated after a successful Product Tailoring Set Key update action.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringKeySetMessageImpl implements ProductTailoringKeySetMessage, 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.store.StoreKeyReference store; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private String key; + + private String oldKey; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringKeySetMessageImpl(@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("store") final com.commercetools.api.models.store.StoreKeyReference store, + @JsonProperty("productKey") final String productKey, + @JsonProperty("product") final com.commercetools.api.models.product.ProductReference product, + @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.store = store; + this.productKey = productKey; + this.product = product; + this.key = key; + this.oldKey = oldKey; + this.type = PRODUCT_TAILORING_KEY_SET; + } + + /** + * create empty instance + */ + public ProductTailoringKeySetMessageImpl() { + this.type = PRODUCT_TAILORING_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; + } + + /** + *

    The Store to which the Product Tailoring belongs.

    + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

    User-defined unique identifier of the Product this Product Tailoring belongs to.

    + */ + + public String getProductKey() { + return this.productKey; + } + + /** + *

    Reference to the Product the Product Tailoring belongs to.

    + */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

    key value of the ProductTailoring after the Set Key update action.

    + */ + + public String getKey() { + return this.key; + } + + /** + *

    key value of the ProductTailoring 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 setStore(final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + } + + public void setProductKey(final String productKey) { + this.productKey = productKey; + } + + public void setProduct(final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + } + + 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; + + ProductTailoringKeySetMessageImpl that = (ProductTailoringKeySetMessageImpl) 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(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .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(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .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(store) + .append(productKey) + .append(product) + .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("store", store) + .append("productKey", productKey) + .append("product", product) + .append("key", key) + .append("oldKey", oldKey) + .build(); + } + + @Override + public ProductTailoringKeySetMessage copyDeep() { + return ProductTailoringKeySetMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessagePayload.java new file mode 100644 index 00000000000..4507756f0a3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessagePayload.java @@ -0,0 +1,206 @@ + +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.product.ProductReference; +import com.commercetools.api.models.store.StoreKeyReference; +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import tools.jackson.databind.annotation.*; + +/** + *

    Generated after a successful Product Tailoring Set Key update action.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ProductTailoringKeySetMessagePayload productTailoringKeySetMessagePayload = ProductTailoringKeySetMessagePayload.builder()
    + *             .store(storeBuilder -> storeBuilder)
    + *             .product(productBuilder -> productBuilder)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("ProductTailoringKeySet") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringKeySetMessagePayloadImpl.class) +public interface ProductTailoringKeySetMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductTailoringKeySetMessagePayload + */ + String PRODUCT_TAILORING_KEY_SET = "ProductTailoringKeySet"; + + /** + *

    The Store to which the Product Tailoring belongs.

    + * @return store + */ + @NotNull + @Valid + @JsonProperty("store") + public StoreKeyReference getStore(); + + /** + *

    User-defined unique identifier of the Product this Product Tailoring belongs to.

    + * @return productKey + */ + + @JsonProperty("productKey") + public String getProductKey(); + + /** + *

    Reference to the Product the Product Tailoring belongs to.

    + * @return product + */ + @NotNull + @Valid + @JsonProperty("product") + public ProductReference getProduct(); + + /** + *

    key value of the ProductTailoring after the Set Key update action.

    + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

    key value of the ProductTailoring before the Set Key update action.

    + * @return oldKey + */ + + @JsonProperty("oldKey") + public String getOldKey(); + + /** + *

    The Store to which the Product Tailoring belongs.

    + * @param store value to be set + */ + + public void setStore(final StoreKeyReference store); + + /** + *

    User-defined unique identifier of the Product this Product Tailoring belongs to.

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

    Reference to the Product the Product Tailoring belongs to.

    + * @param product value to be set + */ + + public void setProduct(final ProductReference product); + + /** + *

    key value of the ProductTailoring after the Set Key update action.

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

    key value of the ProductTailoring before the Set Key update action.

    + * @param oldKey value to be set + */ + + public void setOldKey(final String oldKey); + + /** + * factory method + * @return instance of ProductTailoringKeySetMessagePayload + */ + public static ProductTailoringKeySetMessagePayload of() { + return new ProductTailoringKeySetMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringKeySetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringKeySetMessagePayload of(final ProductTailoringKeySetMessagePayload template) { + ProductTailoringKeySetMessagePayloadImpl instance = new ProductTailoringKeySetMessagePayloadImpl(); + instance.setStore(template.getStore()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + instance.setKey(template.getKey()); + instance.setOldKey(template.getOldKey()); + return instance; + } + + public ProductTailoringKeySetMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of ProductTailoringKeySetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringKeySetMessagePayload deepCopy( + @Nullable final ProductTailoringKeySetMessagePayload template) { + if (template == null) { + return null; + } + ProductTailoringKeySetMessagePayloadImpl instance = new ProductTailoringKeySetMessagePayloadImpl(); + instance.setStore(com.commercetools.api.models.store.StoreKeyReference.deepCopy(template.getStore())); + instance.setProductKey(template.getProductKey()); + instance.setProduct(com.commercetools.api.models.product.ProductReference.deepCopy(template.getProduct())); + instance.setKey(template.getKey()); + instance.setOldKey(template.getOldKey()); + return instance; + } + + /** + * builder factory method for ProductTailoringKeySetMessagePayload + * @return builder + */ + public static ProductTailoringKeySetMessagePayloadBuilder builder() { + return ProductTailoringKeySetMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductTailoringKeySetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringKeySetMessagePayloadBuilder builder( + final ProductTailoringKeySetMessagePayload template) { + return ProductTailoringKeySetMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringKeySetMessagePayload(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/ProductTailoringKeySetMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessagePayloadBuilder.java new file mode 100644 index 00000000000..28d446730db --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessagePayloadBuilder.java @@ -0,0 +1,235 @@ + +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; + +/** + * ProductTailoringKeySetMessagePayloadBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ProductTailoringKeySetMessagePayload productTailoringKeySetMessagePayload = ProductTailoringKeySetMessagePayload.builder()
    + *             .store(storeBuilder -> storeBuilder)
    + *             .product(productBuilder -> productBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringKeySetMessagePayloadBuilder implements Builder { + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + @Nullable + private String key; + + @Nullable + private String oldKey; + + /** + *

    The Store to which the Product Tailoring belongs.

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

    The Store to which the Product Tailoring belongs.

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

    The Store to which the Product Tailoring belongs.

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

    User-defined unique identifier of the Product this Product Tailoring belongs to.

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

    Reference to the Product the Product Tailoring belongs to.

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

    Reference to the Product the Product Tailoring belongs to.

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

    Reference to the Product the Product Tailoring belongs to.

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

    key value of the ProductTailoring after the Set Key update action.

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

    key value of the ProductTailoring before the Set Key update action.

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

    The Store to which the Product Tailoring belongs.

    + * @return store + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

    User-defined unique identifier of the Product this Product Tailoring belongs to.

    + * @return productKey + */ + + @Nullable + public String getProductKey() { + return this.productKey; + } + + /** + *

    Reference to the Product the Product Tailoring belongs to.

    + * @return product + */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

    key value of the ProductTailoring after the Set Key update action.

    + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

    key value of the ProductTailoring before the Set Key update action.

    + * @return oldKey + */ + + @Nullable + public String getOldKey() { + return this.oldKey; + } + + /** + * builds ProductTailoringKeySetMessagePayload with checking for non-null required values + * @return ProductTailoringKeySetMessagePayload + */ + public ProductTailoringKeySetMessagePayload build() { + Objects.requireNonNull(store, ProductTailoringKeySetMessagePayload.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoringKeySetMessagePayload.class + ": product is missing"); + return new ProductTailoringKeySetMessagePayloadImpl(store, productKey, product, key, oldKey); + } + + /** + * builds ProductTailoringKeySetMessagePayload without checking for non-null required values + * @return ProductTailoringKeySetMessagePayload + */ + public ProductTailoringKeySetMessagePayload buildUnchecked() { + return new ProductTailoringKeySetMessagePayloadImpl(store, productKey, product, key, oldKey); + } + + /** + * factory method for an instance of ProductTailoringKeySetMessagePayloadBuilder + * @return builder + */ + public static ProductTailoringKeySetMessagePayloadBuilder of() { + return new ProductTailoringKeySetMessagePayloadBuilder(); + } + + /** + * create builder for ProductTailoringKeySetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringKeySetMessagePayloadBuilder of(final ProductTailoringKeySetMessagePayload template) { + ProductTailoringKeySetMessagePayloadBuilder builder = new ProductTailoringKeySetMessagePayloadBuilder(); + builder.store = template.getStore(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + 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/ProductTailoringKeySetMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessagePayloadImpl.java new file mode 100644 index 00000000000..bf43f6304f8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessagePayloadImpl.java @@ -0,0 +1,181 @@ + +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 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; + +import tools.jackson.databind.annotation.*; + +/** + *

    Generated after a successful Product Tailoring Set Key update action.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringKeySetMessagePayloadImpl implements ProductTailoringKeySetMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private String key; + + private String oldKey; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringKeySetMessagePayloadImpl( + @JsonProperty("store") final com.commercetools.api.models.store.StoreKeyReference store, + @JsonProperty("productKey") final String productKey, + @JsonProperty("product") final com.commercetools.api.models.product.ProductReference product, + @JsonProperty("key") final String key, @JsonProperty("oldKey") final String oldKey) { + this.store = store; + this.productKey = productKey; + this.product = product; + this.key = key; + this.oldKey = oldKey; + this.type = PRODUCT_TAILORING_KEY_SET; + } + + /** + * create empty instance + */ + public ProductTailoringKeySetMessagePayloadImpl() { + this.type = PRODUCT_TAILORING_KEY_SET; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

    The Store to which the Product Tailoring belongs.

    + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

    User-defined unique identifier of the Product this Product Tailoring belongs to.

    + */ + + public String getProductKey() { + return this.productKey; + } + + /** + *

    Reference to the Product the Product Tailoring belongs to.

    + */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

    key value of the ProductTailoring after the Set Key update action.

    + */ + + public String getKey() { + return this.key; + } + + /** + *

    key value of the ProductTailoring before the Set Key update action.

    + */ + + public String getOldKey() { + return this.oldKey; + } + + public void setStore(final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + } + + public void setProductKey(final String productKey) { + this.productKey = productKey; + } + + public void setProduct(final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + } + + 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; + + ProductTailoringKeySetMessagePayloadImpl that = (ProductTailoringKeySetMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(key, that.key) + .append(oldKey, that.oldKey) + .append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(key, that.key) + .append(oldKey, that.oldKey) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(store) + .append(productKey) + .append(product) + .append(key) + .append(oldKey) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("store", store) + .append("productKey", productKey) + .append("product", product) + .append("key", key) + .append("oldKey", oldKey) + .build(); + } + + @Override + public ProductTailoringKeySetMessagePayload copyDeep() { + return ProductTailoringKeySetMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetAction.java index 55dde25c175..fd19594a88a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetAction.java @@ -17,7 +17,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either variantId or sku is required to reference a ProductVariant that exists.

    + *

    Either variantId or sku is required to reference a ProductVariant or Variant (BETA) that exists.

    * *
    * Example to create an instance using the builder pattern @@ -40,7 +40,7 @@ public interface ProductTailoringAddAssetAction extends ProductTailoringUpdateAc String ADD_ASSET = "addAsset"; /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return variantId */ @@ -48,7 +48,7 @@ public interface ProductTailoringAddAssetAction extends ProductTailoringUpdateAc public Long getVariantId(); /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ @@ -81,14 +81,14 @@ public interface ProductTailoringAddAssetAction extends ProductTailoringUpdateAc public Integer getPosition(); /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param variantId value to be set */ public void setVariantId(final Long variantId); /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionBuilder.java index 1cd5dba9c06..207521fa283 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionBuilder.java @@ -39,7 +39,7 @@ public class ProductTailoringAddAssetActionBuilder implements BuilderThe id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param variantId value to be set * @return Builder */ @@ -50,7 +50,7 @@ public ProductTailoringAddAssetActionBuilder variantId(@Nullable final Long vari } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set * @return Builder */ @@ -118,7 +118,7 @@ public ProductTailoringAddAssetActionBuilder position(@Nullable final Integer po } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return variantId */ @@ -128,7 +128,7 @@ public Long getVariantId() { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionImpl.java index 81b92c938c4..d92e3910309 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionImpl.java @@ -18,7 +18,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either variantId or sku is required to reference a ProductVariant that exists.

    + *

    Either variantId or sku is required to reference a ProductVariant or Variant (BETA) that exists.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductTailoringAddAssetActionImpl implements ProductTailoringAddAssetAction, ModelBase { @@ -67,7 +67,7 @@ public String getAction() { } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    */ public Long getVariantId() { @@ -75,7 +75,7 @@ public Long getVariantId() { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    */ public String getSku() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageAction.java index f68fc6bbb12..a8a897a760e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageAction.java @@ -17,7 +17,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either variantId or sku is required to reference a ProductVariant that exists. Produces the ProductTailoringImageAdded Message.

    + *

    Either variantId or sku is required to reference a ProductVariant or Variant (BETA) that exists. Produces the ProductTailoringImageAdded Message.

    * *
    * Example to create an instance using the builder pattern @@ -40,7 +40,7 @@ public interface ProductTailoringAddExternalImageAction extends ProductTailoring String ADD_EXTERNAL_IMAGE = "addExternalImage"; /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return variantId */ @@ -48,7 +48,7 @@ public interface ProductTailoringAddExternalImageAction extends ProductTailoring public Long getVariantId(); /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ @@ -73,14 +73,14 @@ public interface ProductTailoringAddExternalImageAction extends ProductTailoring public Boolean getStaged(); /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param variantId value to be set */ public void setVariantId(final Long variantId); /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionBuilder.java index 2f4c8060f92..c317ccabbcb 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionBuilder.java @@ -36,7 +36,7 @@ public class ProductTailoringAddExternalImageActionBuilder implements BuilderThe id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param variantId value to be set * @return Builder */ @@ -47,7 +47,7 @@ public ProductTailoringAddExternalImageActionBuilder variantId(@Nullable final L } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set * @return Builder */ @@ -104,7 +104,7 @@ public ProductTailoringAddExternalImageActionBuilder staged(@Nullable final Bool } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return variantId */ @@ -114,7 +114,7 @@ public Long getVariantId() { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionImpl.java index dc4662884f6..81efa7d22be 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionImpl.java @@ -18,7 +18,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either variantId or sku is required to reference a ProductVariant that exists. Produces the ProductTailoringImageAdded Message.

    + *

    Either variantId or sku is required to reference a ProductVariant or Variant (BETA) that exists. Produces the ProductTailoringImageAdded Message.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductTailoringAddExternalImageActionImpl implements ProductTailoringAddExternalImageAction, ModelBase { @@ -64,7 +64,7 @@ public String getAction() { } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    */ public Long getVariantId() { @@ -72,7 +72,7 @@ public Long getVariantId() { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    */ public String getSku() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantAction.java index a4703385cac..7d4f7dc840d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantAction.java @@ -18,7 +18,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either id or sku is required to reference a ProductVariant that exists. Produces the ProductVariantTailoringAdded Message.

    + *

    Either id or sku is required to reference a ProductVariant or Variant (BETA) that exists. Produces the ProductVariantTailoringAdded Message.

    * *
    * Example to create an instance using the builder pattern @@ -40,7 +40,7 @@ public interface ProductTailoringAddVariantAction extends ProductTailoringUpdate String ADD_VARIANT = "addVariant"; /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return id */ @@ -48,7 +48,7 @@ public interface ProductTailoringAddVariantAction extends ProductTailoringUpdate public Long getId(); /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ @@ -88,14 +88,14 @@ public interface ProductTailoringAddVariantAction extends ProductTailoringUpdate public Boolean getStaged(); /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param id value to be set */ public void setId(final Long id); /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionBuilder.java index df0a0ec7044..a0653ca145f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionBuilder.java @@ -42,7 +42,7 @@ public class ProductTailoringAddVariantActionBuilder implements BuilderThe id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param id value to be set * @return Builder */ @@ -53,7 +53,7 @@ public ProductTailoringAddVariantActionBuilder id(@Nullable final Long id) { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set * @return Builder */ @@ -348,7 +348,7 @@ public ProductTailoringAddVariantActionBuilder staged(@Nullable final Boolean st } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return id */ @@ -358,7 +358,7 @@ public Long getId() { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionImpl.java index c0a6f76abce..339edbb6844 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionImpl.java @@ -18,7 +18,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either id or sku is required to reference a ProductVariant that exists. Produces the ProductVariantTailoringAdded Message.

    + *

    Either id or sku is required to reference a ProductVariant or Variant (BETA) that exists. Produces the ProductVariantTailoringAdded Message.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductTailoringAddVariantActionImpl implements ProductTailoringAddVariantAction, ModelBase { @@ -71,7 +71,7 @@ public String getAction() { } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    */ public Long getId() { @@ -79,7 +79,7 @@ public Long getId() { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    */ public String getSku() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionAction.java index 43493096ae8..a2b9b502476 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionAction.java @@ -15,7 +15,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either variantId or sku is required to reference a ProductVariant that exists.

    + *

    Either variantId or sku is required to reference a ProductVariant or Variant (BETA) that exists.

    * *
    * Example to create an instance using the builder pattern @@ -39,7 +39,7 @@ public interface ProductTailoringMoveImageToPositionAction extends ProductTailor String MOVE_IMAGE_TO_POSITION = "moveImageToPosition"; /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return variantId */ @@ -47,7 +47,7 @@ public interface ProductTailoringMoveImageToPositionAction extends ProductTailor public Long getVariantId(); /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ @@ -79,14 +79,14 @@ public interface ProductTailoringMoveImageToPositionAction extends ProductTailor public Boolean getStaged(); /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param variantId value to be set */ public void setVariantId(final Long variantId); /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionBuilder.java index 6b5ad714ac8..49d6eb972ff 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionBuilder.java @@ -39,7 +39,7 @@ public class ProductTailoringMoveImageToPositionActionBuilder private Boolean staged; /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param variantId value to be set * @return Builder */ @@ -50,7 +50,7 @@ public ProductTailoringMoveImageToPositionActionBuilder variantId(@Nullable fina } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set * @return Builder */ @@ -94,7 +94,7 @@ public ProductTailoringMoveImageToPositionActionBuilder staged(@Nullable final B } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return variantId */ @@ -104,7 +104,7 @@ public Long getVariantId() { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionImpl.java index 60a592f36a0..060cb542f04 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionImpl.java @@ -18,7 +18,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either variantId or sku is required to reference a ProductVariant that exists.

    + *

    Either variantId or sku is required to reference a ProductVariant or Variant (BETA) that exists.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductTailoringMoveImageToPositionActionImpl @@ -67,7 +67,7 @@ public String getAction() { } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    */ public Long getVariantId() { @@ -75,7 +75,7 @@ public Long getVariantId() { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    */ public String getSku() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetAction.java index e575f8741a4..d484770127f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetAction.java @@ -14,7 +14,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either variantId or sku is required to reference a ProductVariant that exists. The Asset to remove must be specified using either assetId or assetKey.

    + *

    Either variantId or sku is required to reference a ProductVariant or Variant (BETA) that exists. The Asset to remove must be specified using either assetId or assetKey.

    * *
    * Example to create an instance using the builder pattern @@ -36,7 +36,7 @@ public interface ProductTailoringRemoveAssetAction extends ProductTailoringUpdat String REMOVE_ASSET = "removeAsset"; /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return variantId */ @@ -44,7 +44,7 @@ public interface ProductTailoringRemoveAssetAction extends ProductTailoringUpdat public Long getVariantId(); /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ @@ -76,14 +76,14 @@ public interface ProductTailoringRemoveAssetAction extends ProductTailoringUpdat public String getAssetKey(); /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param variantId value to be set */ public void setVariantId(final Long variantId); /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionBuilder.java index 23b0c0e7d3c..294d4846b58 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionBuilder.java @@ -38,7 +38,7 @@ public class ProductTailoringRemoveAssetActionBuilder implements BuilderThe id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param variantId value to be set * @return Builder */ @@ -49,7 +49,7 @@ public ProductTailoringRemoveAssetActionBuilder variantId(@Nullable final Long v } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set * @return Builder */ @@ -93,7 +93,7 @@ public ProductTailoringRemoveAssetActionBuilder assetKey(@Nullable final String } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return variantId */ @@ -103,7 +103,7 @@ public Long getVariantId() { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionImpl.java index fd9d334f810..ec52c9bf240 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionImpl.java @@ -18,7 +18,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either variantId or sku is required to reference a ProductVariant that exists. The Asset to remove must be specified using either assetId or assetKey.

    + *

    Either variantId or sku is required to reference a ProductVariant or Variant (BETA) that exists. The Asset to remove must be specified using either assetId or assetKey.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductTailoringRemoveAssetActionImpl implements ProductTailoringRemoveAssetAction, ModelBase { @@ -66,7 +66,7 @@ public String getAction() { } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    */ public Long getVariantId() { @@ -74,7 +74,7 @@ public Long getVariantId() { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    */ public String getSku() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageAction.java index f24cb487abb..ac3e9b40e78 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageAction.java @@ -15,7 +15,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either variantId or sku is required to reference a ProductVariant that exists.

    + *

    Either variantId or sku is required to reference a ProductVariant or Variant (BETA) that exists.

    * *
    * Example to create an instance using the builder pattern @@ -38,7 +38,7 @@ public interface ProductTailoringRemoveImageAction extends ProductTailoringUpdat String REMOVE_IMAGE = "removeImage"; /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return variantId */ @@ -46,7 +46,7 @@ public interface ProductTailoringRemoveImageAction extends ProductTailoringUpdat public Long getVariantId(); /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ @@ -70,14 +70,14 @@ public interface ProductTailoringRemoveImageAction extends ProductTailoringUpdat public Boolean getStaged(); /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param variantId value to be set */ public void setVariantId(final Long variantId); /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionBuilder.java index a23636bf47f..202ee57179d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionBuilder.java @@ -35,7 +35,7 @@ public class ProductTailoringRemoveImageActionBuilder implements BuilderThe id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param variantId value to be set * @return Builder */ @@ -46,7 +46,7 @@ public ProductTailoringRemoveImageActionBuilder variantId(@Nullable final Long v } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set * @return Builder */ @@ -79,7 +79,7 @@ public ProductTailoringRemoveImageActionBuilder staged(@Nullable final Boolean s } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return variantId */ @@ -89,7 +89,7 @@ public Long getVariantId() { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionImpl.java index 994627b1c79..ad75de5d455 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionImpl.java @@ -18,7 +18,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either variantId or sku is required to reference a ProductVariant that exists.

    + *

    Either variantId or sku is required to reference a ProductVariant or Variant (BETA) that exists.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductTailoringRemoveImageActionImpl implements ProductTailoringRemoveImageAction, ModelBase { @@ -63,7 +63,7 @@ public String getAction() { } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    */ public Long getVariantId() { @@ -71,7 +71,7 @@ public Long getVariantId() { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    */ public String getSku() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantAction.java index 0695a52b4b7..77ff120a1f3 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantAction.java @@ -36,7 +36,7 @@ public interface ProductTailoringRemoveVariantAction extends ProductTailoringUpd String REMOVE_VARIANT = "removeVariant"; /** - *

    The id of the ProductVariant to remove from the Tailoring.

    + *

    The id of the ProductVariant or Variant (BETA) to remove from the Tailoring.

    * @return id */ @@ -44,7 +44,7 @@ public interface ProductTailoringRemoveVariantAction extends ProductTailoringUpd public Long getId(); /** - *

    The sku of the ProductVariant to remove from the Tailoring.

    + *

    The sku of the ProductVariant or Variant (BETA) to remove from the Tailoring.

    * @return sku */ @@ -60,14 +60,14 @@ public interface ProductTailoringRemoveVariantAction extends ProductTailoringUpd public Boolean getStaged(); /** - *

    The id of the ProductVariant to remove from the Tailoring.

    + *

    The id of the ProductVariant or Variant (BETA) to remove from the Tailoring.

    * @param id value to be set */ public void setId(final Long id); /** - *

    The sku of the ProductVariant to remove from the Tailoring.

    + *

    The sku of the ProductVariant or Variant (BETA) to remove from the Tailoring.

    * @param sku value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionBuilder.java index 91fd8c8df31..34c90df5358 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionBuilder.java @@ -32,7 +32,7 @@ public class ProductTailoringRemoveVariantActionBuilder implements BuilderThe id of the ProductVariant to remove from the Tailoring.

    + *

    The id of the ProductVariant or Variant (BETA) to remove from the Tailoring.

    * @param id value to be set * @return Builder */ @@ -43,7 +43,7 @@ public ProductTailoringRemoveVariantActionBuilder id(@Nullable final Long id) { } /** - *

    The sku of the ProductVariant to remove from the Tailoring.

    + *

    The sku of the ProductVariant or Variant (BETA) to remove from the Tailoring.

    * @param sku value to be set * @return Builder */ @@ -65,7 +65,7 @@ public ProductTailoringRemoveVariantActionBuilder staged(@Nullable final Boolean } /** - *

    The id of the ProductVariant to remove from the Tailoring.

    + *

    The id of the ProductVariant or Variant (BETA) to remove from the Tailoring.

    * @return id */ @@ -75,7 +75,7 @@ public Long getId() { } /** - *

    The sku of the ProductVariant to remove from the Tailoring.

    + *

    The sku of the ProductVariant or Variant (BETA) to remove from the Tailoring.

    * @return sku */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionImpl.java index 9c15668908b..8676bebea21 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionImpl.java @@ -59,7 +59,7 @@ public String getAction() { } /** - *

    The id of the ProductVariant to remove from the Tailoring.

    + *

    The id of the ProductVariant or Variant (BETA) to remove from the Tailoring.

    */ public Long getId() { @@ -67,7 +67,7 @@ public Long getId() { } /** - *

    The sku of the ProductVariant to remove from the Tailoring.

    + *

    The sku of the ProductVariant or Variant (BETA) to remove from the Tailoring.

    */ public String getSku() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeAction.java index dc6d126ed89..a05749daaef 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeAction.java @@ -38,7 +38,7 @@ public interface ProductTailoringSetAttributeAction extends ProductTailoringUpda String SET_ATTRIBUTE = "setAttribute"; /** - *

    The id of the ProductVariant to update. Required if sku is absent.

    + *

    The id of the ProductVariant or Variant (BETA) to update. Required if sku is absent.

    * @return variantId */ @@ -46,7 +46,7 @@ public interface ProductTailoringSetAttributeAction extends ProductTailoringUpda public Long getVariantId(); /** - *

    The sku of the ProductVariant to update. Required if variantId is absent.

    + *

    The sku of the ProductVariant or Variant (BETA) to update. Required if variantId is absent.

    * @return sku */ @@ -87,14 +87,14 @@ public interface ProductTailoringSetAttributeAction extends ProductTailoringUpda public Boolean getStaged(); /** - *

    The id of the ProductVariant to update. Required if sku is absent.

    + *

    The id of the ProductVariant or Variant (BETA) to update. Required if sku is absent.

    * @param variantId value to be set */ public void setVariantId(final Long variantId); /** - *

    The sku of the ProductVariant to update. Required if variantId is absent.

    + *

    The sku of the ProductVariant or Variant (BETA) to update. Required if variantId is absent.

    * @param sku value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionBuilder.java index 1b1f2ab546e..2bd68520704 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionBuilder.java @@ -38,7 +38,7 @@ public class ProductTailoringSetAttributeActionBuilder implements BuilderThe id of the ProductVariant to update. Required if sku is absent.

    + *

    The id of the ProductVariant or Variant (BETA) to update. Required if sku is absent.

    * @param variantId value to be set * @return Builder */ @@ -49,7 +49,7 @@ public ProductTailoringSetAttributeActionBuilder variantId(@Nullable final Long } /** - *

    The sku of the ProductVariant to update. Required if variantId is absent.

    + *

    The sku of the ProductVariant or Variant (BETA) to update. Required if variantId is absent.

    * @param sku value to be set * @return Builder */ @@ -102,7 +102,7 @@ public ProductTailoringSetAttributeActionBuilder staged(@Nullable final Boolean } /** - *

    The id of the ProductVariant to update. Required if sku is absent.

    + *

    The id of the ProductVariant or Variant (BETA) to update. Required if sku is absent.

    * @return variantId */ @@ -112,7 +112,7 @@ public Long getVariantId() { } /** - *

    The sku of the ProductVariant to update. Required if variantId is absent.

    + *

    The sku of the ProductVariant or Variant (BETA) to update. Required if variantId is absent.

    * @return sku */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionImpl.java index 6e3e7204c5d..ef8f3823d15 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionImpl.java @@ -66,7 +66,7 @@ public String getAction() { } /** - *

    The id of the ProductVariant to update. Required if sku is absent.

    + *

    The id of the ProductVariant or Variant (BETA) to update. Required if sku is absent.

    */ public Long getVariantId() { @@ -74,7 +74,7 @@ public Long getVariantId() { } /** - *

    The sku of the ProductVariant to update. Required if variantId is absent.

    + *

    The sku of the ProductVariant or Variant (BETA) to update. Required if variantId is absent.

    */ public String getSku() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesAction.java index 4dc7128b9ca..9239bfe62b7 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesAction.java @@ -17,7 +17,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either variantId or sku is required to reference a ProductVariant that exists. Produces the ProductTailoringImagesSet Message.

    + *

    Either variantId or sku is required to reference a ProductVariant or Variant (BETA) that exists. Produces the ProductTailoringImagesSet Message.

    * *
    * Example to create an instance using the builder pattern @@ -39,7 +39,7 @@ public interface ProductTailoringSetExternalImagesAction extends ProductTailorin String SET_IMAGES = "setImages"; /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return variantId */ @@ -47,7 +47,7 @@ public interface ProductTailoringSetExternalImagesAction extends ProductTailorin public Long getVariantId(); /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ @@ -55,8 +55,8 @@ public interface ProductTailoringSetExternalImagesAction extends ProductTailorin public String getSku(); /** - *

    Images of the tailored ProductVariant.

    - *

    Don't provide this field if you want to remove all images from the tailored Product Variant. Set to [] (empty) if you want to hide all images of the original ProductVariant on the tailored ProductVariant.

    + *

    Images of the tailored ProductVariant or Variant (BETA).

    + *

    Don't provide this field if you want to remove all images from the tailored ProductVariant or Variant (BETA). Set to [] (empty) if you want to hide all images of the original ProductVariant or Variant (BETA) on the tailored ProductVariant or Variant (BETA).

    * @return images */ @Valid @@ -72,22 +72,22 @@ public interface ProductTailoringSetExternalImagesAction extends ProductTailorin public Boolean getStaged(); /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param variantId value to be set */ public void setVariantId(final Long variantId); /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set */ public void setSku(final String sku); /** - *

    Images of the tailored ProductVariant.

    - *

    Don't provide this field if you want to remove all images from the tailored Product Variant. Set to [] (empty) if you want to hide all images of the original ProductVariant on the tailored ProductVariant.

    + *

    Images of the tailored ProductVariant or Variant (BETA).

    + *

    Don't provide this field if you want to remove all images from the tailored ProductVariant or Variant (BETA). Set to [] (empty) if you want to hide all images of the original ProductVariant or Variant (BETA) on the tailored ProductVariant or Variant (BETA).

    * @param images values to be set */ @@ -95,8 +95,8 @@ public interface ProductTailoringSetExternalImagesAction extends ProductTailorin public void setImages(final Image... images); /** - *

    Images of the tailored ProductVariant.

    - *

    Don't provide this field if you want to remove all images from the tailored Product Variant. Set to [] (empty) if you want to hide all images of the original ProductVariant on the tailored ProductVariant.

    + *

    Images of the tailored ProductVariant or Variant (BETA).

    + *

    Don't provide this field if you want to remove all images from the tailored ProductVariant or Variant (BETA). Set to [] (empty) if you want to hide all images of the original ProductVariant or Variant (BETA) on the tailored ProductVariant or Variant (BETA).

    * @param images values to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionBuilder.java index 477e5d8cc07..853dce50d63 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionBuilder.java @@ -37,7 +37,7 @@ public class ProductTailoringSetExternalImagesActionBuilder private Boolean staged; /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param variantId value to be set * @return Builder */ @@ -48,7 +48,7 @@ public ProductTailoringSetExternalImagesActionBuilder variantId(@Nullable final } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set * @return Builder */ @@ -59,8 +59,8 @@ public ProductTailoringSetExternalImagesActionBuilder sku(@Nullable final String } /** - *

    Images of the tailored ProductVariant.

    - *

    Don't provide this field if you want to remove all images from the tailored Product Variant. Set to [] (empty) if you want to hide all images of the original ProductVariant on the tailored ProductVariant.

    + *

    Images of the tailored ProductVariant or Variant (BETA).

    + *

    Don't provide this field if you want to remove all images from the tailored ProductVariant or Variant (BETA). Set to [] (empty) if you want to hide all images of the original ProductVariant or Variant (BETA) on the tailored ProductVariant or Variant (BETA).

    * @param images value to be set * @return Builder */ @@ -72,8 +72,8 @@ public ProductTailoringSetExternalImagesActionBuilder images( } /** - *

    Images of the tailored ProductVariant.

    - *

    Don't provide this field if you want to remove all images from the tailored Product Variant. Set to [] (empty) if you want to hide all images of the original ProductVariant on the tailored ProductVariant.

    + *

    Images of the tailored ProductVariant or Variant (BETA).

    + *

    Don't provide this field if you want to remove all images from the tailored ProductVariant or Variant (BETA). Set to [] (empty) if you want to hide all images of the original ProductVariant or Variant (BETA) on the tailored ProductVariant or Variant (BETA).

    * @param images value to be set * @return Builder */ @@ -85,8 +85,8 @@ public ProductTailoringSetExternalImagesActionBuilder images( } /** - *

    Images of the tailored ProductVariant.

    - *

    Don't provide this field if you want to remove all images from the tailored Product Variant. Set to [] (empty) if you want to hide all images of the original ProductVariant on the tailored ProductVariant.

    + *

    Images of the tailored ProductVariant or Variant (BETA).

    + *

    Don't provide this field if you want to remove all images from the tailored ProductVariant or Variant (BETA). Set to [] (empty) if you want to hide all images of the original ProductVariant or Variant (BETA) on the tailored ProductVariant or Variant (BETA).

    * @param images value to be set * @return Builder */ @@ -101,8 +101,8 @@ public ProductTailoringSetExternalImagesActionBuilder plusImages( } /** - *

    Images of the tailored ProductVariant.

    - *

    Don't provide this field if you want to remove all images from the tailored Product Variant. Set to [] (empty) if you want to hide all images of the original ProductVariant on the tailored ProductVariant.

    + *

    Images of the tailored ProductVariant or Variant (BETA).

    + *

    Don't provide this field if you want to remove all images from the tailored ProductVariant or Variant (BETA). Set to [] (empty) if you want to hide all images of the original ProductVariant or Variant (BETA) on the tailored ProductVariant or Variant (BETA).

    * @param builder function to build the images value * @return Builder */ @@ -117,8 +117,8 @@ public ProductTailoringSetExternalImagesActionBuilder plusImages( } /** - *

    Images of the tailored ProductVariant.

    - *

    Don't provide this field if you want to remove all images from the tailored Product Variant. Set to [] (empty) if you want to hide all images of the original ProductVariant on the tailored ProductVariant.

    + *

    Images of the tailored ProductVariant or Variant (BETA).

    + *

    Don't provide this field if you want to remove all images from the tailored ProductVariant or Variant (BETA). Set to [] (empty) if you want to hide all images of the original ProductVariant or Variant (BETA) on the tailored ProductVariant or Variant (BETA).

    * @param builder function to build the images value * @return Builder */ @@ -131,8 +131,8 @@ public ProductTailoringSetExternalImagesActionBuilder withImages( } /** - *

    Images of the tailored ProductVariant.

    - *

    Don't provide this field if you want to remove all images from the tailored Product Variant. Set to [] (empty) if you want to hide all images of the original ProductVariant on the tailored ProductVariant.

    + *

    Images of the tailored ProductVariant or Variant (BETA).

    + *

    Don't provide this field if you want to remove all images from the tailored ProductVariant or Variant (BETA). Set to [] (empty) if you want to hide all images of the original ProductVariant or Variant (BETA) on the tailored ProductVariant or Variant (BETA).

    * @param builder function to build the images value * @return Builder */ @@ -143,8 +143,8 @@ public ProductTailoringSetExternalImagesActionBuilder addImages( } /** - *

    Images of the tailored ProductVariant.

    - *

    Don't provide this field if you want to remove all images from the tailored Product Variant. Set to [] (empty) if you want to hide all images of the original ProductVariant on the tailored ProductVariant.

    + *

    Images of the tailored ProductVariant or Variant (BETA).

    + *

    Don't provide this field if you want to remove all images from the tailored ProductVariant or Variant (BETA). Set to [] (empty) if you want to hide all images of the original ProductVariant or Variant (BETA) on the tailored ProductVariant or Variant (BETA).

    * @param builder function to build the images value * @return Builder */ @@ -166,7 +166,7 @@ public ProductTailoringSetExternalImagesActionBuilder staged(@Nullable final Boo } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return variantId */ @@ -176,7 +176,7 @@ public Long getVariantId() { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ @@ -186,8 +186,8 @@ public String getSku() { } /** - *

    Images of the tailored ProductVariant.

    - *

    Don't provide this field if you want to remove all images from the tailored Product Variant. Set to [] (empty) if you want to hide all images of the original ProductVariant on the tailored ProductVariant.

    + *

    Images of the tailored ProductVariant or Variant (BETA).

    + *

    Don't provide this field if you want to remove all images from the tailored ProductVariant or Variant (BETA). Set to [] (empty) if you want to hide all images of the original ProductVariant or Variant (BETA) on the tailored ProductVariant or Variant (BETA).

    * @return images */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionImpl.java index bff77568b60..0d2a36bcd44 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionImpl.java @@ -18,7 +18,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either variantId or sku is required to reference a ProductVariant that exists. Produces the ProductTailoringImagesSet Message.

    + *

    Either variantId or sku is required to reference a ProductVariant or Variant (BETA) that exists. Produces the ProductTailoringImagesSet Message.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductTailoringSetExternalImagesActionImpl implements ProductTailoringSetExternalImagesAction, ModelBase { @@ -64,7 +64,7 @@ public String getAction() { } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    */ public Long getVariantId() { @@ -72,7 +72,7 @@ public Long getVariantId() { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    */ public String getSku() { @@ -80,8 +80,8 @@ public String getSku() { } /** - *

    Images of the tailored ProductVariant.

    - *

    Don't provide this field if you want to remove all images from the tailored Product Variant. Set to [] (empty) if you want to hide all images of the original ProductVariant on the tailored ProductVariant.

    + *

    Images of the tailored ProductVariant or Variant (BETA).

    + *

    Don't provide this field if you want to remove all images from the tailored ProductVariant or Variant (BETA). Set to [] (empty) if you want to hide all images of the original ProductVariant or Variant (BETA) on the tailored ProductVariant or Variant (BETA).

    */ public java.util.List getImages() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelAction.java index db39bea5a39..f336531e464 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelAction.java @@ -15,7 +15,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either variantId or sku is required to reference a ProductVariant that exists.

    + *

    Either variantId or sku is required to reference a ProductVariant or Variant (BETA) that exists.

    * *
    * Example to create an instance using the builder pattern @@ -38,7 +38,7 @@ public interface ProductTailoringSetImageLabelAction extends ProductTailoringUpd String SET_IMAGE_LABEL = "setImageLabel"; /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ @@ -46,7 +46,7 @@ public interface ProductTailoringSetImageLabelAction extends ProductTailoringUpd public String getSku(); /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return variantId */ @@ -78,14 +78,14 @@ public interface ProductTailoringSetImageLabelAction extends ProductTailoringUpd public Boolean getStaged(); /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set */ public void setSku(final String sku); /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param variantId value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionBuilder.java index 04e5e173fec..a9fd7d1d865 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionBuilder.java @@ -38,7 +38,7 @@ public class ProductTailoringSetImageLabelActionBuilder implements BuilderThe sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @param sku value to be set * @return Builder */ @@ -49,7 +49,7 @@ public ProductTailoringSetImageLabelActionBuilder sku(@Nullable final String sku } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @param variantId value to be set * @return Builder */ @@ -93,7 +93,7 @@ public ProductTailoringSetImageLabelActionBuilder staged(@Nullable final Boolean } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    * @return sku */ @@ -103,7 +103,7 @@ public String getSku() { } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    * @return variantId */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionImpl.java index 99cf3e1bd8c..a810cda2ee6 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionImpl.java @@ -18,7 +18,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either variantId or sku is required to reference a ProductVariant that exists.

    + *

    Either variantId or sku is required to reference a ProductVariant or Variant (BETA) that exists.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductTailoringSetImageLabelActionImpl implements ProductTailoringSetImageLabelAction, ModelBase { @@ -66,7 +66,7 @@ public String getAction() { } /** - *

    The sku of the tailored ProductVariant to update.

    + *

    The sku of the tailored ProductVariant or Variant (BETA) to update.

    */ public String getSku() { @@ -74,7 +74,7 @@ public String getSku() { } /** - *

    The id of the tailored ProductVariant to update.

    + *

    The id of the tailored ProductVariant or Variant (BETA) to update.

    */ public Long getVariantId() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetKeyAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetKeyAction.java new file mode 100644 index 00000000000..a16dd25ae28 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetKeyAction.java @@ -0,0 +1,128 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import tools.jackson.databind.annotation.*; + +/** + *

    Generates the ProductTailoringKeySet Message.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ProductTailoringSetKeyAction productTailoringSetKeyAction = ProductTailoringSetKeyAction.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 = ProductTailoringSetKeyActionImpl.class) +public interface ProductTailoringSetKeyAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetKeyAction + */ + String SET_KEY = "setKey"; + + /** + *

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

    + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

    Value to set. Must be unique. 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 ProductTailoringSetKeyAction + */ + public static ProductTailoringSetKeyAction of() { + return new ProductTailoringSetKeyActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetKeyAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetKeyAction of(final ProductTailoringSetKeyAction template) { + ProductTailoringSetKeyActionImpl instance = new ProductTailoringSetKeyActionImpl(); + instance.setKey(template.getKey()); + return instance; + } + + public ProductTailoringSetKeyAction copyDeep(); + + /** + * factory method to create a deep copy of ProductTailoringSetKeyAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetKeyAction deepCopy(@Nullable final ProductTailoringSetKeyAction template) { + if (template == null) { + return null; + } + ProductTailoringSetKeyActionImpl instance = new ProductTailoringSetKeyActionImpl(); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for ProductTailoringSetKeyAction + * @return builder + */ + public static ProductTailoringSetKeyActionBuilder builder() { + return ProductTailoringSetKeyActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetKeyAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetKeyActionBuilder builder(final ProductTailoringSetKeyAction template) { + return ProductTailoringSetKeyActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetKeyAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static tools.jackson.core.type.TypeReference typeReference() { + return new tools.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/product_tailoring/ProductTailoringSetKeyActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetKeyActionBuilder.java new file mode 100644 index 00000000000..92502cee888 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetKeyActionBuilder.java @@ -0,0 +1,84 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringSetKeyActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ProductTailoringSetKeyAction productTailoringSetKeyAction = ProductTailoringSetKeyAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetKeyActionBuilder implements Builder { + + @Nullable + private String key; + + /** + *

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

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

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

    + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + * builds ProductTailoringSetKeyAction with checking for non-null required values + * @return ProductTailoringSetKeyAction + */ + public ProductTailoringSetKeyAction build() { + return new ProductTailoringSetKeyActionImpl(key); + } + + /** + * builds ProductTailoringSetKeyAction without checking for non-null required values + * @return ProductTailoringSetKeyAction + */ + public ProductTailoringSetKeyAction buildUnchecked() { + return new ProductTailoringSetKeyActionImpl(key); + } + + /** + * factory method for an instance of ProductTailoringSetKeyActionBuilder + * @return builder + */ + public static ProductTailoringSetKeyActionBuilder of() { + return new ProductTailoringSetKeyActionBuilder(); + } + + /** + * create builder for ProductTailoringSetKeyAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetKeyActionBuilder of(final ProductTailoringSetKeyAction template) { + ProductTailoringSetKeyActionBuilder builder = new ProductTailoringSetKeyActionBuilder(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetKeyActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetKeyActionImpl.java new file mode 100644 index 00000000000..e620ef47d9e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetKeyActionImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +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; + +import tools.jackson.databind.annotation.*; + +/** + *

    Generates the ProductTailoringKeySet Message.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetKeyActionImpl implements ProductTailoringSetKeyAction, ModelBase { + + private String action; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetKeyActionImpl(@JsonProperty("key") final String key) { + this.key = key; + this.action = SET_KEY; + } + + /** + * create empty instance + */ + public ProductTailoringSetKeyActionImpl() { + this.action = SET_KEY; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set. Must be unique. 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; + + ProductTailoringSetKeyActionImpl that = (ProductTailoringSetKeyActionImpl) 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 ProductTailoringSetKeyAction copyDeep() { + return ProductTailoringSetKeyAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateAction.java index 82e62c69034..519b9bb1c66 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateAction.java @@ -229,6 +229,14 @@ public static com.commercetools.api.models.product_tailoring.ProductTailoringSet return com.commercetools.api.models.product_tailoring.ProductTailoringSetImageLabelActionBuilder.of(); } + /** + * builder for setKey subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetKeyActionBuilder setKeyBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetKeyActionBuilder.of(); + } + /** * builder for setMetaAttributes subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionBuilder.java index a5d467efe37..5d30017d668 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionBuilder.java @@ -96,6 +96,10 @@ public com.commercetools.api.models.product_tailoring.ProductTailoringSetImageLa return com.commercetools.api.models.product_tailoring.ProductTailoringSetImageLabelActionBuilder.of(); } + public com.commercetools.api.models.product_tailoring.ProductTailoringSetKeyActionBuilder setKeyBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetKeyActionBuilder.of(); + } + public com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaAttributesActionBuilder setMetaAttributesBuilder() { return com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaAttributesActionBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoring.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoring.java index 962bab31e1d..4d6fa5ba91f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoring.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoring.java @@ -19,7 +19,7 @@ import tools.jackson.databind.annotation.*; /** - *

    The tailoring of a ProductVariant.

    + *

    The tailoring of a ProductVariant or Variant (BETA).

    * *
    * Example to create an instance using the builder pattern @@ -36,7 +36,7 @@ public interface ProductVariantTailoring { /** - *

    The id of the tailored ProductVariant.

    + *

    The id of the tailored ProductVariant or Variant (BETA).

    * @return id */ @NotNull @@ -44,7 +44,7 @@ public interface ProductVariantTailoring { public Long getId(); /** - *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

    + *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant or Variant (BETA) in total.

    * @return images */ @Valid @@ -52,7 +52,7 @@ public interface ProductVariantTailoring { public List getImages(); /** - *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

    + *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant or Variant (BETA) in total.

    * @return assets */ @Valid @@ -60,10 +60,9 @@ public interface ProductVariantTailoring { public List getAssets(); /** - *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @return attributes */ @@ -72,14 +71,14 @@ public interface ProductVariantTailoring { public List getAttributes(); /** - *

    The id of the tailored ProductVariant.

    + *

    The id of the tailored ProductVariant or Variant (BETA).

    * @param id value to be set */ public void setId(final Long id); /** - *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

    + *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant or Variant (BETA) in total.

    * @param images values to be set */ @@ -87,14 +86,14 @@ public interface ProductVariantTailoring { public void setImages(final Image... images); /** - *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

    + *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant or Variant (BETA) in total.

    * @param images values to be set */ public void setImages(final List images); /** - *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

    + *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant or Variant (BETA) in total.

    * @param assets values to be set */ @@ -102,17 +101,16 @@ public interface ProductVariantTailoring { public void setAssets(final Asset... assets); /** - *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

    + *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant or Variant (BETA) in total.

    * @param assets values to be set */ public void setAssets(final List assets); /** - *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param attributes values to be set */ @@ -121,10 +119,9 @@ public interface ProductVariantTailoring { public void setAttributes(final ProductTailoringAttribute... attributes); /** - *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param attributes values to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringBuilder.java index c0f5c45cb19..aa4eeb5e80a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringBuilder.java @@ -36,7 +36,7 @@ public class ProductVariantTailoringBuilder implements Builder attributes; /** - *

    The id of the tailored ProductVariant.

    + *

    The id of the tailored ProductVariant or Variant (BETA).

    * @param id value to be set * @return Builder */ @@ -47,7 +47,7 @@ public ProductVariantTailoringBuilder id(final Long id) { } /** - *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

    + *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant or Variant (BETA) in total.

    * @param images value to be set * @return Builder */ @@ -58,7 +58,7 @@ public ProductVariantTailoringBuilder images(@Nullable final com.commercetools.a } /** - *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

    + *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant or Variant (BETA) in total.

    * @param images value to be set * @return Builder */ @@ -70,7 +70,7 @@ public ProductVariantTailoringBuilder images( } /** - *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

    + *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant or Variant (BETA) in total.

    * @param images value to be set * @return Builder */ @@ -85,7 +85,7 @@ public ProductVariantTailoringBuilder plusImages( } /** - *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

    + *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant or Variant (BETA) in total.

    * @param builder function to build the images value * @return Builder */ @@ -100,7 +100,7 @@ public ProductVariantTailoringBuilder plusImages( } /** - *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

    + *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant or Variant (BETA) in total.

    * @param builder function to build the images value * @return Builder */ @@ -113,7 +113,7 @@ public ProductVariantTailoringBuilder withImages( } /** - *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

    + *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant or Variant (BETA) in total.

    * @param builder function to build the images value * @return Builder */ @@ -124,7 +124,7 @@ public ProductVariantTailoringBuilder addImages( } /** - *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

    + *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant or Variant (BETA) in total.

    * @param builder function to build the images value * @return Builder */ @@ -135,7 +135,7 @@ public ProductVariantTailoringBuilder setImages( } /** - *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

    + *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant or Variant (BETA) in total.

    * @param assets value to be set * @return Builder */ @@ -146,7 +146,7 @@ public ProductVariantTailoringBuilder assets(@Nullable final com.commercetools.a } /** - *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

    + *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant or Variant (BETA) in total.

    * @param assets value to be set * @return Builder */ @@ -158,7 +158,7 @@ public ProductVariantTailoringBuilder assets( } /** - *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

    + *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant or Variant (BETA) in total.

    * @param assets value to be set * @return Builder */ @@ -173,7 +173,7 @@ public ProductVariantTailoringBuilder plusAssets( } /** - *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

    + *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant or Variant (BETA) in total.

    * @param builder function to build the assets value * @return Builder */ @@ -188,7 +188,7 @@ public ProductVariantTailoringBuilder plusAssets( } /** - *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

    + *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant or Variant (BETA) in total.

    * @param builder function to build the assets value * @return Builder */ @@ -201,7 +201,7 @@ public ProductVariantTailoringBuilder withAssets( } /** - *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

    + *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant or Variant (BETA) in total.

    * @param builder function to build the assets value * @return Builder */ @@ -212,7 +212,7 @@ public ProductVariantTailoringBuilder addAssets( } /** - *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

    + *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant or Variant (BETA) in total.

    * @param builder function to build the assets value * @return Builder */ @@ -223,10 +223,9 @@ public ProductVariantTailoringBuilder setAssets( } /** - *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param attributes value to be set * @return Builder @@ -239,10 +238,9 @@ public ProductVariantTailoringBuilder attributes( } /** - *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param attributes value to be set * @return Builder @@ -255,10 +253,9 @@ public ProductVariantTailoringBuilder attributes( } /** - *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param attributes value to be set * @return Builder @@ -274,10 +271,9 @@ public ProductVariantTailoringBuilder plusAttributes( } /** - *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param builder function to build the attributes value * @return Builder @@ -295,10 +291,9 @@ public ProductVariantTailoringBuilder plusAttributes( } /** - *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param builder function to build the attributes value * @return Builder @@ -314,10 +309,9 @@ public ProductVariantTailoringBuilder withAttributes( } /** - *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param builder function to build the attributes value * @return Builder @@ -330,10 +324,9 @@ public ProductVariantTailoringBuilder addAttributes( } /** - *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param builder function to build the attributes value * @return Builder @@ -346,7 +339,7 @@ public ProductVariantTailoringBuilder setAttributes( } /** - *

    The id of the tailored ProductVariant.

    + *

    The id of the tailored ProductVariant or Variant (BETA).

    * @return id */ @@ -355,7 +348,7 @@ public Long getId() { } /** - *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

    + *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant or Variant (BETA) in total.

    * @return images */ @@ -365,7 +358,7 @@ public java.util.List getImages() { } /** - *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

    + *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant or Variant (BETA) in total.

    * @return assets */ @@ -375,10 +368,9 @@ public java.util.List getAssets() { } /** - *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @return attributes */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraft.java index a2e33fa1795..558eb6160f3 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraft.java @@ -18,7 +18,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either id or sku is required to reference a ProductVariant that exists.

    + *

    Either id or sku is required to reference a ProductVariant or Variant (BETA) that exists.

    * *
    * Example to create an instance using the builder pattern @@ -34,7 +34,7 @@ public interface ProductVariantTailoringDraft extends io.vrap.rmf.base.client.Draft { /** - *

    The id of the ProductVariant to be tailored.

    + *

    The id of the ProductVariant or Variant (BETA) to be tailored.

    * @return id */ @@ -42,7 +42,7 @@ public interface ProductVariantTailoringDraft extends io.vrap.rmf.base.client.Dr public Long getId(); /** - *

    The sku of the ProductVariant to be tailored.

    + *

    The sku of the ProductVariant or Variant (BETA) to be tailored.

    * @return sku */ @@ -66,10 +66,9 @@ public interface ProductVariantTailoringDraft extends io.vrap.rmf.base.client.Dr public List getAssets(); /** - *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @return attributes */ @@ -78,14 +77,14 @@ public interface ProductVariantTailoringDraft extends io.vrap.rmf.base.client.Dr public List getAttributes(); /** - *

    The id of the ProductVariant to be tailored.

    + *

    The id of the ProductVariant or Variant (BETA) to be tailored.

    * @param id value to be set */ public void setId(final Long id); /** - *

    The sku of the ProductVariant to be tailored.

    + *

    The sku of the ProductVariant or Variant (BETA) to be tailored.

    * @param sku value to be set */ @@ -122,10 +121,9 @@ public interface ProductVariantTailoringDraft extends io.vrap.rmf.base.client.Dr public void setAssets(final List assets); /** - *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param attributes values to be set */ @@ -134,10 +132,9 @@ public interface ProductVariantTailoringDraft extends io.vrap.rmf.base.client.Dr public void setAttributes(final ProductTailoringAttribute... attributes); /** - *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param attributes values to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftBuilder.java index 9c1a4b59657..9c7a071a50d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftBuilder.java @@ -39,7 +39,7 @@ public class ProductVariantTailoringDraftBuilder implements Builder attributes; /** - *

    The id of the ProductVariant to be tailored.

    + *

    The id of the ProductVariant or Variant (BETA) to be tailored.

    * @param id value to be set * @return Builder */ @@ -50,7 +50,7 @@ public ProductVariantTailoringDraftBuilder id(@Nullable final Long id) { } /** - *

    The sku of the ProductVariant to be tailored.

    + *

    The sku of the ProductVariant or Variant (BETA) to be tailored.

    * @param sku value to be set * @return Builder */ @@ -239,10 +239,9 @@ public ProductVariantTailoringDraftBuilder setAssets( } /** - *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param attributes value to be set * @return Builder @@ -255,10 +254,9 @@ public ProductVariantTailoringDraftBuilder attributes( } /** - *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param attributes value to be set * @return Builder @@ -271,10 +269,9 @@ public ProductVariantTailoringDraftBuilder attributes( } /** - *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param attributes value to be set * @return Builder @@ -290,10 +287,9 @@ public ProductVariantTailoringDraftBuilder plusAttributes( } /** - *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param builder function to build the attributes value * @return Builder @@ -311,10 +307,9 @@ public ProductVariantTailoringDraftBuilder plusAttributes( } /** - *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param builder function to build the attributes value * @return Builder @@ -330,10 +325,9 @@ public ProductVariantTailoringDraftBuilder withAttributes( } /** - *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param builder function to build the attributes value * @return Builder @@ -346,10 +340,9 @@ public ProductVariantTailoringDraftBuilder addAttributes( } /** - *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @param builder function to build the attributes value * @return Builder @@ -362,7 +355,7 @@ public ProductVariantTailoringDraftBuilder setAttributes( } /** - *

    The id of the ProductVariant to be tailored.

    + *

    The id of the ProductVariant or Variant (BETA) to be tailored.

    * @return id */ @@ -372,7 +365,7 @@ public Long getId() { } /** - *

    The sku of the ProductVariant to be tailored.

    + *

    The sku of the ProductVariant or Variant (BETA) to be tailored.

    * @return sku */ @@ -402,10 +395,9 @@ public java.util.List getAssets() { } /** - *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    * @return attributes */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftImpl.java index cc29395164e..d8d20917a77 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftImpl.java @@ -18,7 +18,7 @@ import tools.jackson.databind.annotation.*; /** - *

    Either id or sku is required to reference a ProductVariant that exists.

    + *

    Either id or sku is required to reference a ProductVariant or Variant (BETA) that exists.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductVariantTailoringDraftImpl implements ProductVariantTailoringDraft, ModelBase { @@ -55,7 +55,7 @@ public ProductVariantTailoringDraftImpl() { } /** - *

    The id of the ProductVariant to be tailored.

    + *

    The id of the ProductVariant or Variant (BETA) to be tailored.

    */ public Long getId() { @@ -63,7 +63,7 @@ public Long getId() { } /** - *

    The sku of the ProductVariant to be tailored.

    + *

    The sku of the ProductVariant or Variant (BETA) to be tailored.

    */ public String getSku() { @@ -87,10 +87,9 @@ public java.util.List getAssets() { } /** - *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringImpl.java index 71cfcc2382b..c2788ac2626 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringImpl.java @@ -18,7 +18,7 @@ import tools.jackson.databind.annotation.*; /** - *

    The tailoring of a ProductVariant.

    + *

    The tailoring of a ProductVariant or Variant (BETA).

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductVariantTailoringImpl implements ProductVariantTailoring, ModelBase { @@ -52,7 +52,7 @@ public ProductVariantTailoringImpl() { } /** - *

    The id of the tailored ProductVariant.

    + *

    The id of the tailored ProductVariant or Variant (BETA).

    */ public Long getId() { @@ -60,7 +60,7 @@ public Long getId() { } /** - *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

    + *

    Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant or Variant (BETA) in total.

    */ public java.util.List getImages() { @@ -68,7 +68,7 @@ public java.util.List getImages() { } /** - *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

    + *

    Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant or Variant (BETA) in total.

    */ public java.util.List getAssets() { @@ -76,10 +76,9 @@ public java.util.List getAssets() { } /** - *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

    + *

    Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant or Variant (BETA):

    *
      - *
    • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
    • - *
    • otherwise the Attribute and its value are added to the ProductVariant.
    • + *
    • If the ProductVariant or Variant (BETA) contains an Attribute with the same name, its value is overwritten. Otherwise, the Attribute and its value are added to the ProductVariant or Variant (BETA).
    • *
    */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_type/AttributeReferenceTypeId.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_type/AttributeReferenceTypeId.java index 10e6ac2a8cb..164406fde9d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_type/AttributeReferenceTypeId.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_type/AttributeReferenceTypeId.java @@ -62,6 +62,9 @@ public interface AttributeReferenceTypeId extends JsonEnum {

    References a State.

    */ AttributeReferenceTypeId STATE = AttributeReferenceTypeIdEnum.STATE; /** +

    References a Variant. Only available for Projects with productCatalogModel set to Modular (BETA).

    */ + AttributeReferenceTypeId VARIANT = AttributeReferenceTypeIdEnum.VARIANT; + /**

    References a Zone.

    */ AttributeReferenceTypeId ZONE = AttributeReferenceTypeIdEnum.ZONE; @@ -144,6 +147,11 @@ enum AttributeReferenceTypeIdEnum implements AttributeReferenceTypeId { */ STATE("state"), + /** + * variant + */ + VARIANT("variant"), + /** * zone */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemAction.java index c099d6c69fd..3df32c40e71 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemAction.java @@ -67,6 +67,7 @@ public interface ShoppingListAddLineItemAction extends ShoppingListUpdateAction, /** *

    id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

    + *

    For a Project with ProductCatalogModel (BETA) set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (BETA) (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.

    * @return variantId */ @@ -120,6 +121,7 @@ public interface ShoppingListAddLineItemAction extends ShoppingListUpdateAction, /** *

    id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

    + *

    For a Project with ProductCatalogModel (BETA) set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (BETA) (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.

    * @param variantId value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionBuilder.java index 8ee1ed8d960..1d116990e53 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionBuilder.java @@ -79,6 +79,7 @@ public ShoppingListAddLineItemActionBuilder productId(@Nullable final String pro /** *

    id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

    + *

    For a Project with ProductCatalogModel (BETA) set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (BETA) (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.

    * @param variantId value to be set * @return Builder */ @@ -178,6 +179,7 @@ public String getProductId() { /** *

    id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

    + *

    For a Project with ProductCatalogModel (BETA) set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (BETA) (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.

    * @return variantId */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionImpl.java index d1b2304cad5..ca7dd4ea823 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionImpl.java @@ -101,6 +101,7 @@ public String getProductId() { /** *

    id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

    + *

    For a Project with ProductCatalogModel (BETA) set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (BETA) (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.

    */ public Long getVariantId() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItem.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItem.java index 31fe12c7af4..3e98b3d11bb 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItem.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItem.java @@ -131,6 +131,7 @@ public interface ShoppingListLineItem extends com.commercetools.api.models.Custo /** *

    id of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.

    + *

    For a Project with ProductCatalogModel (BETA) set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (BETA) (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.

    * @return variantId */ @@ -230,6 +231,7 @@ public interface ShoppingListLineItem extends com.commercetools.api.models.Custo /** *

    id of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.

    + *

    For a Project with ProductCatalogModel (BETA) set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (BETA) (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.

    * @param variantId value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemBuilder.java index 4816a613926..ea2942f466d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemBuilder.java @@ -253,6 +253,7 @@ public ShoppingListLineItemBuilder quantity(final Long quantity) { /** *

    id of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.

    + *

    For a Project with ProductCatalogModel (BETA) set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (BETA) (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.

    * @param variantId value to be set * @return Builder */ @@ -438,6 +439,7 @@ public Long getQuantity() { /** *

    id of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.

    + *

    For a Project with ProductCatalogModel (BETA) set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (BETA) (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.

    * @return variantId */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemDraft.java index 14ebdcffeb1..07fa7aa3aea 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemDraft.java @@ -52,6 +52,7 @@ public interface ShoppingListLineItemDraft /** *

    id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

    + *

    For a Project with ProductCatalogModel (BETA) set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (BETA) (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.

    * @return variantId */ @@ -106,6 +107,7 @@ public interface ShoppingListLineItemDraft /** *

    id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

    + *

    For a Project with ProductCatalogModel (BETA) set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (BETA) (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.

    * @param variantId value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemDraftBuilder.java index 3b78d59c9dd..46c85b99b4c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemDraftBuilder.java @@ -68,6 +68,7 @@ public ShoppingListLineItemDraftBuilder productId(@Nullable final String product /** *

    id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

    + *

    For a Project with ProductCatalogModel (BETA) set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (BETA) (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.

    * @param variantId value to be set * @return Builder */ @@ -168,6 +169,7 @@ public String getProductId() { /** *

    id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

    + *

    For a Project with ProductCatalogModel (BETA) set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (BETA) (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.

    * @return variantId */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemDraftImpl.java index 8c41072e89c..8785a819854 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemDraftImpl.java @@ -79,6 +79,7 @@ public String getProductId() { /** *

    id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

    + *

    For a Project with ProductCatalogModel (BETA) set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (BETA) (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.

    */ public Long getVariantId() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemImpl.java index 81e89eddeba..6d1d7ec9d3b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListLineItemImpl.java @@ -171,6 +171,7 @@ public Long getQuantity() { /** *

    id of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.

    + *

    For a Project with ProductCatalogModel (BETA) set to Modular, when variantId is not set, the ShoppingListLineItem refers to the Product's default Variant (BETA) (defaultVariant) instead of the Master Variant. If no default Variant is set, the ShoppingListLineItem refers to the Variant with the lowest variantId.

    */ public Long getVariantId() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/SubscriptionHealthStatus.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/SubscriptionHealthStatus.java index 3a9a2cb3f45..7f5ccd371df 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/SubscriptionHealthStatus.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/SubscriptionHealthStatus.java @@ -23,7 +23,7 @@ public interface SubscriptionHealthStatus extends JsonEnum {

    Notifications cannot be delivered with the current configuration. Common causes are deleting the Destination queue, deleting access credentials, or removing necessary permissions. You can fix the configuration by re-creating the configuration on the Destination side, or by setting a new configuration with the Change Destination update action. After the configuration is fixed, undelivered notifications will be delivered and the status will change to Healthy. ConfigurationError is automatically turned into ConfigurationErrorDeliveryStopped after some time. For more information, see Delivery Guarantees.

    */ SubscriptionHealthStatus CONFIGURATION_ERROR = SubscriptionHealthStatusEnum.CONFIGURATION_ERROR; /** -

    Does not deliver notifications with the current configuration and the delivery of the notifications is no longer attempted. After the configuration is fixed, undelivered notifications are not retained and will not be delivered. The status will change to Healthy as soon as new notifications can be delivered.

    */ +

    Does not deliver notifications with the current configuration and the delivery of the notifications is no longer attempted. After the configuration is fixed, undelivered notifications are not retained and will not be delivered. The status will not automatically change to Healthy. To return your Subscription to a Healthy status, use the Change Destination update action or recreate the Subscription.

    */ SubscriptionHealthStatus CONFIGURATION_ERROR_DELIVERY_STOPPED = SubscriptionHealthStatusEnum.CONFIGURATION_ERROR_DELIVERY_STOPPED; /**

    Does not deliver notifications temporarily due to reasons other than a configuration error. For example, the Destination has a temporary outage.

    */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/CustomFieldReferenceValue.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/CustomFieldReferenceValue.java index 3aa7baee7c5..6112906f7eb 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/CustomFieldReferenceValue.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/CustomFieldReferenceValue.java @@ -68,6 +68,9 @@ public interface CustomFieldReferenceValue extends JsonEnum {

    ShippingMethod

    */ CustomFieldReferenceValue SHIPPING_METHOD = CustomFieldReferenceValueEnum.SHIPPING_METHOD; /** +

    Variant - Only available for Projects with productCatalogModel set to Modular (BETA).

    */ + CustomFieldReferenceValue VARIANT = CustomFieldReferenceValueEnum.VARIANT; + /**

    Zone

    */ CustomFieldReferenceValue ZONE = CustomFieldReferenceValueEnum.ZONE; @@ -160,6 +163,11 @@ enum CustomFieldReferenceValueEnum implements CustomFieldReferenceValue { */ SHIPPING_METHOD("shipping-method"), + /** + * variant + */ + VARIANT("variant"), + /** * zone */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/mcp_server/McpServerExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/mcp_server/McpServerExpansionBuilderDsl.java new file mode 100644 index 00000000000..a4ce3de150f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/mcp_server/McpServerExpansionBuilderDsl.java @@ -0,0 +1,41 @@ + +package com.commercetools.api.predicates.expansion.mcp_server; + +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 McpServerExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private McpServerExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static McpServerExpansionBuilderDsl of() { + return new McpServerExpansionBuilderDsl(Collections.emptyList()); + } + + public static McpServerExpansionBuilderDsl of(final List path) { + return new McpServerExpansionBuilderDsl(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")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductTailoringKeySetMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductTailoringKeySetMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..ad75ad9128d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductTailoringKeySetMessageExpansionBuilderDsl.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 ProductTailoringKeySetMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private ProductTailoringKeySetMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static ProductTailoringKeySetMessageExpansionBuilderDsl of() { + return new ProductTailoringKeySetMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static ProductTailoringKeySetMessageExpansionBuilderDsl of(final List path) { + return new ProductTailoringKeySetMessageExpansionBuilderDsl(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.product.ProductReferenceExpansionBuilderDsl product() { + return com.commercetools.api.predicates.expansion.product.ProductReferenceExpansionBuilderDsl + .of(appendOne(path, "product")); + } +} 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 3c59606678e..4b10b96337c 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 @@ -148,6 +148,13 @@ public CombinationQueryPredicate asInventoryEntry( BaseResourceQueryBuilderDsl::of); } + public CombinationQueryPredicate asMcpServer( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.mcp_server.McpServerQueryBuilderDsl.of()), + BaseResourceQueryBuilderDsl::of); + } + public CombinationQueryPredicate asMessage( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/discount_code/DiscountCodeQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/discount_code/DiscountCodeQueryBuilderDsl.java index 9698f82491e..188632daf73 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/discount_code/DiscountCodeQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/discount_code/DiscountCodeQueryBuilderDsl.java @@ -98,6 +98,19 @@ public CollectionPredicateBuilder cartDiscounts() { p -> new CombinationQueryPredicate<>(p, DiscountCodeQueryBuilderDsl::of)); } + public CombinationQueryPredicate stores( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("stores")) + .inner(fn.apply(com.commercetools.api.predicates.query.store.StoreKeyReferenceQueryBuilderDsl.of())), + DiscountCodeQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder stores() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("stores")), + p -> new CombinationQueryPredicate<>(p, DiscountCodeQueryBuilderDsl::of)); + } + public StringComparisonPredicateBuilder cartPredicate() { return new StringComparisonPredicateBuilder<>( BinaryQueryPredicate.of().left(new ConstantQueryPredicate("cartPredicate")), diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java index 1d5d4122ca4..58b717ff775 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java @@ -675,6 +675,13 @@ public CombinationQueryPredicate asSyntaxError( ErrorObjectQueryBuilderDsl::of); } + public CombinationQueryPredicate asUnauthorized( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.error.UnauthorizedErrorQueryBuilderDsl.of()), + ErrorObjectQueryBuilderDsl::of); + } + public CombinationQueryPredicate asValidityLockConflict( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java index ce43ac2daf6..1480a96781b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java @@ -691,6 +691,13 @@ public CombinationQueryPredicate asSyntaxErro GraphQLErrorObjectQueryBuilderDsl::of); } + public CombinationQueryPredicate asUnauthorized( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.error.GraphQLUnauthorizedErrorQueryBuilderDsl.of()), + GraphQLErrorObjectQueryBuilderDsl::of); + } + public CombinationQueryPredicate asValidityLockConflict( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLUnauthorizedErrorQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLUnauthorizedErrorQueryBuilderDsl.java new file mode 100644 index 00000000000..78341017ef2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLUnauthorizedErrorQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.error; + +import com.commercetools.api.predicates.query.*; + +public class GraphQLUnauthorizedErrorQueryBuilderDsl { + public GraphQLUnauthorizedErrorQueryBuilderDsl() { + } + + public static GraphQLUnauthorizedErrorQueryBuilderDsl of() { + return new GraphQLUnauthorizedErrorQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder code() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("code")), + p -> new CombinationQueryPredicate<>(p, GraphQLUnauthorizedErrorQueryBuilderDsl::of)); + } + + public StringCollectionPredicateBuilder storesWithoutPermission() { + return new StringCollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("storesWithoutPermission")), + p -> new CombinationQueryPredicate<>(p, GraphQLUnauthorizedErrorQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/UnauthorizedErrorQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/UnauthorizedErrorQueryBuilderDsl.java new file mode 100644 index 00000000000..692e00712d9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/UnauthorizedErrorQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.error; + +import com.commercetools.api.predicates.query.*; + +public class UnauthorizedErrorQueryBuilderDsl { + public UnauthorizedErrorQueryBuilderDsl() { + } + + public static UnauthorizedErrorQueryBuilderDsl of() { + return new UnauthorizedErrorQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder code() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("code")), + p -> new CombinationQueryPredicate<>(p, UnauthorizedErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder message() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("message")), + p -> new CombinationQueryPredicate<>(p, UnauthorizedErrorQueryBuilderDsl::of)); + } + + public StringCollectionPredicateBuilder storesWithoutPermission() { + return new StringCollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("storesWithoutPermission")), + p -> new CombinationQueryPredicate<>(p, UnauthorizedErrorQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/CommerceMcpServerConfigDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/CommerceMcpServerConfigDraftQueryBuilderDsl.java new file mode 100644 index 00000000000..aadf93aa5db --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/CommerceMcpServerConfigDraftQueryBuilderDsl.java @@ -0,0 +1,66 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CommerceMcpServerConfigDraftQueryBuilderDsl { + public CommerceMcpServerConfigDraftQueryBuilderDsl() { + } + + public static CommerceMcpServerConfigDraftQueryBuilderDsl of() { + return new CommerceMcpServerConfigDraftQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, CommerceMcpServerConfigDraftQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder majorVersion() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("majorVersion")), + p -> new CombinationQueryPredicate<>(p, CommerceMcpServerConfigDraftQueryBuilderDsl::of)); + } + + public StringCollectionPredicateBuilder tools() { + return new StringCollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("tools")), + p -> new CombinationQueryPredicate<>(p, CommerceMcpServerConfigDraftQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate toolCustomizations( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("toolCustomizations")) + .inner(fn.apply( + com.commercetools.api.predicates.query.mcp_server.ToolCustomizationQueryBuilderDsl.of())), + CommerceMcpServerConfigDraftQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder toolCustomizations() { + return new CollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("toolCustomizations")), + p -> new CombinationQueryPredicate<>(p, CommerceMcpServerConfigDraftQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate jsonOutputFiltering( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("jsonOutputFiltering")) + .inner(fn.apply( + com.commercetools.api.predicates.query.mcp_server.McpServerJsonOutputFilteringQueryBuilderDsl + .of())), + CommerceMcpServerConfigDraftQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder toolOutputFormatting() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("toolOutputFormatting")), + p -> new CombinationQueryPredicate<>(p, CommerceMcpServerConfigDraftQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/CommerceMcpServerConfigQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/CommerceMcpServerConfigQueryBuilderDsl.java new file mode 100644 index 00000000000..88aef5d0485 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/CommerceMcpServerConfigQueryBuilderDsl.java @@ -0,0 +1,71 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CommerceMcpServerConfigQueryBuilderDsl { + public CommerceMcpServerConfigQueryBuilderDsl() { + } + + public static CommerceMcpServerConfigQueryBuilderDsl of() { + return new CommerceMcpServerConfigQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, CommerceMcpServerConfigQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder majorVersion() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("majorVersion")), + p -> new CombinationQueryPredicate<>(p, CommerceMcpServerConfigQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder url() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("url")), + p -> new CombinationQueryPredicate<>(p, CommerceMcpServerConfigQueryBuilderDsl::of)); + } + + public StringCollectionPredicateBuilder tools() { + return new StringCollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("tools")), + p -> new CombinationQueryPredicate<>(p, CommerceMcpServerConfigQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate toolCustomizations( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("toolCustomizations")) + .inner(fn.apply( + com.commercetools.api.predicates.query.mcp_server.ToolCustomizationQueryBuilderDsl.of())), + CommerceMcpServerConfigQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder toolCustomizations() { + return new CollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("toolCustomizations")), + p -> new CombinationQueryPredicate<>(p, CommerceMcpServerConfigQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate jsonOutputFiltering( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("jsonOutputFiltering")) + .inner(fn.apply( + com.commercetools.api.predicates.query.mcp_server.McpServerJsonOutputFilteringQueryBuilderDsl + .of())), + CommerceMcpServerConfigQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder toolOutputFormatting() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("toolOutputFormatting")), + p -> new CombinationQueryPredicate<>(p, CommerceMcpServerConfigQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerAddToolActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerAddToolActionQueryBuilderDsl.java new file mode 100644 index 00000000000..eece03e7137 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerAddToolActionQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import com.commercetools.api.predicates.query.*; + +public class McpServerAddToolActionQueryBuilderDsl { + public McpServerAddToolActionQueryBuilderDsl() { + } + + public static McpServerAddToolActionQueryBuilderDsl of() { + return new McpServerAddToolActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, McpServerAddToolActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder tool() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("tool")), + p -> new CombinationQueryPredicate<>(p, McpServerAddToolActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerAddToolCustomizationActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerAddToolCustomizationActionQueryBuilderDsl.java new file mode 100644 index 00000000000..e0440b2a6d9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerAddToolCustomizationActionQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class McpServerAddToolCustomizationActionQueryBuilderDsl { + public McpServerAddToolCustomizationActionQueryBuilderDsl() { + } + + public static McpServerAddToolCustomizationActionQueryBuilderDsl of() { + return new McpServerAddToolCustomizationActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, McpServerAddToolCustomizationActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate toolCustomization( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("toolCustomization")) + .inner(fn.apply( + com.commercetools.api.predicates.query.mcp_server.ToolCustomizationQueryBuilderDsl.of())), + McpServerAddToolCustomizationActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerConfigDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerConfigDraftQueryBuilderDsl.java new file mode 100644 index 00000000000..158bdddbbac --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerConfigDraftQueryBuilderDsl.java @@ -0,0 +1,29 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class McpServerConfigDraftQueryBuilderDsl { + public McpServerConfigDraftQueryBuilderDsl() { + } + + public static McpServerConfigDraftQueryBuilderDsl of() { + return new McpServerConfigDraftQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, McpServerConfigDraftQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate asCommerceMcp( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.mcp_server.CommerceMcpServerConfigDraftQueryBuilderDsl.of()), + McpServerConfigDraftQueryBuilderDsl::of); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerConfigQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerConfigQueryBuilderDsl.java new file mode 100644 index 00000000000..29c31790f4e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerConfigQueryBuilderDsl.java @@ -0,0 +1,28 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class McpServerConfigQueryBuilderDsl { + public McpServerConfigQueryBuilderDsl() { + } + + public static McpServerConfigQueryBuilderDsl of() { + return new McpServerConfigQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, McpServerConfigQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate asCommerceMcp( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.mcp_server.CommerceMcpServerConfigQueryBuilderDsl.of()), + McpServerConfigQueryBuilderDsl::of); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerDraftQueryBuilderDsl.java new file mode 100644 index 00000000000..3185ae52cfe --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerDraftQueryBuilderDsl.java @@ -0,0 +1,55 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class McpServerDraftQueryBuilderDsl { + public McpServerDraftQueryBuilderDsl() { + } + + public static McpServerDraftQueryBuilderDsl of() { + return new McpServerDraftQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, McpServerDraftQueryBuilderDsl::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())), + McpServerDraftQueryBuilderDsl::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())), + McpServerDraftQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder state() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("state")), + p -> new CombinationQueryPredicate<>(p, McpServerDraftQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate mcpServer( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("mcpServer")) + .inner(fn.apply( + com.commercetools.api.predicates.query.mcp_server.McpServerConfigDraftQueryBuilderDsl.of())), + McpServerDraftQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerJsonOutputFilteringMatcherQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerJsonOutputFilteringMatcherQueryBuilderDsl.java new file mode 100644 index 00000000000..d4909dc2b33 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerJsonOutputFilteringMatcherQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import com.commercetools.api.predicates.query.*; + +public class McpServerJsonOutputFilteringMatcherQueryBuilderDsl { + public McpServerJsonOutputFilteringMatcherQueryBuilderDsl() { + } + + public static McpServerJsonOutputFilteringMatcherQueryBuilderDsl of() { + return new McpServerJsonOutputFilteringMatcherQueryBuilderDsl(); + } + + public StringCollectionPredicateBuilder fieldPaths() { + return new StringCollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("fieldPaths")), + p -> new CombinationQueryPredicate<>(p, McpServerJsonOutputFilteringMatcherQueryBuilderDsl::of)); + } + + public StringCollectionPredicateBuilder fieldNames() { + return new StringCollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("fieldNames")), + p -> new CombinationQueryPredicate<>(p, McpServerJsonOutputFilteringMatcherQueryBuilderDsl::of)); + } + + public StringCollectionPredicateBuilder fieldNameContains() { + return new StringCollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("fieldNameContains")), + p -> new CombinationQueryPredicate<>(p, McpServerJsonOutputFilteringMatcherQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerJsonOutputFilteringQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerJsonOutputFilteringQueryBuilderDsl.java new file mode 100644 index 00000000000..c10662b1ffa --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerJsonOutputFilteringQueryBuilderDsl.java @@ -0,0 +1,48 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class McpServerJsonOutputFilteringQueryBuilderDsl { + public McpServerJsonOutputFilteringQueryBuilderDsl() { + } + + public static McpServerJsonOutputFilteringQueryBuilderDsl of() { + return new McpServerJsonOutputFilteringQueryBuilderDsl(); + } + + public CombinationQueryPredicate redact( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("redact")) + .inner(fn.apply( + com.commercetools.api.predicates.query.mcp_server.McpServerJsonOutputFilteringMatcherQueryBuilderDsl + .of())), + McpServerJsonOutputFilteringQueryBuilderDsl::of); + } + + public CombinationQueryPredicate drop( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("drop")) + .inner(fn.apply( + com.commercetools.api.predicates.query.mcp_server.McpServerJsonOutputFilteringMatcherQueryBuilderDsl + .of())), + McpServerJsonOutputFilteringQueryBuilderDsl::of); + } + + public StringCollectionPredicateBuilder fieldPathsToKeep() { + return new StringCollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("fieldPathsToKeep")), + p -> new CombinationQueryPredicate<>(p, McpServerJsonOutputFilteringQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder redactedWith() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("redactedWith")), + p -> new CombinationQueryPredicate<>(p, McpServerJsonOutputFilteringQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerPagedQueryResponseQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerPagedQueryResponseQueryBuilderDsl.java new file mode 100644 index 00000000000..46f081adff1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerPagedQueryResponseQueryBuilderDsl.java @@ -0,0 +1,51 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class McpServerPagedQueryResponseQueryBuilderDsl { + public McpServerPagedQueryResponseQueryBuilderDsl() { + } + + public static McpServerPagedQueryResponseQueryBuilderDsl of() { + return new McpServerPagedQueryResponseQueryBuilderDsl(); + } + + public LongComparisonPredicateBuilder limit() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("limit")), + p -> new CombinationQueryPredicate<>(p, McpServerPagedQueryResponseQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder offset() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("offset")), + p -> new CombinationQueryPredicate<>(p, McpServerPagedQueryResponseQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder count() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("count")), + p -> new CombinationQueryPredicate<>(p, McpServerPagedQueryResponseQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder total() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("total")), + p -> new CombinationQueryPredicate<>(p, McpServerPagedQueryResponseQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate results( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("results")) + .inner(fn.apply(com.commercetools.api.predicates.query.mcp_server.McpServerQueryBuilderDsl.of())), + McpServerPagedQueryResponseQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder results() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("results")), + p -> new CombinationQueryPredicate<>(p, McpServerPagedQueryResponseQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerQueryBuilderDsl.java new file mode 100644 index 00000000000..b224f667ce3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerQueryBuilderDsl.java @@ -0,0 +1,96 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class McpServerQueryBuilderDsl { + public McpServerQueryBuilderDsl() { + } + + public static McpServerQueryBuilderDsl of() { + return new McpServerQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, McpServerQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, McpServerQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, McpServerQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, McpServerQueryBuilderDsl::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())), + McpServerQueryBuilderDsl::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())), + McpServerQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, McpServerQueryBuilderDsl::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())), + McpServerQueryBuilderDsl::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())), + McpServerQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder state() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("state")), + p -> new CombinationQueryPredicate<>(p, McpServerQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate mcpServer( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("mcpServer")) + .inner(fn.apply( + com.commercetools.api.predicates.query.mcp_server.McpServerConfigQueryBuilderDsl.of())), + McpServerQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerRemoveToolActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerRemoveToolActionQueryBuilderDsl.java new file mode 100644 index 00000000000..edfd7989189 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerRemoveToolActionQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import com.commercetools.api.predicates.query.*; + +public class McpServerRemoveToolActionQueryBuilderDsl { + public McpServerRemoveToolActionQueryBuilderDsl() { + } + + public static McpServerRemoveToolActionQueryBuilderDsl of() { + return new McpServerRemoveToolActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, McpServerRemoveToolActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder tool() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("tool")), + p -> new CombinationQueryPredicate<>(p, McpServerRemoveToolActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerRemoveToolCustomizationActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerRemoveToolCustomizationActionQueryBuilderDsl.java new file mode 100644 index 00000000000..46cc66f8d34 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerRemoveToolCustomizationActionQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class McpServerRemoveToolCustomizationActionQueryBuilderDsl { + public McpServerRemoveToolCustomizationActionQueryBuilderDsl() { + } + + public static McpServerRemoveToolCustomizationActionQueryBuilderDsl of() { + return new McpServerRemoveToolCustomizationActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, McpServerRemoveToolCustomizationActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate toolCustomization( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("toolCustomization")) + .inner(fn.apply( + com.commercetools.api.predicates.query.mcp_server.RemoveToolCustomizationTargetQueryBuilderDsl + .of())), + McpServerRemoveToolCustomizationActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetDescriptionActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetDescriptionActionQueryBuilderDsl.java new file mode 100644 index 00000000000..9f060099cc1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetDescriptionActionQueryBuilderDsl.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class McpServerSetDescriptionActionQueryBuilderDsl { + public McpServerSetDescriptionActionQueryBuilderDsl() { + } + + public static McpServerSetDescriptionActionQueryBuilderDsl of() { + return new McpServerSetDescriptionActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, McpServerSetDescriptionActionQueryBuilderDsl::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())), + McpServerSetDescriptionActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetJsonOutputFilteringActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetJsonOutputFilteringActionQueryBuilderDsl.java new file mode 100644 index 00000000000..eb341383c4f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetJsonOutputFilteringActionQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class McpServerSetJsonOutputFilteringActionQueryBuilderDsl { + public McpServerSetJsonOutputFilteringActionQueryBuilderDsl() { + } + + public static McpServerSetJsonOutputFilteringActionQueryBuilderDsl of() { + return new McpServerSetJsonOutputFilteringActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, McpServerSetJsonOutputFilteringActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate jsonOutputFiltering( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("jsonOutputFiltering")) + .inner(fn.apply( + com.commercetools.api.predicates.query.mcp_server.McpServerJsonOutputFilteringQueryBuilderDsl + .of())), + McpServerSetJsonOutputFilteringActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetNameActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetNameActionQueryBuilderDsl.java new file mode 100644 index 00000000000..66572b98daa --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetNameActionQueryBuilderDsl.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class McpServerSetNameActionQueryBuilderDsl { + public McpServerSetNameActionQueryBuilderDsl() { + } + + public static McpServerSetNameActionQueryBuilderDsl of() { + return new McpServerSetNameActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, McpServerSetNameActionQueryBuilderDsl::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())), + McpServerSetNameActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetStateActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetStateActionQueryBuilderDsl.java new file mode 100644 index 00000000000..3b01471e806 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetStateActionQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import com.commercetools.api.predicates.query.*; + +public class McpServerSetStateActionQueryBuilderDsl { + public McpServerSetStateActionQueryBuilderDsl() { + } + + public static McpServerSetStateActionQueryBuilderDsl of() { + return new McpServerSetStateActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, McpServerSetStateActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder state() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("state")), + p -> new CombinationQueryPredicate<>(p, McpServerSetStateActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetToolCustomizationsActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetToolCustomizationsActionQueryBuilderDsl.java new file mode 100644 index 00000000000..6f187e5c149 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetToolCustomizationsActionQueryBuilderDsl.java @@ -0,0 +1,38 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class McpServerSetToolCustomizationsActionQueryBuilderDsl { + public McpServerSetToolCustomizationsActionQueryBuilderDsl() { + } + + public static McpServerSetToolCustomizationsActionQueryBuilderDsl of() { + return new McpServerSetToolCustomizationsActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, McpServerSetToolCustomizationsActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate toolCustomizations( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("toolCustomizations")) + .inner(fn.apply( + com.commercetools.api.predicates.query.mcp_server.ToolCustomizationQueryBuilderDsl.of())), + McpServerSetToolCustomizationsActionQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder toolCustomizations() { + return new CollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("toolCustomizations")), + p -> new CombinationQueryPredicate<>(p, McpServerSetToolCustomizationsActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetToolOutputFormattingActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetToolOutputFormattingActionQueryBuilderDsl.java new file mode 100644 index 00000000000..bc8852d1818 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetToolOutputFormattingActionQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import com.commercetools.api.predicates.query.*; + +public class McpServerSetToolOutputFormattingActionQueryBuilderDsl { + public McpServerSetToolOutputFormattingActionQueryBuilderDsl() { + } + + public static McpServerSetToolOutputFormattingActionQueryBuilderDsl of() { + return new McpServerSetToolOutputFormattingActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, McpServerSetToolOutputFormattingActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder toolOutputFormatting() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("toolOutputFormatting")), + p -> new CombinationQueryPredicate<>(p, McpServerSetToolOutputFormattingActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetToolsActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetToolsActionQueryBuilderDsl.java new file mode 100644 index 00000000000..da657593160 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerSetToolsActionQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import com.commercetools.api.predicates.query.*; + +public class McpServerSetToolsActionQueryBuilderDsl { + public McpServerSetToolsActionQueryBuilderDsl() { + } + + public static McpServerSetToolsActionQueryBuilderDsl of() { + return new McpServerSetToolsActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, McpServerSetToolsActionQueryBuilderDsl::of)); + } + + public StringCollectionPredicateBuilder tools() { + return new StringCollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("tools")), + p -> new CombinationQueryPredicate<>(p, McpServerSetToolsActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerTypeQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerTypeQueryBuilderDsl.java new file mode 100644 index 00000000000..ff787e7907d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerTypeQueryBuilderDsl.java @@ -0,0 +1,43 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class McpServerTypeQueryBuilderDsl { + public McpServerTypeQueryBuilderDsl() { + } + + public static McpServerTypeQueryBuilderDsl of() { + return new McpServerTypeQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, McpServerTypeQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder majorVersion() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("majorVersion")), + p -> new CombinationQueryPredicate<>(p, McpServerTypeQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate tools( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("tools")) + .inner(fn.apply( + com.commercetools.api.predicates.query.mcp_server.McpServerTypeToolQueryBuilderDsl.of())), + McpServerTypeQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder tools() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("tools")), + p -> new CombinationQueryPredicate<>(p, McpServerTypeQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerTypeToolQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerTypeToolQueryBuilderDsl.java new file mode 100644 index 00000000000..8809dc49de0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerTypeToolQueryBuilderDsl.java @@ -0,0 +1,38 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import com.commercetools.api.predicates.query.*; + +public class McpServerTypeToolQueryBuilderDsl { + public McpServerTypeToolQueryBuilderDsl() { + } + + public static McpServerTypeToolQueryBuilderDsl of() { + return new McpServerTypeToolQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, McpServerTypeToolQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder description() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("description")), + p -> new CombinationQueryPredicate<>(p, McpServerTypeToolQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder operationType() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("operationType")), + p -> new CombinationQueryPredicate<>(p, McpServerTypeToolQueryBuilderDsl::of)); + } + + public StringCollectionPredicateBuilder groups() { + return new StringCollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("groups")), + p -> new CombinationQueryPredicate<>(p, McpServerTypeToolQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerUpdateActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerUpdateActionQueryBuilderDsl.java new file mode 100644 index 00000000000..9e654a8b027 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerUpdateActionQueryBuilderDsl.java @@ -0,0 +1,102 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class McpServerUpdateActionQueryBuilderDsl { + public McpServerUpdateActionQueryBuilderDsl() { + } + + public static McpServerUpdateActionQueryBuilderDsl of() { + return new McpServerUpdateActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, McpServerUpdateActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate asAddTool( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.mcp_server.McpServerAddToolActionQueryBuilderDsl.of()), + McpServerUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asAddToolCustomization( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.mcp_server.McpServerAddToolCustomizationActionQueryBuilderDsl.of()), + McpServerUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRemoveTool( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.mcp_server.McpServerRemoveToolActionQueryBuilderDsl.of()), + McpServerUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRemoveToolCustomization( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.mcp_server.McpServerRemoveToolCustomizationActionQueryBuilderDsl + .of()), + McpServerUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetDescription( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.mcp_server.McpServerSetDescriptionActionQueryBuilderDsl.of()), + McpServerUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetJsonOutputFiltering( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.mcp_server.McpServerSetJsonOutputFilteringActionQueryBuilderDsl + .of()), + McpServerUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetName( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.mcp_server.McpServerSetNameActionQueryBuilderDsl.of()), + McpServerUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetState( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.mcp_server.McpServerSetStateActionQueryBuilderDsl.of()), + McpServerUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetToolCustomizations( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.mcp_server.McpServerSetToolCustomizationsActionQueryBuilderDsl.of()), + McpServerUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetToolOutputFormatting( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.mcp_server.McpServerSetToolOutputFormattingActionQueryBuilderDsl + .of()), + McpServerUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetTools( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.mcp_server.McpServerSetToolsActionQueryBuilderDsl.of()), + McpServerUpdateActionQueryBuilderDsl::of); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerUpdateQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerUpdateQueryBuilderDsl.java new file mode 100644 index 00000000000..299b755d948 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/McpServerUpdateQueryBuilderDsl.java @@ -0,0 +1,37 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class McpServerUpdateQueryBuilderDsl { + public McpServerUpdateQueryBuilderDsl() { + } + + public static McpServerUpdateQueryBuilderDsl of() { + return new McpServerUpdateQueryBuilderDsl(); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, McpServerUpdateQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate actions( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("actions")) + .inner(fn.apply( + com.commercetools.api.predicates.query.mcp_server.McpServerUpdateActionQueryBuilderDsl.of())), + McpServerUpdateQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder actions() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("actions")), + p -> new CombinationQueryPredicate<>(p, McpServerUpdateQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/ParameterOverrideQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/ParameterOverrideQueryBuilderDsl.java new file mode 100644 index 00000000000..fde0b3d8d60 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/ParameterOverrideQueryBuilderDsl.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import com.commercetools.api.predicates.query.*; + +public class ParameterOverrideQueryBuilderDsl { + public ParameterOverrideQueryBuilderDsl() { + } + + public static ParameterOverrideQueryBuilderDsl of() { + return new ParameterOverrideQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, ParameterOverrideQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder description() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("description")), + p -> new CombinationQueryPredicate<>(p, ParameterOverrideQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder _const() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("const")), + p -> new CombinationQueryPredicate<>(p, ParameterOverrideQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder _default() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("default")), + p -> new CombinationQueryPredicate<>(p, ParameterOverrideQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder allowedTypes() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("allowedTypes")), + p -> new CombinationQueryPredicate<>(p, ParameterOverrideQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/RemoveToolCustomizationTargetQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/RemoveToolCustomizationTargetQueryBuilderDsl.java new file mode 100644 index 00000000000..1474ce6b68c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/RemoveToolCustomizationTargetQueryBuilderDsl.java @@ -0,0 +1,20 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import com.commercetools.api.predicates.query.*; + +public class RemoveToolCustomizationTargetQueryBuilderDsl { + public RemoveToolCustomizationTargetQueryBuilderDsl() { + } + + public static RemoveToolCustomizationTargetQueryBuilderDsl of() { + return new RemoveToolCustomizationTargetQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder tool() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("tool")), + p -> new CombinationQueryPredicate<>(p, RemoveToolCustomizationTargetQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/ToolCustomizationQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/ToolCustomizationQueryBuilderDsl.java new file mode 100644 index 00000000000..9d70baae84f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/mcp_server/ToolCustomizationQueryBuilderDsl.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.predicates.query.mcp_server; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ToolCustomizationQueryBuilderDsl { + public ToolCustomizationQueryBuilderDsl() { + } + + public static ToolCustomizationQueryBuilderDsl of() { + return new ToolCustomizationQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder tool() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("tool")), + p -> new CombinationQueryPredicate<>(p, ToolCustomizationQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder description() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("description")), + p -> new CombinationQueryPredicate<>(p, ToolCustomizationQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate parameters( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("parameters")) + .inner(fn.apply( + com.commercetools.api.predicates.query.mcp_server.ParameterOverrideQueryBuilderDsl.of())), + ToolCustomizationQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder parameters() { + return new CollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("parameters")), + p -> new CombinationQueryPredicate<>(p, ToolCustomizationQueryBuilderDsl::of)); + } + +} 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 f8ae75ac07d..b4560151a79 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 @@ -1540,6 +1540,13 @@ public CombinationQueryPredicate asProductTailori MessagePayloadQueryBuilderDsl::of); } + public CombinationQueryPredicate asProductTailoringKeySet( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductTailoringKeySetMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + public CombinationQueryPredicate asProductTailoringNameSet( Function> fn) { return new CombinationQueryPredicate<>(fn.apply( 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 955ca61d35d..53b2bb650b7 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 @@ -1549,6 +1549,13 @@ public CombinationQueryPredicate asProductTailoringImage MessageQueryBuilderDsl::of); } + public CombinationQueryPredicate asProductTailoringKeySet( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.ProductTailoringKeySetMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + public CombinationQueryPredicate asProductTailoringNameSet( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringKeySetMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringKeySetMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..544cb75267c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringKeySetMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,55 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringKeySetMessagePayloadQueryBuilderDsl { + public ProductTailoringKeySetMessagePayloadQueryBuilderDsl() { + } + + public static ProductTailoringKeySetMessagePayloadQueryBuilderDsl of() { + return new ProductTailoringKeySetMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringKeySetMessagePayloadQueryBuilderDsl::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())), + ProductTailoringKeySetMessagePayloadQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringKeySetMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate product( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("product")) + .inner(fn.apply(com.commercetools.api.predicates.query.product.ProductReferenceQueryBuilderDsl.of())), + ProductTailoringKeySetMessagePayloadQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringKeySetMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder oldKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringKeySetMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringKeySetMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringKeySetMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..f79a5330807 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringKeySetMessageQueryBuilderDsl.java @@ -0,0 +1,127 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringKeySetMessageQueryBuilderDsl { + public ProductTailoringKeySetMessageQueryBuilderDsl() { + } + + public static ProductTailoringKeySetMessageQueryBuilderDsl of() { + return new ProductTailoringKeySetMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringKeySetMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringKeySetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringKeySetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringKeySetMessageQueryBuilderDsl::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())), + ProductTailoringKeySetMessageQueryBuilderDsl::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())), + ProductTailoringKeySetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringKeySetMessageQueryBuilderDsl::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())), + ProductTailoringKeySetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringKeySetMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringKeySetMessageQueryBuilderDsl::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())), + ProductTailoringKeySetMessageQueryBuilderDsl::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())), + ProductTailoringKeySetMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringKeySetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate product( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("product")) + .inner(fn.apply(com.commercetools.api.predicates.query.product.ProductReferenceQueryBuilderDsl.of())), + ProductTailoringKeySetMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringKeySetMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder oldKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringKeySetMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetKeyActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetKeyActionQueryBuilderDsl.java new file mode 100644 index 00000000000..125068672d7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetKeyActionQueryBuilderDsl.java @@ -0,0 +1,25 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetKeyActionQueryBuilderDsl { + public ProductTailoringSetKeyActionQueryBuilderDsl() { + } + + public static ProductTailoringSetKeyActionQueryBuilderDsl of() { + return new ProductTailoringSetKeyActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetKeyActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder key() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("key")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetKeyActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUpdateActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUpdateActionQueryBuilderDsl.java index 476b02a31a5..267efa2d534 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUpdateActionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUpdateActionQueryBuilderDsl.java @@ -186,6 +186,13 @@ public CombinationQueryPredicate as ProductTailoringUpdateActionQueryBuilderDsl::of); } + public CombinationQueryPredicate asSetKey( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetKeyActionQueryBuilderDsl.of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + public CombinationQueryPredicate asSetMetaAttributes( Function> fn) { return new CombinationQueryPredicate<>(fn.apply( diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDTest.java new file mode 100644 index 00000000000..e21505c872c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDTest.java @@ -0,0 +1,106 @@ + +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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDTest { + 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") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .withId("test_ID") + .get() + .withExpand("expand") + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/discount-codes/test_ID?expand=expand", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .withId("test_ID") + .get() + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/discount-codes/test_ID", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .withId("test_ID") + .head() + .createHttpRequest(), + "head", "test_projectKey/in-store/key=test_storeKey/discount-codes/test_ID", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .withId("test_ID") + .get() + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .withId("test_ID") + .get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .withId("test_ID") + .head(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyTest.java new file mode 100644 index 00000000000..72d365759d5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyTest.java @@ -0,0 +1,107 @@ + +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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyTest { + 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") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .withKey("test_key") + .get() + .withExpand("expand") + .createHttpRequest(), + "get", + "test_projectKey/in-store/key=test_storeKey/discount-codes/key=test_key?expand=expand", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .withKey("test_key") + .get() + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/discount-codes/key=test_key", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .withKey("test_key") + .head() + .createHttpRequest(), + "head", "test_projectKey/in-store/key=test_storeKey/discount-codes/key=test_key", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .withKey("test_key") + .get() + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .withKey("test_key") + .get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .withKey("test_key") + .head(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesTest.java new file mode 100644 index 00000000000..1e7abaea031 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesTest.java @@ -0,0 +1,191 @@ + +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 ByProjectKeyInStoreKeyByStoreKeyDiscountCodesTest { + 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") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get() + .withExpand("expand") + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/discount-codes?expand=expand", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get() + .withSort("sort") + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/discount-codes?sort=sort", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get() + .withLimit(7) + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/discount-codes?limit=7", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get() + .withOffset(3) + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/discount-codes?offset=3", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get() + .withWithTotal(true) + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/discount-codes?withTotal=true", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get() + .withWhere("where") + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/discount-codes?where=where", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get() + .withPredicateVar("varName", "var.varName") + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/discount-codes?var.varName=var.varName", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get() + .createHttpRequest(), + "get", "test_projectKey/in-store/key=test_storeKey/discount-codes", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .head() + .withWhere("where") + .createHttpRequest(), + "head", "test_projectKey/in-store/key=test_storeKey/discount-codes?where=where", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .head() + .createHttpRequest(), + "head", "test_projectKey/in-store/key=test_storeKey/discount-codes", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get() + .withExpand("expand"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get() + .withSort("sort"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get() + .withLimit(7), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get() + .withOffset(3), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get() + .withWithTotal(true), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get() + .withWhere("where"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get() + .withPredicateVar("varName", "var.varName"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .head() + .withWhere("where"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .discountCodes() + .head(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyMcpServersByIDTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyMcpServersByIDTest.java new file mode 100644 index 00000000000..e457a441021 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyMcpServersByIDTest.java @@ -0,0 +1,94 @@ + +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 ByProjectKeyMcpServersByIDTest { + 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").mcpServers().withId("test_ID").get().createHttpRequest(), + "get", "test_projectKey/mcp-servers/test_ID", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .withId("test_ID") + .post(com.commercetools.api.models.mcp_server.McpServerUpdate.of()) + .createHttpRequest(), "post", "test_projectKey/mcp-servers/test_ID", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .withId("test_ID") + .delete() + .withVersion(2) + .createHttpRequest(), "delete", "test_projectKey/mcp-servers/test_ID?version=2", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .withId("test_ID") + .delete() + .createHttpRequest(), "delete", "test_projectKey/mcp-servers/test_ID", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey").mcpServers().withId("test_ID").get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .withId("test_ID") + .post(com.commercetools.api.models.mcp_server.McpServerUpdate.of()), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .withId("test_ID") + .delete() + .withVersion(2), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").mcpServers().withId("test_ID").delete(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyMcpServersKeyByKeyTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyMcpServersKeyByKeyTest.java new file mode 100644 index 00000000000..ad542b673bd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyMcpServersKeyByKeyTest.java @@ -0,0 +1,94 @@ + +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 ByProjectKeyMcpServersKeyByKeyTest { + 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").mcpServers().withKey("test_key").get().createHttpRequest(), + "get", "test_projectKey/mcp-servers/key=test_key", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .withKey("test_key") + .post(com.commercetools.api.models.mcp_server.McpServerUpdate.of()) + .createHttpRequest(), "post", "test_projectKey/mcp-servers/key=test_key", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .withKey("test_key") + .delete() + .withVersion(2) + .createHttpRequest(), "delete", "test_projectKey/mcp-servers/key=test_key?version=2", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .withKey("test_key") + .delete() + .createHttpRequest(), "delete", "test_projectKey/mcp-servers/key=test_key", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey").mcpServers().withKey("test_key").get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .withKey("test_key") + .post(com.commercetools.api.models.mcp_server.McpServerUpdate.of()), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .withKey("test_key") + .delete() + .withVersion(2), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").mcpServers().withKey("test_key").delete(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyMcpServersTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyMcpServersTest.java new file mode 100644 index 00000000000..076fd22b032 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyMcpServersTest.java @@ -0,0 +1,92 @@ + +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 ByProjectKeyMcpServersTest { + 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").mcpServers().get().withSort("sort").createHttpRequest(), + "get", "test_projectKey/mcp-servers?sort=sort", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").mcpServers().get().withLimit(7).createHttpRequest(), + "get", "test_projectKey/mcp-servers?limit=7", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").mcpServers().get().withOffset(3).createHttpRequest(), + "get", "test_projectKey/mcp-servers?offset=3", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .get() + .withWithTotal(true) + .createHttpRequest(), "get", "test_projectKey/mcp-servers?withTotal=true", }, + new Object[] { apiRoot.withProjectKey("test_projectKey").mcpServers().get().createHttpRequest(), "get", + "test_projectKey/mcp-servers", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .post(com.commercetools.api.models.mcp_server.McpServerDraft.of()) + .createHttpRequest(), "post", "test_projectKey/mcp-servers", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey").mcpServers().get().withSort("sort"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").mcpServers().get().withLimit(7), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").mcpServers().get().withOffset(3), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").mcpServers().get().withWithTotal(true), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").mcpServers().get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .post(com.commercetools.api.models.mcp_server.McpServerDraft.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyMcpServersTypesByMcpServerTypeTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyMcpServersTypesByMcpServerTypeTest.java new file mode 100644 index 00000000000..8c08a14eac0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyMcpServersTypesByMcpServerTypeTest.java @@ -0,0 +1,93 @@ + +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 ByProjectKeyMcpServersTypesByMcpServerTypeTest { + 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") + .mcpServers() + .types() + .withMcpServerType("test_mcpServerType") + .get() + .withMajorVersion("majorVersion") + .createHttpRequest(), + "get", "test_projectKey/mcp-servers/types/test_mcpServerType?majorVersion=majorVersion", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .types() + .withMcpServerType("test_mcpServerType") + .get() + .createHttpRequest(), + "get", "test_projectKey/mcp-servers/types/test_mcpServerType", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .types() + .withMcpServerType("test_mcpServerType") + .get() + .withMajorVersion("majorVersion"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .mcpServers() + .types() + .withMcpServerType("test_mcpServerType") + .get(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyMcpServersTypesTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyMcpServersTypesTest.java new file mode 100644 index 00000000000..fb06c9a7a7b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyMcpServersTypesTest.java @@ -0,0 +1,68 @@ + +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 ByProjectKeyMcpServersTypesTest { + 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").mcpServers().types().get().createHttpRequest(), + "get", "test_projectKey/mcp-servers/types", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey").mcpServers().types().get(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/discount_code/DiscountCodeTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/discount_code/DiscountCodeTest.java index 1ea69d168ec..82cbd5c0b2f 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/discount_code/DiscountCodeTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/discount_code/DiscountCodeTest.java @@ -41,6 +41,10 @@ public static Object[][] objectBuilder() { DiscountCode.builder() .cartDiscounts(Collections.singletonList( new com.commercetools.api.models.cart_discount.CartDiscountReferenceImpl())) }, + new Object[] { "stores", + DiscountCode.builder() + .stores(Collections.singletonList( + new com.commercetools.api.models.store.StoreKeyReferenceImpl())) }, new Object[] { "cartPredicate", DiscountCode.builder().cartPredicate("cartPredicate") }, new Object[] { "isActive", DiscountCode.builder().isActive(true) }, new Object[] { "references", @@ -141,6 +145,14 @@ public void cartDiscounts() { .singletonList(new com.commercetools.api.models.cart_discount.CartDiscountReferenceImpl())); } + @Test + public void stores() { + DiscountCode value = DiscountCode.of(); + value.setStores(Collections.singletonList(new com.commercetools.api.models.store.StoreKeyReferenceImpl())); + Assertions.assertThat(value.getStores()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.store.StoreKeyReferenceImpl())); + } + @Test public void cartPredicate() { DiscountCode value = DiscountCode.of(); diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLUnauthorizedErrorTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLUnauthorizedErrorTest.java new file mode 100644 index 00000000000..a730d062100 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLUnauthorizedErrorTest.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.models.error; + +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 GraphQLUnauthorizedErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, GraphQLUnauthorizedErrorBuilder builder) { + GraphQLUnauthorizedError graphQLUnauthorizedError = builder.buildUnchecked(); + Assertions.assertThat(graphQLUnauthorizedError).isInstanceOf(GraphQLUnauthorizedError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "storesWithoutPermission", GraphQLUnauthorizedError.builder() + .storesWithoutPermission(Collections.singletonList("storesWithoutPermission")) } }; + } + + @Test + public void storesWithoutPermission() { + GraphQLUnauthorizedError value = GraphQLUnauthorizedError.of(); + value.setStoresWithoutPermission(Collections.singletonList("storesWithoutPermission")); + Assertions.assertThat(value.getStoresWithoutPermission()) + .isEqualTo(Collections.singletonList("storesWithoutPermission")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/UnauthorizedErrorTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/UnauthorizedErrorTest.java new file mode 100644 index 00000000000..394b7785cd9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/UnauthorizedErrorTest.java @@ -0,0 +1,40 @@ + +package com.commercetools.api.models.error; + +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 UnauthorizedErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, UnauthorizedErrorBuilder builder) { + UnauthorizedError unauthorizedError = builder.buildUnchecked(); + Assertions.assertThat(unauthorizedError).isInstanceOf(UnauthorizedError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", UnauthorizedError.builder().message("message") }, + new Object[] { "storesWithoutPermission", UnauthorizedError.builder() + .storesWithoutPermission(Collections.singletonList("storesWithoutPermission")) } }; + } + + @Test + public void message() { + UnauthorizedError value = UnauthorizedError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void storesWithoutPermission() { + UnauthorizedError value = UnauthorizedError.of(); + value.setStoresWithoutPermission(Collections.singletonList("storesWithoutPermission")); + Assertions.assertThat(value.getStoresWithoutPermission()) + .isEqualTo(Collections.singletonList("storesWithoutPermission")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigDraftTest.java new file mode 100644 index 00000000000..a8be941a98a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigDraftTest.java @@ -0,0 +1,84 @@ + +package com.commercetools.api.models.mcp_server; + +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 CommerceMcpServerConfigDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CommerceMcpServerConfigDraftBuilder builder) { + CommerceMcpServerConfigDraft commerceMcpServerConfigDraft = builder.buildUnchecked(); + Assertions.assertThat(commerceMcpServerConfigDraft).isInstanceOf(CommerceMcpServerConfigDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "majorVersion", CommerceMcpServerConfigDraft.builder().majorVersion("majorVersion") }, + new Object[] { "tools", + CommerceMcpServerConfigDraft.builder() + .tools(Collections.singletonList( + com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all"))) }, + new Object[] { "toolCustomizations", + CommerceMcpServerConfigDraft.builder() + .toolCustomizations(Collections.singletonList( + new com.commercetools.api.models.mcp_server.ToolCustomizationImpl())) }, + new Object[] { "jsonOutputFiltering", + CommerceMcpServerConfigDraft.builder() + .jsonOutputFiltering( + new com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringImpl()) }, + new Object[] { "toolOutputFormatting", CommerceMcpServerConfigDraft.builder() + .toolOutputFormatting(com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting + .findEnum("JsonToTabular")) } }; + } + + @Test + public void majorVersion() { + CommerceMcpServerConfigDraft value = CommerceMcpServerConfigDraft.of(); + value.setMajorVersion("majorVersion"); + Assertions.assertThat(value.getMajorVersion()).isEqualTo("majorVersion"); + } + + @Test + public void tools() { + CommerceMcpServerConfigDraft value = CommerceMcpServerConfigDraft.of(); + value.setTools( + Collections.singletonList(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all"))); + Assertions.assertThat(value.getTools()) + .isEqualTo( + Collections.singletonList(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all"))); + } + + @Test + public void toolCustomizations() { + CommerceMcpServerConfigDraft value = CommerceMcpServerConfigDraft.of(); + value.setToolCustomizations( + Collections.singletonList(new com.commercetools.api.models.mcp_server.ToolCustomizationImpl())); + Assertions.assertThat(value.getToolCustomizations()) + .isEqualTo( + Collections.singletonList(new com.commercetools.api.models.mcp_server.ToolCustomizationImpl())); + } + + @Test + public void jsonOutputFiltering() { + CommerceMcpServerConfigDraft value = CommerceMcpServerConfigDraft.of(); + value.setJsonOutputFiltering(new com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringImpl()); + Assertions.assertThat(value.getJsonOutputFiltering()) + .isEqualTo(new com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringImpl()); + } + + @Test + public void toolOutputFormatting() { + CommerceMcpServerConfigDraft value = CommerceMcpServerConfigDraft.of(); + value.setToolOutputFormatting( + com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting.findEnum("JsonToTabular")); + Assertions.assertThat(value.getToolOutputFormatting()) + .isEqualTo( + com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting.findEnum("JsonToTabular")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigTest.java new file mode 100644 index 00000000000..464efdfb920 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/CommerceMcpServerConfigTest.java @@ -0,0 +1,92 @@ + +package com.commercetools.api.models.mcp_server; + +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 CommerceMcpServerConfigTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CommerceMcpServerConfigBuilder builder) { + CommerceMcpServerConfig commerceMcpServerConfig = builder.buildUnchecked(); + Assertions.assertThat(commerceMcpServerConfig).isInstanceOf(CommerceMcpServerConfig.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "majorVersion", CommerceMcpServerConfig.builder().majorVersion("majorVersion") }, + new Object[] { "url", CommerceMcpServerConfig.builder().url("url") }, + new Object[] { "tools", + CommerceMcpServerConfig.builder() + .tools(Collections.singletonList( + com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all"))) }, + new Object[] { "toolCustomizations", + CommerceMcpServerConfig.builder() + .toolCustomizations(Collections.singletonList( + new com.commercetools.api.models.mcp_server.ToolCustomizationImpl())) }, + new Object[] { "jsonOutputFiltering", + CommerceMcpServerConfig.builder() + .jsonOutputFiltering( + new com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringImpl()) }, + new Object[] { "toolOutputFormatting", CommerceMcpServerConfig.builder() + .toolOutputFormatting(com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting + .findEnum("JsonToTabular")) } }; + } + + @Test + public void majorVersion() { + CommerceMcpServerConfig value = CommerceMcpServerConfig.of(); + value.setMajorVersion("majorVersion"); + Assertions.assertThat(value.getMajorVersion()).isEqualTo("majorVersion"); + } + + @Test + public void url() { + CommerceMcpServerConfig value = CommerceMcpServerConfig.of(); + value.setUrl("url"); + Assertions.assertThat(value.getUrl()).isEqualTo("url"); + } + + @Test + public void tools() { + CommerceMcpServerConfig value = CommerceMcpServerConfig.of(); + value.setTools( + Collections.singletonList(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all"))); + Assertions.assertThat(value.getTools()) + .isEqualTo( + Collections.singletonList(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all"))); + } + + @Test + public void toolCustomizations() { + CommerceMcpServerConfig value = CommerceMcpServerConfig.of(); + value.setToolCustomizations( + Collections.singletonList(new com.commercetools.api.models.mcp_server.ToolCustomizationImpl())); + Assertions.assertThat(value.getToolCustomizations()) + .isEqualTo( + Collections.singletonList(new com.commercetools.api.models.mcp_server.ToolCustomizationImpl())); + } + + @Test + public void jsonOutputFiltering() { + CommerceMcpServerConfig value = CommerceMcpServerConfig.of(); + value.setJsonOutputFiltering(new com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringImpl()); + Assertions.assertThat(value.getJsonOutputFiltering()) + .isEqualTo(new com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringImpl()); + } + + @Test + public void toolOutputFormatting() { + CommerceMcpServerConfig value = CommerceMcpServerConfig.of(); + value.setToolOutputFormatting( + com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting.findEnum("JsonToTabular")); + Assertions.assertThat(value.getToolOutputFormatting()) + .isEqualTo( + com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting.findEnum("JsonToTabular")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolActionTest.java new file mode 100644 index 00000000000..2e8263126af --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolActionTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerAddToolActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerAddToolActionBuilder builder) { + McpServerAddToolAction mcpServerAddToolAction = builder.buildUnchecked(); + Assertions.assertThat(mcpServerAddToolAction).isInstanceOf(McpServerAddToolAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "tool", McpServerAddToolAction.builder() + .tool(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all")) } }; + } + + @Test + public void tool() { + McpServerAddToolAction value = McpServerAddToolAction.of(); + value.setTool(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all")); + Assertions.assertThat(value.getTool()) + .isEqualTo(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolCustomizationActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolCustomizationActionTest.java new file mode 100644 index 00000000000..f7b769b8042 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerAddToolCustomizationActionTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerAddToolCustomizationActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerAddToolCustomizationActionBuilder builder) { + McpServerAddToolCustomizationAction mcpServerAddToolCustomizationAction = builder.buildUnchecked(); + Assertions.assertThat(mcpServerAddToolCustomizationAction) + .isInstanceOf(McpServerAddToolCustomizationAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "toolCustomization", McpServerAddToolCustomizationAction.builder() + .toolCustomization(new com.commercetools.api.models.mcp_server.ToolCustomizationImpl()) } }; + } + + @Test + public void toolCustomization() { + McpServerAddToolCustomizationAction value = McpServerAddToolCustomizationAction.of(); + value.setToolCustomization(new com.commercetools.api.models.mcp_server.ToolCustomizationImpl()); + Assertions.assertThat(value.getToolCustomization()) + .isEqualTo(new com.commercetools.api.models.mcp_server.ToolCustomizationImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerDraftTest.java new file mode 100644 index 00000000000..3312e9f868a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerDraftTest.java @@ -0,0 +1,69 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerDraftBuilder builder) { + McpServerDraft mcpServerDraft = builder.buildUnchecked(); + Assertions.assertThat(mcpServerDraft).isInstanceOf(McpServerDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", McpServerDraft.builder().key("key") }, + new Object[] { "name", + McpServerDraft.builder().name(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { "description", + McpServerDraft.builder() + .description(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { "state", + McpServerDraft.builder() + .state(com.commercetools.api.models.mcp_server.McpServerState.findEnum("Enabled")) }, + new Object[] { "mcpServer", McpServerDraft.builder() + .mcpServer(new com.commercetools.api.models.mcp_server.McpServerConfigDraftImpl()) } }; + } + + @Test + public void key() { + McpServerDraft value = McpServerDraft.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void name() { + McpServerDraft value = McpServerDraft.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() { + McpServerDraft value = McpServerDraft.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 state() { + McpServerDraft value = McpServerDraft.of(); + value.setState(com.commercetools.api.models.mcp_server.McpServerState.findEnum("Enabled")); + Assertions.assertThat(value.getState()) + .isEqualTo(com.commercetools.api.models.mcp_server.McpServerState.findEnum("Enabled")); + } + + @Test + public void mcpServer() { + McpServerDraft value = McpServerDraft.of(); + value.setMcpServer(new com.commercetools.api.models.mcp_server.McpServerConfigDraftImpl()); + Assertions.assertThat(value.getMcpServer()) + .isEqualTo(new com.commercetools.api.models.mcp_server.McpServerConfigDraftImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringMatcherTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringMatcherTest.java new file mode 100644 index 00000000000..81a7227955b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringMatcherTest.java @@ -0,0 +1,53 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerJsonOutputFilteringMatcherTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerJsonOutputFilteringMatcherBuilder builder) { + McpServerJsonOutputFilteringMatcher mcpServerJsonOutputFilteringMatcher = builder.buildUnchecked(); + Assertions.assertThat(mcpServerJsonOutputFilteringMatcher) + .isInstanceOf(McpServerJsonOutputFilteringMatcher.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "fieldPaths", + McpServerJsonOutputFilteringMatcher.builder() + .fieldPaths(Collections.singletonList("fieldPaths")) }, + new Object[] { "fieldNames", + McpServerJsonOutputFilteringMatcher.builder() + .fieldNames(Collections.singletonList("fieldNames")) }, + new Object[] { "fieldNameContains", McpServerJsonOutputFilteringMatcher.builder() + .fieldNameContains(Collections.singletonList("fieldNameContains")) } }; + } + + @Test + public void fieldPaths() { + McpServerJsonOutputFilteringMatcher value = McpServerJsonOutputFilteringMatcher.of(); + value.setFieldPaths(Collections.singletonList("fieldPaths")); + Assertions.assertThat(value.getFieldPaths()).isEqualTo(Collections.singletonList("fieldPaths")); + } + + @Test + public void fieldNames() { + McpServerJsonOutputFilteringMatcher value = McpServerJsonOutputFilteringMatcher.of(); + value.setFieldNames(Collections.singletonList("fieldNames")); + Assertions.assertThat(value.getFieldNames()).isEqualTo(Collections.singletonList("fieldNames")); + } + + @Test + public void fieldNameContains() { + McpServerJsonOutputFilteringMatcher value = McpServerJsonOutputFilteringMatcher.of(); + value.setFieldNameContains(Collections.singletonList("fieldNameContains")); + Assertions.assertThat(value.getFieldNameContains()).isEqualTo(Collections.singletonList("fieldNameContains")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringTest.java new file mode 100644 index 00000000000..33a7b346015 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerJsonOutputFilteringTest.java @@ -0,0 +1,60 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerJsonOutputFilteringTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerJsonOutputFilteringBuilder builder) { + McpServerJsonOutputFiltering mcpServerJsonOutputFiltering = builder.buildUnchecked(); + Assertions.assertThat(mcpServerJsonOutputFiltering).isInstanceOf(McpServerJsonOutputFiltering.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "redact", McpServerJsonOutputFiltering.builder() + .redact(new com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcherImpl()) }, + new Object[] { "drop", McpServerJsonOutputFiltering.builder() + .drop(new com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcherImpl()) }, + new Object[] { "fieldPathsToKeep", + McpServerJsonOutputFiltering.builder() + .fieldPathsToKeep(Collections.singletonList("fieldPathsToKeep")) }, + new Object[] { "redactedWith", McpServerJsonOutputFiltering.builder().redactedWith("redactedWith") } }; + } + + @Test + public void redact() { + McpServerJsonOutputFiltering value = McpServerJsonOutputFiltering.of(); + value.setRedact(new com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcherImpl()); + Assertions.assertThat(value.getRedact()) + .isEqualTo(new com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcherImpl()); + } + + @Test + public void drop() { + McpServerJsonOutputFiltering value = McpServerJsonOutputFiltering.of(); + value.setDrop(new com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcherImpl()); + Assertions.assertThat(value.getDrop()) + .isEqualTo(new com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringMatcherImpl()); + } + + @Test + public void fieldPathsToKeep() { + McpServerJsonOutputFiltering value = McpServerJsonOutputFiltering.of(); + value.setFieldPathsToKeep(Collections.singletonList("fieldPathsToKeep")); + Assertions.assertThat(value.getFieldPathsToKeep()).isEqualTo(Collections.singletonList("fieldPathsToKeep")); + } + + @Test + public void redactedWith() { + McpServerJsonOutputFiltering value = McpServerJsonOutputFiltering.of(); + value.setRedactedWith("redactedWith"); + Assertions.assertThat(value.getRedactedWith()).isEqualTo("redactedWith"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerPagedQueryResponseTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerPagedQueryResponseTest.java new file mode 100644 index 00000000000..67ecc65315e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerPagedQueryResponseTest.java @@ -0,0 +1,65 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerPagedQueryResponseTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerPagedQueryResponseBuilder builder) { + McpServerPagedQueryResponse mcpServerPagedQueryResponse = builder.buildUnchecked(); + Assertions.assertThat(mcpServerPagedQueryResponse).isInstanceOf(McpServerPagedQueryResponse.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "limit", McpServerPagedQueryResponse.builder().limit(7L) }, + new Object[] { "offset", McpServerPagedQueryResponse.builder().offset(3L) }, + new Object[] { "count", McpServerPagedQueryResponse.builder().count(2L) }, + new Object[] { "total", McpServerPagedQueryResponse.builder().total(1L) }, + new Object[] { "results", McpServerPagedQueryResponse.builder() + .results( + Collections.singletonList(new com.commercetools.api.models.mcp_server.McpServerImpl())) } }; + } + + @Test + public void limit() { + McpServerPagedQueryResponse value = McpServerPagedQueryResponse.of(); + value.setLimit(7L); + Assertions.assertThat(value.getLimit()).isEqualTo(7L); + } + + @Test + public void offset() { + McpServerPagedQueryResponse value = McpServerPagedQueryResponse.of(); + value.setOffset(3L); + Assertions.assertThat(value.getOffset()).isEqualTo(3L); + } + + @Test + public void count() { + McpServerPagedQueryResponse value = McpServerPagedQueryResponse.of(); + value.setCount(2L); + Assertions.assertThat(value.getCount()).isEqualTo(2L); + } + + @Test + public void total() { + McpServerPagedQueryResponse value = McpServerPagedQueryResponse.of(); + value.setTotal(1L); + Assertions.assertThat(value.getTotal()).isEqualTo(1L); + } + + @Test + public void results() { + McpServerPagedQueryResponse value = McpServerPagedQueryResponse.of(); + value.setResults(Collections.singletonList(new com.commercetools.api.models.mcp_server.McpServerImpl())); + Assertions.assertThat(value.getResults()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.mcp_server.McpServerImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolActionTest.java new file mode 100644 index 00000000000..be3ca85ce9a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolActionTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerRemoveToolActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerRemoveToolActionBuilder builder) { + McpServerRemoveToolAction mcpServerRemoveToolAction = builder.buildUnchecked(); + Assertions.assertThat(mcpServerRemoveToolAction).isInstanceOf(McpServerRemoveToolAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "tool", McpServerRemoveToolAction.builder() + .tool(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all")) } }; + } + + @Test + public void tool() { + McpServerRemoveToolAction value = McpServerRemoveToolAction.of(); + value.setTool(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all")); + Assertions.assertThat(value.getTool()) + .isEqualTo(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolCustomizationActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolCustomizationActionTest.java new file mode 100644 index 00000000000..632fa5e1ed8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerRemoveToolCustomizationActionTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerRemoveToolCustomizationActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerRemoveToolCustomizationActionBuilder builder) { + McpServerRemoveToolCustomizationAction mcpServerRemoveToolCustomizationAction = builder.buildUnchecked(); + Assertions.assertThat(mcpServerRemoveToolCustomizationAction) + .isInstanceOf(McpServerRemoveToolCustomizationAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "toolCustomization", McpServerRemoveToolCustomizationAction.builder() + .toolCustomization(new com.commercetools.api.models.mcp_server.RemoveToolCustomizationTargetImpl()) } }; + } + + @Test + public void toolCustomization() { + McpServerRemoveToolCustomizationAction value = McpServerRemoveToolCustomizationAction.of(); + value.setToolCustomization(new com.commercetools.api.models.mcp_server.RemoveToolCustomizationTargetImpl()); + Assertions.assertThat(value.getToolCustomization()) + .isEqualTo(new com.commercetools.api.models.mcp_server.RemoveToolCustomizationTargetImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetDescriptionActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetDescriptionActionTest.java new file mode 100644 index 00000000000..045a37e22a0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetDescriptionActionTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerSetDescriptionActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerSetDescriptionActionBuilder builder) { + McpServerSetDescriptionAction mcpServerSetDescriptionAction = builder.buildUnchecked(); + Assertions.assertThat(mcpServerSetDescriptionAction).isInstanceOf(McpServerSetDescriptionAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "description", McpServerSetDescriptionAction.builder() + .description(new com.commercetools.api.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void description() { + McpServerSetDescriptionAction value = McpServerSetDescriptionAction.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/mcp_server/McpServerSetJsonOutputFilteringActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetJsonOutputFilteringActionTest.java new file mode 100644 index 00000000000..66655e7e01f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetJsonOutputFilteringActionTest.java @@ -0,0 +1,33 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerSetJsonOutputFilteringActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerSetJsonOutputFilteringActionBuilder builder) { + McpServerSetJsonOutputFilteringAction mcpServerSetJsonOutputFilteringAction = builder.buildUnchecked(); + Assertions.assertThat(mcpServerSetJsonOutputFilteringAction) + .isInstanceOf(McpServerSetJsonOutputFilteringAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "jsonOutputFiltering", + McpServerSetJsonOutputFilteringAction.builder() + .jsonOutputFiltering( + new com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringImpl()) } }; + } + + @Test + public void jsonOutputFiltering() { + McpServerSetJsonOutputFilteringAction value = McpServerSetJsonOutputFilteringAction.of(); + value.setJsonOutputFiltering(new com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringImpl()); + Assertions.assertThat(value.getJsonOutputFiltering()) + .isEqualTo(new com.commercetools.api.models.mcp_server.McpServerJsonOutputFilteringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetNameActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetNameActionTest.java new file mode 100644 index 00000000000..d448324ef79 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetNameActionTest.java @@ -0,0 +1,29 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerSetNameActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerSetNameActionBuilder builder) { + McpServerSetNameAction mcpServerSetNameAction = builder.buildUnchecked(); + Assertions.assertThat(mcpServerSetNameAction).isInstanceOf(McpServerSetNameAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "name", McpServerSetNameAction.builder() + .name(new com.commercetools.api.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void name() { + McpServerSetNameAction value = McpServerSetNameAction.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/mcp_server/McpServerSetStateActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetStateActionTest.java new file mode 100644 index 00000000000..3b34375eee6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetStateActionTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerSetStateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerSetStateActionBuilder builder) { + McpServerSetStateAction mcpServerSetStateAction = builder.buildUnchecked(); + Assertions.assertThat(mcpServerSetStateAction).isInstanceOf(McpServerSetStateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "state", McpServerSetStateAction.builder() + .state(com.commercetools.api.models.mcp_server.McpServerState.findEnum("Enabled")) } }; + } + + @Test + public void state() { + McpServerSetStateAction value = McpServerSetStateAction.of(); + value.setState(com.commercetools.api.models.mcp_server.McpServerState.findEnum("Enabled")); + Assertions.assertThat(value.getState()) + .isEqualTo(com.commercetools.api.models.mcp_server.McpServerState.findEnum("Enabled")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolCustomizationsActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolCustomizationsActionTest.java new file mode 100644 index 00000000000..bf385cb4d47 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolCustomizationsActionTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerSetToolCustomizationsActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerSetToolCustomizationsActionBuilder builder) { + McpServerSetToolCustomizationsAction mcpServerSetToolCustomizationsAction = builder.buildUnchecked(); + Assertions.assertThat(mcpServerSetToolCustomizationsAction) + .isInstanceOf(McpServerSetToolCustomizationsAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "toolCustomizations", McpServerSetToolCustomizationsAction.builder() + .toolCustomizations( + Collections.singletonList(new com.commercetools.api.models.mcp_server.ToolCustomizationImpl())) } }; + } + + @Test + public void toolCustomizations() { + McpServerSetToolCustomizationsAction value = McpServerSetToolCustomizationsAction.of(); + value.setToolCustomizations( + Collections.singletonList(new com.commercetools.api.models.mcp_server.ToolCustomizationImpl())); + Assertions.assertThat(value.getToolCustomizations()) + .isEqualTo( + Collections.singletonList(new com.commercetools.api.models.mcp_server.ToolCustomizationImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolOutputFormattingActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolOutputFormattingActionTest.java new file mode 100644 index 00000000000..4a4da341536 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolOutputFormattingActionTest.java @@ -0,0 +1,35 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerSetToolOutputFormattingActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerSetToolOutputFormattingActionBuilder builder) { + McpServerSetToolOutputFormattingAction mcpServerSetToolOutputFormattingAction = builder.buildUnchecked(); + Assertions.assertThat(mcpServerSetToolOutputFormattingAction) + .isInstanceOf(McpServerSetToolOutputFormattingAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "toolOutputFormatting", + McpServerSetToolOutputFormattingAction.builder() + .toolOutputFormatting(com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting + .findEnum("JsonToTabular")) } }; + } + + @Test + public void toolOutputFormatting() { + McpServerSetToolOutputFormattingAction value = McpServerSetToolOutputFormattingAction.of(); + value.setToolOutputFormatting( + com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting.findEnum("JsonToTabular")); + Assertions.assertThat(value.getToolOutputFormatting()) + .isEqualTo( + com.commercetools.api.models.mcp_server.McpServerToolOutputFormatting.findEnum("JsonToTabular")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolsActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolsActionTest.java new file mode 100644 index 00000000000..a20eb9e52c2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerSetToolsActionTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerSetToolsActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerSetToolsActionBuilder builder) { + McpServerSetToolsAction mcpServerSetToolsAction = builder.buildUnchecked(); + Assertions.assertThat(mcpServerSetToolsAction).isInstanceOf(McpServerSetToolsAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "tools", + McpServerSetToolsAction.builder() + .tools(Collections.singletonList( + com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all"))) } }; + } + + @Test + public void tools() { + McpServerSetToolsAction value = McpServerSetToolsAction.of(); + value.setTools( + Collections.singletonList(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all"))); + Assertions.assertThat(value.getTools()) + .isEqualTo( + Collections.singletonList(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all"))); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerTest.java new file mode 100644 index 00000000000..81e3c8753cb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerTest.java @@ -0,0 +1,124 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerBuilder builder) { + McpServer mcpServer = builder.buildUnchecked(); + Assertions.assertThat(mcpServer).isInstanceOf(McpServer.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", McpServer.builder().id("id") }, + new Object[] { "version", McpServer.builder().version(2L) }, + new Object[] { "createdAt", McpServer.builder().createdAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "lastModifiedAt", + McpServer.builder().lastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "lastModifiedBy", + McpServer.builder() + .lastModifiedBy(new com.commercetools.api.models.common.LastModifiedByImpl()) }, + new Object[] { "createdBy", + McpServer.builder().createdBy(new com.commercetools.api.models.common.CreatedByImpl()) }, + new Object[] { "key", McpServer.builder().key("key") }, + new Object[] { "name", + McpServer.builder().name(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { "description", + McpServer.builder() + .description(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { "state", + McpServer.builder() + .state(com.commercetools.api.models.mcp_server.McpServerState.findEnum("Enabled")) }, + new Object[] { "mcpServer", McpServer.builder() + .mcpServer(new com.commercetools.api.models.mcp_server.McpServerConfigImpl()) } }; + } + + @Test + public void id() { + McpServer value = McpServer.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void version() { + McpServer value = McpServer.of(); + value.setVersion(2L); + Assertions.assertThat(value.getVersion()).isEqualTo(2L); + } + + @Test + public void createdAt() { + McpServer value = McpServer.of(); + value.setCreatedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getCreatedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void lastModifiedAt() { + McpServer value = McpServer.of(); + value.setLastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getLastModifiedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void lastModifiedBy() { + McpServer value = McpServer.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() { + McpServer value = McpServer.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 key() { + McpServer value = McpServer.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void name() { + McpServer value = McpServer.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() { + McpServer value = McpServer.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 state() { + McpServer value = McpServer.of(); + value.setState(com.commercetools.api.models.mcp_server.McpServerState.findEnum("Enabled")); + Assertions.assertThat(value.getState()) + .isEqualTo(com.commercetools.api.models.mcp_server.McpServerState.findEnum("Enabled")); + } + + @Test + public void mcpServer() { + McpServer value = McpServer.of(); + value.setMcpServer(new com.commercetools.api.models.mcp_server.McpServerConfigImpl()); + Assertions.assertThat(value.getMcpServer()) + .isEqualTo(new com.commercetools.api.models.mcp_server.McpServerConfigImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeTest.java new file mode 100644 index 00000000000..c8b203dcfbb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeTest.java @@ -0,0 +1,51 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerTypeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerTypeBuilder builder) { + McpServerType mcpServerType = builder.buildUnchecked(); + Assertions.assertThat(mcpServerType).isInstanceOf(McpServerType.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "type", McpServerType.builder().type("type") }, + new Object[] { "majorVersion", McpServerType.builder().majorVersion("majorVersion") }, + new Object[] { "tools", + McpServerType.builder() + .tools(Collections.singletonList( + new com.commercetools.api.models.mcp_server.McpServerTypeToolImpl())) } }; + } + + @Test + public void type() { + McpServerType value = McpServerType.of(); + value.setType("type"); + Assertions.assertThat(value.getType()).isEqualTo("type"); + } + + @Test + public void majorVersion() { + McpServerType value = McpServerType.of(); + value.setMajorVersion("majorVersion"); + Assertions.assertThat(value.getMajorVersion()).isEqualTo("majorVersion"); + } + + @Test + public void tools() { + McpServerType value = McpServerType.of(); + value.setTools(Collections.singletonList(new com.commercetools.api.models.mcp_server.McpServerTypeToolImpl())); + Assertions.assertThat(value.getTools()) + .isEqualTo( + Collections.singletonList(new com.commercetools.api.models.mcp_server.McpServerTypeToolImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeToolTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeToolTest.java new file mode 100644 index 00000000000..7a9bb99a2ee --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerTypeToolTest.java @@ -0,0 +1,54 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerTypeToolTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerTypeToolBuilder builder) { + McpServerTypeTool mcpServerTypeTool = builder.buildUnchecked(); + Assertions.assertThat(mcpServerTypeTool).isInstanceOf(McpServerTypeTool.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "name", McpServerTypeTool.builder().name("name") }, + new Object[] { "description", McpServerTypeTool.builder().description("description") }, + new Object[] { "operationType", McpServerTypeTool.builder().operationType("operationType") }, + new Object[] { "groups", McpServerTypeTool.builder().groups(Collections.singletonList("groups")) } }; + } + + @Test + public void name() { + McpServerTypeTool value = McpServerTypeTool.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void description() { + McpServerTypeTool value = McpServerTypeTool.of(); + value.setDescription("description"); + Assertions.assertThat(value.getDescription()).isEqualTo("description"); + } + + @Test + public void operationType() { + McpServerTypeTool value = McpServerTypeTool.of(); + value.setOperationType("operationType"); + Assertions.assertThat(value.getOperationType()).isEqualTo("operationType"); + } + + @Test + public void groups() { + McpServerTypeTool value = McpServerTypeTool.of(); + value.setGroups(Collections.singletonList("groups")); + Assertions.assertThat(value.getGroups()).isEqualTo(Collections.singletonList("groups")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdateTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdateTest.java new file mode 100644 index 00000000000..4d2461c4cb8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/McpServerUpdateTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.models.mcp_server; + +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 McpServerUpdateTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, McpServerUpdateBuilder builder) { + McpServerUpdate mcpServerUpdate = builder.buildUnchecked(); + Assertions.assertThat(mcpServerUpdate).isInstanceOf(McpServerUpdate.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "version", McpServerUpdate.builder().version(2L) }, + new Object[] { "actions", + McpServerUpdate.builder() + .actions(Collections.singletonList( + new com.commercetools.api.models.mcp_server.McpServerUpdateActionImpl())) } }; + } + + @Test + public void version() { + McpServerUpdate value = McpServerUpdate.of(); + value.setVersion(2L); + Assertions.assertThat(value.getVersion()).isEqualTo(2L); + } + + @Test + public void actions() { + McpServerUpdate value = McpServerUpdate.of(); + value.setActions( + Collections.singletonList(new com.commercetools.api.models.mcp_server.McpServerUpdateActionImpl())); + Assertions.assertThat(value.getActions()) + .isEqualTo( + Collections.singletonList(new com.commercetools.api.models.mcp_server.McpServerUpdateActionImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/ParameterOverrideTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/ParameterOverrideTest.java new file mode 100644 index 00000000000..e4888ef0ea9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/ParameterOverrideTest.java @@ -0,0 +1,63 @@ + +package com.commercetools.api.models.mcp_server; + +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 ParameterOverrideTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ParameterOverrideBuilder builder) { + ParameterOverride parameterOverride = builder.buildUnchecked(); + Assertions.assertThat(parameterOverride).isInstanceOf(ParameterOverride.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "name", ParameterOverride.builder().name("name") }, + new Object[] { "description", ParameterOverride.builder().description("description") }, + new Object[] { "const", ParameterOverride.builder()._const("_const") }, + new Object[] { "default", ParameterOverride.builder()._default("_default") }, + new Object[] { "allowedTypes", + ParameterOverride.builder().allowedTypes(Collections.singletonList("allowedTypes")) } }; + } + + @Test + public void name() { + ParameterOverride value = ParameterOverride.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void description() { + ParameterOverride value = ParameterOverride.of(); + value.setDescription("description"); + Assertions.assertThat(value.getDescription()).isEqualTo("description"); + } + + @Test + public void _const() { + ParameterOverride value = ParameterOverride.of(); + value.setConst("const"); + Assertions.assertThat(value.getConst()).isEqualTo("const"); + } + + @Test + public void _default() { + ParameterOverride value = ParameterOverride.of(); + value.setDefault("default"); + Assertions.assertThat(value.getDefault()).isEqualTo("default"); + } + + @Test + public void allowedTypes() { + ParameterOverride value = ParameterOverride.of(); + value.setAllowedTypes(Collections.singletonList("allowedTypes")); + Assertions.assertThat(value.getAllowedTypes()).isEqualTo(Collections.singletonList("allowedTypes")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/RemoveToolCustomizationTargetTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/RemoveToolCustomizationTargetTest.java new file mode 100644 index 00000000000..4683c603299 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/RemoveToolCustomizationTargetTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.api.models.mcp_server; + +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 RemoveToolCustomizationTargetTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RemoveToolCustomizationTargetBuilder builder) { + RemoveToolCustomizationTarget removeToolCustomizationTarget = builder.buildUnchecked(); + Assertions.assertThat(removeToolCustomizationTarget).isInstanceOf(RemoveToolCustomizationTarget.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "tool", RemoveToolCustomizationTarget.builder() + .tool(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all")) } }; + } + + @Test + public void tool() { + RemoveToolCustomizationTarget value = RemoveToolCustomizationTarget.of(); + value.setTool(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all")); + Assertions.assertThat(value.getTool()) + .isEqualTo(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/ToolCustomizationTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/ToolCustomizationTest.java new file mode 100644 index 00000000000..1a93b5334be --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/mcp_server/ToolCustomizationTest.java @@ -0,0 +1,56 @@ + +package com.commercetools.api.models.mcp_server; + +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 ToolCustomizationTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ToolCustomizationBuilder builder) { + ToolCustomization toolCustomization = builder.buildUnchecked(); + Assertions.assertThat(toolCustomization).isInstanceOf(ToolCustomization.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "tool", + ToolCustomization.builder() + .tool(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all")) }, + new Object[] { "description", ToolCustomization.builder().description("description") }, + new Object[] { "parameters", + ToolCustomization.builder() + .parameters(Collections.singletonList( + new com.commercetools.api.models.mcp_server.ParameterOverrideImpl())) } }; + } + + @Test + public void tool() { + ToolCustomization value = ToolCustomization.of(); + value.setTool(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all")); + Assertions.assertThat(value.getTool()) + .isEqualTo(com.commercetools.api.models.mcp_server.McpServerTool.findEnum("all")); + } + + @Test + public void description() { + ToolCustomization value = ToolCustomization.of(); + value.setDescription("description"); + Assertions.assertThat(value.getDescription()).isEqualTo("description"); + } + + @Test + public void parameters() { + ToolCustomization value = ToolCustomization.of(); + value.setParameters( + Collections.singletonList(new com.commercetools.api.models.mcp_server.ParameterOverrideImpl())); + Assertions.assertThat(value.getParameters()) + .isEqualTo( + Collections.singletonList(new com.commercetools.api.models.mcp_server.ParameterOverrideImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessagePayloadTest.java new file mode 100644 index 00000000000..7fa4afeb229 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessagePayloadTest.java @@ -0,0 +1,68 @@ + +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 ProductTailoringKeySetMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ProductTailoringKeySetMessagePayloadBuilder builder) { + ProductTailoringKeySetMessagePayload productTailoringKeySetMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(productTailoringKeySetMessagePayload) + .isInstanceOf(ProductTailoringKeySetMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "store", + ProductTailoringKeySetMessagePayload.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { "productKey", ProductTailoringKeySetMessagePayload.builder().productKey("productKey") }, + new Object[] { "product", + ProductTailoringKeySetMessagePayload.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { "key", ProductTailoringKeySetMessagePayload.builder().key("key") }, + new Object[] { "oldKey", ProductTailoringKeySetMessagePayload.builder().oldKey("oldKey") } }; + } + + @Test + public void store() { + ProductTailoringKeySetMessagePayload value = ProductTailoringKeySetMessagePayload.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 productKey() { + ProductTailoringKeySetMessagePayload value = ProductTailoringKeySetMessagePayload.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringKeySetMessagePayload value = ProductTailoringKeySetMessagePayload.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } + + @Test + public void key() { + ProductTailoringKeySetMessagePayload value = ProductTailoringKeySetMessagePayload.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void oldKey() { + ProductTailoringKeySetMessagePayload value = ProductTailoringKeySetMessagePayload.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/ProductTailoringKeySetMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessageTest.java new file mode 100644 index 00000000000..479b84bb3a7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringKeySetMessageTest.java @@ -0,0 +1,67 @@ + +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 ProductTailoringKeySetMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ProductTailoringKeySetMessageBuilder builder) { + ProductTailoringKeySetMessage productTailoringKeySetMessage = builder.buildUnchecked(); + Assertions.assertThat(productTailoringKeySetMessage).isInstanceOf(ProductTailoringKeySetMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "store", + ProductTailoringKeySetMessage.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { "productKey", ProductTailoringKeySetMessage.builder().productKey("productKey") }, + new Object[] { "product", + ProductTailoringKeySetMessage.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { "key", ProductTailoringKeySetMessage.builder().key("key") }, + new Object[] { "oldKey", ProductTailoringKeySetMessage.builder().oldKey("oldKey") } }; + } + + @Test + public void store() { + ProductTailoringKeySetMessage value = ProductTailoringKeySetMessage.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 productKey() { + ProductTailoringKeySetMessage value = ProductTailoringKeySetMessage.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringKeySetMessage value = ProductTailoringKeySetMessage.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } + + @Test + public void key() { + ProductTailoringKeySetMessage value = ProductTailoringKeySetMessage.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void oldKey() { + ProductTailoringKeySetMessage value = ProductTailoringKeySetMessage.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/product_tailoring/ProductTailoringSetKeyActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetKeyActionTest.java new file mode 100644 index 00000000000..5a3ba962c0d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetKeyActionTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.api.models.product_tailoring; + +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 ProductTailoringSetKeyActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ProductTailoringSetKeyActionBuilder builder) { + ProductTailoringSetKeyAction productTailoringSetKeyAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetKeyAction).isInstanceOf(ProductTailoringSetKeyAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", ProductTailoringSetKeyAction.builder().key("key") } }; + } + + @Test + public void key() { + ProductTailoringSetKeyAction value = ProductTailoringSetKeyAction.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeByIDGet.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeByIDGet.java index 67e037c3fb2..d3f192fc3d8 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeByIDGet.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeByIDGet.java @@ -163,6 +163,10 @@ public List getExpand() { return this.getQueryParam("expand"); } + public List getWithTotal() { + return this.getQueryParam("withTotal"); + } + public void setProjectKey(final String projectKey) { this.projectKey = projectKey; } @@ -1376,6 +1380,86 @@ public ByProjectKeyByResourceTypeByIDGet addExpand(final Collection new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); } + /** + * set withTotal with the specified value + * @param withTotal value to be set + * @param value type + * @return ByProjectKeyByResourceTypeByIDGet + */ + public ByProjectKeyByResourceTypeByIDGet withWithTotal(final TValue withTotal) { + return copy().withQueryParam("withTotal", withTotal); + } + + /** + * add additional withTotal query parameter + * @param withTotal value to be added + * @param value type + * @return ByProjectKeyByResourceTypeByIDGet + */ + public ByProjectKeyByResourceTypeByIDGet 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 ByProjectKeyByResourceTypeByIDGet + */ + public ByProjectKeyByResourceTypeByIDGet 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 ByProjectKeyByResourceTypeByIDGet + */ + public ByProjectKeyByResourceTypeByIDGet 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 ByProjectKeyByResourceTypeByIDGet + */ + public ByProjectKeyByResourceTypeByIDGet 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 ByProjectKeyByResourceTypeByIDGet + */ + public ByProjectKeyByResourceTypeByIDGet 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 ByProjectKeyByResourceTypeByIDGet + */ + public ByProjectKeyByResourceTypeByIDGet 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 ByProjectKeyByResourceTypeByIDGet + */ + public ByProjectKeyByResourceTypeByIDGet addWithTotal(final Collection withTotal) { + return copy().addQueryParams( + withTotal.stream().map(s -> new ParamEntry<>("withTotal", s.toString())).collect(Collectors.toList())); + } + @Override public boolean equals(Object o) { if (this == o) diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeGet.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeGet.java index 4c7f98571b2..e02138cdbd2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeGet.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeGet.java @@ -158,6 +158,10 @@ public List getExpand() { return this.getQueryParam("expand"); } + public List getWithTotal() { + return this.getQueryParam("withTotal"); + } + public void setProjectKey(final String projectKey) { this.projectKey = projectKey; } @@ -1447,6 +1451,86 @@ public ByProjectKeyByResourceTypeGet addExpand(final Collection expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); } + /** + * set withTotal with the specified value + * @param withTotal value to be set + * @param value type + * @return ByProjectKeyByResourceTypeGet + */ + public ByProjectKeyByResourceTypeGet withWithTotal(final TValue withTotal) { + return copy().withQueryParam("withTotal", withTotal); + } + + /** + * add additional withTotal query parameter + * @param withTotal value to be added + * @param value type + * @return ByProjectKeyByResourceTypeGet + */ + public ByProjectKeyByResourceTypeGet 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 ByProjectKeyByResourceTypeGet + */ + public ByProjectKeyByResourceTypeGet 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 ByProjectKeyByResourceTypeGet + */ + public ByProjectKeyByResourceTypeGet 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 ByProjectKeyByResourceTypeGet + */ + public ByProjectKeyByResourceTypeGet 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 ByProjectKeyByResourceTypeGet + */ + public ByProjectKeyByResourceTypeGet 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 ByProjectKeyByResourceTypeGet + */ + public ByProjectKeyByResourceTypeGet 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 ByProjectKeyByResourceTypeGet + */ + public ByProjectKeyByResourceTypeGet addWithTotal(final Collection withTotal) { + return copy().addQueryParams( + withTotal.stream().map(s -> new ParamEntry<>("withTotal", s.toString())).collect(Collectors.toList())); + } + @Override public boolean equals(Object o) { if (this == o) diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyGet.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyGet.java index d661e14f9ed..e32a4e004ff 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyGet.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyGet.java @@ -158,6 +158,10 @@ public List getExpand() { return this.getQueryParam("expand"); } + public List getWithTotal() { + return this.getQueryParam("withTotal"); + } + public void setProjectKey(final String projectKey) { this.projectKey = projectKey; } @@ -1598,6 +1602,86 @@ public ByProjectKeyGet addExpand(final Collection expand) { expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); } + /** + * set withTotal with the specified value + * @param withTotal value to be set + * @param value type + * @return ByProjectKeyGet + */ + public ByProjectKeyGet withWithTotal(final TValue withTotal) { + return copy().withQueryParam("withTotal", withTotal); + } + + /** + * add additional withTotal query parameter + * @param withTotal value to be added + * @param value type + * @return ByProjectKeyGet + */ + public ByProjectKeyGet 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 ByProjectKeyGet + */ + public ByProjectKeyGet 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 ByProjectKeyGet + */ + public ByProjectKeyGet 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 ByProjectKeyGet + */ + public ByProjectKeyGet 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 ByProjectKeyGet + */ + public ByProjectKeyGet 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 ByProjectKeyGet + */ + public ByProjectKeyGet 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 ByProjectKeyGet + */ + public ByProjectKeyGet addWithTotal(final Collection withTotal) { + return copy().addQueryParams( + withTotal.stream().map(s -> new ParamEntry<>("withTotal", s.toString())).collect(Collectors.toList())); + } + @Override public boolean equals(Object o) { if (this == o) diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordPagedQueryResponse.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordPagedQueryResponse.java index c5326236690..3011c6d0188 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordPagedQueryResponse.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordPagedQueryResponse.java @@ -26,7 +26,6 @@ * RecordPagedQueryResponse recordPagedQueryResponse = RecordPagedQueryResponse.builder() * .limit(1) * .count(1) - * .total(1) * .offset(1) * .plusResults(resultsBuilder -> resultsBuilder) * .build() @@ -54,10 +53,10 @@ public interface RecordPagedQueryResponse { public Integer getCount(); /** - *

    Total number of results matching the query. This number is an estimation and not strongly consistent.

    + *

    Total number of results matching the query. This number is an estimation and not strongly consistent. Returned only when withTotal is set to true on the query.

    * @return total */ - @NotNull + @JsonProperty("total") public Integer getTotal(); @@ -93,7 +92,7 @@ public interface RecordPagedQueryResponse { public void setCount(final Integer count); /** - *

    Total number of results matching the query. This number is an estimation and not strongly consistent.

    + *

    Total number of results matching the query. This number is an estimation and not strongly consistent. Returned only when withTotal is set to true on the query.

    * @param total value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordPagedQueryResponseBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordPagedQueryResponseBuilder.java index f9c1c74d869..624dcce1c4d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordPagedQueryResponseBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordPagedQueryResponseBuilder.java @@ -4,6 +4,8 @@ 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; @@ -16,7 +18,6 @@ * RecordPagedQueryResponse recordPagedQueryResponse = RecordPagedQueryResponse.builder() * .limit(1) * .count(1) - * .total(1) * .offset(1) * .plusResults(resultsBuilder -> resultsBuilder) * .build() @@ -30,6 +31,7 @@ public class RecordPagedQueryResponseBuilder implements BuilderTotal number of results matching the query. This number is an estimation and not strongly consistent.

    + *

    Total number of results matching the query. This number is an estimation and not strongly consistent. Returned only when withTotal is set to true on the query.

    * @param total value to be set * @return Builder */ - public RecordPagedQueryResponseBuilder total(final Integer total) { + public RecordPagedQueryResponseBuilder total(@Nullable final Integer total) { this.total = total; return this; } @@ -188,10 +190,11 @@ public Integer getCount() { } /** - *

    Total number of results matching the query. This number is an estimation and not strongly consistent.

    + *

    Total number of results matching the query. This number is an estimation and not strongly consistent. Returned only when withTotal is set to true on the query.

    * @return total */ + @Nullable public Integer getTotal() { return this.total; } @@ -221,7 +224,6 @@ public java.util.List ge public RecordPagedQueryResponse build() { Objects.requireNonNull(limit, RecordPagedQueryResponse.class + ": limit is missing"); Objects.requireNonNull(count, RecordPagedQueryResponse.class + ": count is missing"); - Objects.requireNonNull(total, RecordPagedQueryResponse.class + ": total is missing"); Objects.requireNonNull(offset, RecordPagedQueryResponse.class + ": offset is missing"); Objects.requireNonNull(results, RecordPagedQueryResponse.class + ": results is missing"); return new RecordPagedQueryResponseImpl(limit, count, total, offset, results); diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordPagedQueryResponseImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordPagedQueryResponseImpl.java index 1f650b1f3ae..deb4bf3063c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordPagedQueryResponseImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/RecordPagedQueryResponseImpl.java @@ -70,7 +70,7 @@ public Integer getCount() { } /** - *

    Total number of results matching the query. This number is an estimation and not strongly consistent.

    + *

    Total number of results matching the query. This number is an estimation and not strongly consistent. Returned only when withTotal is set to true on the query.

    */ public Integer getTotal() { diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyByResourceTypeByIDTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyByResourceTypeByIDTest.java index e2e1d0418c3..5566db7e73a 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyByResourceTypeByIDTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyByResourceTypeByIDTest.java @@ -172,6 +172,14 @@ public static Object[][] requestWithMethodParameters() { .get() .withExpand(true) .createHttpRequest(), "get", "test_projectKey/test_resourceType/test_ID?expand=true", }, + new Object[] { + apiRoot.withProjectKeyValue("test_projectKey") + .withResourceTypeValue("test_resourceType") + .withIDValue("test_ID") + .get() + .withWithTotal(true) + .createHttpRequest(), + "get", "test_projectKey/test_resourceType/test_ID?withTotal=true", }, new Object[] { apiRoot.withProjectKeyValue("test_projectKey") .withResourceTypeValue("test_resourceType") .withIDValue("test_ID") @@ -258,6 +266,11 @@ public static Object[][] executeMethodParameters() { .withIDValue("test_ID") .get() .withExpand(true), }, + new Object[] { apiRoot.withProjectKeyValue("test_projectKey") + .withResourceTypeValue("test_resourceType") + .withIDValue("test_ID") + .get() + .withWithTotal(true), }, new Object[] { apiRoot.withProjectKeyValue("test_projectKey") .withResourceTypeValue("test_resourceType") .withIDValue("test_ID") diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyByResourceTypeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyByResourceTypeTest.java index a8f1d65f11a..3e18afd51fa 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyByResourceTypeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyByResourceTypeTest.java @@ -150,6 +150,11 @@ public static Object[][] requestWithMethodParameters() { .get() .withExpand(true) .createHttpRequest(), "get", "test_projectKey/test_resourceType?expand=true", }, + new Object[] { apiRoot.withProjectKeyValue("test_projectKey") + .withResourceTypeValue("test_resourceType") + .get() + .withWithTotal(true) + .createHttpRequest(), "get", "test_projectKey/test_resourceType?withTotal=true", }, new Object[] { apiRoot.withProjectKeyValue("test_projectKey") .withResourceTypeValue("test_resourceType") .get() @@ -224,6 +229,10 @@ public static Object[][] executeMethodParameters() { .withResourceTypeValue("test_resourceType") .get() .withExpand(true), }, + new Object[] { apiRoot.withProjectKeyValue("test_projectKey") + .withResourceTypeValue("test_resourceType") + .get() + .withWithTotal(true), }, new Object[] { apiRoot.withProjectKeyValue("test_projectKey") .withResourceTypeValue("test_resourceType") .get(), } }; diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyTest.java index 072950730b8..a7b99af0b53 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/client/resource/ByProjectKeyTest.java @@ -124,6 +124,9 @@ public static Object[][] requestWithMethodParameters() { new Object[] { apiRoot.withProjectKeyValue("test_projectKey").get().withExpand(true).createHttpRequest(), "get", "test_projectKey?expand=true", }, + new Object[] { + apiRoot.withProjectKeyValue("test_projectKey").get().withWithTotal(true).createHttpRequest(), + "get", "test_projectKey?withTotal=true", }, new Object[] { apiRoot.withProjectKeyValue("test_projectKey").get().createHttpRequest(), "get", "test_projectKey", } }; } @@ -157,6 +160,7 @@ public static Object[][] executeMethodParameters() { com.commercetools.history.models.change_history.PlatformInitiatedChange .findEnum("excludePlatformInitiatedChanges")), }, new Object[] { apiRoot.withProjectKeyValue("test_projectKey").get().withExpand(true), }, + new Object[] { apiRoot.withProjectKeyValue("test_projectKey").get().withWithTotal(true), }, new Object[] { apiRoot.withProjectKeyValue("test_projectKey").get(), } }; } } diff --git a/reference.txt b/reference.txt new file mode 100644 index 00000000000..3223e1e1907 --- /dev/null +++ b/reference.txt @@ -0,0 +1 @@ +0fd20527a3590275d0224f6daba460c9ae55f4c7 diff --git a/references.txt b/references.txt index 853434ff57c..248efad3ef0 100644 --- a/references.txt +++ b/references.txt @@ -583,3 +583,19 @@ c9cd63b8b3c149eb27bc2f2a62dffa68ea137d8b d4c439f7fc7dd0ad0d9d85c9e69cd5f32609af3d 6ff4467597dad93dc5797d057b1b6181ae49514d 2e41f003e889de240f6a92aa143c3103ea348e54 +eba9a59893b6b3e86b86d17cf2c33986232bc543 +a9e9771fe2b7eca7651b0ca5fef4992d4df8b21c +c8321d32796eebddbeced6e06cf4779a0cfc6cbc +79477db5d059245edcaa3fd0d2df897b1b18c46e +4752cbbf0f4da072c49859d5ab1fb686aa7f0523 +3de16df960a806c0b97cb7e618ebc5dec0d15281 +40485b00f981f9b45241cdc8c963614ee64b3b25 +ea8a8e4f1d1afa796bb888e4c1ea46952214b5d8 +b27bf23c25b1bd52d00dd57159016fd47e3c21e7 +c0ff7b23243c9d95736ec183699775a9341f0007 +ff7070c0ff123a4d0bb190130d1c83e5ac0356ec +03e55e32b7a0a742fc59eb380d290623105d5cbf +3da8f4b822245fffefa8a9fcae78b2d9d8eea73d +f1aa67e522f27cdd01e5817f85d2d8ead7dbf5c6 +2020e89c5cef8597a35ec654b36439e6a3c90d49 +6ec5a2fd3780a332812cb9642da1546fb44f0a8d