diff --git a/examples/examples_test.go b/examples/examples_test.go index 7426c66..ba1924f 100644 --- a/examples/examples_test.go +++ b/examples/examples_test.go @@ -1,7 +1,9 @@ package examples + import ( "testing" ) + func TestExamples(t *testing.T) { t.Skip("Not implemented") } diff --git a/provider/cmd/pulumi-resource-commercetools/bridge-metadata.json b/provider/cmd/pulumi-resource-commercetools/bridge-metadata.json index c300e3e..7aca40e 100644 --- a/provider/cmd/pulumi-resource-commercetools/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-commercetools/bridge-metadata.json @@ -3,6 +3,8 @@ "resources": { "commercetools:index/apiClient:ApiClient": 0, "commercetools:index/apiExtension:ApiExtension": 0, + "commercetools:index/associateRole:AssociateRole": 1, + "commercetools:index/attributeGroup:AttributeGroup": 1, "commercetools:index/cartDiscount:CartDiscount": 0, "commercetools:index/category:Category": 0, "commercetools:index/channel:Channel": 0, @@ -24,6 +26,7 @@ "commercetools:index/type:Type": 0 }, "functions": { + "commercetools:index/getState:getState": 1, "commercetools:index/getType:getType": 1 } }, @@ -31,6 +34,8 @@ "resources": { "commercetools:index/apiClient:ApiClient": "commercetools_api_client", "commercetools:index/apiExtension:ApiExtension": "commercetools_api_extension", + "commercetools:index/associateRole:AssociateRole": "commercetools_associate_role", + "commercetools:index/attributeGroup:AttributeGroup": "commercetools_attribute_group", "commercetools:index/cartDiscount:CartDiscount": "commercetools_cart_discount", "commercetools:index/category:Category": "commercetools_category", "commercetools:index/channel:Channel": "commercetools_channel", @@ -52,6 +57,7 @@ "commercetools:index/type:Type": "commercetools_type" }, "functions": { + "commercetools:index/getState:getState": "commercetools_state", "commercetools:index/getType:getType": "commercetools_type" }, "renamedProperties": { @@ -64,11 +70,21 @@ "commercetools:index/ApiExtensionTrigger:ApiExtensionTrigger": { "resourceTypeId": "resource_type_id" }, + "commercetools:index/CartDiscountCustom:CartDiscountCustom": { + "typeId": "type_id" + }, + "commercetools:index/CartDiscountTarget:CartDiscountTarget": { + "discountedQuantity": "discounted_quantity", + "maxOccurrence": "max_occurrence", + "selectionMode": "selection_mode", + "triggerQuantity": "trigger_quantity" + }, "commercetools:index/CartDiscountValue:CartDiscountValue": { "distributionChannelId": "distribution_channel_id", "monies": "money", "productId": "product_id", - "supplyChannelId": "supply_channel_id" + "supplyChannelId": "supply_channel_id", + "variantId": "variant_id" }, "commercetools:index/CartDiscountValueMoney:CartDiscountValueMoney": { "centAmount": "cent_amount", @@ -199,6 +215,12 @@ "timeoutInMs": "timeout_in_ms", "triggers": "trigger" }, + "commercetools:index/associateRole:AssociateRole": { + "buyerAssignable": "buyer_assignable" + }, + "commercetools:index/attributeGroup:AttributeGroup": { + "attributes": "attribute" + }, "commercetools:index/cartDiscount:CartDiscount": { "isActive": "is_active", "requiresDiscountCode": "requires_discount_code", @@ -241,6 +263,7 @@ "commercetools:index/shippingMethod:ShippingMethod": { "isDefault": "is_default", "localizedDescription": "localized_description", + "localizedName": "localized_name", "taxCategoryId": "tax_category_id" }, "commercetools:index/shippingZone:ShippingZone": { diff --git a/provider/cmd/pulumi-resource-commercetools/schema.json b/provider/cmd/pulumi-resource-commercetools/schema.json index 316c0b3..15c8aa5 100644 --- a/provider/cmd/pulumi-resource-commercetools/schema.json +++ b/provider/cmd/pulumi-resource-commercetools/schema.json @@ -135,11 +135,51 @@ "resourceTypeId" ] }, + "commercetools:index/AttributeGroupAttribute:AttributeGroupAttribute": { + "properties": { + "key": { + "type": "string" + } + }, + "type": "object", + "required": [ + "key" + ] + }, + "commercetools:index/CartDiscountCustom:CartDiscountCustom": { + "properties": { + "fields": { + "type": "object", + "additionalProperties": { + "$ref": "pulumi.json#/Any" + } + }, + "typeId": { + "type": "string" + } + }, + "type": "object", + "required": [ + "typeId" + ] + }, "commercetools:index/CartDiscountTarget:CartDiscountTarget": { "properties": { + "discountedQuantity": { + "type": "integer" + }, + "maxOccurrence": { + "type": "integer" + }, "predicate": { "type": "string" }, + "selectionMode": { + "type": "string" + }, + "triggerQuantity": { + "type": "integer" + }, "type": { "type": "string" } @@ -172,7 +212,7 @@ "type": { "type": "string" }, - "variant": { + "variantId": { "type": "integer" } }, @@ -1311,8 +1351,197 @@ "type": "object" } }, + "commercetools:index/associateRole:AssociateRole": { + "properties": { + "buyerAssignable": { + "type": "boolean", + "description": "Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned\nusing the general endpoint.\n" + }, + "key": { + "type": "string", + "description": "User-defined unique identifier of the AssociateRole.\n" + }, + "name": { + "type": "string", + "description": "Name of the AssociateRole.\n" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of Permissions for the AssociateRole.\n" + }, + "version": { + "type": "integer", + "description": "Current version of the AssociateRole.\n" + } + }, + "required": [ + "key", + "name", + "permissions", + "version" + ], + "inputProperties": { + "buyerAssignable": { + "type": "boolean", + "description": "Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned\nusing the general endpoint.\n" + }, + "key": { + "type": "string", + "description": "User-defined unique identifier of the AssociateRole.\n" + }, + "name": { + "type": "string", + "description": "Name of the AssociateRole.\n" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of Permissions for the AssociateRole.\n" + } + }, + "requiredInputs": [ + "key", + "permissions" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering AssociateRole resources.\n", + "properties": { + "buyerAssignable": { + "type": "boolean", + "description": "Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned\nusing the general endpoint.\n" + }, + "key": { + "type": "string", + "description": "User-defined unique identifier of the AssociateRole.\n" + }, + "name": { + "type": "string", + "description": "Name of the AssociateRole.\n" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of Permissions for the AssociateRole.\n" + }, + "version": { + "type": "integer", + "description": "Current version of the AssociateRole.\n" + } + }, + "type": "object" + } + }, + "commercetools:index/attributeGroup:AttributeGroup": { + "properties": { + "attributes": { + "type": "array", + "items": { + "$ref": "#/types/commercetools:index/AttributeGroupAttribute:AttributeGroupAttribute" + }, + "description": "Attributes with unique values.\n" + }, + "description": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Description of the State as localized string.\n" + }, + "key": { + "type": "string", + "description": "User-defined unique identifier of the AttributeGroup.\n" + }, + "name": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Name of the State as localized string.\n" + }, + "version": { + "type": "integer", + "description": "Current version of the AttributeGroup.\n" + } + }, + "required": [ + "name", + "version" + ], + "inputProperties": { + "attributes": { + "type": "array", + "items": { + "$ref": "#/types/commercetools:index/AttributeGroupAttribute:AttributeGroupAttribute" + }, + "description": "Attributes with unique values.\n" + }, + "description": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Description of the State as localized string.\n" + }, + "key": { + "type": "string", + "description": "User-defined unique identifier of the AttributeGroup.\n" + }, + "name": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Name of the State as localized string.\n" + } + }, + "stateInputs": { + "description": "Input properties used for looking up and filtering AttributeGroup resources.\n", + "properties": { + "attributes": { + "type": "array", + "items": { + "$ref": "#/types/commercetools:index/AttributeGroupAttribute:AttributeGroupAttribute" + }, + "description": "Attributes with unique values.\n" + }, + "description": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Description of the State as localized string.\n" + }, + "key": { + "type": "string", + "description": "User-defined unique identifier of the AttributeGroup.\n" + }, + "name": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Name of the State as localized string.\n" + }, + "version": { + "type": "integer", + "description": "Current version of the AttributeGroup.\n" + } + }, + "type": "object" + } + }, "commercetools:index/cartDiscount:CartDiscount": { "properties": { + "custom": { + "$ref": "#/types/commercetools:index/CartDiscountCustom:CartDiscountCustom" + }, "description": { "type": "object", "additionalProperties": { @@ -1377,6 +1606,9 @@ "version" ], "inputProperties": { + "custom": { + "$ref": "#/types/commercetools:index/CartDiscountCustom:CartDiscountCustom" + }, "description": { "type": "object", "additionalProperties": { @@ -1438,6 +1670,9 @@ "stateInputs": { "description": "Input properties used for looking up and filtering CartDiscount resources.\n", "properties": { + "custom": { + "$ref": "#/types/commercetools:index/CartDiscountCustom:CartDiscountCustom" + }, "description": { "type": "object", "additionalProperties": { @@ -1592,8 +1827,7 @@ }, "key": { "type": "string", - "description": "Category-specific unique identifier. Must be unique across a project\n", - "willReplaceOnChanges": true + "description": "Category-specific unique identifier. Must be unique across a project\n" }, "metaDescription": { "type": "object", @@ -1617,8 +1851,7 @@ "type": "object", "additionalProperties": { "$ref": "pulumi.json#/Any" - }, - "willReplaceOnChanges": true + } }, "orderHint": { "type": "string", @@ -1663,8 +1896,7 @@ }, "key": { "type": "string", - "description": "Category-specific unique identifier. Must be unique across a project\n", - "willReplaceOnChanges": true + "description": "Category-specific unique identifier. Must be unique across a project\n" }, "metaDescription": { "type": "object", @@ -1688,8 +1920,7 @@ "type": "object", "additionalProperties": { "$ref": "pulumi.json#/Any" - }, - "willReplaceOnChanges": true + } }, "orderHint": { "type": "string", @@ -2615,7 +2846,14 @@ "additionalProperties": { "$ref": "pulumi.json#/Any" }, - "description": "[LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring)\n" + "description": "[LocalizedString](https://docs.commercetools.com/api/types#localizedstring)\n" + }, + "localizedName": { + "type": "object", + "additionalProperties": { + "$ref": "pulumi.json#/Any" + }, + "description": "[LocalizedString](https://docs.commercetools.com/api/types#localizedstring)\n" }, "name": { "type": "string" @@ -2626,7 +2864,7 @@ }, "taxCategoryId": { "type": "string", - "description": "ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory)\n" + "description": "ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory)\n" }, "version": { "type": "integer" @@ -2657,7 +2895,14 @@ "additionalProperties": { "$ref": "pulumi.json#/Any" }, - "description": "[LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring)\n" + "description": "[LocalizedString](https://docs.commercetools.com/api/types#localizedstring)\n" + }, + "localizedName": { + "type": "object", + "additionalProperties": { + "$ref": "pulumi.json#/Any" + }, + "description": "[LocalizedString](https://docs.commercetools.com/api/types#localizedstring)\n" }, "name": { "type": "string" @@ -2668,7 +2913,7 @@ }, "taxCategoryId": { "type": "string", - "description": "ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory)\n" + "description": "ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory)\n" } }, "requiredInputs": [ @@ -2696,7 +2941,14 @@ "additionalProperties": { "$ref": "pulumi.json#/Any" }, - "description": "[LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring)\n" + "description": "[LocalizedString](https://docs.commercetools.com/api/types#localizedstring)\n" + }, + "localizedName": { + "type": "object", + "additionalProperties": { + "$ref": "pulumi.json#/Any" + }, + "description": "[LocalizedString](https://docs.commercetools.com/api/types#localizedstring)\n" }, "name": { "type": "string" @@ -2707,7 +2959,7 @@ }, "taxCategoryId": { "type": "string", - "description": "ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory)\n" + "description": "ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory)\n" }, "version": { "type": "integer" @@ -3056,6 +3308,13 @@ }, "commercetools:index/store:Store": { "properties": { + "countries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)\n" + }, "custom": { "$ref": "#/types/commercetools:index/StoreCustom:StoreCustom" }, @@ -3101,6 +3360,13 @@ "version" ], "inputProperties": { + "countries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)\n" + }, "custom": { "$ref": "#/types/commercetools:index/StoreCustom:StoreCustom" }, @@ -3144,6 +3410,13 @@ "stateInputs": { "description": "Input properties used for looking up and filtering Store resources.\n", "properties": { + "countries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)\n" + }, "custom": { "$ref": "#/types/commercetools:index/StoreCustom:StoreCustom" }, @@ -3570,6 +3843,36 @@ } }, "functions": { + "commercetools:index/getState:getState": { + "inputs": { + "description": "A collection of arguments for invoking getState.\n", + "properties": { + "key": { + "type": "string" + } + }, + "type": "object", + "required": [ + "key" + ] + }, + "outputs": { + "description": "A collection of values returned by getState.\n", + "properties": { + "id": { + "type": "string" + }, + "key": { + "type": "string" + } + }, + "type": "object", + "required": [ + "id", + "key" + ] + } + }, "commercetools:index/getType:getType": { "inputs": { "description": "A collection of arguments for invoking getType.\n", diff --git a/provider/resources.go b/provider/resources.go index b7045b0..a3dc7e0 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -87,6 +87,8 @@ func Provider() tfbridge.ProviderInfo { "commercetools_subscription": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "Subscription")}, "commercetools_api_client": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "ApiClient")}, "commercetools_api_extension": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "ApiExtension")}, + "commercetools_associate_role": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "AssociateRole")}, + "commercetools_attribute_group": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "AttributeGroup")}, "commercetools_cart_discount": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "CartDiscount")}, "commercetools_category": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "Category")}, "commercetools_channel": {Tok: tfbridge.MakeResource(mainPkg, mainMod, "Channel")}, @@ -162,7 +164,8 @@ func Provider() tfbridge.ProviderInfo { // Map each resource in the Terraform provider to a Pulumi function. An example // is below. // "aws_ami": {Tok: makeDataSource(mainMod, "getAmi")}, - "commercetools_type": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getType")}, + "commercetools_type": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getType")}, + "commercetools_state": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getState")}, }, MetadataInfo: tfbridge.NewProviderMetadata(bridgeMetadata), JavaScript: &tfbridge.JavaScriptInfo{ diff --git a/sdk/dotnet/AssociateRole.cs b/sdk/dotnet/AssociateRole.cs new file mode 100644 index 0000000..7bceb5c --- /dev/null +++ b/sdk/dotnet/AssociateRole.cs @@ -0,0 +1,173 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Commercetools +{ + [CommercetoolsResourceType("commercetools:index/associateRole:AssociateRole")] + public partial class AssociateRole : global::Pulumi.CustomResource + { + /// + /// Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + /// using the general endpoint. + /// + [Output("buyerAssignable")] + public Output BuyerAssignable { get; private set; } = null!; + + /// + /// User-defined unique identifier of the AssociateRole. + /// + [Output("key")] + public Output Key { get; private set; } = null!; + + /// + /// Name of the AssociateRole. + /// + [Output("name")] + public Output Name { get; private set; } = null!; + + /// + /// List of Permissions for the AssociateRole. + /// + [Output("permissions")] + public Output> Permissions { get; private set; } = null!; + + /// + /// Current version of the AssociateRole. + /// + [Output("version")] + public Output Version { get; private set; } = null!; + + + /// + /// Create a AssociateRole resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public AssociateRole(string name, AssociateRoleArgs args, CustomResourceOptions? options = null) + : base("commercetools:index/associateRole:AssociateRole", name, args ?? new AssociateRoleArgs(), MakeResourceOptions(options, "")) + { + } + + private AssociateRole(string name, Input id, AssociateRoleState? state = null, CustomResourceOptions? options = null) + : base("commercetools:index/associateRole:AssociateRole", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing AssociateRole resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static AssociateRole Get(string name, Input id, AssociateRoleState? state = null, CustomResourceOptions? options = null) + { + return new AssociateRole(name, id, state, options); + } + } + + public sealed class AssociateRoleArgs : global::Pulumi.ResourceArgs + { + /// + /// Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + /// using the general endpoint. + /// + [Input("buyerAssignable")] + public Input? BuyerAssignable { get; set; } + + /// + /// User-defined unique identifier of the AssociateRole. + /// + [Input("key", required: true)] + public Input Key { get; set; } = null!; + + /// + /// Name of the AssociateRole. + /// + [Input("name")] + public Input? Name { get; set; } + + [Input("permissions", required: true)] + private InputList? _permissions; + + /// + /// List of Permissions for the AssociateRole. + /// + public InputList Permissions + { + get => _permissions ?? (_permissions = new InputList()); + set => _permissions = value; + } + + public AssociateRoleArgs() + { + } + public static new AssociateRoleArgs Empty => new AssociateRoleArgs(); + } + + public sealed class AssociateRoleState : global::Pulumi.ResourceArgs + { + /// + /// Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + /// using the general endpoint. + /// + [Input("buyerAssignable")] + public Input? BuyerAssignable { get; set; } + + /// + /// User-defined unique identifier of the AssociateRole. + /// + [Input("key")] + public Input? Key { get; set; } + + /// + /// Name of the AssociateRole. + /// + [Input("name")] + public Input? Name { get; set; } + + [Input("permissions")] + private InputList? _permissions; + + /// + /// List of Permissions for the AssociateRole. + /// + public InputList Permissions + { + get => _permissions ?? (_permissions = new InputList()); + set => _permissions = value; + } + + /// + /// Current version of the AssociateRole. + /// + [Input("version")] + public Input? Version { get; set; } + + public AssociateRoleState() + { + } + public static new AssociateRoleState Empty => new AssociateRoleState(); + } +} diff --git a/sdk/dotnet/AttributeGroup.cs b/sdk/dotnet/AttributeGroup.cs new file mode 100644 index 0000000..036dd82 --- /dev/null +++ b/sdk/dotnet/AttributeGroup.cs @@ -0,0 +1,194 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Commercetools +{ + [CommercetoolsResourceType("commercetools:index/attributeGroup:AttributeGroup")] + public partial class AttributeGroup : global::Pulumi.CustomResource + { + /// + /// Attributes with unique values. + /// + [Output("attributes")] + public Output> Attributes { get; private set; } = null!; + + /// + /// Description of the State as localized string. + /// + [Output("description")] + public Output?> Description { get; private set; } = null!; + + /// + /// User-defined unique identifier of the AttributeGroup. + /// + [Output("key")] + public Output Key { get; private set; } = null!; + + /// + /// Name of the State as localized string. + /// + [Output("name")] + public Output> Name { get; private set; } = null!; + + /// + /// Current version of the AttributeGroup. + /// + [Output("version")] + public Output Version { get; private set; } = null!; + + + /// + /// Create a AttributeGroup resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public AttributeGroup(string name, AttributeGroupArgs? args = null, CustomResourceOptions? options = null) + : base("commercetools:index/attributeGroup:AttributeGroup", name, args ?? new AttributeGroupArgs(), MakeResourceOptions(options, "")) + { + } + + private AttributeGroup(string name, Input id, AttributeGroupState? state = null, CustomResourceOptions? options = null) + : base("commercetools:index/attributeGroup:AttributeGroup", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing AttributeGroup resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static AttributeGroup Get(string name, Input id, AttributeGroupState? state = null, CustomResourceOptions? options = null) + { + return new AttributeGroup(name, id, state, options); + } + } + + public sealed class AttributeGroupArgs : global::Pulumi.ResourceArgs + { + [Input("attributes")] + private InputList? _attributes; + + /// + /// Attributes with unique values. + /// + public InputList Attributes + { + get => _attributes ?? (_attributes = new InputList()); + set => _attributes = value; + } + + [Input("description")] + private InputMap? _description; + + /// + /// Description of the State as localized string. + /// + public InputMap Description + { + get => _description ?? (_description = new InputMap()); + set => _description = value; + } + + /// + /// User-defined unique identifier of the AttributeGroup. + /// + [Input("key")] + public Input? Key { get; set; } + + [Input("name")] + private InputMap? _name; + + /// + /// Name of the State as localized string. + /// + public InputMap Name + { + get => _name ?? (_name = new InputMap()); + set => _name = value; + } + + public AttributeGroupArgs() + { + } + public static new AttributeGroupArgs Empty => new AttributeGroupArgs(); + } + + public sealed class AttributeGroupState : global::Pulumi.ResourceArgs + { + [Input("attributes")] + private InputList? _attributes; + + /// + /// Attributes with unique values. + /// + public InputList Attributes + { + get => _attributes ?? (_attributes = new InputList()); + set => _attributes = value; + } + + [Input("description")] + private InputMap? _description; + + /// + /// Description of the State as localized string. + /// + public InputMap Description + { + get => _description ?? (_description = new InputMap()); + set => _description = value; + } + + /// + /// User-defined unique identifier of the AttributeGroup. + /// + [Input("key")] + public Input? Key { get; set; } + + [Input("name")] + private InputMap? _name; + + /// + /// Name of the State as localized string. + /// + public InputMap Name + { + get => _name ?? (_name = new InputMap()); + set => _name = value; + } + + /// + /// Current version of the AttributeGroup. + /// + [Input("version")] + public Input? Version { get; set; } + + public AttributeGroupState() + { + } + public static new AttributeGroupState Empty => new AttributeGroupState(); + } +} diff --git a/sdk/dotnet/CartDiscount.cs b/sdk/dotnet/CartDiscount.cs index 2f6094c..b4b0e9c 100644 --- a/sdk/dotnet/CartDiscount.cs +++ b/sdk/dotnet/CartDiscount.cs @@ -12,6 +12,9 @@ namespace Pulumi.Commercetools [CommercetoolsResourceType("commercetools:index/cartDiscount:CartDiscount")] public partial class CartDiscount : global::Pulumi.CustomResource { + [Output("custom")] + public Output Custom { get; private set; } = null!; + /// /// [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) /// @@ -132,6 +135,9 @@ public static CartDiscount Get(string name, Input id, CartDiscountState? public sealed class CartDiscountArgs : global::Pulumi.ResourceArgs { + [Input("custom")] + public Input? Custom { get; set; } + [Input("description")] private InputMap? _description; @@ -223,6 +229,9 @@ public CartDiscountArgs() public sealed class CartDiscountState : global::Pulumi.ResourceArgs { + [Input("custom")] + public Input? Custom { get; set; } + [Input("description")] private InputMap? _description; diff --git a/sdk/dotnet/GetState.cs b/sdk/dotnet/GetState.cs new file mode 100644 index 0000000..2b48878 --- /dev/null +++ b/sdk/dotnet/GetState.cs @@ -0,0 +1,61 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Commercetools +{ + public static class GetState + { + public static Task InvokeAsync(GetStateArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("commercetools:index/getState:getState", args ?? new GetStateArgs(), options.WithDefaults()); + + public static Output Invoke(GetStateInvokeArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.Invoke("commercetools:index/getState:getState", args ?? new GetStateInvokeArgs(), options.WithDefaults()); + } + + + public sealed class GetStateArgs : global::Pulumi.InvokeArgs + { + [Input("key", required: true)] + public string Key { get; set; } = null!; + + public GetStateArgs() + { + } + public static new GetStateArgs Empty => new GetStateArgs(); + } + + public sealed class GetStateInvokeArgs : global::Pulumi.InvokeArgs + { + [Input("key", required: true)] + public Input Key { get; set; } = null!; + + public GetStateInvokeArgs() + { + } + public static new GetStateInvokeArgs Empty => new GetStateInvokeArgs(); + } + + + [OutputType] + public sealed class GetStateResult + { + public readonly string Id; + public readonly string Key; + + [OutputConstructor] + private GetStateResult( + string id, + + string key) + { + Id = id; + Key = key; + } + } +} diff --git a/sdk/dotnet/Inputs/AttributeGroupAttributeArgs.cs b/sdk/dotnet/Inputs/AttributeGroupAttributeArgs.cs new file mode 100644 index 0000000..678f189 --- /dev/null +++ b/sdk/dotnet/Inputs/AttributeGroupAttributeArgs.cs @@ -0,0 +1,23 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Commercetools.Inputs +{ + + public sealed class AttributeGroupAttributeArgs : global::Pulumi.ResourceArgs + { + [Input("key", required: true)] + public Input Key { get; set; } = null!; + + public AttributeGroupAttributeArgs() + { + } + public static new AttributeGroupAttributeArgs Empty => new AttributeGroupAttributeArgs(); + } +} diff --git a/sdk/dotnet/Inputs/AttributeGroupAttributeGetArgs.cs b/sdk/dotnet/Inputs/AttributeGroupAttributeGetArgs.cs new file mode 100644 index 0000000..81c6031 --- /dev/null +++ b/sdk/dotnet/Inputs/AttributeGroupAttributeGetArgs.cs @@ -0,0 +1,23 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Commercetools.Inputs +{ + + public sealed class AttributeGroupAttributeGetArgs : global::Pulumi.ResourceArgs + { + [Input("key", required: true)] + public Input Key { get; set; } = null!; + + public AttributeGroupAttributeGetArgs() + { + } + public static new AttributeGroupAttributeGetArgs Empty => new AttributeGroupAttributeGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/CartDiscountCustomArgs.cs b/sdk/dotnet/Inputs/CartDiscountCustomArgs.cs new file mode 100644 index 0000000..67f9ae5 --- /dev/null +++ b/sdk/dotnet/Inputs/CartDiscountCustomArgs.cs @@ -0,0 +1,31 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Commercetools.Inputs +{ + + public sealed class CartDiscountCustomArgs : global::Pulumi.ResourceArgs + { + [Input("fields")] + private InputMap? _fields; + public InputMap Fields + { + get => _fields ?? (_fields = new InputMap()); + set => _fields = value; + } + + [Input("typeId", required: true)] + public Input TypeId { get; set; } = null!; + + public CartDiscountCustomArgs() + { + } + public static new CartDiscountCustomArgs Empty => new CartDiscountCustomArgs(); + } +} diff --git a/sdk/dotnet/Inputs/CartDiscountCustomGetArgs.cs b/sdk/dotnet/Inputs/CartDiscountCustomGetArgs.cs new file mode 100644 index 0000000..da1d199 --- /dev/null +++ b/sdk/dotnet/Inputs/CartDiscountCustomGetArgs.cs @@ -0,0 +1,31 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Commercetools.Inputs +{ + + public sealed class CartDiscountCustomGetArgs : global::Pulumi.ResourceArgs + { + [Input("fields")] + private InputMap? _fields; + public InputMap Fields + { + get => _fields ?? (_fields = new InputMap()); + set => _fields = value; + } + + [Input("typeId", required: true)] + public Input TypeId { get; set; } = null!; + + public CartDiscountCustomGetArgs() + { + } + public static new CartDiscountCustomGetArgs Empty => new CartDiscountCustomGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/CartDiscountTargetArgs.cs b/sdk/dotnet/Inputs/CartDiscountTargetArgs.cs index f5b829e..741e859 100644 --- a/sdk/dotnet/Inputs/CartDiscountTargetArgs.cs +++ b/sdk/dotnet/Inputs/CartDiscountTargetArgs.cs @@ -12,9 +12,21 @@ namespace Pulumi.Commercetools.Inputs public sealed class CartDiscountTargetArgs : global::Pulumi.ResourceArgs { + [Input("discountedQuantity")] + public Input? DiscountedQuantity { get; set; } + + [Input("maxOccurrence")] + public Input? MaxOccurrence { get; set; } + [Input("predicate")] public Input? Predicate { get; set; } + [Input("selectionMode")] + public Input? SelectionMode { get; set; } + + [Input("triggerQuantity")] + public Input? TriggerQuantity { get; set; } + [Input("type", required: true)] public Input Type { get; set; } = null!; diff --git a/sdk/dotnet/Inputs/CartDiscountTargetGetArgs.cs b/sdk/dotnet/Inputs/CartDiscountTargetGetArgs.cs index 0e08c5b..87e81ea 100644 --- a/sdk/dotnet/Inputs/CartDiscountTargetGetArgs.cs +++ b/sdk/dotnet/Inputs/CartDiscountTargetGetArgs.cs @@ -12,9 +12,21 @@ namespace Pulumi.Commercetools.Inputs public sealed class CartDiscountTargetGetArgs : global::Pulumi.ResourceArgs { + [Input("discountedQuantity")] + public Input? DiscountedQuantity { get; set; } + + [Input("maxOccurrence")] + public Input? MaxOccurrence { get; set; } + [Input("predicate")] public Input? Predicate { get; set; } + [Input("selectionMode")] + public Input? SelectionMode { get; set; } + + [Input("triggerQuantity")] + public Input? TriggerQuantity { get; set; } + [Input("type", required: true)] public Input Type { get; set; } = null!; diff --git a/sdk/dotnet/Inputs/CartDiscountValueArgs.cs b/sdk/dotnet/Inputs/CartDiscountValueArgs.cs index eafaffd..92a3fb5 100644 --- a/sdk/dotnet/Inputs/CartDiscountValueArgs.cs +++ b/sdk/dotnet/Inputs/CartDiscountValueArgs.cs @@ -35,8 +35,8 @@ public InputList Monies [Input("type", required: true)] public Input Type { get; set; } = null!; - [Input("variant")] - public Input? Variant { get; set; } + [Input("variantId")] + public Input? VariantId { get; set; } public CartDiscountValueArgs() { diff --git a/sdk/dotnet/Inputs/CartDiscountValueGetArgs.cs b/sdk/dotnet/Inputs/CartDiscountValueGetArgs.cs index c857816..991307c 100644 --- a/sdk/dotnet/Inputs/CartDiscountValueGetArgs.cs +++ b/sdk/dotnet/Inputs/CartDiscountValueGetArgs.cs @@ -35,8 +35,8 @@ public InputList Monies [Input("type", required: true)] public Input Type { get; set; } = null!; - [Input("variant")] - public Input? Variant { get; set; } + [Input("variantId")] + public Input? VariantId { get; set; } public CartDiscountValueGetArgs() { diff --git a/sdk/dotnet/Outputs/AttributeGroupAttribute.cs b/sdk/dotnet/Outputs/AttributeGroupAttribute.cs new file mode 100644 index 0000000..1d61f55 --- /dev/null +++ b/sdk/dotnet/Outputs/AttributeGroupAttribute.cs @@ -0,0 +1,24 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Commercetools.Outputs +{ + + [OutputType] + public sealed class AttributeGroupAttribute + { + public readonly string Key; + + [OutputConstructor] + private AttributeGroupAttribute(string key) + { + Key = key; + } + } +} diff --git a/sdk/dotnet/Outputs/CartDiscountCustom.cs b/sdk/dotnet/Outputs/CartDiscountCustom.cs new file mode 100644 index 0000000..bd5c47c --- /dev/null +++ b/sdk/dotnet/Outputs/CartDiscountCustom.cs @@ -0,0 +1,29 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Commercetools.Outputs +{ + + [OutputType] + public sealed class CartDiscountCustom + { + public readonly ImmutableDictionary? Fields; + public readonly string TypeId; + + [OutputConstructor] + private CartDiscountCustom( + ImmutableDictionary? fields, + + string typeId) + { + Fields = fields; + TypeId = typeId; + } + } +} diff --git a/sdk/dotnet/Outputs/CartDiscountTarget.cs b/sdk/dotnet/Outputs/CartDiscountTarget.cs index 5edb7fb..76777b0 100644 --- a/sdk/dotnet/Outputs/CartDiscountTarget.cs +++ b/sdk/dotnet/Outputs/CartDiscountTarget.cs @@ -13,16 +13,32 @@ namespace Pulumi.Commercetools.Outputs [OutputType] public sealed class CartDiscountTarget { + public readonly int? DiscountedQuantity; + public readonly int? MaxOccurrence; public readonly string? Predicate; + public readonly string? SelectionMode; + public readonly int? TriggerQuantity; public readonly string Type; [OutputConstructor] private CartDiscountTarget( + int? discountedQuantity, + + int? maxOccurrence, + string? predicate, + string? selectionMode, + + int? triggerQuantity, + string type) { + DiscountedQuantity = discountedQuantity; + MaxOccurrence = maxOccurrence; Predicate = predicate; + SelectionMode = selectionMode; + TriggerQuantity = triggerQuantity; Type = type; } } diff --git a/sdk/dotnet/Outputs/CartDiscountValue.cs b/sdk/dotnet/Outputs/CartDiscountValue.cs index a6315ff..b319059 100644 --- a/sdk/dotnet/Outputs/CartDiscountValue.cs +++ b/sdk/dotnet/Outputs/CartDiscountValue.cs @@ -19,7 +19,7 @@ public sealed class CartDiscountValue public readonly string? ProductId; public readonly string? SupplyChannelId; public readonly string Type; - public readonly int? Variant; + public readonly int? VariantId; [OutputConstructor] private CartDiscountValue( @@ -35,7 +35,7 @@ private CartDiscountValue( string type, - int? variant) + int? variantId) { DistributionChannelId = distributionChannelId; Monies = monies; @@ -43,7 +43,7 @@ private CartDiscountValue( ProductId = productId; SupplyChannelId = supplyChannelId; Type = type; - Variant = variant; + VariantId = variantId; } } } diff --git a/sdk/dotnet/ShippingMethod.cs b/sdk/dotnet/ShippingMethod.cs index a97838a..1860b96 100644 --- a/sdk/dotnet/ShippingMethod.cs +++ b/sdk/dotnet/ShippingMethod.cs @@ -31,11 +31,17 @@ public partial class ShippingMethod : global::Pulumi.CustomResource public Output Key { get; private set; } = null!; /// - /// [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + /// [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) /// [Output("localizedDescription")] public Output?> LocalizedDescription { get; private set; } = null!; + /// + /// [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + /// + [Output("localizedName")] + public Output?> LocalizedName { get; private set; } = null!; + [Output("name")] public Output Name { get; private set; } = null!; @@ -46,7 +52,7 @@ public partial class ShippingMethod : global::Pulumi.CustomResource public Output Predicate { get; private set; } = null!; /// - /// ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + /// ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) /// [Output("taxCategoryId")] public Output TaxCategoryId { get; private set; } = null!; @@ -122,7 +128,7 @@ public sealed class ShippingMethodArgs : global::Pulumi.ResourceArgs private InputMap? _localizedDescription; /// - /// [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + /// [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) /// public InputMap LocalizedDescription { @@ -130,6 +136,18 @@ public InputMap LocalizedDescription set => _localizedDescription = value; } + [Input("localizedName")] + private InputMap? _localizedName; + + /// + /// [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + /// + public InputMap LocalizedName + { + get => _localizedName ?? (_localizedName = new InputMap()); + set => _localizedName = value; + } + [Input("name")] public Input? Name { get; set; } @@ -140,7 +158,7 @@ public InputMap LocalizedDescription public Input? Predicate { get; set; } /// - /// ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + /// ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) /// [Input("taxCategoryId", required: true)] public Input TaxCategoryId { get; set; } = null!; @@ -175,7 +193,7 @@ public sealed class ShippingMethodState : global::Pulumi.ResourceArgs private InputMap? _localizedDescription; /// - /// [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + /// [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) /// public InputMap LocalizedDescription { @@ -183,6 +201,18 @@ public InputMap LocalizedDescription set => _localizedDescription = value; } + [Input("localizedName")] + private InputMap? _localizedName; + + /// + /// [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + /// + public InputMap LocalizedName + { + get => _localizedName ?? (_localizedName = new InputMap()); + set => _localizedName = value; + } + [Input("name")] public Input? Name { get; set; } @@ -193,7 +223,7 @@ public InputMap LocalizedDescription public Input? Predicate { get; set; } /// - /// ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + /// ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) /// [Input("taxCategoryId")] public Input? TaxCategoryId { get; set; } diff --git a/sdk/dotnet/Store.cs b/sdk/dotnet/Store.cs index 0da7c7b..b9b0f3e 100644 --- a/sdk/dotnet/Store.cs +++ b/sdk/dotnet/Store.cs @@ -12,6 +12,12 @@ namespace Pulumi.Commercetools [CommercetoolsResourceType("commercetools:index/store:Store")] public partial class Store : global::Pulumi.CustomResource { + /// + /// A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + /// + [Output("countries")] + public Output> Countries { get; private set; } = null!; + [Output("custom")] public Output Custom { get; private set; } = null!; @@ -94,6 +100,18 @@ public static Store Get(string name, Input id, StoreState? state = null, public sealed class StoreArgs : global::Pulumi.ResourceArgs { + [Input("countries")] + private InputList? _countries; + + /// + /// A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + /// + public InputList Countries + { + get => _countries ?? (_countries = new InputList()); + set => _countries = value; + } + [Input("custom")] public Input? Custom { get; set; } @@ -159,6 +177,18 @@ public StoreArgs() public sealed class StoreState : global::Pulumi.ResourceArgs { + [Input("countries")] + private InputList? _countries; + + /// + /// A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + /// + public InputList Countries + { + get => _countries ?? (_countries = new InputList()); + set => _countries = value; + } + [Input("custom")] public Input? Custom { get; set; } diff --git a/sdk/go/commercetools/associateRole.go b/sdk/go/commercetools/associateRole.go new file mode 100644 index 0000000..f0e4b5e --- /dev/null +++ b/sdk/go/commercetools/associateRole.go @@ -0,0 +1,283 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package commercetools + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi-commercetools/sdk/go/commercetools/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +type AssociateRole struct { + pulumi.CustomResourceState + + // Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + // using the general endpoint. + BuyerAssignable pulumi.BoolPtrOutput `pulumi:"buyerAssignable"` + // User-defined unique identifier of the AssociateRole. + Key pulumi.StringOutput `pulumi:"key"` + // Name of the AssociateRole. + Name pulumi.StringOutput `pulumi:"name"` + // List of Permissions for the AssociateRole. + Permissions pulumi.StringArrayOutput `pulumi:"permissions"` + // Current version of the AssociateRole. + Version pulumi.IntOutput `pulumi:"version"` +} + +// NewAssociateRole registers a new resource with the given unique name, arguments, and options. +func NewAssociateRole(ctx *pulumi.Context, + name string, args *AssociateRoleArgs, opts ...pulumi.ResourceOption) (*AssociateRole, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Key == nil { + return nil, errors.New("invalid value for required argument 'Key'") + } + if args.Permissions == nil { + return nil, errors.New("invalid value for required argument 'Permissions'") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource AssociateRole + err := ctx.RegisterResource("commercetools:index/associateRole:AssociateRole", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetAssociateRole gets an existing AssociateRole resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetAssociateRole(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *AssociateRoleState, opts ...pulumi.ResourceOption) (*AssociateRole, error) { + var resource AssociateRole + err := ctx.ReadResource("commercetools:index/associateRole:AssociateRole", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering AssociateRole resources. +type associateRoleState struct { + // Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + // using the general endpoint. + BuyerAssignable *bool `pulumi:"buyerAssignable"` + // User-defined unique identifier of the AssociateRole. + Key *string `pulumi:"key"` + // Name of the AssociateRole. + Name *string `pulumi:"name"` + // List of Permissions for the AssociateRole. + Permissions []string `pulumi:"permissions"` + // Current version of the AssociateRole. + Version *int `pulumi:"version"` +} + +type AssociateRoleState struct { + // Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + // using the general endpoint. + BuyerAssignable pulumi.BoolPtrInput + // User-defined unique identifier of the AssociateRole. + Key pulumi.StringPtrInput + // Name of the AssociateRole. + Name pulumi.StringPtrInput + // List of Permissions for the AssociateRole. + Permissions pulumi.StringArrayInput + // Current version of the AssociateRole. + Version pulumi.IntPtrInput +} + +func (AssociateRoleState) ElementType() reflect.Type { + return reflect.TypeOf((*associateRoleState)(nil)).Elem() +} + +type associateRoleArgs struct { + // Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + // using the general endpoint. + BuyerAssignable *bool `pulumi:"buyerAssignable"` + // User-defined unique identifier of the AssociateRole. + Key string `pulumi:"key"` + // Name of the AssociateRole. + Name *string `pulumi:"name"` + // List of Permissions for the AssociateRole. + Permissions []string `pulumi:"permissions"` +} + +// The set of arguments for constructing a AssociateRole resource. +type AssociateRoleArgs struct { + // Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + // using the general endpoint. + BuyerAssignable pulumi.BoolPtrInput + // User-defined unique identifier of the AssociateRole. + Key pulumi.StringInput + // Name of the AssociateRole. + Name pulumi.StringPtrInput + // List of Permissions for the AssociateRole. + Permissions pulumi.StringArrayInput +} + +func (AssociateRoleArgs) ElementType() reflect.Type { + return reflect.TypeOf((*associateRoleArgs)(nil)).Elem() +} + +type AssociateRoleInput interface { + pulumi.Input + + ToAssociateRoleOutput() AssociateRoleOutput + ToAssociateRoleOutputWithContext(ctx context.Context) AssociateRoleOutput +} + +func (*AssociateRole) ElementType() reflect.Type { + return reflect.TypeOf((**AssociateRole)(nil)).Elem() +} + +func (i *AssociateRole) ToAssociateRoleOutput() AssociateRoleOutput { + return i.ToAssociateRoleOutputWithContext(context.Background()) +} + +func (i *AssociateRole) ToAssociateRoleOutputWithContext(ctx context.Context) AssociateRoleOutput { + return pulumi.ToOutputWithContext(ctx, i).(AssociateRoleOutput) +} + +// AssociateRoleArrayInput is an input type that accepts AssociateRoleArray and AssociateRoleArrayOutput values. +// You can construct a concrete instance of `AssociateRoleArrayInput` via: +// +// AssociateRoleArray{ AssociateRoleArgs{...} } +type AssociateRoleArrayInput interface { + pulumi.Input + + ToAssociateRoleArrayOutput() AssociateRoleArrayOutput + ToAssociateRoleArrayOutputWithContext(context.Context) AssociateRoleArrayOutput +} + +type AssociateRoleArray []AssociateRoleInput + +func (AssociateRoleArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*AssociateRole)(nil)).Elem() +} + +func (i AssociateRoleArray) ToAssociateRoleArrayOutput() AssociateRoleArrayOutput { + return i.ToAssociateRoleArrayOutputWithContext(context.Background()) +} + +func (i AssociateRoleArray) ToAssociateRoleArrayOutputWithContext(ctx context.Context) AssociateRoleArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(AssociateRoleArrayOutput) +} + +// AssociateRoleMapInput is an input type that accepts AssociateRoleMap and AssociateRoleMapOutput values. +// You can construct a concrete instance of `AssociateRoleMapInput` via: +// +// AssociateRoleMap{ "key": AssociateRoleArgs{...} } +type AssociateRoleMapInput interface { + pulumi.Input + + ToAssociateRoleMapOutput() AssociateRoleMapOutput + ToAssociateRoleMapOutputWithContext(context.Context) AssociateRoleMapOutput +} + +type AssociateRoleMap map[string]AssociateRoleInput + +func (AssociateRoleMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*AssociateRole)(nil)).Elem() +} + +func (i AssociateRoleMap) ToAssociateRoleMapOutput() AssociateRoleMapOutput { + return i.ToAssociateRoleMapOutputWithContext(context.Background()) +} + +func (i AssociateRoleMap) ToAssociateRoleMapOutputWithContext(ctx context.Context) AssociateRoleMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(AssociateRoleMapOutput) +} + +type AssociateRoleOutput struct{ *pulumi.OutputState } + +func (AssociateRoleOutput) ElementType() reflect.Type { + return reflect.TypeOf((**AssociateRole)(nil)).Elem() +} + +func (o AssociateRoleOutput) ToAssociateRoleOutput() AssociateRoleOutput { + return o +} + +func (o AssociateRoleOutput) ToAssociateRoleOutputWithContext(ctx context.Context) AssociateRoleOutput { + return o +} + +// Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned +// using the general endpoint. +func (o AssociateRoleOutput) BuyerAssignable() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *AssociateRole) pulumi.BoolPtrOutput { return v.BuyerAssignable }).(pulumi.BoolPtrOutput) +} + +// User-defined unique identifier of the AssociateRole. +func (o AssociateRoleOutput) Key() pulumi.StringOutput { + return o.ApplyT(func(v *AssociateRole) pulumi.StringOutput { return v.Key }).(pulumi.StringOutput) +} + +// Name of the AssociateRole. +func (o AssociateRoleOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v *AssociateRole) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) +} + +// List of Permissions for the AssociateRole. +func (o AssociateRoleOutput) Permissions() pulumi.StringArrayOutput { + return o.ApplyT(func(v *AssociateRole) pulumi.StringArrayOutput { return v.Permissions }).(pulumi.StringArrayOutput) +} + +// Current version of the AssociateRole. +func (o AssociateRoleOutput) Version() pulumi.IntOutput { + return o.ApplyT(func(v *AssociateRole) pulumi.IntOutput { return v.Version }).(pulumi.IntOutput) +} + +type AssociateRoleArrayOutput struct{ *pulumi.OutputState } + +func (AssociateRoleArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*AssociateRole)(nil)).Elem() +} + +func (o AssociateRoleArrayOutput) ToAssociateRoleArrayOutput() AssociateRoleArrayOutput { + return o +} + +func (o AssociateRoleArrayOutput) ToAssociateRoleArrayOutputWithContext(ctx context.Context) AssociateRoleArrayOutput { + return o +} + +func (o AssociateRoleArrayOutput) Index(i pulumi.IntInput) AssociateRoleOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AssociateRole { + return vs[0].([]*AssociateRole)[vs[1].(int)] + }).(AssociateRoleOutput) +} + +type AssociateRoleMapOutput struct{ *pulumi.OutputState } + +func (AssociateRoleMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*AssociateRole)(nil)).Elem() +} + +func (o AssociateRoleMapOutput) ToAssociateRoleMapOutput() AssociateRoleMapOutput { + return o +} + +func (o AssociateRoleMapOutput) ToAssociateRoleMapOutputWithContext(ctx context.Context) AssociateRoleMapOutput { + return o +} + +func (o AssociateRoleMapOutput) MapIndex(k pulumi.StringInput) AssociateRoleOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AssociateRole { + return vs[0].(map[string]*AssociateRole)[vs[1].(string)] + }).(AssociateRoleOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*AssociateRoleInput)(nil)).Elem(), &AssociateRole{}) + pulumi.RegisterInputType(reflect.TypeOf((*AssociateRoleArrayInput)(nil)).Elem(), AssociateRoleArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*AssociateRoleMapInput)(nil)).Elem(), AssociateRoleMap{}) + pulumi.RegisterOutputType(AssociateRoleOutput{}) + pulumi.RegisterOutputType(AssociateRoleArrayOutput{}) + pulumi.RegisterOutputType(AssociateRoleMapOutput{}) +} diff --git a/sdk/go/commercetools/attributeGroup.go b/sdk/go/commercetools/attributeGroup.go new file mode 100644 index 0000000..1374fa9 --- /dev/null +++ b/sdk/go/commercetools/attributeGroup.go @@ -0,0 +1,270 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package commercetools + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi-commercetools/sdk/go/commercetools/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +type AttributeGroup struct { + pulumi.CustomResourceState + + // Attributes with unique values. + Attributes AttributeGroupAttributeArrayOutput `pulumi:"attributes"` + // Description of the State as localized string. + Description pulumi.StringMapOutput `pulumi:"description"` + // User-defined unique identifier of the AttributeGroup. + Key pulumi.StringPtrOutput `pulumi:"key"` + // Name of the State as localized string. + Name pulumi.StringMapOutput `pulumi:"name"` + // Current version of the AttributeGroup. + Version pulumi.IntOutput `pulumi:"version"` +} + +// NewAttributeGroup registers a new resource with the given unique name, arguments, and options. +func NewAttributeGroup(ctx *pulumi.Context, + name string, args *AttributeGroupArgs, opts ...pulumi.ResourceOption) (*AttributeGroup, error) { + if args == nil { + args = &AttributeGroupArgs{} + } + + opts = internal.PkgResourceDefaultOpts(opts) + var resource AttributeGroup + err := ctx.RegisterResource("commercetools:index/attributeGroup:AttributeGroup", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetAttributeGroup gets an existing AttributeGroup resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetAttributeGroup(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *AttributeGroupState, opts ...pulumi.ResourceOption) (*AttributeGroup, error) { + var resource AttributeGroup + err := ctx.ReadResource("commercetools:index/attributeGroup:AttributeGroup", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering AttributeGroup resources. +type attributeGroupState struct { + // Attributes with unique values. + Attributes []AttributeGroupAttribute `pulumi:"attributes"` + // Description of the State as localized string. + Description map[string]string `pulumi:"description"` + // User-defined unique identifier of the AttributeGroup. + Key *string `pulumi:"key"` + // Name of the State as localized string. + Name map[string]string `pulumi:"name"` + // Current version of the AttributeGroup. + Version *int `pulumi:"version"` +} + +type AttributeGroupState struct { + // Attributes with unique values. + Attributes AttributeGroupAttributeArrayInput + // Description of the State as localized string. + Description pulumi.StringMapInput + // User-defined unique identifier of the AttributeGroup. + Key pulumi.StringPtrInput + // Name of the State as localized string. + Name pulumi.StringMapInput + // Current version of the AttributeGroup. + Version pulumi.IntPtrInput +} + +func (AttributeGroupState) ElementType() reflect.Type { + return reflect.TypeOf((*attributeGroupState)(nil)).Elem() +} + +type attributeGroupArgs struct { + // Attributes with unique values. + Attributes []AttributeGroupAttribute `pulumi:"attributes"` + // Description of the State as localized string. + Description map[string]string `pulumi:"description"` + // User-defined unique identifier of the AttributeGroup. + Key *string `pulumi:"key"` + // Name of the State as localized string. + Name map[string]string `pulumi:"name"` +} + +// The set of arguments for constructing a AttributeGroup resource. +type AttributeGroupArgs struct { + // Attributes with unique values. + Attributes AttributeGroupAttributeArrayInput + // Description of the State as localized string. + Description pulumi.StringMapInput + // User-defined unique identifier of the AttributeGroup. + Key pulumi.StringPtrInput + // Name of the State as localized string. + Name pulumi.StringMapInput +} + +func (AttributeGroupArgs) ElementType() reflect.Type { + return reflect.TypeOf((*attributeGroupArgs)(nil)).Elem() +} + +type AttributeGroupInput interface { + pulumi.Input + + ToAttributeGroupOutput() AttributeGroupOutput + ToAttributeGroupOutputWithContext(ctx context.Context) AttributeGroupOutput +} + +func (*AttributeGroup) ElementType() reflect.Type { + return reflect.TypeOf((**AttributeGroup)(nil)).Elem() +} + +func (i *AttributeGroup) ToAttributeGroupOutput() AttributeGroupOutput { + return i.ToAttributeGroupOutputWithContext(context.Background()) +} + +func (i *AttributeGroup) ToAttributeGroupOutputWithContext(ctx context.Context) AttributeGroupOutput { + return pulumi.ToOutputWithContext(ctx, i).(AttributeGroupOutput) +} + +// AttributeGroupArrayInput is an input type that accepts AttributeGroupArray and AttributeGroupArrayOutput values. +// You can construct a concrete instance of `AttributeGroupArrayInput` via: +// +// AttributeGroupArray{ AttributeGroupArgs{...} } +type AttributeGroupArrayInput interface { + pulumi.Input + + ToAttributeGroupArrayOutput() AttributeGroupArrayOutput + ToAttributeGroupArrayOutputWithContext(context.Context) AttributeGroupArrayOutput +} + +type AttributeGroupArray []AttributeGroupInput + +func (AttributeGroupArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*AttributeGroup)(nil)).Elem() +} + +func (i AttributeGroupArray) ToAttributeGroupArrayOutput() AttributeGroupArrayOutput { + return i.ToAttributeGroupArrayOutputWithContext(context.Background()) +} + +func (i AttributeGroupArray) ToAttributeGroupArrayOutputWithContext(ctx context.Context) AttributeGroupArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(AttributeGroupArrayOutput) +} + +// AttributeGroupMapInput is an input type that accepts AttributeGroupMap and AttributeGroupMapOutput values. +// You can construct a concrete instance of `AttributeGroupMapInput` via: +// +// AttributeGroupMap{ "key": AttributeGroupArgs{...} } +type AttributeGroupMapInput interface { + pulumi.Input + + ToAttributeGroupMapOutput() AttributeGroupMapOutput + ToAttributeGroupMapOutputWithContext(context.Context) AttributeGroupMapOutput +} + +type AttributeGroupMap map[string]AttributeGroupInput + +func (AttributeGroupMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*AttributeGroup)(nil)).Elem() +} + +func (i AttributeGroupMap) ToAttributeGroupMapOutput() AttributeGroupMapOutput { + return i.ToAttributeGroupMapOutputWithContext(context.Background()) +} + +func (i AttributeGroupMap) ToAttributeGroupMapOutputWithContext(ctx context.Context) AttributeGroupMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(AttributeGroupMapOutput) +} + +type AttributeGroupOutput struct{ *pulumi.OutputState } + +func (AttributeGroupOutput) ElementType() reflect.Type { + return reflect.TypeOf((**AttributeGroup)(nil)).Elem() +} + +func (o AttributeGroupOutput) ToAttributeGroupOutput() AttributeGroupOutput { + return o +} + +func (o AttributeGroupOutput) ToAttributeGroupOutputWithContext(ctx context.Context) AttributeGroupOutput { + return o +} + +// Attributes with unique values. +func (o AttributeGroupOutput) Attributes() AttributeGroupAttributeArrayOutput { + return o.ApplyT(func(v *AttributeGroup) AttributeGroupAttributeArrayOutput { return v.Attributes }).(AttributeGroupAttributeArrayOutput) +} + +// Description of the State as localized string. +func (o AttributeGroupOutput) Description() pulumi.StringMapOutput { + return o.ApplyT(func(v *AttributeGroup) pulumi.StringMapOutput { return v.Description }).(pulumi.StringMapOutput) +} + +// User-defined unique identifier of the AttributeGroup. +func (o AttributeGroupOutput) Key() pulumi.StringPtrOutput { + return o.ApplyT(func(v *AttributeGroup) pulumi.StringPtrOutput { return v.Key }).(pulumi.StringPtrOutput) +} + +// Name of the State as localized string. +func (o AttributeGroupOutput) Name() pulumi.StringMapOutput { + return o.ApplyT(func(v *AttributeGroup) pulumi.StringMapOutput { return v.Name }).(pulumi.StringMapOutput) +} + +// Current version of the AttributeGroup. +func (o AttributeGroupOutput) Version() pulumi.IntOutput { + return o.ApplyT(func(v *AttributeGroup) pulumi.IntOutput { return v.Version }).(pulumi.IntOutput) +} + +type AttributeGroupArrayOutput struct{ *pulumi.OutputState } + +func (AttributeGroupArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*AttributeGroup)(nil)).Elem() +} + +func (o AttributeGroupArrayOutput) ToAttributeGroupArrayOutput() AttributeGroupArrayOutput { + return o +} + +func (o AttributeGroupArrayOutput) ToAttributeGroupArrayOutputWithContext(ctx context.Context) AttributeGroupArrayOutput { + return o +} + +func (o AttributeGroupArrayOutput) Index(i pulumi.IntInput) AttributeGroupOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AttributeGroup { + return vs[0].([]*AttributeGroup)[vs[1].(int)] + }).(AttributeGroupOutput) +} + +type AttributeGroupMapOutput struct{ *pulumi.OutputState } + +func (AttributeGroupMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*AttributeGroup)(nil)).Elem() +} + +func (o AttributeGroupMapOutput) ToAttributeGroupMapOutput() AttributeGroupMapOutput { + return o +} + +func (o AttributeGroupMapOutput) ToAttributeGroupMapOutputWithContext(ctx context.Context) AttributeGroupMapOutput { + return o +} + +func (o AttributeGroupMapOutput) MapIndex(k pulumi.StringInput) AttributeGroupOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AttributeGroup { + return vs[0].(map[string]*AttributeGroup)[vs[1].(string)] + }).(AttributeGroupOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*AttributeGroupInput)(nil)).Elem(), &AttributeGroup{}) + pulumi.RegisterInputType(reflect.TypeOf((*AttributeGroupArrayInput)(nil)).Elem(), AttributeGroupArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*AttributeGroupMapInput)(nil)).Elem(), AttributeGroupMap{}) + pulumi.RegisterOutputType(AttributeGroupOutput{}) + pulumi.RegisterOutputType(AttributeGroupArrayOutput{}) + pulumi.RegisterOutputType(AttributeGroupMapOutput{}) +} diff --git a/sdk/go/commercetools/cartDiscount.go b/sdk/go/commercetools/cartDiscount.go index a3bb25a..2f330fa 100644 --- a/sdk/go/commercetools/cartDiscount.go +++ b/sdk/go/commercetools/cartDiscount.go @@ -15,6 +15,7 @@ import ( type CartDiscount struct { pulumi.CustomResourceState + Custom CartDiscountCustomPtrOutput `pulumi:"custom"` // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) Description pulumi.MapOutput `pulumi:"description"` // Only active discount can be applied to the cart @@ -84,6 +85,7 @@ func GetCartDiscount(ctx *pulumi.Context, // Input properties used for looking up and filtering CartDiscount resources. type cartDiscountState struct { + Custom *CartDiscountCustom `pulumi:"custom"` // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) Description map[string]interface{} `pulumi:"description"` // Only active discount can be applied to the cart @@ -115,6 +117,7 @@ type cartDiscountState struct { } type CartDiscountState struct { + Custom CartDiscountCustomPtrInput // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) Description pulumi.MapInput // Only active discount can be applied to the cart @@ -150,6 +153,7 @@ func (CartDiscountState) ElementType() reflect.Type { } type cartDiscountArgs struct { + Custom *CartDiscountCustom `pulumi:"custom"` // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) Description map[string]interface{} `pulumi:"description"` // Only active discount can be applied to the cart @@ -181,6 +185,7 @@ type cartDiscountArgs struct { // The set of arguments for constructing a CartDiscount resource. type CartDiscountArgs struct { + Custom CartDiscountCustomPtrInput // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) Description pulumi.MapInput // Only active discount can be applied to the cart @@ -297,6 +302,10 @@ func (o CartDiscountOutput) ToCartDiscountOutputWithContext(ctx context.Context) return o } +func (o CartDiscountOutput) Custom() CartDiscountCustomPtrOutput { + return o.ApplyT(func(v *CartDiscount) CartDiscountCustomPtrOutput { return v.Custom }).(CartDiscountCustomPtrOutput) +} + // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) func (o CartDiscountOutput) Description() pulumi.MapOutput { return o.ApplyT(func(v *CartDiscount) pulumi.MapOutput { return v.Description }).(pulumi.MapOutput) diff --git a/sdk/go/commercetools/getState.go b/sdk/go/commercetools/getState.go new file mode 100644 index 0000000..62900b9 --- /dev/null +++ b/sdk/go/commercetools/getState.go @@ -0,0 +1,82 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package commercetools + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi-commercetools/sdk/go/commercetools/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func LookupState(ctx *pulumi.Context, args *LookupStateArgs, opts ...pulumi.InvokeOption) (*LookupStateResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupStateResult + err := ctx.Invoke("commercetools:index/getState:getState", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getState. +type LookupStateArgs struct { + Key string `pulumi:"key"` +} + +// A collection of values returned by getState. +type LookupStateResult struct { + Id string `pulumi:"id"` + Key string `pulumi:"key"` +} + +func LookupStateOutput(ctx *pulumi.Context, args LookupStateOutputArgs, opts ...pulumi.InvokeOption) LookupStateResultOutput { + return pulumi.ToOutputWithContext(context.Background(), args). + ApplyT(func(v interface{}) (LookupStateResult, error) { + args := v.(LookupStateArgs) + r, err := LookupState(ctx, &args, opts...) + var s LookupStateResult + if r != nil { + s = *r + } + return s, err + }).(LookupStateResultOutput) +} + +// A collection of arguments for invoking getState. +type LookupStateOutputArgs struct { + Key pulumi.StringInput `pulumi:"key"` +} + +func (LookupStateOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupStateArgs)(nil)).Elem() +} + +// A collection of values returned by getState. +type LookupStateResultOutput struct{ *pulumi.OutputState } + +func (LookupStateResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupStateResult)(nil)).Elem() +} + +func (o LookupStateResultOutput) ToLookupStateResultOutput() LookupStateResultOutput { + return o +} + +func (o LookupStateResultOutput) ToLookupStateResultOutputWithContext(ctx context.Context) LookupStateResultOutput { + return o +} + +func (o LookupStateResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupStateResult) string { return v.Id }).(pulumi.StringOutput) +} + +func (o LookupStateResultOutput) Key() pulumi.StringOutput { + return o.ApplyT(func(v LookupStateResult) string { return v.Key }).(pulumi.StringOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupStateResultOutput{}) +} diff --git a/sdk/go/commercetools/init.go b/sdk/go/commercetools/init.go index 6da63b7..ed04b1e 100644 --- a/sdk/go/commercetools/init.go +++ b/sdk/go/commercetools/init.go @@ -25,6 +25,10 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &ApiClient{} case "commercetools:index/apiExtension:ApiExtension": r = &ApiExtension{} + case "commercetools:index/associateRole:AssociateRole": + r = &AssociateRole{} + case "commercetools:index/attributeGroup:AttributeGroup": + r = &AttributeGroup{} case "commercetools:index/cartDiscount:CartDiscount": r = &CartDiscount{} case "commercetools:index/category:Category": @@ -104,6 +108,16 @@ func init() { "index/apiExtension", &module{version}, ) + pulumi.RegisterResourceModule( + "commercetools", + "index/associateRole", + &module{version}, + ) + pulumi.RegisterResourceModule( + "commercetools", + "index/attributeGroup", + &module{version}, + ) pulumi.RegisterResourceModule( "commercetools", "index/cartDiscount", diff --git a/sdk/go/commercetools/pulumiTypes.go b/sdk/go/commercetools/pulumiTypes.go index fefd999..27c98d3 100644 --- a/sdk/go/commercetools/pulumiTypes.go +++ b/sdk/go/commercetools/pulumiTypes.go @@ -342,9 +342,255 @@ func (o ApiExtensionTriggerArrayOutput) Index(i pulumi.IntInput) ApiExtensionTri }).(ApiExtensionTriggerOutput) } +type AttributeGroupAttribute struct { + Key string `pulumi:"key"` +} + +// AttributeGroupAttributeInput is an input type that accepts AttributeGroupAttributeArgs and AttributeGroupAttributeOutput values. +// You can construct a concrete instance of `AttributeGroupAttributeInput` via: +// +// AttributeGroupAttributeArgs{...} +type AttributeGroupAttributeInput interface { + pulumi.Input + + ToAttributeGroupAttributeOutput() AttributeGroupAttributeOutput + ToAttributeGroupAttributeOutputWithContext(context.Context) AttributeGroupAttributeOutput +} + +type AttributeGroupAttributeArgs struct { + Key pulumi.StringInput `pulumi:"key"` +} + +func (AttributeGroupAttributeArgs) ElementType() reflect.Type { + return reflect.TypeOf((*AttributeGroupAttribute)(nil)).Elem() +} + +func (i AttributeGroupAttributeArgs) ToAttributeGroupAttributeOutput() AttributeGroupAttributeOutput { + return i.ToAttributeGroupAttributeOutputWithContext(context.Background()) +} + +func (i AttributeGroupAttributeArgs) ToAttributeGroupAttributeOutputWithContext(ctx context.Context) AttributeGroupAttributeOutput { + return pulumi.ToOutputWithContext(ctx, i).(AttributeGroupAttributeOutput) +} + +// AttributeGroupAttributeArrayInput is an input type that accepts AttributeGroupAttributeArray and AttributeGroupAttributeArrayOutput values. +// You can construct a concrete instance of `AttributeGroupAttributeArrayInput` via: +// +// AttributeGroupAttributeArray{ AttributeGroupAttributeArgs{...} } +type AttributeGroupAttributeArrayInput interface { + pulumi.Input + + ToAttributeGroupAttributeArrayOutput() AttributeGroupAttributeArrayOutput + ToAttributeGroupAttributeArrayOutputWithContext(context.Context) AttributeGroupAttributeArrayOutput +} + +type AttributeGroupAttributeArray []AttributeGroupAttributeInput + +func (AttributeGroupAttributeArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]AttributeGroupAttribute)(nil)).Elem() +} + +func (i AttributeGroupAttributeArray) ToAttributeGroupAttributeArrayOutput() AttributeGroupAttributeArrayOutput { + return i.ToAttributeGroupAttributeArrayOutputWithContext(context.Background()) +} + +func (i AttributeGroupAttributeArray) ToAttributeGroupAttributeArrayOutputWithContext(ctx context.Context) AttributeGroupAttributeArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(AttributeGroupAttributeArrayOutput) +} + +type AttributeGroupAttributeOutput struct{ *pulumi.OutputState } + +func (AttributeGroupAttributeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*AttributeGroupAttribute)(nil)).Elem() +} + +func (o AttributeGroupAttributeOutput) ToAttributeGroupAttributeOutput() AttributeGroupAttributeOutput { + return o +} + +func (o AttributeGroupAttributeOutput) ToAttributeGroupAttributeOutputWithContext(ctx context.Context) AttributeGroupAttributeOutput { + return o +} + +func (o AttributeGroupAttributeOutput) Key() pulumi.StringOutput { + return o.ApplyT(func(v AttributeGroupAttribute) string { return v.Key }).(pulumi.StringOutput) +} + +type AttributeGroupAttributeArrayOutput struct{ *pulumi.OutputState } + +func (AttributeGroupAttributeArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]AttributeGroupAttribute)(nil)).Elem() +} + +func (o AttributeGroupAttributeArrayOutput) ToAttributeGroupAttributeArrayOutput() AttributeGroupAttributeArrayOutput { + return o +} + +func (o AttributeGroupAttributeArrayOutput) ToAttributeGroupAttributeArrayOutputWithContext(ctx context.Context) AttributeGroupAttributeArrayOutput { + return o +} + +func (o AttributeGroupAttributeArrayOutput) Index(i pulumi.IntInput) AttributeGroupAttributeOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) AttributeGroupAttribute { + return vs[0].([]AttributeGroupAttribute)[vs[1].(int)] + }).(AttributeGroupAttributeOutput) +} + +type CartDiscountCustom struct { + Fields map[string]interface{} `pulumi:"fields"` + TypeId string `pulumi:"typeId"` +} + +// CartDiscountCustomInput is an input type that accepts CartDiscountCustomArgs and CartDiscountCustomOutput values. +// You can construct a concrete instance of `CartDiscountCustomInput` via: +// +// CartDiscountCustomArgs{...} +type CartDiscountCustomInput interface { + pulumi.Input + + ToCartDiscountCustomOutput() CartDiscountCustomOutput + ToCartDiscountCustomOutputWithContext(context.Context) CartDiscountCustomOutput +} + +type CartDiscountCustomArgs struct { + Fields pulumi.MapInput `pulumi:"fields"` + TypeId pulumi.StringInput `pulumi:"typeId"` +} + +func (CartDiscountCustomArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CartDiscountCustom)(nil)).Elem() +} + +func (i CartDiscountCustomArgs) ToCartDiscountCustomOutput() CartDiscountCustomOutput { + return i.ToCartDiscountCustomOutputWithContext(context.Background()) +} + +func (i CartDiscountCustomArgs) ToCartDiscountCustomOutputWithContext(ctx context.Context) CartDiscountCustomOutput { + return pulumi.ToOutputWithContext(ctx, i).(CartDiscountCustomOutput) +} + +func (i CartDiscountCustomArgs) ToCartDiscountCustomPtrOutput() CartDiscountCustomPtrOutput { + return i.ToCartDiscountCustomPtrOutputWithContext(context.Background()) +} + +func (i CartDiscountCustomArgs) ToCartDiscountCustomPtrOutputWithContext(ctx context.Context) CartDiscountCustomPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CartDiscountCustomOutput).ToCartDiscountCustomPtrOutputWithContext(ctx) +} + +// CartDiscountCustomPtrInput is an input type that accepts CartDiscountCustomArgs, CartDiscountCustomPtr and CartDiscountCustomPtrOutput values. +// You can construct a concrete instance of `CartDiscountCustomPtrInput` via: +// +// CartDiscountCustomArgs{...} +// +// or: +// +// nil +type CartDiscountCustomPtrInput interface { + pulumi.Input + + ToCartDiscountCustomPtrOutput() CartDiscountCustomPtrOutput + ToCartDiscountCustomPtrOutputWithContext(context.Context) CartDiscountCustomPtrOutput +} + +type cartDiscountCustomPtrType CartDiscountCustomArgs + +func CartDiscountCustomPtr(v *CartDiscountCustomArgs) CartDiscountCustomPtrInput { + return (*cartDiscountCustomPtrType)(v) +} + +func (*cartDiscountCustomPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CartDiscountCustom)(nil)).Elem() +} + +func (i *cartDiscountCustomPtrType) ToCartDiscountCustomPtrOutput() CartDiscountCustomPtrOutput { + return i.ToCartDiscountCustomPtrOutputWithContext(context.Background()) +} + +func (i *cartDiscountCustomPtrType) ToCartDiscountCustomPtrOutputWithContext(ctx context.Context) CartDiscountCustomPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CartDiscountCustomPtrOutput) +} + +type CartDiscountCustomOutput struct{ *pulumi.OutputState } + +func (CartDiscountCustomOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CartDiscountCustom)(nil)).Elem() +} + +func (o CartDiscountCustomOutput) ToCartDiscountCustomOutput() CartDiscountCustomOutput { + return o +} + +func (o CartDiscountCustomOutput) ToCartDiscountCustomOutputWithContext(ctx context.Context) CartDiscountCustomOutput { + return o +} + +func (o CartDiscountCustomOutput) ToCartDiscountCustomPtrOutput() CartDiscountCustomPtrOutput { + return o.ToCartDiscountCustomPtrOutputWithContext(context.Background()) +} + +func (o CartDiscountCustomOutput) ToCartDiscountCustomPtrOutputWithContext(ctx context.Context) CartDiscountCustomPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v CartDiscountCustom) *CartDiscountCustom { + return &v + }).(CartDiscountCustomPtrOutput) +} + +func (o CartDiscountCustomOutput) Fields() pulumi.MapOutput { + return o.ApplyT(func(v CartDiscountCustom) map[string]interface{} { return v.Fields }).(pulumi.MapOutput) +} + +func (o CartDiscountCustomOutput) TypeId() pulumi.StringOutput { + return o.ApplyT(func(v CartDiscountCustom) string { return v.TypeId }).(pulumi.StringOutput) +} + +type CartDiscountCustomPtrOutput struct{ *pulumi.OutputState } + +func (CartDiscountCustomPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CartDiscountCustom)(nil)).Elem() +} + +func (o CartDiscountCustomPtrOutput) ToCartDiscountCustomPtrOutput() CartDiscountCustomPtrOutput { + return o +} + +func (o CartDiscountCustomPtrOutput) ToCartDiscountCustomPtrOutputWithContext(ctx context.Context) CartDiscountCustomPtrOutput { + return o +} + +func (o CartDiscountCustomPtrOutput) Elem() CartDiscountCustomOutput { + return o.ApplyT(func(v *CartDiscountCustom) CartDiscountCustom { + if v != nil { + return *v + } + var ret CartDiscountCustom + return ret + }).(CartDiscountCustomOutput) +} + +func (o CartDiscountCustomPtrOutput) Fields() pulumi.MapOutput { + return o.ApplyT(func(v *CartDiscountCustom) map[string]interface{} { + if v == nil { + return nil + } + return v.Fields + }).(pulumi.MapOutput) +} + +func (o CartDiscountCustomPtrOutput) TypeId() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CartDiscountCustom) *string { + if v == nil { + return nil + } + return &v.TypeId + }).(pulumi.StringPtrOutput) +} + type CartDiscountTarget struct { - Predicate *string `pulumi:"predicate"` - Type string `pulumi:"type"` + DiscountedQuantity *int `pulumi:"discountedQuantity"` + MaxOccurrence *int `pulumi:"maxOccurrence"` + Predicate *string `pulumi:"predicate"` + SelectionMode *string `pulumi:"selectionMode"` + TriggerQuantity *int `pulumi:"triggerQuantity"` + Type string `pulumi:"type"` } // CartDiscountTargetInput is an input type that accepts CartDiscountTargetArgs and CartDiscountTargetOutput values. @@ -359,8 +605,12 @@ type CartDiscountTargetInput interface { } type CartDiscountTargetArgs struct { - Predicate pulumi.StringPtrInput `pulumi:"predicate"` - Type pulumi.StringInput `pulumi:"type"` + DiscountedQuantity pulumi.IntPtrInput `pulumi:"discountedQuantity"` + MaxOccurrence pulumi.IntPtrInput `pulumi:"maxOccurrence"` + Predicate pulumi.StringPtrInput `pulumi:"predicate"` + SelectionMode pulumi.StringPtrInput `pulumi:"selectionMode"` + TriggerQuantity pulumi.IntPtrInput `pulumi:"triggerQuantity"` + Type pulumi.StringInput `pulumi:"type"` } func (CartDiscountTargetArgs) ElementType() reflect.Type { @@ -440,10 +690,26 @@ func (o CartDiscountTargetOutput) ToCartDiscountTargetPtrOutputWithContext(ctx c }).(CartDiscountTargetPtrOutput) } +func (o CartDiscountTargetOutput) DiscountedQuantity() pulumi.IntPtrOutput { + return o.ApplyT(func(v CartDiscountTarget) *int { return v.DiscountedQuantity }).(pulumi.IntPtrOutput) +} + +func (o CartDiscountTargetOutput) MaxOccurrence() pulumi.IntPtrOutput { + return o.ApplyT(func(v CartDiscountTarget) *int { return v.MaxOccurrence }).(pulumi.IntPtrOutput) +} + func (o CartDiscountTargetOutput) Predicate() pulumi.StringPtrOutput { return o.ApplyT(func(v CartDiscountTarget) *string { return v.Predicate }).(pulumi.StringPtrOutput) } +func (o CartDiscountTargetOutput) SelectionMode() pulumi.StringPtrOutput { + return o.ApplyT(func(v CartDiscountTarget) *string { return v.SelectionMode }).(pulumi.StringPtrOutput) +} + +func (o CartDiscountTargetOutput) TriggerQuantity() pulumi.IntPtrOutput { + return o.ApplyT(func(v CartDiscountTarget) *int { return v.TriggerQuantity }).(pulumi.IntPtrOutput) +} + func (o CartDiscountTargetOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v CartDiscountTarget) string { return v.Type }).(pulumi.StringOutput) } @@ -472,6 +738,24 @@ func (o CartDiscountTargetPtrOutput) Elem() CartDiscountTargetOutput { }).(CartDiscountTargetOutput) } +func (o CartDiscountTargetPtrOutput) DiscountedQuantity() pulumi.IntPtrOutput { + return o.ApplyT(func(v *CartDiscountTarget) *int { + if v == nil { + return nil + } + return v.DiscountedQuantity + }).(pulumi.IntPtrOutput) +} + +func (o CartDiscountTargetPtrOutput) MaxOccurrence() pulumi.IntPtrOutput { + return o.ApplyT(func(v *CartDiscountTarget) *int { + if v == nil { + return nil + } + return v.MaxOccurrence + }).(pulumi.IntPtrOutput) +} + func (o CartDiscountTargetPtrOutput) Predicate() pulumi.StringPtrOutput { return o.ApplyT(func(v *CartDiscountTarget) *string { if v == nil { @@ -481,6 +765,24 @@ func (o CartDiscountTargetPtrOutput) Predicate() pulumi.StringPtrOutput { }).(pulumi.StringPtrOutput) } +func (o CartDiscountTargetPtrOutput) SelectionMode() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CartDiscountTarget) *string { + if v == nil { + return nil + } + return v.SelectionMode + }).(pulumi.StringPtrOutput) +} + +func (o CartDiscountTargetPtrOutput) TriggerQuantity() pulumi.IntPtrOutput { + return o.ApplyT(func(v *CartDiscountTarget) *int { + if v == nil { + return nil + } + return v.TriggerQuantity + }).(pulumi.IntPtrOutput) +} + func (o CartDiscountTargetPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *CartDiscountTarget) *string { if v == nil { @@ -497,7 +799,7 @@ type CartDiscountValue struct { ProductId *string `pulumi:"productId"` SupplyChannelId *string `pulumi:"supplyChannelId"` Type string `pulumi:"type"` - Variant *int `pulumi:"variant"` + VariantId *int `pulumi:"variantId"` } // CartDiscountValueInput is an input type that accepts CartDiscountValueArgs and CartDiscountValueOutput values. @@ -518,7 +820,7 @@ type CartDiscountValueArgs struct { ProductId pulumi.StringPtrInput `pulumi:"productId"` SupplyChannelId pulumi.StringPtrInput `pulumi:"supplyChannelId"` Type pulumi.StringInput `pulumi:"type"` - Variant pulumi.IntPtrInput `pulumi:"variant"` + VariantId pulumi.IntPtrInput `pulumi:"variantId"` } func (CartDiscountValueArgs) ElementType() reflect.Type { @@ -622,8 +924,8 @@ func (o CartDiscountValueOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v CartDiscountValue) string { return v.Type }).(pulumi.StringOutput) } -func (o CartDiscountValueOutput) Variant() pulumi.IntPtrOutput { - return o.ApplyT(func(v CartDiscountValue) *int { return v.Variant }).(pulumi.IntPtrOutput) +func (o CartDiscountValueOutput) VariantId() pulumi.IntPtrOutput { + return o.ApplyT(func(v CartDiscountValue) *int { return v.VariantId }).(pulumi.IntPtrOutput) } type CartDiscountValuePtrOutput struct{ *pulumi.OutputState } @@ -704,12 +1006,12 @@ func (o CartDiscountValuePtrOutput) Type() pulumi.StringPtrOutput { }).(pulumi.StringPtrOutput) } -func (o CartDiscountValuePtrOutput) Variant() pulumi.IntPtrOutput { +func (o CartDiscountValuePtrOutput) VariantId() pulumi.IntPtrOutput { return o.ApplyT(func(v *CartDiscountValue) *int { if v == nil { return nil } - return v.Variant + return v.VariantId }).(pulumi.IntPtrOutput) } @@ -6655,6 +6957,10 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*ApiExtensionDestinationPtrInput)(nil)).Elem(), ApiExtensionDestinationArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ApiExtensionTriggerInput)(nil)).Elem(), ApiExtensionTriggerArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ApiExtensionTriggerArrayInput)(nil)).Elem(), ApiExtensionTriggerArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*AttributeGroupAttributeInput)(nil)).Elem(), AttributeGroupAttributeArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*AttributeGroupAttributeArrayInput)(nil)).Elem(), AttributeGroupAttributeArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*CartDiscountCustomInput)(nil)).Elem(), CartDiscountCustomArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CartDiscountCustomPtrInput)(nil)).Elem(), CartDiscountCustomArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*CartDiscountTargetInput)(nil)).Elem(), CartDiscountTargetArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*CartDiscountTargetPtrInput)(nil)).Elem(), CartDiscountTargetArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*CartDiscountValueInput)(nil)).Elem(), CartDiscountValueArgs{}) @@ -6747,6 +7053,10 @@ func init() { pulumi.RegisterOutputType(ApiExtensionDestinationPtrOutput{}) pulumi.RegisterOutputType(ApiExtensionTriggerOutput{}) pulumi.RegisterOutputType(ApiExtensionTriggerArrayOutput{}) + pulumi.RegisterOutputType(AttributeGroupAttributeOutput{}) + pulumi.RegisterOutputType(AttributeGroupAttributeArrayOutput{}) + pulumi.RegisterOutputType(CartDiscountCustomOutput{}) + pulumi.RegisterOutputType(CartDiscountCustomPtrOutput{}) pulumi.RegisterOutputType(CartDiscountTargetOutput{}) pulumi.RegisterOutputType(CartDiscountTargetPtrOutput{}) pulumi.RegisterOutputType(CartDiscountValueOutput{}) diff --git a/sdk/go/commercetools/shippingMethod.go b/sdk/go/commercetools/shippingMethod.go index 30dffff..becf3b7 100644 --- a/sdk/go/commercetools/shippingMethod.go +++ b/sdk/go/commercetools/shippingMethod.go @@ -21,12 +21,14 @@ type ShippingMethod struct { IsDefault pulumi.BoolPtrOutput `pulumi:"isDefault"` // User-specific unique identifier for the shipping method Key pulumi.StringPtrOutput `pulumi:"key"` - // [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) - LocalizedDescription pulumi.MapOutput `pulumi:"localizedDescription"` - Name pulumi.StringOutput `pulumi:"name"` + // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + LocalizedDescription pulumi.MapOutput `pulumi:"localizedDescription"` + // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + LocalizedName pulumi.MapOutput `pulumi:"localizedName"` + Name pulumi.StringOutput `pulumi:"name"` // A Cart predicate which can be used to more precisely select a shipping method for a cart Predicate pulumi.StringPtrOutput `pulumi:"predicate"` - // ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + // ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) TaxCategoryId pulumi.StringOutput `pulumi:"taxCategoryId"` Version pulumi.IntOutput `pulumi:"version"` } @@ -70,12 +72,14 @@ type shippingMethodState struct { IsDefault *bool `pulumi:"isDefault"` // User-specific unique identifier for the shipping method Key *string `pulumi:"key"` - // [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) LocalizedDescription map[string]interface{} `pulumi:"localizedDescription"` - Name *string `pulumi:"name"` + // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + LocalizedName map[string]interface{} `pulumi:"localizedName"` + Name *string `pulumi:"name"` // A Cart predicate which can be used to more precisely select a shipping method for a cart Predicate *string `pulumi:"predicate"` - // ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + // ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) TaxCategoryId *string `pulumi:"taxCategoryId"` Version *int `pulumi:"version"` } @@ -87,12 +91,14 @@ type ShippingMethodState struct { IsDefault pulumi.BoolPtrInput // User-specific unique identifier for the shipping method Key pulumi.StringPtrInput - // [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) LocalizedDescription pulumi.MapInput - Name pulumi.StringPtrInput + // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + LocalizedName pulumi.MapInput + Name pulumi.StringPtrInput // A Cart predicate which can be used to more precisely select a shipping method for a cart Predicate pulumi.StringPtrInput - // ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + // ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) TaxCategoryId pulumi.StringPtrInput Version pulumi.IntPtrInput } @@ -108,12 +114,14 @@ type shippingMethodArgs struct { IsDefault *bool `pulumi:"isDefault"` // User-specific unique identifier for the shipping method Key *string `pulumi:"key"` - // [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) LocalizedDescription map[string]interface{} `pulumi:"localizedDescription"` - Name *string `pulumi:"name"` + // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + LocalizedName map[string]interface{} `pulumi:"localizedName"` + Name *string `pulumi:"name"` // A Cart predicate which can be used to more precisely select a shipping method for a cart Predicate *string `pulumi:"predicate"` - // ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + // ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) TaxCategoryId string `pulumi:"taxCategoryId"` } @@ -125,12 +133,14 @@ type ShippingMethodArgs struct { IsDefault pulumi.BoolPtrInput // User-specific unique identifier for the shipping method Key pulumi.StringPtrInput - // [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) LocalizedDescription pulumi.MapInput - Name pulumi.StringPtrInput + // [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + LocalizedName pulumi.MapInput + Name pulumi.StringPtrInput // A Cart predicate which can be used to more precisely select a shipping method for a cart Predicate pulumi.StringPtrInput - // ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + // ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) TaxCategoryId pulumi.StringInput } @@ -239,11 +249,16 @@ func (o ShippingMethodOutput) Key() pulumi.StringPtrOutput { return o.ApplyT(func(v *ShippingMethod) pulumi.StringPtrOutput { return v.Key }).(pulumi.StringPtrOutput) } -// [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) +// [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) func (o ShippingMethodOutput) LocalizedDescription() pulumi.MapOutput { return o.ApplyT(func(v *ShippingMethod) pulumi.MapOutput { return v.LocalizedDescription }).(pulumi.MapOutput) } +// [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) +func (o ShippingMethodOutput) LocalizedName() pulumi.MapOutput { + return o.ApplyT(func(v *ShippingMethod) pulumi.MapOutput { return v.LocalizedName }).(pulumi.MapOutput) +} + func (o ShippingMethodOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ShippingMethod) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } @@ -253,7 +268,7 @@ func (o ShippingMethodOutput) Predicate() pulumi.StringPtrOutput { return o.ApplyT(func(v *ShippingMethod) pulumi.StringPtrOutput { return v.Predicate }).(pulumi.StringPtrOutput) } -// ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) +// ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) func (o ShippingMethodOutput) TaxCategoryId() pulumi.StringOutput { return o.ApplyT(func(v *ShippingMethod) pulumi.StringOutput { return v.TaxCategoryId }).(pulumi.StringOutput) } diff --git a/sdk/go/commercetools/store.go b/sdk/go/commercetools/store.go index 7ba1003..34f7854 100644 --- a/sdk/go/commercetools/store.go +++ b/sdk/go/commercetools/store.go @@ -15,7 +15,9 @@ import ( type Store struct { pulumi.CustomResourceState - Custom StoreCustomPtrOutput `pulumi:"custom"` + // A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + Countries pulumi.StringArrayOutput `pulumi:"countries"` + Custom StoreCustomPtrOutput `pulumi:"custom"` // Set of ResourceIdentifier to a Channel with ProductDistribution DistributionChannels pulumi.StringArrayOutput `pulumi:"distributionChannels"` // User-specific unique identifier for the store. The key is mandatory and immutable. It is used to reference the store @@ -62,7 +64,9 @@ func GetStore(ctx *pulumi.Context, // Input properties used for looking up and filtering Store resources. type storeState struct { - Custom *StoreCustom `pulumi:"custom"` + // A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + Countries []string `pulumi:"countries"` + Custom *StoreCustom `pulumi:"custom"` // Set of ResourceIdentifier to a Channel with ProductDistribution DistributionChannels []string `pulumi:"distributionChannels"` // User-specific unique identifier for the store. The key is mandatory and immutable. It is used to reference the store @@ -77,7 +81,9 @@ type storeState struct { } type StoreState struct { - Custom StoreCustomPtrInput + // A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + Countries pulumi.StringArrayInput + Custom StoreCustomPtrInput // Set of ResourceIdentifier to a Channel with ProductDistribution DistributionChannels pulumi.StringArrayInput // User-specific unique identifier for the store. The key is mandatory and immutable. It is used to reference the store @@ -96,7 +102,9 @@ func (StoreState) ElementType() reflect.Type { } type storeArgs struct { - Custom *StoreCustom `pulumi:"custom"` + // A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + Countries []string `pulumi:"countries"` + Custom *StoreCustom `pulumi:"custom"` // Set of ResourceIdentifier to a Channel with ProductDistribution DistributionChannels []string `pulumi:"distributionChannels"` // User-specific unique identifier for the store. The key is mandatory and immutable. It is used to reference the store @@ -111,7 +119,9 @@ type storeArgs struct { // The set of arguments for constructing a Store resource. type StoreArgs struct { - Custom StoreCustomPtrInput + // A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + Countries pulumi.StringArrayInput + Custom StoreCustomPtrInput // Set of ResourceIdentifier to a Channel with ProductDistribution DistributionChannels pulumi.StringArrayInput // User-specific unique identifier for the store. The key is mandatory and immutable. It is used to reference the store @@ -211,6 +221,11 @@ func (o StoreOutput) ToStoreOutputWithContext(ctx context.Context) StoreOutput { return o } +// A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) +func (o StoreOutput) Countries() pulumi.StringArrayOutput { + return o.ApplyT(func(v *Store) pulumi.StringArrayOutput { return v.Countries }).(pulumi.StringArrayOutput) +} + func (o StoreOutput) Custom() StoreCustomPtrOutput { return o.ApplyT(func(v *Store) StoreCustomPtrOutput { return v.Custom }).(StoreCustomPtrOutput) } diff --git a/sdk/nodejs/associateRole.ts b/sdk/nodejs/associateRole.ts new file mode 100644 index 0000000..320347b --- /dev/null +++ b/sdk/nodejs/associateRole.ts @@ -0,0 +1,142 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +export class AssociateRole extends pulumi.CustomResource { + /** + * Get an existing AssociateRole resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: AssociateRoleState, opts?: pulumi.CustomResourceOptions): AssociateRole { + return new AssociateRole(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'commercetools:index/associateRole:AssociateRole'; + + /** + * Returns true if the given object is an instance of AssociateRole. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is AssociateRole { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === AssociateRole.__pulumiType; + } + + /** + * Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + * using the general endpoint. + */ + public readonly buyerAssignable!: pulumi.Output; + /** + * User-defined unique identifier of the AssociateRole. + */ + public readonly key!: pulumi.Output; + /** + * Name of the AssociateRole. + */ + public readonly name!: pulumi.Output; + /** + * List of Permissions for the AssociateRole. + */ + public readonly permissions!: pulumi.Output; + /** + * Current version of the AssociateRole. + */ + public /*out*/ readonly version!: pulumi.Output; + + /** + * Create a AssociateRole resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: AssociateRoleArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: AssociateRoleArgs | AssociateRoleState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as AssociateRoleState | undefined; + resourceInputs["buyerAssignable"] = state ? state.buyerAssignable : undefined; + resourceInputs["key"] = state ? state.key : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["permissions"] = state ? state.permissions : undefined; + resourceInputs["version"] = state ? state.version : undefined; + } else { + const args = argsOrState as AssociateRoleArgs | undefined; + if ((!args || args.key === undefined) && !opts.urn) { + throw new Error("Missing required property 'key'"); + } + if ((!args || args.permissions === undefined) && !opts.urn) { + throw new Error("Missing required property 'permissions'"); + } + resourceInputs["buyerAssignable"] = args ? args.buyerAssignable : undefined; + resourceInputs["key"] = args ? args.key : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["permissions"] = args ? args.permissions : undefined; + resourceInputs["version"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(AssociateRole.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering AssociateRole resources. + */ +export interface AssociateRoleState { + /** + * Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + * using the general endpoint. + */ + buyerAssignable?: pulumi.Input; + /** + * User-defined unique identifier of the AssociateRole. + */ + key?: pulumi.Input; + /** + * Name of the AssociateRole. + */ + name?: pulumi.Input; + /** + * List of Permissions for the AssociateRole. + */ + permissions?: pulumi.Input[]>; + /** + * Current version of the AssociateRole. + */ + version?: pulumi.Input; +} + +/** + * The set of arguments for constructing a AssociateRole resource. + */ +export interface AssociateRoleArgs { + /** + * Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + * using the general endpoint. + */ + buyerAssignable?: pulumi.Input; + /** + * User-defined unique identifier of the AssociateRole. + */ + key: pulumi.Input; + /** + * Name of the AssociateRole. + */ + name?: pulumi.Input; + /** + * List of Permissions for the AssociateRole. + */ + permissions: pulumi.Input[]>; +} diff --git a/sdk/nodejs/attributeGroup.ts b/sdk/nodejs/attributeGroup.ts new file mode 100644 index 0000000..949a98f --- /dev/null +++ b/sdk/nodejs/attributeGroup.ts @@ -0,0 +1,135 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +export class AttributeGroup extends pulumi.CustomResource { + /** + * Get an existing AttributeGroup resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: AttributeGroupState, opts?: pulumi.CustomResourceOptions): AttributeGroup { + return new AttributeGroup(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'commercetools:index/attributeGroup:AttributeGroup'; + + /** + * Returns true if the given object is an instance of AttributeGroup. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is AttributeGroup { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === AttributeGroup.__pulumiType; + } + + /** + * Attributes with unique values. + */ + public readonly attributes!: pulumi.Output; + /** + * Description of the State as localized string. + */ + public readonly description!: pulumi.Output<{[key: string]: string} | undefined>; + /** + * User-defined unique identifier of the AttributeGroup. + */ + public readonly key!: pulumi.Output; + /** + * Name of the State as localized string. + */ + public readonly name!: pulumi.Output<{[key: string]: string}>; + /** + * Current version of the AttributeGroup. + */ + public /*out*/ readonly version!: pulumi.Output; + + /** + * Create a AttributeGroup resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: AttributeGroupArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: AttributeGroupArgs | AttributeGroupState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as AttributeGroupState | undefined; + resourceInputs["attributes"] = state ? state.attributes : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["key"] = state ? state.key : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["version"] = state ? state.version : undefined; + } else { + const args = argsOrState as AttributeGroupArgs | undefined; + resourceInputs["attributes"] = args ? args.attributes : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["key"] = args ? args.key : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["version"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(AttributeGroup.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering AttributeGroup resources. + */ +export interface AttributeGroupState { + /** + * Attributes with unique values. + */ + attributes?: pulumi.Input[]>; + /** + * Description of the State as localized string. + */ + description?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * User-defined unique identifier of the AttributeGroup. + */ + key?: pulumi.Input; + /** + * Name of the State as localized string. + */ + name?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * Current version of the AttributeGroup. + */ + version?: pulumi.Input; +} + +/** + * The set of arguments for constructing a AttributeGroup resource. + */ +export interface AttributeGroupArgs { + /** + * Attributes with unique values. + */ + attributes?: pulumi.Input[]>; + /** + * Description of the State as localized string. + */ + description?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * User-defined unique identifier of the AttributeGroup. + */ + key?: pulumi.Input; + /** + * Name of the State as localized string. + */ + name?: pulumi.Input<{[key: string]: pulumi.Input}>; +} diff --git a/sdk/nodejs/cartDiscount.ts b/sdk/nodejs/cartDiscount.ts index d0289e7..c0c539d 100644 --- a/sdk/nodejs/cartDiscount.ts +++ b/sdk/nodejs/cartDiscount.ts @@ -34,6 +34,7 @@ export class CartDiscount extends pulumi.CustomResource { return obj['__pulumiType'] === CartDiscount.__pulumiType; } + public readonly custom!: pulumi.Output; /** * [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) */ @@ -96,6 +97,7 @@ export class CartDiscount extends pulumi.CustomResource { opts = opts || {}; if (opts.id) { const state = argsOrState as CartDiscountState | undefined; + resourceInputs["custom"] = state ? state.custom : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["isActive"] = state ? state.isActive : undefined; resourceInputs["key"] = state ? state.key : undefined; @@ -120,6 +122,7 @@ export class CartDiscount extends pulumi.CustomResource { if ((!args || args.value === undefined) && !opts.urn) { throw new Error("Missing required property 'value'"); } + resourceInputs["custom"] = args ? args.custom : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["isActive"] = args ? args.isActive : undefined; resourceInputs["key"] = args ? args.key : undefined; @@ -143,6 +146,7 @@ export class CartDiscount extends pulumi.CustomResource { * Input properties used for looking up and filtering CartDiscount resources. */ export interface CartDiscountState { + custom?: pulumi.Input; /** * [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) */ @@ -197,6 +201,7 @@ export interface CartDiscountState { * The set of arguments for constructing a CartDiscount resource. */ export interface CartDiscountArgs { + custom?: pulumi.Input; /** * [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) */ diff --git a/sdk/nodejs/getState.ts b/sdk/nodejs/getState.ts new file mode 100644 index 0000000..ee6b603 --- /dev/null +++ b/sdk/nodejs/getState.ts @@ -0,0 +1,38 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +export function getState(args: GetStateArgs, opts?: pulumi.InvokeOptions): Promise { + + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("commercetools:index/getState:getState", { + "key": args.key, + }, opts); +} + +/** + * A collection of arguments for invoking getState. + */ +export interface GetStateArgs { + key: string; +} + +/** + * A collection of values returned by getState. + */ +export interface GetStateResult { + readonly id: string; + readonly key: string; +} +export function getStateOutput(args: GetStateOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { + return pulumi.output(args).apply((a: any) => getState(a, opts)) +} + +/** + * A collection of arguments for invoking getState. + */ +export interface GetStateOutputArgs { + key: pulumi.Input; +} diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index e1478c5..8fc66b5 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -15,6 +15,16 @@ export type ApiExtension = import("./apiExtension").ApiExtension; export const ApiExtension: typeof import("./apiExtension").ApiExtension = null as any; utilities.lazyLoad(exports, ["ApiExtension"], () => require("./apiExtension")); +export { AssociateRoleArgs, AssociateRoleState } from "./associateRole"; +export type AssociateRole = import("./associateRole").AssociateRole; +export const AssociateRole: typeof import("./associateRole").AssociateRole = null as any; +utilities.lazyLoad(exports, ["AssociateRole"], () => require("./associateRole")); + +export { AttributeGroupArgs, AttributeGroupState } from "./attributeGroup"; +export type AttributeGroup = import("./attributeGroup").AttributeGroup; +export const AttributeGroup: typeof import("./attributeGroup").AttributeGroup = null as any; +utilities.lazyLoad(exports, ["AttributeGroup"], () => require("./attributeGroup")); + export { CartDiscountArgs, CartDiscountState } from "./cartDiscount"; export type CartDiscount = import("./cartDiscount").CartDiscount; export const CartDiscount: typeof import("./cartDiscount").CartDiscount = null as any; @@ -45,6 +55,11 @@ export type DiscountCode = import("./discountCode").DiscountCode; export const DiscountCode: typeof import("./discountCode").DiscountCode = null as any; utilities.lazyLoad(exports, ["DiscountCode"], () => require("./discountCode")); +export { GetStateArgs, GetStateResult, GetStateOutputArgs } from "./getState"; +export const getState: typeof import("./getState").getState = null as any; +export const getStateOutput: typeof import("./getState").getStateOutput = null as any; +utilities.lazyLoad(exports, ["getState","getStateOutput"], () => require("./getState")); + export { GetTypeArgs, GetTypeResult, GetTypeOutputArgs } from "./getType"; export const getType: typeof import("./getType").getType = null as any; export const getTypeOutput: typeof import("./getType").getTypeOutput = null as any; @@ -138,6 +153,10 @@ const _module = { return new ApiClient(name, undefined, { urn }) case "commercetools:index/apiExtension:ApiExtension": return new ApiExtension(name, undefined, { urn }) + case "commercetools:index/associateRole:AssociateRole": + return new AssociateRole(name, undefined, { urn }) + case "commercetools:index/attributeGroup:AttributeGroup": + return new AttributeGroup(name, undefined, { urn }) case "commercetools:index/cartDiscount:CartDiscount": return new CartDiscount(name, undefined, { urn }) case "commercetools:index/category:Category": @@ -183,6 +202,8 @@ const _module = { }; pulumi.runtime.registerResourceModule("commercetools", "index/apiClient", _module) pulumi.runtime.registerResourceModule("commercetools", "index/apiExtension", _module) +pulumi.runtime.registerResourceModule("commercetools", "index/associateRole", _module) +pulumi.runtime.registerResourceModule("commercetools", "index/attributeGroup", _module) pulumi.runtime.registerResourceModule("commercetools", "index/cartDiscount", _module) pulumi.runtime.registerResourceModule("commercetools", "index/category", _module) pulumi.runtime.registerResourceModule("commercetools", "index/channel", _module) diff --git a/sdk/nodejs/shippingMethod.ts b/sdk/nodejs/shippingMethod.ts index 182a36d..e4c38a3 100644 --- a/sdk/nodejs/shippingMethod.ts +++ b/sdk/nodejs/shippingMethod.ts @@ -45,16 +45,20 @@ export class ShippingMethod extends pulumi.CustomResource { */ public readonly key!: pulumi.Output; /** - * [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + * [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) */ public readonly localizedDescription!: pulumi.Output<{[key: string]: any} | undefined>; + /** + * [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + */ + public readonly localizedName!: pulumi.Output<{[key: string]: any} | undefined>; public readonly name!: pulumi.Output; /** * A Cart predicate which can be used to more precisely select a shipping method for a cart */ public readonly predicate!: pulumi.Output; /** - * ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + * ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) */ public readonly taxCategoryId!: pulumi.Output; public /*out*/ readonly version!: pulumi.Output; @@ -77,6 +81,7 @@ export class ShippingMethod extends pulumi.CustomResource { resourceInputs["isDefault"] = state ? state.isDefault : undefined; resourceInputs["key"] = state ? state.key : undefined; resourceInputs["localizedDescription"] = state ? state.localizedDescription : undefined; + resourceInputs["localizedName"] = state ? state.localizedName : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["predicate"] = state ? state.predicate : undefined; resourceInputs["taxCategoryId"] = state ? state.taxCategoryId : undefined; @@ -91,6 +96,7 @@ export class ShippingMethod extends pulumi.CustomResource { resourceInputs["isDefault"] = args ? args.isDefault : undefined; resourceInputs["key"] = args ? args.key : undefined; resourceInputs["localizedDescription"] = args ? args.localizedDescription : undefined; + resourceInputs["localizedName"] = args ? args.localizedName : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["predicate"] = args ? args.predicate : undefined; resourceInputs["taxCategoryId"] = args ? args.taxCategoryId : undefined; @@ -116,16 +122,20 @@ export interface ShippingMethodState { */ key?: pulumi.Input; /** - * [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + * [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) */ localizedDescription?: pulumi.Input<{[key: string]: any}>; + /** + * [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + */ + localizedName?: pulumi.Input<{[key: string]: any}>; name?: pulumi.Input; /** * A Cart predicate which can be used to more precisely select a shipping method for a cart */ predicate?: pulumi.Input; /** - * ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + * ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) */ taxCategoryId?: pulumi.Input; version?: pulumi.Input; @@ -146,16 +156,20 @@ export interface ShippingMethodArgs { */ key?: pulumi.Input; /** - * [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + * [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) */ localizedDescription?: pulumi.Input<{[key: string]: any}>; + /** + * [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + */ + localizedName?: pulumi.Input<{[key: string]: any}>; name?: pulumi.Input; /** * A Cart predicate which can be used to more precisely select a shipping method for a cart */ predicate?: pulumi.Input; /** - * ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + * ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) */ taxCategoryId: pulumi.Input; } diff --git a/sdk/nodejs/store.ts b/sdk/nodejs/store.ts index 7362160..71d3138 100644 --- a/sdk/nodejs/store.ts +++ b/sdk/nodejs/store.ts @@ -34,6 +34,10 @@ export class Store extends pulumi.CustomResource { return obj['__pulumiType'] === Store.__pulumiType; } + /** + * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + */ + public readonly countries!: pulumi.Output; public readonly custom!: pulumi.Output; /** * Set of ResourceIdentifier to a Channel with ProductDistribution @@ -70,6 +74,7 @@ export class Store extends pulumi.CustomResource { opts = opts || {}; if (opts.id) { const state = argsOrState as StoreState | undefined; + resourceInputs["countries"] = state ? state.countries : undefined; resourceInputs["custom"] = state ? state.custom : undefined; resourceInputs["distributionChannels"] = state ? state.distributionChannels : undefined; resourceInputs["key"] = state ? state.key : undefined; @@ -82,6 +87,7 @@ export class Store extends pulumi.CustomResource { if ((!args || args.key === undefined) && !opts.urn) { throw new Error("Missing required property 'key'"); } + resourceInputs["countries"] = args ? args.countries : undefined; resourceInputs["custom"] = args ? args.custom : undefined; resourceInputs["distributionChannels"] = args ? args.distributionChannels : undefined; resourceInputs["key"] = args ? args.key : undefined; @@ -99,6 +105,10 @@ export class Store extends pulumi.CustomResource { * Input properties used for looking up and filtering Store resources. */ export interface StoreState { + /** + * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + */ + countries?: pulumi.Input[]>; custom?: pulumi.Input; /** * Set of ResourceIdentifier to a Channel with ProductDistribution @@ -127,6 +137,10 @@ export interface StoreState { * The set of arguments for constructing a Store resource. */ export interface StoreArgs { + /** + * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + */ + countries?: pulumi.Input[]>; custom?: pulumi.Input; /** * Set of ResourceIdentifier to a Channel with ProductDistribution diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index e6812df..9217316 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -15,6 +15,8 @@ "files": [ "apiClient.ts", "apiExtension.ts", + "associateRole.ts", + "attributeGroup.ts", "cartDiscount.ts", "category.ts", "channel.ts", @@ -23,6 +25,7 @@ "customObject.ts", "customerGroup.ts", "discountCode.ts", + "getState.ts", "getType.ts", "index.ts", "productDiscount.ts", diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 22cfe12..58ac5f1 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -21,8 +21,21 @@ export interface ApiExtensionTrigger { resourceTypeId: pulumi.Input; } +export interface AttributeGroupAttribute { + key: pulumi.Input; +} + +export interface CartDiscountCustom { + fields?: pulumi.Input<{[key: string]: any}>; + typeId: pulumi.Input; +} + export interface CartDiscountTarget { + discountedQuantity?: pulumi.Input; + maxOccurrence?: pulumi.Input; predicate?: pulumi.Input; + selectionMode?: pulumi.Input; + triggerQuantity?: pulumi.Input; type: pulumi.Input; } @@ -33,7 +46,7 @@ export interface CartDiscountValue { productId?: pulumi.Input; supplyChannelId?: pulumi.Input; type: pulumi.Input; - variant?: pulumi.Input; + variantId?: pulumi.Input; } export interface CartDiscountValueMoney { diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index cdd65e6..6776e18 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -21,8 +21,21 @@ export interface ApiExtensionTrigger { resourceTypeId: string; } +export interface AttributeGroupAttribute { + key: string; +} + +export interface CartDiscountCustom { + fields?: {[key: string]: any}; + typeId: string; +} + export interface CartDiscountTarget { + discountedQuantity?: number; + maxOccurrence?: number; predicate?: string; + selectionMode?: string; + triggerQuantity?: number; type: string; } @@ -33,7 +46,7 @@ export interface CartDiscountValue { productId?: string; supplyChannelId?: string; type: string; - variant?: number; + variantId?: number; } export interface CartDiscountValueMoney { diff --git a/sdk/python/pulumi_commercetools/__init__.py b/sdk/python/pulumi_commercetools/__init__.py index 0b544ff..5d42fa0 100644 --- a/sdk/python/pulumi_commercetools/__init__.py +++ b/sdk/python/pulumi_commercetools/__init__.py @@ -7,12 +7,15 @@ # Export this package's modules as members: from .api_client import * from .api_extension import * +from .associate_role import * +from .attribute_group import * from .cart_discount import * from .category import * from .channel import * from .custom_object import * from .customer_group import * from .discount_code import * +from .get_state import * from .get_type import * from .product_discount import * from .product_type import * @@ -57,6 +60,22 @@ "commercetools:index/apiExtension:ApiExtension": "ApiExtension" } }, + { + "pkg": "commercetools", + "mod": "index/associateRole", + "fqn": "pulumi_commercetools", + "classes": { + "commercetools:index/associateRole:AssociateRole": "AssociateRole" + } + }, + { + "pkg": "commercetools", + "mod": "index/attributeGroup", + "fqn": "pulumi_commercetools", + "classes": { + "commercetools:index/attributeGroup:AttributeGroup": "AttributeGroup" + } + }, { "pkg": "commercetools", "mod": "index/cartDiscount", diff --git a/sdk/python/pulumi_commercetools/_inputs.py b/sdk/python/pulumi_commercetools/_inputs.py index 8c85859..a171912 100644 --- a/sdk/python/pulumi_commercetools/_inputs.py +++ b/sdk/python/pulumi_commercetools/_inputs.py @@ -12,6 +12,8 @@ __all__ = [ 'ApiExtensionDestinationArgs', 'ApiExtensionTriggerArgs', + 'AttributeGroupAttributeArgs', + 'CartDiscountCustomArgs', 'CartDiscountTargetArgs', 'CartDiscountValueArgs', 'CartDiscountValueMoneyArgs', @@ -186,14 +188,70 @@ def condition(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "condition", value) +@pulumi.input_type +class AttributeGroupAttributeArgs: + def __init__(__self__, *, + key: pulumi.Input[str]): + pulumi.set(__self__, "key", key) + + @property + @pulumi.getter + def key(self) -> pulumi.Input[str]: + return pulumi.get(self, "key") + + @key.setter + def key(self, value: pulumi.Input[str]): + pulumi.set(self, "key", value) + + +@pulumi.input_type +class CartDiscountCustomArgs: + def __init__(__self__, *, + type_id: pulumi.Input[str], + fields: Optional[pulumi.Input[Mapping[str, Any]]] = None): + pulumi.set(__self__, "type_id", type_id) + if fields is not None: + pulumi.set(__self__, "fields", fields) + + @property + @pulumi.getter(name="typeId") + def type_id(self) -> pulumi.Input[str]: + return pulumi.get(self, "type_id") + + @type_id.setter + def type_id(self, value: pulumi.Input[str]): + pulumi.set(self, "type_id", value) + + @property + @pulumi.getter + def fields(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + return pulumi.get(self, "fields") + + @fields.setter + def fields(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + pulumi.set(self, "fields", value) + + @pulumi.input_type class CartDiscountTargetArgs: def __init__(__self__, *, type: pulumi.Input[str], - predicate: Optional[pulumi.Input[str]] = None): + discounted_quantity: Optional[pulumi.Input[int]] = None, + max_occurrence: Optional[pulumi.Input[int]] = None, + predicate: Optional[pulumi.Input[str]] = None, + selection_mode: Optional[pulumi.Input[str]] = None, + trigger_quantity: Optional[pulumi.Input[int]] = None): pulumi.set(__self__, "type", type) + if discounted_quantity is not None: + pulumi.set(__self__, "discounted_quantity", discounted_quantity) + if max_occurrence is not None: + pulumi.set(__self__, "max_occurrence", max_occurrence) if predicate is not None: pulumi.set(__self__, "predicate", predicate) + if selection_mode is not None: + pulumi.set(__self__, "selection_mode", selection_mode) + if trigger_quantity is not None: + pulumi.set(__self__, "trigger_quantity", trigger_quantity) @property @pulumi.getter @@ -204,6 +262,24 @@ def type(self) -> pulumi.Input[str]: def type(self, value: pulumi.Input[str]): pulumi.set(self, "type", value) + @property + @pulumi.getter(name="discountedQuantity") + def discounted_quantity(self) -> Optional[pulumi.Input[int]]: + return pulumi.get(self, "discounted_quantity") + + @discounted_quantity.setter + def discounted_quantity(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "discounted_quantity", value) + + @property + @pulumi.getter(name="maxOccurrence") + def max_occurrence(self) -> Optional[pulumi.Input[int]]: + return pulumi.get(self, "max_occurrence") + + @max_occurrence.setter + def max_occurrence(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "max_occurrence", value) + @property @pulumi.getter def predicate(self) -> Optional[pulumi.Input[str]]: @@ -213,6 +289,24 @@ def predicate(self) -> Optional[pulumi.Input[str]]: def predicate(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "predicate", value) + @property + @pulumi.getter(name="selectionMode") + def selection_mode(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "selection_mode") + + @selection_mode.setter + def selection_mode(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "selection_mode", value) + + @property + @pulumi.getter(name="triggerQuantity") + def trigger_quantity(self) -> Optional[pulumi.Input[int]]: + return pulumi.get(self, "trigger_quantity") + + @trigger_quantity.setter + def trigger_quantity(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "trigger_quantity", value) + @pulumi.input_type class CartDiscountValueArgs: @@ -223,7 +317,7 @@ def __init__(__self__, *, permyriad: Optional[pulumi.Input[int]] = None, product_id: Optional[pulumi.Input[str]] = None, supply_channel_id: Optional[pulumi.Input[str]] = None, - variant: Optional[pulumi.Input[int]] = None): + variant_id: Optional[pulumi.Input[int]] = None): pulumi.set(__self__, "type", type) if distribution_channel_id is not None: pulumi.set(__self__, "distribution_channel_id", distribution_channel_id) @@ -235,8 +329,8 @@ def __init__(__self__, *, pulumi.set(__self__, "product_id", product_id) if supply_channel_id is not None: pulumi.set(__self__, "supply_channel_id", supply_channel_id) - if variant is not None: - pulumi.set(__self__, "variant", variant) + if variant_id is not None: + pulumi.set(__self__, "variant_id", variant_id) @property @pulumi.getter @@ -293,13 +387,13 @@ def supply_channel_id(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "supply_channel_id", value) @property - @pulumi.getter - def variant(self) -> Optional[pulumi.Input[int]]: - return pulumi.get(self, "variant") + @pulumi.getter(name="variantId") + def variant_id(self) -> Optional[pulumi.Input[int]]: + return pulumi.get(self, "variant_id") - @variant.setter - def variant(self, value: Optional[pulumi.Input[int]]): - pulumi.set(self, "variant", value) + @variant_id.setter + def variant_id(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "variant_id", value) @pulumi.input_type diff --git a/sdk/python/pulumi_commercetools/associate_role.py b/sdk/python/pulumi_commercetools/associate_role.py new file mode 100644 index 0000000..19142ac --- /dev/null +++ b/sdk/python/pulumi_commercetools/associate_role.py @@ -0,0 +1,321 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities + +__all__ = ['AssociateRoleArgs', 'AssociateRole'] + +@pulumi.input_type +class AssociateRoleArgs: + def __init__(__self__, *, + key: pulumi.Input[str], + permissions: pulumi.Input[Sequence[pulumi.Input[str]]], + buyer_assignable: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None): + """ + The set of arguments for constructing a AssociateRole resource. + :param pulumi.Input[str] key: User-defined unique identifier of the AssociateRole. + :param pulumi.Input[Sequence[pulumi.Input[str]]] permissions: List of Permissions for the AssociateRole. + :param pulumi.Input[bool] buyer_assignable: Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + using the general endpoint. + :param pulumi.Input[str] name: Name of the AssociateRole. + """ + pulumi.set(__self__, "key", key) + pulumi.set(__self__, "permissions", permissions) + if buyer_assignable is not None: + pulumi.set(__self__, "buyer_assignable", buyer_assignable) + if name is not None: + pulumi.set(__self__, "name", name) + + @property + @pulumi.getter + def key(self) -> pulumi.Input[str]: + """ + User-defined unique identifier of the AssociateRole. + """ + return pulumi.get(self, "key") + + @key.setter + def key(self, value: pulumi.Input[str]): + pulumi.set(self, "key", value) + + @property + @pulumi.getter + def permissions(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: + """ + List of Permissions for the AssociateRole. + """ + return pulumi.get(self, "permissions") + + @permissions.setter + def permissions(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): + pulumi.set(self, "permissions", value) + + @property + @pulumi.getter(name="buyerAssignable") + def buyer_assignable(self) -> Optional[pulumi.Input[bool]]: + """ + Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + using the general endpoint. + """ + return pulumi.get(self, "buyer_assignable") + + @buyer_assignable.setter + def buyer_assignable(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "buyer_assignable", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + Name of the AssociateRole. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + +@pulumi.input_type +class _AssociateRoleState: + def __init__(__self__, *, + buyer_assignable: Optional[pulumi.Input[bool]] = None, + key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[int]] = None): + """ + Input properties used for looking up and filtering AssociateRole resources. + :param pulumi.Input[bool] buyer_assignable: Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + using the general endpoint. + :param pulumi.Input[str] key: User-defined unique identifier of the AssociateRole. + :param pulumi.Input[str] name: Name of the AssociateRole. + :param pulumi.Input[Sequence[pulumi.Input[str]]] permissions: List of Permissions for the AssociateRole. + :param pulumi.Input[int] version: Current version of the AssociateRole. + """ + if buyer_assignable is not None: + pulumi.set(__self__, "buyer_assignable", buyer_assignable) + if key is not None: + pulumi.set(__self__, "key", key) + if name is not None: + pulumi.set(__self__, "name", name) + if permissions is not None: + pulumi.set(__self__, "permissions", permissions) + if version is not None: + pulumi.set(__self__, "version", version) + + @property + @pulumi.getter(name="buyerAssignable") + def buyer_assignable(self) -> Optional[pulumi.Input[bool]]: + """ + Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + using the general endpoint. + """ + return pulumi.get(self, "buyer_assignable") + + @buyer_assignable.setter + def buyer_assignable(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "buyer_assignable", value) + + @property + @pulumi.getter + def key(self) -> Optional[pulumi.Input[str]]: + """ + User-defined unique identifier of the AssociateRole. + """ + return pulumi.get(self, "key") + + @key.setter + def key(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "key", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + Name of the AssociateRole. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter + def permissions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + List of Permissions for the AssociateRole. + """ + return pulumi.get(self, "permissions") + + @permissions.setter + def permissions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "permissions", value) + + @property + @pulumi.getter + def version(self) -> Optional[pulumi.Input[int]]: + """ + Current version of the AssociateRole. + """ + return pulumi.get(self, "version") + + @version.setter + def version(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "version", value) + + +class AssociateRole(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + buyer_assignable: Optional[pulumi.Input[bool]] = None, + key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + __props__=None): + """ + Create a AssociateRole resource with the given unique name, props, and options. + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[bool] buyer_assignable: Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + using the general endpoint. + :param pulumi.Input[str] key: User-defined unique identifier of the AssociateRole. + :param pulumi.Input[str] name: Name of the AssociateRole. + :param pulumi.Input[Sequence[pulumi.Input[str]]] permissions: List of Permissions for the AssociateRole. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: AssociateRoleArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + Create a AssociateRole resource with the given unique name, props, and options. + :param str resource_name: The name of the resource. + :param AssociateRoleArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(AssociateRoleArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + buyer_assignable: Optional[pulumi.Input[bool]] = None, + key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = AssociateRoleArgs.__new__(AssociateRoleArgs) + + __props__.__dict__["buyer_assignable"] = buyer_assignable + if key is None and not opts.urn: + raise TypeError("Missing required property 'key'") + __props__.__dict__["key"] = key + __props__.__dict__["name"] = name + if permissions is None and not opts.urn: + raise TypeError("Missing required property 'permissions'") + __props__.__dict__["permissions"] = permissions + __props__.__dict__["version"] = None + super(AssociateRole, __self__).__init__( + 'commercetools:index/associateRole:AssociateRole', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + buyer_assignable: Optional[pulumi.Input[bool]] = None, + key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[int]] = None) -> 'AssociateRole': + """ + Get an existing AssociateRole resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[bool] buyer_assignable: Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + using the general endpoint. + :param pulumi.Input[str] key: User-defined unique identifier of the AssociateRole. + :param pulumi.Input[str] name: Name of the AssociateRole. + :param pulumi.Input[Sequence[pulumi.Input[str]]] permissions: List of Permissions for the AssociateRole. + :param pulumi.Input[int] version: Current version of the AssociateRole. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _AssociateRoleState.__new__(_AssociateRoleState) + + __props__.__dict__["buyer_assignable"] = buyer_assignable + __props__.__dict__["key"] = key + __props__.__dict__["name"] = name + __props__.__dict__["permissions"] = permissions + __props__.__dict__["version"] = version + return AssociateRole(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="buyerAssignable") + def buyer_assignable(self) -> pulumi.Output[Optional[bool]]: + """ + Whether the AssociateRole can be assigned to an Associate by a buyer. If false, the AssociateRole can only be assigned + using the general endpoint. + """ + return pulumi.get(self, "buyer_assignable") + + @property + @pulumi.getter + def key(self) -> pulumi.Output[str]: + """ + User-defined unique identifier of the AssociateRole. + """ + return pulumi.get(self, "key") + + @property + @pulumi.getter + def name(self) -> pulumi.Output[str]: + """ + Name of the AssociateRole. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter + def permissions(self) -> pulumi.Output[Sequence[str]]: + """ + List of Permissions for the AssociateRole. + """ + return pulumi.get(self, "permissions") + + @property + @pulumi.getter + def version(self) -> pulumi.Output[int]: + """ + Current version of the AssociateRole. + """ + return pulumi.get(self, "version") + diff --git a/sdk/python/pulumi_commercetools/attribute_group.py b/sdk/python/pulumi_commercetools/attribute_group.py new file mode 100644 index 0000000..4508840 --- /dev/null +++ b/sdk/python/pulumi_commercetools/attribute_group.py @@ -0,0 +1,314 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities +from . import outputs +from ._inputs import * + +__all__ = ['AttributeGroupArgs', 'AttributeGroup'] + +@pulumi.input_type +class AttributeGroupArgs: + def __init__(__self__, *, + attributes: Optional[pulumi.Input[Sequence[pulumi.Input['AttributeGroupAttributeArgs']]]] = None, + description: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None): + """ + The set of arguments for constructing a AttributeGroup resource. + :param pulumi.Input[Sequence[pulumi.Input['AttributeGroupAttributeArgs']]] attributes: Attributes with unique values. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] description: Description of the State as localized string. + :param pulumi.Input[str] key: User-defined unique identifier of the AttributeGroup. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] name: Name of the State as localized string. + """ + if attributes is not None: + pulumi.set(__self__, "attributes", attributes) + if description is not None: + pulumi.set(__self__, "description", description) + if key is not None: + pulumi.set(__self__, "key", key) + if name is not None: + pulumi.set(__self__, "name", name) + + @property + @pulumi.getter + def attributes(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AttributeGroupAttributeArgs']]]]: + """ + Attributes with unique values. + """ + return pulumi.get(self, "attributes") + + @attributes.setter + def attributes(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['AttributeGroupAttributeArgs']]]]): + pulumi.set(self, "attributes", value) + + @property + @pulumi.getter + def description(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + Description of the State as localized string. + """ + return pulumi.get(self, "description") + + @description.setter + def description(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "description", value) + + @property + @pulumi.getter + def key(self) -> Optional[pulumi.Input[str]]: + """ + User-defined unique identifier of the AttributeGroup. + """ + return pulumi.get(self, "key") + + @key.setter + def key(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "key", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + Name of the State as localized string. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "name", value) + + +@pulumi.input_type +class _AttributeGroupState: + def __init__(__self__, *, + attributes: Optional[pulumi.Input[Sequence[pulumi.Input['AttributeGroupAttributeArgs']]]] = None, + description: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[int]] = None): + """ + Input properties used for looking up and filtering AttributeGroup resources. + :param pulumi.Input[Sequence[pulumi.Input['AttributeGroupAttributeArgs']]] attributes: Attributes with unique values. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] description: Description of the State as localized string. + :param pulumi.Input[str] key: User-defined unique identifier of the AttributeGroup. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] name: Name of the State as localized string. + :param pulumi.Input[int] version: Current version of the AttributeGroup. + """ + if attributes is not None: + pulumi.set(__self__, "attributes", attributes) + if description is not None: + pulumi.set(__self__, "description", description) + if key is not None: + pulumi.set(__self__, "key", key) + if name is not None: + pulumi.set(__self__, "name", name) + if version is not None: + pulumi.set(__self__, "version", version) + + @property + @pulumi.getter + def attributes(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AttributeGroupAttributeArgs']]]]: + """ + Attributes with unique values. + """ + return pulumi.get(self, "attributes") + + @attributes.setter + def attributes(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['AttributeGroupAttributeArgs']]]]): + pulumi.set(self, "attributes", value) + + @property + @pulumi.getter + def description(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + Description of the State as localized string. + """ + return pulumi.get(self, "description") + + @description.setter + def description(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "description", value) + + @property + @pulumi.getter + def key(self) -> Optional[pulumi.Input[str]]: + """ + User-defined unique identifier of the AttributeGroup. + """ + return pulumi.get(self, "key") + + @key.setter + def key(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "key", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + Name of the State as localized string. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter + def version(self) -> Optional[pulumi.Input[int]]: + """ + Current version of the AttributeGroup. + """ + return pulumi.get(self, "version") + + @version.setter + def version(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "version", value) + + +class AttributeGroup(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + attributes: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AttributeGroupAttributeArgs']]]]] = None, + description: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + __props__=None): + """ + Create a AttributeGroup resource with the given unique name, props, and options. + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AttributeGroupAttributeArgs']]]] attributes: Attributes with unique values. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] description: Description of the State as localized string. + :param pulumi.Input[str] key: User-defined unique identifier of the AttributeGroup. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] name: Name of the State as localized string. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: Optional[AttributeGroupArgs] = None, + opts: Optional[pulumi.ResourceOptions] = None): + """ + Create a AttributeGroup resource with the given unique name, props, and options. + :param str resource_name: The name of the resource. + :param AttributeGroupArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(AttributeGroupArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + attributes: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AttributeGroupAttributeArgs']]]]] = None, + description: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = AttributeGroupArgs.__new__(AttributeGroupArgs) + + __props__.__dict__["attributes"] = attributes + __props__.__dict__["description"] = description + __props__.__dict__["key"] = key + __props__.__dict__["name"] = name + __props__.__dict__["version"] = None + super(AttributeGroup, __self__).__init__( + 'commercetools:index/attributeGroup:AttributeGroup', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + attributes: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AttributeGroupAttributeArgs']]]]] = None, + description: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + version: Optional[pulumi.Input[int]] = None) -> 'AttributeGroup': + """ + Get an existing AttributeGroup resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AttributeGroupAttributeArgs']]]] attributes: Attributes with unique values. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] description: Description of the State as localized string. + :param pulumi.Input[str] key: User-defined unique identifier of the AttributeGroup. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] name: Name of the State as localized string. + :param pulumi.Input[int] version: Current version of the AttributeGroup. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _AttributeGroupState.__new__(_AttributeGroupState) + + __props__.__dict__["attributes"] = attributes + __props__.__dict__["description"] = description + __props__.__dict__["key"] = key + __props__.__dict__["name"] = name + __props__.__dict__["version"] = version + return AttributeGroup(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter + def attributes(self) -> pulumi.Output[Optional[Sequence['outputs.AttributeGroupAttribute']]]: + """ + Attributes with unique values. + """ + return pulumi.get(self, "attributes") + + @property + @pulumi.getter + def description(self) -> pulumi.Output[Optional[Mapping[str, str]]]: + """ + Description of the State as localized string. + """ + return pulumi.get(self, "description") + + @property + @pulumi.getter + def key(self) -> pulumi.Output[Optional[str]]: + """ + User-defined unique identifier of the AttributeGroup. + """ + return pulumi.get(self, "key") + + @property + @pulumi.getter + def name(self) -> pulumi.Output[Mapping[str, str]]: + """ + Name of the State as localized string. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter + def version(self) -> pulumi.Output[int]: + """ + Current version of the AttributeGroup. + """ + return pulumi.get(self, "version") + diff --git a/sdk/python/pulumi_commercetools/cart_discount.py b/sdk/python/pulumi_commercetools/cart_discount.py index 7dc1a36..5387830 100644 --- a/sdk/python/pulumi_commercetools/cart_discount.py +++ b/sdk/python/pulumi_commercetools/cart_discount.py @@ -19,6 +19,7 @@ def __init__(__self__, *, predicate: pulumi.Input[str], sort_order: pulumi.Input[str], value: pulumi.Input['CartDiscountValueArgs'], + custom: Optional[pulumi.Input['CartDiscountCustomArgs']] = None, description: Optional[pulumi.Input[Mapping[str, Any]]] = None, is_active: Optional[pulumi.Input[bool]] = None, key: Optional[pulumi.Input[str]] = None, @@ -49,6 +50,8 @@ def __init__(__self__, *, pulumi.set(__self__, "predicate", predicate) pulumi.set(__self__, "sort_order", sort_order) pulumi.set(__self__, "value", value) + if custom is not None: + pulumi.set(__self__, "custom", custom) if description is not None: pulumi.set(__self__, "description", description) if is_active is not None: @@ -107,6 +110,15 @@ def value(self) -> pulumi.Input['CartDiscountValueArgs']: def value(self, value: pulumi.Input['CartDiscountValueArgs']): pulumi.set(self, "value", value) + @property + @pulumi.getter + def custom(self) -> Optional[pulumi.Input['CartDiscountCustomArgs']]: + return pulumi.get(self, "custom") + + @custom.setter + def custom(self, value: Optional[pulumi.Input['CartDiscountCustomArgs']]): + pulumi.set(self, "custom", value) + @property @pulumi.getter def description(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: @@ -215,6 +227,7 @@ def valid_until(self, value: Optional[pulumi.Input[str]]): @pulumi.input_type class _CartDiscountState: def __init__(__self__, *, + custom: Optional[pulumi.Input['CartDiscountCustomArgs']] = None, description: Optional[pulumi.Input[Mapping[str, Any]]] = None, is_active: Optional[pulumi.Input[bool]] = None, key: Optional[pulumi.Input[str]] = None, @@ -246,6 +259,8 @@ def __init__(__self__, *, :param pulumi.Input['CartDiscountValueArgs'] value: Defines the effect the discount will have. [CartDiscountValue](https://docs.commercetools.com/api/projects/cartDiscounts#cartdiscountvalue) """ + if custom is not None: + pulumi.set(__self__, "custom", custom) if description is not None: pulumi.set(__self__, "description", description) if is_active is not None: @@ -273,6 +288,15 @@ def __init__(__self__, *, if version is not None: pulumi.set(__self__, "version", version) + @property + @pulumi.getter + def custom(self) -> Optional[pulumi.Input['CartDiscountCustomArgs']]: + return pulumi.get(self, "custom") + + @custom.setter + def custom(self, value: Optional[pulumi.Input['CartDiscountCustomArgs']]): + pulumi.set(self, "custom", value) + @property @pulumi.getter def description(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: @@ -431,6 +455,7 @@ class CartDiscount(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + custom: Optional[pulumi.Input[pulumi.InputType['CartDiscountCustomArgs']]] = None, description: Optional[pulumi.Input[Mapping[str, Any]]] = None, is_active: Optional[pulumi.Input[bool]] = None, key: Optional[pulumi.Input[str]] = None, @@ -487,6 +512,7 @@ def __init__(__self__, resource_name: str, *args, **kwargs): def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + custom: Optional[pulumi.Input[pulumi.InputType['CartDiscountCustomArgs']]] = None, description: Optional[pulumi.Input[Mapping[str, Any]]] = None, is_active: Optional[pulumi.Input[bool]] = None, key: Optional[pulumi.Input[str]] = None, @@ -508,6 +534,7 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = CartDiscountArgs.__new__(CartDiscountArgs) + __props__.__dict__["custom"] = custom __props__.__dict__["description"] = description __props__.__dict__["is_active"] = is_active __props__.__dict__["key"] = key @@ -537,6 +564,7 @@ def _internal_init(__self__, def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, + custom: Optional[pulumi.Input[pulumi.InputType['CartDiscountCustomArgs']]] = None, description: Optional[pulumi.Input[Mapping[str, Any]]] = None, is_active: Optional[pulumi.Input[bool]] = None, key: Optional[pulumi.Input[str]] = None, @@ -577,6 +605,7 @@ def get(resource_name: str, __props__ = _CartDiscountState.__new__(_CartDiscountState) + __props__.__dict__["custom"] = custom __props__.__dict__["description"] = description __props__.__dict__["is_active"] = is_active __props__.__dict__["key"] = key @@ -592,6 +621,11 @@ def get(resource_name: str, __props__.__dict__["version"] = version return CartDiscount(resource_name, opts=opts, __props__=__props__) + @property + @pulumi.getter + def custom(self) -> pulumi.Output[Optional['outputs.CartDiscountCustom']]: + return pulumi.get(self, "custom") + @property @pulumi.getter def description(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: diff --git a/sdk/python/pulumi_commercetools/get_state.py b/sdk/python/pulumi_commercetools/get_state.py new file mode 100644 index 0000000..0f589cb --- /dev/null +++ b/sdk/python/pulumi_commercetools/get_state.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities + +__all__ = [ + 'GetStateResult', + 'AwaitableGetStateResult', + 'get_state', + 'get_state_output', +] + +@pulumi.output_type +class GetStateResult: + """ + A collection of values returned by getState. + """ + def __init__(__self__, id=None, key=None): + if id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + if key and not isinstance(key, str): + raise TypeError("Expected argument 'key' to be a str") + pulumi.set(__self__, "key", key) + + @property + @pulumi.getter + def id(self) -> str: + return pulumi.get(self, "id") + + @property + @pulumi.getter + def key(self) -> str: + return pulumi.get(self, "key") + + +class AwaitableGetStateResult(GetStateResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetStateResult( + id=self.id, + key=self.key) + + +def get_state(key: Optional[str] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetStateResult: + """ + Use this data source to access information about an existing resource. + """ + __args__ = dict() + __args__['key'] = key + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('commercetools:index/getState:getState', __args__, opts=opts, typ=GetStateResult).value + + return AwaitableGetStateResult( + id=pulumi.get(__ret__, 'id'), + key=pulumi.get(__ret__, 'key')) + + +@_utilities.lift_output_func(get_state) +def get_state_output(key: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetStateResult]: + """ + Use this data source to access information about an existing resource. + """ + ... diff --git a/sdk/python/pulumi_commercetools/outputs.py b/sdk/python/pulumi_commercetools/outputs.py index f1ddd13..ba0d79e 100644 --- a/sdk/python/pulumi_commercetools/outputs.py +++ b/sdk/python/pulumi_commercetools/outputs.py @@ -13,6 +13,8 @@ __all__ = [ 'ApiExtensionDestination', 'ApiExtensionTrigger', + 'AttributeGroupAttribute', + 'CartDiscountCustom', 'CartDiscountTarget', 'CartDiscountValue', 'CartDiscountValueMoney', @@ -187,25 +189,129 @@ def condition(self) -> Optional[str]: return pulumi.get(self, "condition") +@pulumi.output_type +class AttributeGroupAttribute(dict): + def __init__(__self__, *, + key: str): + pulumi.set(__self__, "key", key) + + @property + @pulumi.getter + def key(self) -> str: + return pulumi.get(self, "key") + + +@pulumi.output_type +class CartDiscountCustom(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "typeId": + suggest = "type_id" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in CartDiscountCustom. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + CartDiscountCustom.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + CartDiscountCustom.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + type_id: str, + fields: Optional[Mapping[str, Any]] = None): + pulumi.set(__self__, "type_id", type_id) + if fields is not None: + pulumi.set(__self__, "fields", fields) + + @property + @pulumi.getter(name="typeId") + def type_id(self) -> str: + return pulumi.get(self, "type_id") + + @property + @pulumi.getter + def fields(self) -> Optional[Mapping[str, Any]]: + return pulumi.get(self, "fields") + + @pulumi.output_type class CartDiscountTarget(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "discountedQuantity": + suggest = "discounted_quantity" + elif key == "maxOccurrence": + suggest = "max_occurrence" + elif key == "selectionMode": + suggest = "selection_mode" + elif key == "triggerQuantity": + suggest = "trigger_quantity" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in CartDiscountTarget. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + CartDiscountTarget.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + CartDiscountTarget.__key_warning(key) + return super().get(key, default) + def __init__(__self__, *, type: str, - predicate: Optional[str] = None): + discounted_quantity: Optional[int] = None, + max_occurrence: Optional[int] = None, + predicate: Optional[str] = None, + selection_mode: Optional[str] = None, + trigger_quantity: Optional[int] = None): pulumi.set(__self__, "type", type) + if discounted_quantity is not None: + pulumi.set(__self__, "discounted_quantity", discounted_quantity) + if max_occurrence is not None: + pulumi.set(__self__, "max_occurrence", max_occurrence) if predicate is not None: pulumi.set(__self__, "predicate", predicate) + if selection_mode is not None: + pulumi.set(__self__, "selection_mode", selection_mode) + if trigger_quantity is not None: + pulumi.set(__self__, "trigger_quantity", trigger_quantity) @property @pulumi.getter def type(self) -> str: return pulumi.get(self, "type") + @property + @pulumi.getter(name="discountedQuantity") + def discounted_quantity(self) -> Optional[int]: + return pulumi.get(self, "discounted_quantity") + + @property + @pulumi.getter(name="maxOccurrence") + def max_occurrence(self) -> Optional[int]: + return pulumi.get(self, "max_occurrence") + @property @pulumi.getter def predicate(self) -> Optional[str]: return pulumi.get(self, "predicate") + @property + @pulumi.getter(name="selectionMode") + def selection_mode(self) -> Optional[str]: + return pulumi.get(self, "selection_mode") + + @property + @pulumi.getter(name="triggerQuantity") + def trigger_quantity(self) -> Optional[int]: + return pulumi.get(self, "trigger_quantity") + @pulumi.output_type class CartDiscountValue(dict): @@ -218,6 +324,8 @@ def __key_warning(key: str): suggest = "product_id" elif key == "supplyChannelId": suggest = "supply_channel_id" + elif key == "variantId": + suggest = "variant_id" if suggest: pulumi.log.warn(f"Key '{key}' not found in CartDiscountValue. Access the value via the '{suggest}' property getter instead.") @@ -237,7 +345,7 @@ def __init__(__self__, *, permyriad: Optional[int] = None, product_id: Optional[str] = None, supply_channel_id: Optional[str] = None, - variant: Optional[int] = None): + variant_id: Optional[int] = None): pulumi.set(__self__, "type", type) if distribution_channel_id is not None: pulumi.set(__self__, "distribution_channel_id", distribution_channel_id) @@ -249,8 +357,8 @@ def __init__(__self__, *, pulumi.set(__self__, "product_id", product_id) if supply_channel_id is not None: pulumi.set(__self__, "supply_channel_id", supply_channel_id) - if variant is not None: - pulumi.set(__self__, "variant", variant) + if variant_id is not None: + pulumi.set(__self__, "variant_id", variant_id) @property @pulumi.getter @@ -283,9 +391,9 @@ def supply_channel_id(self) -> Optional[str]: return pulumi.get(self, "supply_channel_id") @property - @pulumi.getter - def variant(self) -> Optional[int]: - return pulumi.get(self, "variant") + @pulumi.getter(name="variantId") + def variant_id(self) -> Optional[int]: + return pulumi.get(self, "variant_id") @pulumi.output_type diff --git a/sdk/python/pulumi_commercetools/shipping_method.py b/sdk/python/pulumi_commercetools/shipping_method.py index d1b8858..17fad82 100644 --- a/sdk/python/pulumi_commercetools/shipping_method.py +++ b/sdk/python/pulumi_commercetools/shipping_method.py @@ -22,14 +22,16 @@ def __init__(__self__, *, is_default: Optional[pulumi.Input[bool]] = None, key: Optional[pulumi.Input[str]] = None, localized_description: Optional[pulumi.Input[Mapping[str, Any]]] = None, + localized_name: Optional[pulumi.Input[Mapping[str, Any]]] = None, name: Optional[pulumi.Input[str]] = None, predicate: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a ShippingMethod resource. - :param pulumi.Input[str] tax_category_id: ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + :param pulumi.Input[str] tax_category_id: ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) :param pulumi.Input[bool] is_default: One shipping method in a project can be default :param pulumi.Input[str] key: User-specific unique identifier for the shipping method - :param pulumi.Input[Mapping[str, Any]] localized_description: [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + :param pulumi.Input[Mapping[str, Any]] localized_description: [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + :param pulumi.Input[Mapping[str, Any]] localized_name: [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) :param pulumi.Input[str] predicate: A Cart predicate which can be used to more precisely select a shipping method for a cart """ pulumi.set(__self__, "tax_category_id", tax_category_id) @@ -43,6 +45,8 @@ def __init__(__self__, *, pulumi.set(__self__, "key", key) if localized_description is not None: pulumi.set(__self__, "localized_description", localized_description) + if localized_name is not None: + pulumi.set(__self__, "localized_name", localized_name) if name is not None: pulumi.set(__self__, "name", name) if predicate is not None: @@ -52,7 +56,7 @@ def __init__(__self__, *, @pulumi.getter(name="taxCategoryId") def tax_category_id(self) -> pulumi.Input[str]: """ - ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) """ return pulumi.get(self, "tax_category_id") @@ -106,7 +110,7 @@ def key(self, value: Optional[pulumi.Input[str]]): @pulumi.getter(name="localizedDescription") def localized_description(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: """ - [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) """ return pulumi.get(self, "localized_description") @@ -114,6 +118,18 @@ def localized_description(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: def localized_description(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): pulumi.set(self, "localized_description", value) + @property + @pulumi.getter(name="localizedName") + def localized_name(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + """ + [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + """ + return pulumi.get(self, "localized_name") + + @localized_name.setter + def localized_name(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + pulumi.set(self, "localized_name", value) + @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: @@ -144,6 +160,7 @@ def __init__(__self__, *, is_default: Optional[pulumi.Input[bool]] = None, key: Optional[pulumi.Input[str]] = None, localized_description: Optional[pulumi.Input[Mapping[str, Any]]] = None, + localized_name: Optional[pulumi.Input[Mapping[str, Any]]] = None, name: Optional[pulumi.Input[str]] = None, predicate: Optional[pulumi.Input[str]] = None, tax_category_id: Optional[pulumi.Input[str]] = None, @@ -152,9 +169,10 @@ def __init__(__self__, *, Input properties used for looking up and filtering ShippingMethod resources. :param pulumi.Input[bool] is_default: One shipping method in a project can be default :param pulumi.Input[str] key: User-specific unique identifier for the shipping method - :param pulumi.Input[Mapping[str, Any]] localized_description: [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + :param pulumi.Input[Mapping[str, Any]] localized_description: [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + :param pulumi.Input[Mapping[str, Any]] localized_name: [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) :param pulumi.Input[str] predicate: A Cart predicate which can be used to more precisely select a shipping method for a cart - :param pulumi.Input[str] tax_category_id: ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + :param pulumi.Input[str] tax_category_id: ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) """ if custom is not None: pulumi.set(__self__, "custom", custom) @@ -166,6 +184,8 @@ def __init__(__self__, *, pulumi.set(__self__, "key", key) if localized_description is not None: pulumi.set(__self__, "localized_description", localized_description) + if localized_name is not None: + pulumi.set(__self__, "localized_name", localized_name) if name is not None: pulumi.set(__self__, "name", name) if predicate is not None: @@ -221,7 +241,7 @@ def key(self, value: Optional[pulumi.Input[str]]): @pulumi.getter(name="localizedDescription") def localized_description(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: """ - [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) """ return pulumi.get(self, "localized_description") @@ -229,6 +249,18 @@ def localized_description(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: def localized_description(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): pulumi.set(self, "localized_description", value) + @property + @pulumi.getter(name="localizedName") + def localized_name(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + """ + [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + """ + return pulumi.get(self, "localized_name") + + @localized_name.setter + def localized_name(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + pulumi.set(self, "localized_name", value) + @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: @@ -254,7 +286,7 @@ def predicate(self, value: Optional[pulumi.Input[str]]): @pulumi.getter(name="taxCategoryId") def tax_category_id(self) -> Optional[pulumi.Input[str]]: """ - ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) """ return pulumi.get(self, "tax_category_id") @@ -282,6 +314,7 @@ def __init__(__self__, is_default: Optional[pulumi.Input[bool]] = None, key: Optional[pulumi.Input[str]] = None, localized_description: Optional[pulumi.Input[Mapping[str, Any]]] = None, + localized_name: Optional[pulumi.Input[Mapping[str, Any]]] = None, name: Optional[pulumi.Input[str]] = None, predicate: Optional[pulumi.Input[str]] = None, tax_category_id: Optional[pulumi.Input[str]] = None, @@ -292,9 +325,10 @@ def __init__(__self__, :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[bool] is_default: One shipping method in a project can be default :param pulumi.Input[str] key: User-specific unique identifier for the shipping method - :param pulumi.Input[Mapping[str, Any]] localized_description: [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + :param pulumi.Input[Mapping[str, Any]] localized_description: [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + :param pulumi.Input[Mapping[str, Any]] localized_name: [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) :param pulumi.Input[str] predicate: A Cart predicate which can be used to more precisely select a shipping method for a cart - :param pulumi.Input[str] tax_category_id: ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + :param pulumi.Input[str] tax_category_id: ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) """ ... @overload @@ -324,6 +358,7 @@ def _internal_init(__self__, is_default: Optional[pulumi.Input[bool]] = None, key: Optional[pulumi.Input[str]] = None, localized_description: Optional[pulumi.Input[Mapping[str, Any]]] = None, + localized_name: Optional[pulumi.Input[Mapping[str, Any]]] = None, name: Optional[pulumi.Input[str]] = None, predicate: Optional[pulumi.Input[str]] = None, tax_category_id: Optional[pulumi.Input[str]] = None, @@ -341,6 +376,7 @@ def _internal_init(__self__, __props__.__dict__["is_default"] = is_default __props__.__dict__["key"] = key __props__.__dict__["localized_description"] = localized_description + __props__.__dict__["localized_name"] = localized_name __props__.__dict__["name"] = name __props__.__dict__["predicate"] = predicate if tax_category_id is None and not opts.urn: @@ -362,6 +398,7 @@ def get(resource_name: str, is_default: Optional[pulumi.Input[bool]] = None, key: Optional[pulumi.Input[str]] = None, localized_description: Optional[pulumi.Input[Mapping[str, Any]]] = None, + localized_name: Optional[pulumi.Input[Mapping[str, Any]]] = None, name: Optional[pulumi.Input[str]] = None, predicate: Optional[pulumi.Input[str]] = None, tax_category_id: Optional[pulumi.Input[str]] = None, @@ -375,9 +412,10 @@ def get(resource_name: str, :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[bool] is_default: One shipping method in a project can be default :param pulumi.Input[str] key: User-specific unique identifier for the shipping method - :param pulumi.Input[Mapping[str, Any]] localized_description: [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + :param pulumi.Input[Mapping[str, Any]] localized_description: [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + :param pulumi.Input[Mapping[str, Any]] localized_name: [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) :param pulumi.Input[str] predicate: A Cart predicate which can be used to more precisely select a shipping method for a cart - :param pulumi.Input[str] tax_category_id: ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + :param pulumi.Input[str] tax_category_id: ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) @@ -388,6 +426,7 @@ def get(resource_name: str, __props__.__dict__["is_default"] = is_default __props__.__dict__["key"] = key __props__.__dict__["localized_description"] = localized_description + __props__.__dict__["localized_name"] = localized_name __props__.__dict__["name"] = name __props__.__dict__["predicate"] = predicate __props__.__dict__["tax_category_id"] = tax_category_id @@ -424,10 +463,18 @@ def key(self) -> pulumi.Output[Optional[str]]: @pulumi.getter(name="localizedDescription") def localized_description(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: """ - [LocalizedString](https://docs.commercetoolstools.com/api/types#localizedstring) + [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) """ return pulumi.get(self, "localized_description") + @property + @pulumi.getter(name="localizedName") + def localized_name(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: + """ + [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) + """ + return pulumi.get(self, "localized_name") + @property @pulumi.getter def name(self) -> pulumi.Output[str]: @@ -445,7 +492,7 @@ def predicate(self) -> pulumi.Output[Optional[str]]: @pulumi.getter(name="taxCategoryId") def tax_category_id(self) -> pulumi.Output[str]: """ - ID of a [Tax Category](https://docs.commercetoolstools.com/api/projects/taxCategories#taxcategory) + ID of a [Tax Category](https://docs.commercetools.com/api/projects/taxCategories#taxcategory) """ return pulumi.get(self, "tax_category_id") diff --git a/sdk/python/pulumi_commercetools/store.py b/sdk/python/pulumi_commercetools/store.py index 5cdf065..95a9813 100644 --- a/sdk/python/pulumi_commercetools/store.py +++ b/sdk/python/pulumi_commercetools/store.py @@ -17,6 +17,7 @@ class StoreArgs: def __init__(__self__, *, key: pulumi.Input[str], + countries: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, custom: Optional[pulumi.Input['StoreCustomArgs']] = None, distribution_channels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, languages: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, @@ -25,12 +26,15 @@ def __init__(__self__, *, """ The set of arguments for constructing a Store resource. :param pulumi.Input[str] key: User-specific unique identifier for the store. The key is mandatory and immutable. It is used to reference the store + :param pulumi.Input[Sequence[pulumi.Input[str]]] countries: A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) :param pulumi.Input[Sequence[pulumi.Input[str]]] distribution_channels: Set of ResourceIdentifier to a Channel with ProductDistribution :param pulumi.Input[Sequence[pulumi.Input[str]]] languages: [IETF Language Tag](https://en.wikipedia.org/wiki/IETF_language_tag) :param pulumi.Input[Mapping[str, Any]] name: [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) :param pulumi.Input[Sequence[pulumi.Input[str]]] supply_channels: Set of ResourceIdentifier of Channels with InventorySupply """ pulumi.set(__self__, "key", key) + if countries is not None: + pulumi.set(__self__, "countries", countries) if custom is not None: pulumi.set(__self__, "custom", custom) if distribution_channels is not None: @@ -54,6 +58,18 @@ def key(self) -> pulumi.Input[str]: def key(self, value: pulumi.Input[str]): pulumi.set(self, "key", value) + @property + @pulumi.getter + def countries(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + """ + return pulumi.get(self, "countries") + + @countries.setter + def countries(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "countries", value) + @property @pulumi.getter def custom(self) -> Optional[pulumi.Input['StoreCustomArgs']]: @@ -115,6 +131,7 @@ def supply_channels(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str @pulumi.input_type class _StoreState: def __init__(__self__, *, + countries: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, custom: Optional[pulumi.Input['StoreCustomArgs']] = None, distribution_channels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, key: Optional[pulumi.Input[str]] = None, @@ -124,12 +141,15 @@ def __init__(__self__, *, version: Optional[pulumi.Input[int]] = None): """ Input properties used for looking up and filtering Store resources. + :param pulumi.Input[Sequence[pulumi.Input[str]]] countries: A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) :param pulumi.Input[Sequence[pulumi.Input[str]]] distribution_channels: Set of ResourceIdentifier to a Channel with ProductDistribution :param pulumi.Input[str] key: User-specific unique identifier for the store. The key is mandatory and immutable. It is used to reference the store :param pulumi.Input[Sequence[pulumi.Input[str]]] languages: [IETF Language Tag](https://en.wikipedia.org/wiki/IETF_language_tag) :param pulumi.Input[Mapping[str, Any]] name: [LocalizedString](https://docs.commercetools.com/api/types#localizedstring) :param pulumi.Input[Sequence[pulumi.Input[str]]] supply_channels: Set of ResourceIdentifier of Channels with InventorySupply """ + if countries is not None: + pulumi.set(__self__, "countries", countries) if custom is not None: pulumi.set(__self__, "custom", custom) if distribution_channels is not None: @@ -145,6 +165,18 @@ def __init__(__self__, *, if version is not None: pulumi.set(__self__, "version", version) + @property + @pulumi.getter + def countries(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + """ + return pulumi.get(self, "countries") + + @countries.setter + def countries(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "countries", value) + @property @pulumi.getter def custom(self) -> Optional[pulumi.Input['StoreCustomArgs']]: @@ -229,6 +261,7 @@ class Store(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + countries: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, custom: Optional[pulumi.Input[pulumi.InputType['StoreCustomArgs']]] = None, distribution_channels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, key: Optional[pulumi.Input[str]] = None, @@ -240,6 +273,7 @@ def __init__(__self__, Create a Store resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[str]]] countries: A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) :param pulumi.Input[Sequence[pulumi.Input[str]]] distribution_channels: Set of ResourceIdentifier to a Channel with ProductDistribution :param pulumi.Input[str] key: User-specific unique identifier for the store. The key is mandatory and immutable. It is used to reference the store :param pulumi.Input[Sequence[pulumi.Input[str]]] languages: [IETF Language Tag](https://en.wikipedia.org/wiki/IETF_language_tag) @@ -269,6 +303,7 @@ def __init__(__self__, resource_name: str, *args, **kwargs): def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + countries: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, custom: Optional[pulumi.Input[pulumi.InputType['StoreCustomArgs']]] = None, distribution_channels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, key: Optional[pulumi.Input[str]] = None, @@ -284,6 +319,7 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = StoreArgs.__new__(StoreArgs) + __props__.__dict__["countries"] = countries __props__.__dict__["custom"] = custom __props__.__dict__["distribution_channels"] = distribution_channels if key is None and not opts.urn: @@ -303,6 +339,7 @@ def _internal_init(__self__, def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, + countries: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, custom: Optional[pulumi.Input[pulumi.InputType['StoreCustomArgs']]] = None, distribution_channels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, key: Optional[pulumi.Input[str]] = None, @@ -317,6 +354,7 @@ def get(resource_name: str, :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[str]]] countries: A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) :param pulumi.Input[Sequence[pulumi.Input[str]]] distribution_channels: Set of ResourceIdentifier to a Channel with ProductDistribution :param pulumi.Input[str] key: User-specific unique identifier for the store. The key is mandatory and immutable. It is used to reference the store :param pulumi.Input[Sequence[pulumi.Input[str]]] languages: [IETF Language Tag](https://en.wikipedia.org/wiki/IETF_language_tag) @@ -327,6 +365,7 @@ def get(resource_name: str, __props__ = _StoreState.__new__(_StoreState) + __props__.__dict__["countries"] = countries __props__.__dict__["custom"] = custom __props__.__dict__["distribution_channels"] = distribution_channels __props__.__dict__["key"] = key @@ -336,6 +375,14 @@ def get(resource_name: str, __props__.__dict__["version"] = version return Store(resource_name, opts=opts, __props__=__props__) + @property + @pulumi.getter + def countries(self) -> pulumi.Output[Optional[Sequence[str]]]: + """ + A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + """ + return pulumi.get(self, "countries") + @property @pulumi.getter def custom(self) -> pulumi.Output[Optional['outputs.StoreCustom']]: diff --git a/upstream b/upstream index 8a1c885..0fd57d7 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit 8a1c885ca666743d58b8e1952bc204df58775390 +Subproject commit 0fd57d7410f5df5d725f9a715f3b52a9afb025a8 diff --git a/upstream_patches/customtypes.patch b/upstream_patches/customtypes.patch index 4aef75a..6bf8aff 100644 --- a/upstream_patches/customtypes.patch +++ b/upstream_patches/customtypes.patch @@ -1,5 +1,5 @@ diff --git a/internal/customtypes/localized_string.go b/internal/customtypes/localized_string.go -index 37dc32c..47874c4 100644 +index 37dc32c..d4b5eb0 100644 --- a/internal/customtypes/localized_string.go +++ b/internal/customtypes/localized_string.go @@ -44,3 +44,3 @@ func LocalizedString(opts LocalizedStringOpts) schema.MapAttribute { @@ -7,8 +7,26 @@ index 37dc32c..47874c4 100644 - CustomType: NewLocalizedStringType(), + ElementType: types.StringType, Validators: []validator.Map{ +diff --git a/internal/resources/attribute_group/resource.go b/internal/resources/attribute_group/resource.go +index 2002433..7f7cfc6 100644 +--- a/internal/resources/attribute_group/resource.go ++++ b/internal/resources/attribute_group/resource.go +@@ -7,3 +7,2 @@ import ( + "github.com/hashicorp/terraform-plugin-framework/schema/validator" +- "github.com/labd/terraform-provider-commercetools/internal/customtypes" + "regexp" +@@ -69,3 +68,3 @@ func (r *Resource) Schema(_ context.Context, _ resource.SchemaRequest, resp *res + "name": schema.MapAttribute{ +- CustomType: customtypes.NewLocalizedStringType(), ++ ElementType: types.StringType, + Description: "Name of the State as localized string.", +@@ -75,3 +74,3 @@ func (r *Resource) Schema(_ context.Context, _ resource.SchemaRequest, resp *res + "description": schema.MapAttribute{ +- CustomType: customtypes.NewLocalizedStringType(), ++ ElementType: types.StringType, + Description: "Description of the State as localized string.", diff --git a/internal/resources/state/resource.go b/internal/resources/state/resource.go -index a290ef0..c0a637e 100644 +index dd28402..f4dfe90 100644 --- a/internal/resources/state/resource.go +++ b/internal/resources/state/resource.go @@ -20,3 +20,2 @@ import (