// *** 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;
using Pulumi;

namespace zscaler.PulumiPackage.Zpa.ApplicationSegment
{
    [ZpaResourceType("zpa:ApplicationSegment/browserAccess:BrowserAccess")]
    public partial class BrowserAccess : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Indicates whether users can bypass ZPA to access applications. Default: NEVER. Supported values: ALWAYS, NEVER, ON_NET.
        /// The value NEVER indicates the use of the client forwarding policy.
        /// </summary>
        [Output("bypassType")]
        public Output<string?> BypassType { get; private set; } = null!;

        [Output("clientlessApps")]
        public Output<ImmutableArray<Outputs.BrowserAccessClientlessApp>> ClientlessApps { get; private set; } = null!;

        [Output("configSpace")]
        public Output<string?> ConfigSpace { get; private set; } = null!;

        /// <summary>
        /// Description of the application.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// List of domains and IPs.
        /// </summary>
        [Output("domainNames")]
        public Output<ImmutableArray<string>> DomainNames { get; private set; } = null!;

        /// <summary>
        /// Whether Double Encryption is enabled or disabled for the app.
        /// </summary>
        [Output("doubleEncrypt")]
        public Output<bool?> DoubleEncrypt { get; private set; } = null!;

        [Output("enabled")]
        public Output<bool> Enabled { get; private set; } = null!;

        [Output("healthCheckType")]
        public Output<string> HealthCheckType { get; private set; } = null!;

        /// <summary>
        /// Whether health reporting for the app is Continuous or On Access. Supported values: NONE, ON_ACCESS, CONTINUOUS.
        /// </summary>
        [Output("healthReporting")]
        public Output<string> HealthReporting { get; private set; } = null!;

        [Output("icmpAccessType")]
        public Output<string?> IcmpAccessType { get; private set; } = null!;

        [Output("ipAnchored")]
        public Output<bool?> IpAnchored { get; private set; } = null!;

        /// <summary>
        /// Indicates if the Zscaler Client Connector (formerly Zscaler App or Z App) receives CNAME DNS records from the
        /// connectors.
        /// </summary>
        [Output("isCnameEnabled")]
        public Output<bool?> IsCnameEnabled { get; private set; } = null!;

        /// <summary>
        /// Name of the application.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        [Output("passiveHealthEnabled")]
        public Output<bool> PassiveHealthEnabled { get; private set; } = null!;

        [Output("segmentGroupId")]
        public Output<string> SegmentGroupId { get; private set; } = null!;

        [Output("segmentGroupName")]
        public Output<string> SegmentGroupName { get; private set; } = null!;

        /// <summary>
        /// List of the server group IDs.
        /// </summary>
        [Output("serverGroups")]
        public Output<ImmutableArray<Outputs.BrowserAccessServerGroup>> ServerGroups { get; private set; } = null!;

        /// <summary>
        /// TCP port ranges used to access the app.
        /// </summary>
        [Output("tcpPortRanges")]
        public Output<ImmutableArray<string>> TcpPortRanges { get; private set; } = null!;

        /// <summary>
        /// UDP port ranges used to access the app.
        /// </summary>
        [Output("udpPortRanges")]
        public Output<ImmutableArray<string>> UdpPortRanges { get; private set; } = null!;


        /// <summary>
        /// Create a BrowserAccess resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public BrowserAccess(string name, BrowserAccessArgs args, CustomResourceOptions? options = null)
            : base("zpa:ApplicationSegment/browserAccess:BrowserAccess", name, args ?? new BrowserAccessArgs(), MakeResourceOptions(options, ""))
        {
        }

        private BrowserAccess(string name, Input<string> id, BrowserAccessState? state = null, CustomResourceOptions? options = null)
            : base("zpa:ApplicationSegment/browserAccess:BrowserAccess", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/zscaler",
            };
            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;
        }
        /// <summary>
        /// Get an existing BrowserAccess resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static BrowserAccess Get(string name, Input<string> id, BrowserAccessState? state = null, CustomResourceOptions? options = null)
        {
            return new BrowserAccess(name, id, state, options);
        }
    }

    public sealed class BrowserAccessArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Indicates whether users can bypass ZPA to access applications. Default: NEVER. Supported values: ALWAYS, NEVER, ON_NET.
        /// The value NEVER indicates the use of the client forwarding policy.
        /// </summary>
        [Input("bypassType")]
        public Input<string>? BypassType { get; set; }

        [Input("clientlessApps", required: true)]
        private InputList<Inputs.BrowserAccessClientlessAppArgs>? _clientlessApps;
        public InputList<Inputs.BrowserAccessClientlessAppArgs> ClientlessApps
        {
            get => _clientlessApps ?? (_clientlessApps = new InputList<Inputs.BrowserAccessClientlessAppArgs>());
            set => _clientlessApps = value;
        }

        [Input("configSpace")]
        public Input<string>? ConfigSpace { get; set; }

        /// <summary>
        /// Description of the application.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        [Input("domainNames", required: true)]
        private InputList<string>? _domainNames;

        /// <summary>
        /// List of domains and IPs.
        /// </summary>
        public InputList<string> DomainNames
        {
            get => _domainNames ?? (_domainNames = new InputList<string>());
            set => _domainNames = value;
        }

        /// <summary>
        /// Whether Double Encryption is enabled or disabled for the app.
        /// </summary>
        [Input("doubleEncrypt")]
        public Input<bool>? DoubleEncrypt { get; set; }

        [Input("enabled")]
        public Input<bool>? Enabled { get; set; }

        [Input("healthCheckType")]
        public Input<string>? HealthCheckType { get; set; }

        /// <summary>
        /// Whether health reporting for the app is Continuous or On Access. Supported values: NONE, ON_ACCESS, CONTINUOUS.
        /// </summary>
        [Input("healthReporting")]
        public Input<string>? HealthReporting { get; set; }

        [Input("icmpAccessType")]
        public Input<string>? IcmpAccessType { get; set; }

        [Input("ipAnchored")]
        public Input<bool>? IpAnchored { get; set; }

        /// <summary>
        /// Indicates if the Zscaler Client Connector (formerly Zscaler App or Z App) receives CNAME DNS records from the
        /// connectors.
        /// </summary>
        [Input("isCnameEnabled")]
        public Input<bool>? IsCnameEnabled { get; set; }

        /// <summary>
        /// Name of the application.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("passiveHealthEnabled")]
        public Input<bool>? PassiveHealthEnabled { get; set; }

        [Input("segmentGroupId", required: true)]
        public Input<string> SegmentGroupId { get; set; } = null!;

        [Input("segmentGroupName")]
        public Input<string>? SegmentGroupName { get; set; }

        [Input("serverGroups", required: true)]
        private InputList<Inputs.BrowserAccessServerGroupArgs>? _serverGroups;

        /// <summary>
        /// List of the server group IDs.
        /// </summary>
        public InputList<Inputs.BrowserAccessServerGroupArgs> ServerGroups
        {
            get => _serverGroups ?? (_serverGroups = new InputList<Inputs.BrowserAccessServerGroupArgs>());
            set => _serverGroups = value;
        }

        [Input("tcpPortRanges")]
        private InputList<string>? _tcpPortRanges;

        /// <summary>
        /// TCP port ranges used to access the app.
        /// </summary>
        public InputList<string> TcpPortRanges
        {
            get => _tcpPortRanges ?? (_tcpPortRanges = new InputList<string>());
            set => _tcpPortRanges = value;
        }

        [Input("udpPortRanges")]
        private InputList<string>? _udpPortRanges;

        /// <summary>
        /// UDP port ranges used to access the app.
        /// </summary>
        public InputList<string> UdpPortRanges
        {
            get => _udpPortRanges ?? (_udpPortRanges = new InputList<string>());
            set => _udpPortRanges = value;
        }

        public BrowserAccessArgs()
        {
        }
        public static new BrowserAccessArgs Empty => new BrowserAccessArgs();
    }

    public sealed class BrowserAccessState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Indicates whether users can bypass ZPA to access applications. Default: NEVER. Supported values: ALWAYS, NEVER, ON_NET.
        /// The value NEVER indicates the use of the client forwarding policy.
        /// </summary>
        [Input("bypassType")]
        public Input<string>? BypassType { get; set; }

        [Input("clientlessApps")]
        private InputList<Inputs.BrowserAccessClientlessAppGetArgs>? _clientlessApps;
        public InputList<Inputs.BrowserAccessClientlessAppGetArgs> ClientlessApps
        {
            get => _clientlessApps ?? (_clientlessApps = new InputList<Inputs.BrowserAccessClientlessAppGetArgs>());
            set => _clientlessApps = value;
        }

        [Input("configSpace")]
        public Input<string>? ConfigSpace { get; set; }

        /// <summary>
        /// Description of the application.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        [Input("domainNames")]
        private InputList<string>? _domainNames;

        /// <summary>
        /// List of domains and IPs.
        /// </summary>
        public InputList<string> DomainNames
        {
            get => _domainNames ?? (_domainNames = new InputList<string>());
            set => _domainNames = value;
        }

        /// <summary>
        /// Whether Double Encryption is enabled or disabled for the app.
        /// </summary>
        [Input("doubleEncrypt")]
        public Input<bool>? DoubleEncrypt { get; set; }

        [Input("enabled")]
        public Input<bool>? Enabled { get; set; }

        [Input("healthCheckType")]
        public Input<string>? HealthCheckType { get; set; }

        /// <summary>
        /// Whether health reporting for the app is Continuous or On Access. Supported values: NONE, ON_ACCESS, CONTINUOUS.
        /// </summary>
        [Input("healthReporting")]
        public Input<string>? HealthReporting { get; set; }

        [Input("icmpAccessType")]
        public Input<string>? IcmpAccessType { get; set; }

        [Input("ipAnchored")]
        public Input<bool>? IpAnchored { get; set; }

        /// <summary>
        /// Indicates if the Zscaler Client Connector (formerly Zscaler App or Z App) receives CNAME DNS records from the
        /// connectors.
        /// </summary>
        [Input("isCnameEnabled")]
        public Input<bool>? IsCnameEnabled { get; set; }

        /// <summary>
        /// Name of the application.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("passiveHealthEnabled")]
        public Input<bool>? PassiveHealthEnabled { get; set; }

        [Input("segmentGroupId")]
        public Input<string>? SegmentGroupId { get; set; }

        [Input("segmentGroupName")]
        public Input<string>? SegmentGroupName { get; set; }

        [Input("serverGroups")]
        private InputList<Inputs.BrowserAccessServerGroupGetArgs>? _serverGroups;

        /// <summary>
        /// List of the server group IDs.
        /// </summary>
        public InputList<Inputs.BrowserAccessServerGroupGetArgs> ServerGroups
        {
            get => _serverGroups ?? (_serverGroups = new InputList<Inputs.BrowserAccessServerGroupGetArgs>());
            set => _serverGroups = value;
        }

        [Input("tcpPortRanges")]
        private InputList<string>? _tcpPortRanges;

        /// <summary>
        /// TCP port ranges used to access the app.
        /// </summary>
        public InputList<string> TcpPortRanges
        {
            get => _tcpPortRanges ?? (_tcpPortRanges = new InputList<string>());
            set => _tcpPortRanges = value;
        }

        [Input("udpPortRanges")]
        private InputList<string>? _udpPortRanges;

        /// <summary>
        /// UDP port ranges used to access the app.
        /// </summary>
        public InputList<string> UdpPortRanges
        {
            get => _udpPortRanges ?? (_udpPortRanges = new InputList<string>());
            set => _udpPortRanges = value;
        }

        public BrowserAccessState()
        {
        }
        public static new BrowserAccessState Empty => new BrowserAccessState();
    }
}
