// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.cdn;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.cdn.EndpointArgs;
import com.pulumi.azure.cdn.inputs.EndpointState;
import com.pulumi.azure.cdn.outputs.EndpointDeliveryRule;
import com.pulumi.azure.cdn.outputs.EndpointGeoFilter;
import com.pulumi.azure.cdn.outputs.EndpointGlobalDeliveryRule;
import com.pulumi.azure.cdn.outputs.EndpointOrigin;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * ## Example Usage
 * ```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 exampleResourceGroup = new ResourceGroup(&#34;exampleResourceGroup&#34;, ResourceGroupArgs.builder()        
 *             .location(&#34;West Europe&#34;)
 *             .build());
 * 
 *         var exampleProfile = new Profile(&#34;exampleProfile&#34;, ProfileArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .sku(&#34;Standard_Verizon&#34;)
 *             .build());
 * 
 *         var exampleEndpoint = new Endpoint(&#34;exampleEndpoint&#34;, EndpointArgs.builder()        
 *             .profileName(exampleProfile.name())
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .origins(EndpointOriginArgs.builder()
 *                 .name(&#34;example&#34;)
 *                 .hostName(&#34;www.contoso.com&#34;)
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## 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
 * ```
 * 
 */
@ResourceType(type="azure:cdn/endpoint:Endpoint")
public class Endpoint extends com.pulumi.resources.CustomResource {
    /**
     * An array of strings that indicates a content types on which compression will be applied. The value for the elements should be MIME types.
     * 
     */
    @Export(name="contentTypesToCompresses", refs={List.class,String.class}, tree="[0,1]")
    private Output<List<String>> contentTypesToCompresses;

    /**
     * @return An array of strings that indicates a content types on which compression will be applied. The value for the elements should be MIME types.
     * 
     */
    public Output<List<String>> contentTypesToCompresses() {
        return this.contentTypesToCompresses;
    }
    /**
     * 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.
     * 
     */
    @Export(name="deliveryRules", refs={List.class,EndpointDeliveryRule.class}, tree="[0,1]")
    private Output</* @Nullable */ List<EndpointDeliveryRule>> deliveryRules;

    /**
     * @return 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.
     * 
     */
    public Output<Optional<List<EndpointDeliveryRule>>> deliveryRules() {
        return Codegen.optional(this.deliveryRules);
    }
    /**
     * The Fully Qualified Domain Name of the CDN Endpoint.
     * 
     */
    @Export(name="fqdn", refs={String.class}, tree="[0]")
    private Output<String> fqdn;

    /**
     * @return The Fully Qualified Domain Name of the CDN Endpoint.
     * 
     */
    public Output<String> fqdn() {
        return this.fqdn;
    }
    /**
     * A set of Geo Filters for this CDN Endpoint. Each `geo_filter` block supports fields documented below.
     * 
     */
    @Export(name="geoFilters", refs={List.class,EndpointGeoFilter.class}, tree="[0,1]")
    private Output</* @Nullable */ List<EndpointGeoFilter>> geoFilters;

    /**
     * @return A set of Geo Filters for this CDN Endpoint. Each `geo_filter` block supports fields documented below.
     * 
     */
    public Output<Optional<List<EndpointGeoFilter>>> geoFilters() {
        return Codegen.optional(this.geoFilters);
    }
    /**
     * Actions that are valid for all resources regardless of any conditions. A `global_delivery_rule` block as defined below.
     * 
     */
    @Export(name="globalDeliveryRule", refs={EndpointGlobalDeliveryRule.class}, tree="[0]")
    private Output</* @Nullable */ EndpointGlobalDeliveryRule> globalDeliveryRule;

    /**
     * @return Actions that are valid for all resources regardless of any conditions. A `global_delivery_rule` block as defined below.
     * 
     */
    public Output<Optional<EndpointGlobalDeliveryRule>> globalDeliveryRule() {
        return Codegen.optional(this.globalDeliveryRule);
    }
    /**
     * Indicates whether compression is to be enabled.
     * 
     */
    @Export(name="isCompressionEnabled", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> isCompressionEnabled;

    /**
     * @return Indicates whether compression is to be enabled.
     * 
     */
    public Output<Optional<Boolean>> isCompressionEnabled() {
        return Codegen.optional(this.isCompressionEnabled);
    }
    /**
     * Defaults to `true`.
     * 
     */
    @Export(name="isHttpAllowed", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> isHttpAllowed;

    /**
     * @return Defaults to `true`.
     * 
     */
    public Output<Optional<Boolean>> isHttpAllowed() {
        return Codegen.optional(this.isHttpAllowed);
    }
    /**
     * Defaults to `true`.
     * 
     */
    @Export(name="isHttpsAllowed", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> isHttpsAllowed;

    /**
     * @return Defaults to `true`.
     * 
     */
    public Output<Optional<Boolean>> isHttpsAllowed() {
        return Codegen.optional(this.isHttpsAllowed);
    }
    /**
     * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="location", refs={String.class}, tree="[0]")
    private Output<String> location;

    /**
     * @return Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> location() {
        return this.location;
    }
    /**
     * Specifies the name of the CDN Endpoint. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return Specifies the name of the CDN Endpoint. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * What types of optimization should this CDN Endpoint optimize for? Possible values include `DynamicSiteAcceleration`, `GeneralMediaStreaming`, `GeneralWebDelivery`, `LargeFileDownload` and `VideoOnDemandMediaStreaming`.
     * 
     */
    @Export(name="optimizationType", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> optimizationType;

    /**
     * @return What types of optimization should this CDN Endpoint optimize for? Possible values include `DynamicSiteAcceleration`, `GeneralMediaStreaming`, `GeneralWebDelivery`, `LargeFileDownload` and `VideoOnDemandMediaStreaming`.
     * 
     */
    public Output<Optional<String>> optimizationType() {
        return Codegen.optional(this.optimizationType);
    }
    /**
     * The host header CDN provider will send along with content requests to origins.
     * 
     */
    @Export(name="originHostHeader", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> originHostHeader;

    /**
     * @return The host header CDN provider will send along with content requests to origins.
     * 
     */
    public Output<Optional<String>> originHostHeader() {
        return Codegen.optional(this.originHostHeader);
    }
    /**
     * The path used at for origin requests.
     * 
     */
    @Export(name="originPath", refs={String.class}, tree="[0]")
    private Output<String> originPath;

    /**
     * @return The path used at for origin requests.
     * 
     */
    public Output<String> originPath() {
        return this.originPath;
    }
    /**
     * 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.
     * 
     */
    @Export(name="origins", refs={List.class,EndpointOrigin.class}, tree="[0,1]")
    private Output<List<EndpointOrigin>> origins;

    /**
     * @return 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.
     * 
     */
    public Output<List<EndpointOrigin>> origins() {
        return this.origins;
    }
    /**
     * 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`.
     * 
     * &gt; **NOTE:** `global_delivery_rule` and `delivery_rule` are currently only available for `Microsoft_Standard` CDN profiles.
     * 
     */
    @Export(name="probePath", refs={String.class}, tree="[0]")
    private Output<String> probePath;

    /**
     * @return 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`.
     * 
     * &gt; **NOTE:** `global_delivery_rule` and `delivery_rule` are currently only available for `Microsoft_Standard` CDN profiles.
     * 
     */
    public Output<String> probePath() {
        return this.probePath;
    }
    /**
     * The CDN Profile to which to attach the CDN Endpoint. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="profileName", refs={String.class}, tree="[0]")
    private Output<String> profileName;

    /**
     * @return The CDN Profile to which to attach the CDN Endpoint. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> profileName() {
        return this.profileName;
    }
    /**
     * 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`.
     * 
     */
    @Export(name="querystringCachingBehaviour", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> querystringCachingBehaviour;

    /**
     * @return 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`.
     * 
     */
    public Output<Optional<String>> querystringCachingBehaviour() {
        return Codegen.optional(this.querystringCachingBehaviour);
    }
    /**
     * The name of the resource group in which to create the CDN Endpoint. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="resourceGroupName", refs={String.class}, tree="[0]")
    private Output<String> resourceGroupName;

    /**
     * @return The name of the resource group in which to create the CDN Endpoint. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }
    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
    private Output</* @Nullable */ Map<String,String>> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Output<Optional<Map<String,String>>> tags() {
        return Codegen.optional(this.tags);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public Endpoint(String name) {
        this(name, EndpointArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public Endpoint(String name, EndpointArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public Endpoint(String name, EndpointArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:cdn/endpoint:Endpoint", name, args == null ? EndpointArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private Endpoint(String name, Output<String> id, @Nullable EndpointState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:cdn/endpoint:Endpoint", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host 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
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static Endpoint get(String name, Output<String> id, @Nullable EndpointState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new Endpoint(name, id, state, options);
    }
}
