All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.edgeorder.kotlin.OrderItemArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.edgeorder.kotlin

import com.pulumi.azurenative.edgeorder.OrderItemArgs.builder
import com.pulumi.azurenative.edgeorder.kotlin.inputs.AddressDetailsArgs
import com.pulumi.azurenative.edgeorder.kotlin.inputs.AddressDetailsArgsBuilder
import com.pulumi.azurenative.edgeorder.kotlin.inputs.OrderItemDetailsArgs
import com.pulumi.azurenative.edgeorder.kotlin.inputs.OrderItemDetailsArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Represents order item resource.
 * Azure REST API version: 2022-05-01-preview.
 * Other available API versions: 2024-02-01.
 * ## Example Usage
 * ### CreateOrderItem
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var orderItem = new AzureNative.EdgeOrder.OrderItem("orderItem", new()
 *     {
 *         AddressDetails = new AzureNative.EdgeOrder.Inputs.AddressDetailsArgs
 *         {
 *             ForwardAddress = new AzureNative.EdgeOrder.Inputs.AddressPropertiesArgs
 *             {
 *                 ContactDetails = new AzureNative.EdgeOrder.Inputs.ContactDetailsArgs
 *                 {
 *                     ContactName = "XXXX XXXX",
 *                     EmailList = new[]
 *                     {
 *                         "[email protected]",
 *                     },
 *                     Phone = "0000000000",
 *                     PhoneExtension = "",
 *                 },
 *                 ShippingAddress = new AzureNative.EdgeOrder.Inputs.ShippingAddressArgs
 *                 {
 *                     AddressType = AzureNative.EdgeOrder.AddressType.None,
 *                     City = "San Francisco",
 *                     CompanyName = "Microsoft",
 *                     Country = "US",
 *                     PostalCode = "94107",
 *                     StateOrProvince = "CA",
 *                     StreetAddress1 = "16 TOWNSEND ST",
 *                     StreetAddress2 = "UNIT 1",
 *                 },
 *             },
 *         },
 *         Location = "eastus",
 *         OrderId = "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.EdgeOrder/locations/eastus/orders/TestOrderName2",
 *         OrderItemDetails = new AzureNative.EdgeOrder.Inputs.OrderItemDetailsArgs
 *         {
 *             OrderItemType = AzureNative.EdgeOrder.OrderItemType.Purchase,
 *             Preferences = new AzureNative.EdgeOrder.Inputs.PreferencesArgs
 *             {
 *                 TransportPreferences = new AzureNative.EdgeOrder.Inputs.TransportPreferencesArgs
 *                 {
 *                     PreferredShipmentType = AzureNative.EdgeOrder.TransportShipmentTypes.MicrosoftManaged,
 *                 },
 *             },
 *             ProductDetails = new AzureNative.EdgeOrder.Inputs.ProductDetailsArgs
 *             {
 *                 HierarchyInformation = new AzureNative.EdgeOrder.Inputs.HierarchyInformationArgs
 *                 {
 *                     ConfigurationName = "edgep_base",
 *                     ProductFamilyName = "azurestackedge",
 *                     ProductLineName = "azurestackedge",
 *                     ProductName = "azurestackedgegpu",
 *                 },
 *             },
 *         },
 *         OrderItemName = "TestOrderItemName2",
 *         ResourceGroupName = "YourResourceGroupName",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	edgeorder "github.com/pulumi/pulumi-azure-native-sdk/edgeorder/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := edgeorder.NewOrderItem(ctx, "orderItem", &edgeorder.OrderItemArgs{
 * 			AddressDetails: &edgeorder.AddressDetailsArgs{
 * 				ForwardAddress: &edgeorder.AddressPropertiesArgs{
 * 					ContactDetails: &edgeorder.ContactDetailsArgs{
 * 						ContactName: pulumi.String("XXXX XXXX"),
 * 						EmailList: pulumi.StringArray{
 * 							pulumi.String("[email protected]"),
 * 						},
 * 						Phone:          pulumi.String("0000000000"),
 * 						PhoneExtension: pulumi.String(""),
 * 					},
 * 					ShippingAddress: &edgeorder.ShippingAddressArgs{
 * 						AddressType:     pulumi.String(edgeorder.AddressTypeNone),
 * 						City:            pulumi.String("San Francisco"),
 * 						CompanyName:     pulumi.String("Microsoft"),
 * 						Country:         pulumi.String("US"),
 * 						PostalCode:      pulumi.String("94107"),
 * 						StateOrProvince: pulumi.String("CA"),
 * 						StreetAddress1:  pulumi.String("16 TOWNSEND ST"),
 * 						StreetAddress2:  pulumi.String("UNIT 1"),
 * 					},
 * 				},
 * 			},
 * 			Location: pulumi.String("eastus"),
 * 			OrderId:  pulumi.String("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.EdgeOrder/locations/eastus/orders/TestOrderName2"),
 * 			OrderItemDetails: &edgeorder.OrderItemDetailsArgs{
 * 				OrderItemType: pulumi.String(edgeorder.OrderItemTypePurchase),
 * 				Preferences: &edgeorder.PreferencesArgs{
 * 					TransportPreferences: &edgeorder.TransportPreferencesArgs{
 * 						PreferredShipmentType: pulumi.String(edgeorder.TransportShipmentTypesMicrosoftManaged),
 * 					},
 * 				},
 * 				ProductDetails: &edgeorder.ProductDetailsArgs{
 * 					HierarchyInformation: &edgeorder.HierarchyInformationArgs{
 * 						ConfigurationName: pulumi.String("edgep_base"),
 * 						ProductFamilyName: pulumi.String("azurestackedge"),
 * 						ProductLineName:   pulumi.String("azurestackedge"),
 * 						ProductName:       pulumi.String("azurestackedgegpu"),
 * 					},
 * 				},
 * 			},
 * 			OrderItemName:     pulumi.String("TestOrderItemName2"),
 * 			ResourceGroupName: pulumi.String("YourResourceGroupName"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.edgeorder.OrderItem;
 * import com.pulumi.azurenative.edgeorder.OrderItemArgs;
 * import com.pulumi.azurenative.edgeorder.inputs.AddressDetailsArgs;
 * import com.pulumi.azurenative.edgeorder.inputs.AddressPropertiesArgs;
 * import com.pulumi.azurenative.edgeorder.inputs.ContactDetailsArgs;
 * import com.pulumi.azurenative.edgeorder.inputs.ShippingAddressArgs;
 * import com.pulumi.azurenative.edgeorder.inputs.OrderItemDetailsArgs;
 * import com.pulumi.azurenative.edgeorder.inputs.PreferencesArgs;
 * import com.pulumi.azurenative.edgeorder.inputs.TransportPreferencesArgs;
 * import com.pulumi.azurenative.edgeorder.inputs.ProductDetailsArgs;
 * import com.pulumi.azurenative.edgeorder.inputs.HierarchyInformationArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var orderItem = new OrderItem("orderItem", OrderItemArgs.builder()
 *             .addressDetails(AddressDetailsArgs.builder()
 *                 .forwardAddress(AddressPropertiesArgs.builder()
 *                     .contactDetails(ContactDetailsArgs.builder()
 *                         .contactName("XXXX XXXX")
 *                         .emailList("[email protected]")
 *                         .phone("0000000000")
 *                         .phoneExtension("")
 *                         .build())
 *                     .shippingAddress(ShippingAddressArgs.builder()
 *                         .addressType("None")
 *                         .city("San Francisco")
 *                         .companyName("Microsoft")
 *                         .country("US")
 *                         .postalCode("94107")
 *                         .stateOrProvince("CA")
 *                         .streetAddress1("16 TOWNSEND ST")
 *                         .streetAddress2("UNIT 1")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .location("eastus")
 *             .orderId("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.EdgeOrder/locations/eastus/orders/TestOrderName2")
 *             .orderItemDetails(OrderItemDetailsArgs.builder()
 *                 .orderItemType("Purchase")
 *                 .preferences(PreferencesArgs.builder()
 *                     .transportPreferences(TransportPreferencesArgs.builder()
 *                         .preferredShipmentType("MicrosoftManaged")
 *                         .build())
 *                     .build())
 *                 .productDetails(ProductDetailsArgs.builder()
 *                     .hierarchyInformation(HierarchyInformationArgs.builder()
 *                         .configurationName("edgep_base")
 *                         .productFamilyName("azurestackedge")
 *                         .productLineName("azurestackedge")
 *                         .productName("azurestackedgegpu")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .orderItemName("TestOrderItemName2")
 *             .resourceGroupName("YourResourceGroupName")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:edgeorder:OrderItem TestOrderItemName2 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}
 * ```
 * @property addressDetails Represents shipping and return address for order item.
 * @property location The geo-location where the resource lives
 * @property orderId Id of the order to which order item belongs to.
 * @property orderItemDetails Represents order item details.
 * @property orderItemName The name of the order item.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property tags Resource tags.
 */
public data class OrderItemArgs(
    public val addressDetails: Output? = null,
    public val location: Output? = null,
    public val orderId: Output? = null,
    public val orderItemDetails: Output? = null,
    public val orderItemName: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.edgeorder.OrderItemArgs =
        com.pulumi.azurenative.edgeorder.OrderItemArgs.builder()
            .addressDetails(addressDetails?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .orderId(orderId?.applyValue({ args0 -> args0 }))
            .orderItemDetails(orderItemDetails?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .orderItemName(orderItemName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [OrderItemArgs].
 */
@PulumiTagMarker
public class OrderItemArgsBuilder internal constructor() {
    private var addressDetails: Output? = null

    private var location: Output? = null

    private var orderId: Output? = null

    private var orderItemDetails: Output? = null

    private var orderItemName: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Represents shipping and return address for order item.
     */
    @JvmName("uwlqtoersecdegcv")
    public suspend fun addressDetails(`value`: Output) {
        this.addressDetails = value
    }

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("jkerkdmvufprdevy")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Id of the order to which order item belongs to.
     */
    @JvmName("hshuklkxciwiobst")
    public suspend fun orderId(`value`: Output) {
        this.orderId = value
    }

    /**
     * @param value Represents order item details.
     */
    @JvmName("ylepbcjybcxadajw")
    public suspend fun orderItemDetails(`value`: Output) {
        this.orderItemDetails = value
    }

    /**
     * @param value The name of the order item.
     */
    @JvmName("scghhatbvussbfby")
    public suspend fun orderItemName(`value`: Output) {
        this.orderItemName = value
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("ehmpalpwwvnshnwh")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("vdhqxyajsecbsupm")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Represents shipping and return address for order item.
     */
    @JvmName("esimbpixdktliopm")
    public suspend fun addressDetails(`value`: AddressDetailsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.addressDetails = mapped
    }

    /**
     * @param argument Represents shipping and return address for order item.
     */
    @JvmName("erughpkroktxmrwl")
    public suspend fun addressDetails(argument: suspend AddressDetailsArgsBuilder.() -> Unit) {
        val toBeMapped = AddressDetailsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.addressDetails = mapped
    }

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("ywjinheudwxqhrin")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Id of the order to which order item belongs to.
     */
    @JvmName("xdunhlieqmwxgehu")
    public suspend fun orderId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.orderId = mapped
    }

    /**
     * @param value Represents order item details.
     */
    @JvmName("nxypdpbxdjybvpka")
    public suspend fun orderItemDetails(`value`: OrderItemDetailsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.orderItemDetails = mapped
    }

    /**
     * @param argument Represents order item details.
     */
    @JvmName("xvobbrkolyottheo")
    public suspend fun orderItemDetails(argument: suspend OrderItemDetailsArgsBuilder.() -> Unit) {
        val toBeMapped = OrderItemDetailsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.orderItemDetails = mapped
    }

    /**
     * @param value The name of the order item.
     */
    @JvmName("qlbwiehhfofgayas")
    public suspend fun orderItemName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.orderItemName = mapped
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("ludtngrxranhubne")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("napatbkuymalhpni")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Resource tags.
     */
    @JvmName("fbstejgbyahxskjy")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): OrderItemArgs = OrderItemArgs(
        addressDetails = addressDetails,
        location = location,
        orderId = orderId,
        orderItemDetails = orderItemDetails,
        orderItemName = orderItemName,
        resourceGroupName = resourceGroupName,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy