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

com.pulumi.azure.cdn.kotlin.EndpointArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.cdn.kotlin

import com.pulumi.azure.cdn.EndpointArgs.builder
import com.pulumi.azure.cdn.kotlin.inputs.EndpointDeliveryRuleArgs
import com.pulumi.azure.cdn.kotlin.inputs.EndpointDeliveryRuleArgsBuilder
import com.pulumi.azure.cdn.kotlin.inputs.EndpointGeoFilterArgs
import com.pulumi.azure.cdn.kotlin.inputs.EndpointGeoFilterArgsBuilder
import com.pulumi.azure.cdn.kotlin.inputs.EndpointGlobalDeliveryRuleArgs
import com.pulumi.azure.cdn.kotlin.inputs.EndpointGlobalDeliveryRuleArgsBuilder
import com.pulumi.azure.cdn.kotlin.inputs.EndpointOriginArgs
import com.pulumi.azure.cdn.kotlin.inputs.EndpointOriginArgsBuilder
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.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * A CDN Endpoint is the entity within a CDN Profile containing configuration information regarding caching behaviours and origins. The CDN Endpoint is exposed using the URL format `.azureedge.net`.
 * !> **Be Aware:** Azure is rolling out a breaking change on Friday 9th April 2021 which may cause issues with the CDN/FrontDoor resources. More information is available in this GitHub issue as the necessary changes are identified.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleProfile = new azure.cdn.Profile("example", {
 *     name: "example-cdn",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "Standard_Verizon",
 * });
 * const exampleEndpoint = new azure.cdn.Endpoint("example", {
 *     name: "example",
 *     profileName: exampleProfile.name,
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     origins: [{
 *         name: "example",
 *         hostName: "www.contoso.com",
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_profile = azure.cdn.Profile("example",
 *     name="example-cdn",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku="Standard_Verizon")
 * example_endpoint = azure.cdn.Endpoint("example",
 *     name="example",
 *     profile_name=example_profile.name,
 *     location=example.location,
 *     resource_group_name=example.name,
 *     origins=[{
 *         "name": "example",
 *         "host_name": "www.contoso.com",
 *     }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleProfile = new Azure.Cdn.Profile("example", new()
 *     {
 *         Name = "example-cdn",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Sku = "Standard_Verizon",
 *     });
 *     var exampleEndpoint = new Azure.Cdn.Endpoint("example", new()
 *     {
 *         Name = "example",
 *         ProfileName = exampleProfile.Name,
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Origins = new[]
 *         {
 *             new Azure.Cdn.Inputs.EndpointOriginArgs
 *             {
 *                 Name = "example",
 *                 HostName = "www.contoso.com",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/cdn"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleProfile, err := cdn.NewProfile(ctx, "example", &cdn.ProfileArgs{
 * 			Name:              pulumi.String("example-cdn"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Sku:               pulumi.String("Standard_Verizon"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = cdn.NewEndpoint(ctx, "example", &cdn.EndpointArgs{
 * 			Name:              pulumi.String("example"),
 * 			ProfileName:       exampleProfile.Name,
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Origins: cdn.EndpointOriginArray{
 * 				&cdn.EndpointOriginArgs{
 * 					Name:     pulumi.String("example"),
 * 					HostName: pulumi.String("www.contoso.com"),
 * 				},
 * 			},
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.cdn.Profile;
 * import com.pulumi.azure.cdn.ProfileArgs;
 * import com.pulumi.azure.cdn.Endpoint;
 * import com.pulumi.azure.cdn.EndpointArgs;
 * import com.pulumi.azure.cdn.inputs.EndpointOriginArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleProfile = new Profile("exampleProfile", ProfileArgs.builder()
 *             .name("example-cdn")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku("Standard_Verizon")
 *             .build());
 *         var exampleEndpoint = new Endpoint("exampleEndpoint", EndpointArgs.builder()
 *             .name("example")
 *             .profileName(exampleProfile.name())
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .origins(EndpointOriginArgs.builder()
 *                 .name("example")
 *                 .hostName("www.contoso.com")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleProfile:
 *     type: azure:cdn:Profile
 *     name: example
 *     properties:
 *       name: example-cdn
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       sku: Standard_Verizon
 *   exampleEndpoint:
 *     type: azure:cdn:Endpoint
 *     name: example
 *     properties:
 *       name: example
 *       profileName: ${exampleProfile.name}
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       origins:
 *         - name: example
 *           hostName: www.contoso.com
 * ```
 * 
 * ## Import
 * CDN Endpoints can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:cdn/endpoint:Endpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Cdn/profiles/myprofile1/endpoints/myendpoint1
 * ```
 * @property contentTypesToCompresses An array of strings that indicates a content types on which compression will be applied. The value for the elements should be MIME types.
 * @property deliveryRules Rules for the rules engine. An endpoint can contain up until 4 of those rules that consist of conditions and actions. A `delivery_rule` blocks as defined below.
 * @property geoFilters A set of Geo Filters for this CDN Endpoint. Each `geo_filter` block supports fields documented below.
 * @property globalDeliveryRule Actions that are valid for all resources regardless of any conditions. A `global_delivery_rule` block as defined below.
 * @property isCompressionEnabled Indicates whether compression is to be enabled.
 * @property isHttpAllowed Specifies if http allowed. Defaults to `true`.
 * @property isHttpsAllowed Specifies if https allowed. Defaults to `true`.
 * @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
 * @property name Specifies the name of the CDN Endpoint. Changing this forces a new resource to be created.
 * @property optimizationType What types of optimization should this CDN Endpoint optimize for? Possible values include `DynamicSiteAcceleration`, `GeneralMediaStreaming`, `GeneralWebDelivery`, `LargeFileDownload` and `VideoOnDemandMediaStreaming`.
 * @property originHostHeader The host header CDN provider will send along with content requests to origins.
 * @property originPath The path used at for origin requests.
 * @property origins The set of origins of the CDN endpoint. When multiple origins exist, the first origin will be used as primary and rest will be used as failover options. Each `origin` block supports fields documented below. Changing this forces a new resource to be created.
 * @property probePath the path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the `origin_path`.
 * > **NOTE:** `global_delivery_rule` and `delivery_rule` are currently only available for `Microsoft_Standard` CDN profiles.
 * @property profileName The CDN Profile to which to attach the CDN Endpoint. Changing this forces a new resource to be created.
 * @property querystringCachingBehaviour Sets query string caching behavior. Allowed values are `IgnoreQueryString`, `BypassCaching` and `UseQueryString`. `NotSet` value can be used for `Premium Verizon` CDN profile. Defaults to `IgnoreQueryString`.
 * @property resourceGroupName The name of the resource group in which to create the CDN Endpoint. Changing this forces a new resource to be created.
 * @property tags A mapping of tags to assign to the resource.
 */
public data class EndpointArgs(
    public val contentTypesToCompresses: Output>? = null,
    public val deliveryRules: Output>? = null,
    public val geoFilters: Output>? = null,
    public val globalDeliveryRule: Output? = null,
    public val isCompressionEnabled: Output? = null,
    public val isHttpAllowed: Output? = null,
    public val isHttpsAllowed: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val optimizationType: Output? = null,
    public val originHostHeader: Output? = null,
    public val originPath: Output? = null,
    public val origins: Output>? = null,
    public val probePath: Output? = null,
    public val profileName: Output? = null,
    public val querystringCachingBehaviour: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.cdn.EndpointArgs =
        com.pulumi.azure.cdn.EndpointArgs.builder()
            .contentTypesToCompresses(
                contentTypesToCompresses?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .deliveryRules(
                deliveryRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .geoFilters(
                geoFilters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .globalDeliveryRule(
                globalDeliveryRule?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .isCompressionEnabled(isCompressionEnabled?.applyValue({ args0 -> args0 }))
            .isHttpAllowed(isHttpAllowed?.applyValue({ args0 -> args0 }))
            .isHttpsAllowed(isHttpsAllowed?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .optimizationType(optimizationType?.applyValue({ args0 -> args0 }))
            .originHostHeader(originHostHeader?.applyValue({ args0 -> args0 }))
            .originPath(originPath?.applyValue({ args0 -> args0 }))
            .origins(
                origins?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .probePath(probePath?.applyValue({ args0 -> args0 }))
            .profileName(profileName?.applyValue({ args0 -> args0 }))
            .querystringCachingBehaviour(querystringCachingBehaviour?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [EndpointArgs].
 */
@PulumiTagMarker
public class EndpointArgsBuilder internal constructor() {
    private var contentTypesToCompresses: Output>? = null

    private var deliveryRules: Output>? = null

    private var geoFilters: Output>? = null

    private var globalDeliveryRule: Output? = null

    private var isCompressionEnabled: Output? = null

    private var isHttpAllowed: Output? = null

    private var isHttpsAllowed: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var optimizationType: Output? = null

    private var originHostHeader: Output? = null

    private var originPath: Output? = null

    private var origins: Output>? = null

    private var probePath: Output? = null

    private var profileName: Output? = null

    private var querystringCachingBehaviour: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value An array of strings that indicates a content types on which compression will be applied. The value for the elements should be MIME types.
     */
    @JvmName("bjcdptvdegptyump")
    public suspend fun contentTypesToCompresses(`value`: Output>) {
        this.contentTypesToCompresses = value
    }

    @JvmName("oaqtemahgkukdibt")
    public suspend fun contentTypesToCompresses(vararg values: Output) {
        this.contentTypesToCompresses = Output.all(values.asList())
    }

    /**
     * @param values An array of strings that indicates a content types on which compression will be applied. The value for the elements should be MIME types.
     */
    @JvmName("eenajgohvfsooehy")
    public suspend fun contentTypesToCompresses(values: List>) {
        this.contentTypesToCompresses = Output.all(values)
    }

    /**
     * @param value Rules for the rules engine. An endpoint can contain up until 4 of those rules that consist of conditions and actions. A `delivery_rule` blocks as defined below.
     */
    @JvmName("bdbwmgvgmdymtegb")
    public suspend fun deliveryRules(`value`: Output>) {
        this.deliveryRules = value
    }

    @JvmName("moedwcpvdbgcjukd")
    public suspend fun deliveryRules(vararg values: Output) {
        this.deliveryRules = Output.all(values.asList())
    }

    /**
     * @param values Rules for the rules engine. An endpoint can contain up until 4 of those rules that consist of conditions and actions. A `delivery_rule` blocks as defined below.
     */
    @JvmName("gnawhofkgiiccowl")
    public suspend fun deliveryRules(values: List>) {
        this.deliveryRules = Output.all(values)
    }

    /**
     * @param value A set of Geo Filters for this CDN Endpoint. Each `geo_filter` block supports fields documented below.
     */
    @JvmName("koxuphyrvjkqeady")
    public suspend fun geoFilters(`value`: Output>) {
        this.geoFilters = value
    }

    @JvmName("udjcvuvjojnxudqn")
    public suspend fun geoFilters(vararg values: Output) {
        this.geoFilters = Output.all(values.asList())
    }

    /**
     * @param values A set of Geo Filters for this CDN Endpoint. Each `geo_filter` block supports fields documented below.
     */
    @JvmName("fckxhlglpbelehkq")
    public suspend fun geoFilters(values: List>) {
        this.geoFilters = Output.all(values)
    }

    /**
     * @param value Actions that are valid for all resources regardless of any conditions. A `global_delivery_rule` block as defined below.
     */
    @JvmName("vxbubecieolaxxtd")
    public suspend fun globalDeliveryRule(`value`: Output) {
        this.globalDeliveryRule = value
    }

    /**
     * @param value Indicates whether compression is to be enabled.
     */
    @JvmName("dufmxncnjgskrnhs")
    public suspend fun isCompressionEnabled(`value`: Output) {
        this.isCompressionEnabled = value
    }

    /**
     * @param value Specifies if http allowed. Defaults to `true`.
     */
    @JvmName("nftesqeppifpinwo")
    public suspend fun isHttpAllowed(`value`: Output) {
        this.isHttpAllowed = value
    }

    /**
     * @param value Specifies if https allowed. Defaults to `true`.
     */
    @JvmName("mwyftjniyumdtkvc")
    public suspend fun isHttpsAllowed(`value`: Output) {
        this.isHttpsAllowed = value
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("uyyuixixqgryrwra")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Specifies the name of the CDN Endpoint. Changing this forces a new resource to be created.
     */
    @JvmName("eeqchrgxexiraqrf")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value What types of optimization should this CDN Endpoint optimize for? Possible values include `DynamicSiteAcceleration`, `GeneralMediaStreaming`, `GeneralWebDelivery`, `LargeFileDownload` and `VideoOnDemandMediaStreaming`.
     */
    @JvmName("wsvjdpkffklnqtqe")
    public suspend fun optimizationType(`value`: Output) {
        this.optimizationType = value
    }

    /**
     * @param value The host header CDN provider will send along with content requests to origins.
     */
    @JvmName("teqeokcvupfikluw")
    public suspend fun originHostHeader(`value`: Output) {
        this.originHostHeader = value
    }

    /**
     * @param value The path used at for origin requests.
     */
    @JvmName("lfbmijchvcmrxjuk")
    public suspend fun originPath(`value`: Output) {
        this.originPath = value
    }

    /**
     * @param value The set of origins of the CDN endpoint. When multiple origins exist, the first origin will be used as primary and rest will be used as failover options. Each `origin` block supports fields documented below. Changing this forces a new resource to be created.
     */
    @JvmName("ktmxavwsdtmcmafb")
    public suspend fun origins(`value`: Output>) {
        this.origins = value
    }

    @JvmName("gvshyvimckwejhmn")
    public suspend fun origins(vararg values: Output) {
        this.origins = Output.all(values.asList())
    }

    /**
     * @param values The set of origins of the CDN endpoint. When multiple origins exist, the first origin will be used as primary and rest will be used as failover options. Each `origin` block supports fields documented below. Changing this forces a new resource to be created.
     */
    @JvmName("wcsreftnmxmbqkla")
    public suspend fun origins(values: List>) {
        this.origins = Output.all(values)
    }

    /**
     * @param value the path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the `origin_path`.
     * > **NOTE:** `global_delivery_rule` and `delivery_rule` are currently only available for `Microsoft_Standard` CDN profiles.
     */
    @JvmName("eqwlohepucbiwchr")
    public suspend fun probePath(`value`: Output) {
        this.probePath = value
    }

    /**
     * @param value The CDN Profile to which to attach the CDN Endpoint. Changing this forces a new resource to be created.
     */
    @JvmName("pvnylpxldrhwhrqi")
    public suspend fun profileName(`value`: Output) {
        this.profileName = value
    }

    /**
     * @param value Sets query string caching behavior. Allowed values are `IgnoreQueryString`, `BypassCaching` and `UseQueryString`. `NotSet` value can be used for `Premium Verizon` CDN profile. Defaults to `IgnoreQueryString`.
     */
    @JvmName("qtwmxnykvjcsobgo")
    public suspend fun querystringCachingBehaviour(`value`: Output) {
        this.querystringCachingBehaviour = value
    }

    /**
     * @param value The name of the resource group in which to create the CDN Endpoint. Changing this forces a new resource to be created.
     */
    @JvmName("swjhsvlqtuwuupfk")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("ldpmdoovbisambwc")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value An array of strings that indicates a content types on which compression will be applied. The value for the elements should be MIME types.
     */
    @JvmName("ejgyyortoptrfepw")
    public suspend fun contentTypesToCompresses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentTypesToCompresses = mapped
    }

    /**
     * @param values An array of strings that indicates a content types on which compression will be applied. The value for the elements should be MIME types.
     */
    @JvmName("bdqmnklprvjdixwt")
    public suspend fun contentTypesToCompresses(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.contentTypesToCompresses = mapped
    }

    /**
     * @param value Rules for the rules engine. An endpoint can contain up until 4 of those rules that consist of conditions and actions. A `delivery_rule` blocks as defined below.
     */
    @JvmName("brlugqdltkiklmol")
    public suspend fun deliveryRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deliveryRules = mapped
    }

    /**
     * @param argument Rules for the rules engine. An endpoint can contain up until 4 of those rules that consist of conditions and actions. A `delivery_rule` blocks as defined below.
     */
    @JvmName("cdmmvdadxwpyhcdi")
    public suspend fun deliveryRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EndpointDeliveryRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.deliveryRules = mapped
    }

    /**
     * @param argument Rules for the rules engine. An endpoint can contain up until 4 of those rules that consist of conditions and actions. A `delivery_rule` blocks as defined below.
     */
    @JvmName("fdbiywkeskwtpmkm")
    public suspend fun deliveryRules(vararg argument: suspend EndpointDeliveryRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EndpointDeliveryRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.deliveryRules = mapped
    }

    /**
     * @param argument Rules for the rules engine. An endpoint can contain up until 4 of those rules that consist of conditions and actions. A `delivery_rule` blocks as defined below.
     */
    @JvmName("ocuiutlnmupxflfg")
    public suspend fun deliveryRules(argument: suspend EndpointDeliveryRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(EndpointDeliveryRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.deliveryRules = mapped
    }

    /**
     * @param values Rules for the rules engine. An endpoint can contain up until 4 of those rules that consist of conditions and actions. A `delivery_rule` blocks as defined below.
     */
    @JvmName("crfolycjsxlgujqb")
    public suspend fun deliveryRules(vararg values: EndpointDeliveryRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.deliveryRules = mapped
    }

    /**
     * @param value A set of Geo Filters for this CDN Endpoint. Each `geo_filter` block supports fields documented below.
     */
    @JvmName("opimbrbhxyefamsm")
    public suspend fun geoFilters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.geoFilters = mapped
    }

    /**
     * @param argument A set of Geo Filters for this CDN Endpoint. Each `geo_filter` block supports fields documented below.
     */
    @JvmName("ijjbclkvauahxmdg")
    public suspend fun geoFilters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EndpointGeoFilterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.geoFilters = mapped
    }

    /**
     * @param argument A set of Geo Filters for this CDN Endpoint. Each `geo_filter` block supports fields documented below.
     */
    @JvmName("bmtjeuscgauhgqgp")
    public suspend fun geoFilters(vararg argument: suspend EndpointGeoFilterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EndpointGeoFilterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.geoFilters = mapped
    }

    /**
     * @param argument A set of Geo Filters for this CDN Endpoint. Each `geo_filter` block supports fields documented below.
     */
    @JvmName("njqwodrgqccmhosv")
    public suspend fun geoFilters(argument: suspend EndpointGeoFilterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(EndpointGeoFilterArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.geoFilters = mapped
    }

    /**
     * @param values A set of Geo Filters for this CDN Endpoint. Each `geo_filter` block supports fields documented below.
     */
    @JvmName("cocskikafsdrdxyd")
    public suspend fun geoFilters(vararg values: EndpointGeoFilterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.geoFilters = mapped
    }

    /**
     * @param value Actions that are valid for all resources regardless of any conditions. A `global_delivery_rule` block as defined below.
     */
    @JvmName("dstdbbklkfplpcek")
    public suspend fun globalDeliveryRule(`value`: EndpointGlobalDeliveryRuleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.globalDeliveryRule = mapped
    }

    /**
     * @param argument Actions that are valid for all resources regardless of any conditions. A `global_delivery_rule` block as defined below.
     */
    @JvmName("plmyubcjrbbeoupx")
    public suspend fun globalDeliveryRule(argument: suspend EndpointGlobalDeliveryRuleArgsBuilder.() -> Unit) {
        val toBeMapped = EndpointGlobalDeliveryRuleArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.globalDeliveryRule = mapped
    }

    /**
     * @param value Indicates whether compression is to be enabled.
     */
    @JvmName("rvfkrtjhrnnqkojk")
    public suspend fun isCompressionEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isCompressionEnabled = mapped
    }

    /**
     * @param value Specifies if http allowed. Defaults to `true`.
     */
    @JvmName("abasrccqjfbdffij")
    public suspend fun isHttpAllowed(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isHttpAllowed = mapped
    }

    /**
     * @param value Specifies if https allowed. Defaults to `true`.
     */
    @JvmName("wruxvwxpbjdbosdn")
    public suspend fun isHttpsAllowed(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isHttpsAllowed = mapped
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("abmwdlymtuetrytg")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Specifies the name of the CDN Endpoint. Changing this forces a new resource to be created.
     */
    @JvmName("veewkrxqcegdpaeq")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value What types of optimization should this CDN Endpoint optimize for? Possible values include `DynamicSiteAcceleration`, `GeneralMediaStreaming`, `GeneralWebDelivery`, `LargeFileDownload` and `VideoOnDemandMediaStreaming`.
     */
    @JvmName("lvawygvicswkvurq")
    public suspend fun optimizationType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.optimizationType = mapped
    }

    /**
     * @param value The host header CDN provider will send along with content requests to origins.
     */
    @JvmName("tykdiliebssksxwy")
    public suspend fun originHostHeader(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.originHostHeader = mapped
    }

    /**
     * @param value The path used at for origin requests.
     */
    @JvmName("bttbuunextvrnnxh")
    public suspend fun originPath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.originPath = mapped
    }

    /**
     * @param value The set of origins of the CDN endpoint. When multiple origins exist, the first origin will be used as primary and rest will be used as failover options. Each `origin` block supports fields documented below. Changing this forces a new resource to be created.
     */
    @JvmName("xqgcihfhwubuifnm")
    public suspend fun origins(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.origins = mapped
    }

    /**
     * @param argument The set of origins of the CDN endpoint. When multiple origins exist, the first origin will be used as primary and rest will be used as failover options. Each `origin` block supports fields documented below. Changing this forces a new resource to be created.
     */
    @JvmName("mxkqfsjlxesiojgo")
    public suspend fun origins(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EndpointOriginArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.origins = mapped
    }

    /**
     * @param argument The set of origins of the CDN endpoint. When multiple origins exist, the first origin will be used as primary and rest will be used as failover options. Each `origin` block supports fields documented below. Changing this forces a new resource to be created.
     */
    @JvmName("fpocnmpcqdfxdsep")
    public suspend fun origins(vararg argument: suspend EndpointOriginArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EndpointOriginArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.origins = mapped
    }

    /**
     * @param argument The set of origins of the CDN endpoint. When multiple origins exist, the first origin will be used as primary and rest will be used as failover options. Each `origin` block supports fields documented below. Changing this forces a new resource to be created.
     */
    @JvmName("nidknptpifuswurt")
    public suspend fun origins(argument: suspend EndpointOriginArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(EndpointOriginArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.origins = mapped
    }

    /**
     * @param values The set of origins of the CDN endpoint. When multiple origins exist, the first origin will be used as primary and rest will be used as failover options. Each `origin` block supports fields documented below. Changing this forces a new resource to be created.
     */
    @JvmName("mrybgeubreywqnmi")
    public suspend fun origins(vararg values: EndpointOriginArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.origins = mapped
    }

    /**
     * @param value the path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the `origin_path`.
     * > **NOTE:** `global_delivery_rule` and `delivery_rule` are currently only available for `Microsoft_Standard` CDN profiles.
     */
    @JvmName("qymbhoioinqsrewi")
    public suspend fun probePath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.probePath = mapped
    }

    /**
     * @param value The CDN Profile to which to attach the CDN Endpoint. Changing this forces a new resource to be created.
     */
    @JvmName("bvtftbmoaewbmxye")
    public suspend fun profileName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.profileName = mapped
    }

    /**
     * @param value Sets query string caching behavior. Allowed values are `IgnoreQueryString`, `BypassCaching` and `UseQueryString`. `NotSet` value can be used for `Premium Verizon` CDN profile. Defaults to `IgnoreQueryString`.
     */
    @JvmName("tvcayokxekgghaul")
    public suspend fun querystringCachingBehaviour(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.querystringCachingBehaviour = mapped
    }

    /**
     * @param value The name of the resource group in which to create the CDN Endpoint. Changing this forces a new resource to be created.
     */
    @JvmName("frgdeqirbajsjcwx")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("qtfcniwnksdvngdy")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the resource.
     */
    @JvmName("gcjppmmgmkjmkmbs")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): EndpointArgs = EndpointArgs(
        contentTypesToCompresses = contentTypesToCompresses,
        deliveryRules = deliveryRules,
        geoFilters = geoFilters,
        globalDeliveryRule = globalDeliveryRule,
        isCompressionEnabled = isCompressionEnabled,
        isHttpAllowed = isHttpAllowed,
        isHttpsAllowed = isHttpsAllowed,
        location = location,
        name = name,
        optimizationType = optimizationType,
        originHostHeader = originHostHeader,
        originPath = originPath,
        origins = origins,
        probePath = probePath,
        profileName = profileName,
        querystringCachingBehaviour = querystringCachingBehaviour,
        resourceGroupName = resourceGroupName,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy