<reponame>pulumiverse/pulumi-fortios// *** 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 Pulumiverse.Fortios
{
    /// <summary>
    /// This resource supports Create/Read/Update/Delete firewall object service for FortiManager.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Fortios = Pulumiverse.Fortios;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var test1 = new Fortios.FmgFirewallObjectService("test1", new()
    ///     {
    ///         Category = "Email",
    ///         Comment = "test obj service",
    ///         Iprange = "1.1.1.1",
    ///         Protocol = "TCP/UDP/SCTP",
    ///         SctpPortranges = new[]
    ///         {
    ///             "100-200:150-250",
    ///         },
    ///         TcpPortranges = new[]
    ///         {
    ///             "100-200:150-250",
    ///         },
    ///         UdpPortranges = new[]
    ///         {
    ///             "100-200:150-250",
    ///         },
    ///     });
    /// 
    ///     var test2 = new Fortios.FmgFirewallObjectService("test2", new()
    ///     {
    ///         Category = "Web Access",
    ///         Comment = "test obj service",
    ///         IcmpCode = 3,
    ///         IcmpType = 2,
    ///         Protocol = "ICMP",
    ///     });
    /// 
    ///     var test3 = new Fortios.FmgFirewallObjectService("test3", new()
    ///     {
    ///         Category = "File Access",
    ///         Comment = "test obj service",
    ///         Protocol = "IP",
    ///         ProtocolNumber = 4,
    ///     });
    /// 
    /// });
    /// ```
    /// </summary>
    [FortiosResourceType("fortios:index/fmgFirewallObjectService:FmgFirewallObjectService")]
    public partial class FmgFirewallObjectService : global::Pulumi.CustomResource
    {
        /// <summary>
        /// ADOM name. default is 'root'.
        /// </summary>
        [Output("adom")]
        public Output<string?> Adom { get; private set; } = null!;

        /// <summary>
        /// Service category. Enum: ["", "File Access", "Authentication", "Email", "General", "Network Services", "Remote Access", "Tunneling", "VoIP, Messaging &amp; Other Applications", "Web Access", "Web Proxy"]
        /// </summary>
        [Output("category")]
        public Output<string?> Category { get; private set; } = null!;

        /// <summary>
        /// Comments.
        /// </summary>
        [Output("comment")]
        public Output<string?> Comment { get; private set; } = null!;

        /// <summary>
        /// Fully qualified domain name.
        /// </summary>
        [Output("fqdn")]
        public Output<string?> Fqdn { get; private set; } = null!;

        /// <summary>
        /// ICMP Code.
        /// </summary>
        [Output("icmpCode")]
        public Output<int?> IcmpCode { get; private set; } = null!;

        /// <summary>
        /// ICMP Type.
        /// </summary>
        [Output("icmpType")]
        public Output<int?> IcmpType { get; private set; } = null!;

        /// <summary>
        /// Start and end of the IP range associated with service. Ip or Ip range(eg: 1.1.1.1-1.1.1.100).
        /// </summary>
        [Output("iprange")]
        public Output<string?> Iprange { get; private set; } = null!;

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

        /// <summary>
        /// Protocol type. Enum: ["TCP/UDP/SCTP", "ICMP", "ICMP6", "IP"]
        /// </summary>
        [Output("protocol")]
        public Output<string?> Protocol { get; private set; } = null!;

        /// <summary>
        /// IP protocol number.
        /// </summary>
        [Output("protocolNumber")]
        public Output<int?> ProtocolNumber { get; private set; } = null!;

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

        /// <summary>
        /// SCTP port ranges. e.g: ["dst-port-range:src-port-range"]
        /// </summary>
        [Output("sctpPortranges")]
        public Output<ImmutableArray<string>> SctpPortranges { get; private set; } = null!;

        /// <summary>
        /// TCP port ranges. e.g: ["dst-port-range:src-port-range"]
        /// </summary>
        [Output("tcpPortranges")]
        public Output<ImmutableArray<string>> TcpPortranges { get; private set; } = null!;

        /// <summary>
        /// UDP port ranges. e.g: ["dst-port-range:src-port-range"]
        /// </summary>
        [Output("udpPortranges")]
        public Output<ImmutableArray<string>> UdpPortranges { get; private set; } = null!;


        /// <summary>
        /// Create a FmgFirewallObjectService 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 FmgFirewallObjectService(string name, FmgFirewallObjectServiceArgs? args = null, CustomResourceOptions? options = null)
            : base("fortios:index/fmgFirewallObjectService:FmgFirewallObjectService", name, args ?? new FmgFirewallObjectServiceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private FmgFirewallObjectService(string name, Input<string> id, FmgFirewallObjectServiceState? state = null, CustomResourceOptions? options = null)
            : base("fortios:index/fmgFirewallObjectService:FmgFirewallObjectService", 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/pulumiverse/pulumi-fortios",
            };
            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 FmgFirewallObjectService 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 FmgFirewallObjectService Get(string name, Input<string> id, FmgFirewallObjectServiceState? state = null, CustomResourceOptions? options = null)
        {
            return new FmgFirewallObjectService(name, id, state, options);
        }
    }

    public sealed class FmgFirewallObjectServiceArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// ADOM name. default is 'root'.
        /// </summary>
        [Input("adom")]
        public Input<string>? Adom { get; set; }

        /// <summary>
        /// Service category. Enum: ["", "File Access", "Authentication", "Email", "General", "Network Services", "Remote Access", "Tunneling", "VoIP, Messaging &amp; Other Applications", "Web Access", "Web Proxy"]
        /// </summary>
        [Input("category")]
        public Input<string>? Category { get; set; }

        /// <summary>
        /// Comments.
        /// </summary>
        [Input("comment")]
        public Input<string>? Comment { get; set; }

        /// <summary>
        /// Fully qualified domain name.
        /// </summary>
        [Input("fqdn")]
        public Input<string>? Fqdn { get; set; }

        /// <summary>
        /// ICMP Code.
        /// </summary>
        [Input("icmpCode")]
        public Input<int>? IcmpCode { get; set; }

        /// <summary>
        /// ICMP Type.
        /// </summary>
        [Input("icmpType")]
        public Input<int>? IcmpType { get; set; }

        /// <summary>
        /// Start and end of the IP range associated with service. Ip or Ip range(eg: 1.1.1.1-1.1.1.100).
        /// </summary>
        [Input("iprange")]
        public Input<string>? Iprange { get; set; }

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

        /// <summary>
        /// Protocol type. Enum: ["TCP/UDP/SCTP", "ICMP", "ICMP6", "IP"]
        /// </summary>
        [Input("protocol")]
        public Input<string>? Protocol { get; set; }

        /// <summary>
        /// IP protocol number.
        /// </summary>
        [Input("protocolNumber")]
        public Input<int>? ProtocolNumber { get; set; }

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

        [Input("sctpPortranges")]
        private InputList<string>? _sctpPortranges;

        /// <summary>
        /// SCTP port ranges. e.g: ["dst-port-range:src-port-range"]
        /// </summary>
        public InputList<string> SctpPortranges
        {
            get => _sctpPortranges ?? (_sctpPortranges = new InputList<string>());
            set => _sctpPortranges = value;
        }

        [Input("tcpPortranges")]
        private InputList<string>? _tcpPortranges;

        /// <summary>
        /// TCP port ranges. e.g: ["dst-port-range:src-port-range"]
        /// </summary>
        public InputList<string> TcpPortranges
        {
            get => _tcpPortranges ?? (_tcpPortranges = new InputList<string>());
            set => _tcpPortranges = value;
        }

        [Input("udpPortranges")]
        private InputList<string>? _udpPortranges;

        /// <summary>
        /// UDP port ranges. e.g: ["dst-port-range:src-port-range"]
        /// </summary>
        public InputList<string> UdpPortranges
        {
            get => _udpPortranges ?? (_udpPortranges = new InputList<string>());
            set => _udpPortranges = value;
        }

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

    public sealed class FmgFirewallObjectServiceState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// ADOM name. default is 'root'.
        /// </summary>
        [Input("adom")]
        public Input<string>? Adom { get; set; }

        /// <summary>
        /// Service category. Enum: ["", "File Access", "Authentication", "Email", "General", "Network Services", "Remote Access", "Tunneling", "VoIP, Messaging &amp; Other Applications", "Web Access", "Web Proxy"]
        /// </summary>
        [Input("category")]
        public Input<string>? Category { get; set; }

        /// <summary>
        /// Comments.
        /// </summary>
        [Input("comment")]
        public Input<string>? Comment { get; set; }

        /// <summary>
        /// Fully qualified domain name.
        /// </summary>
        [Input("fqdn")]
        public Input<string>? Fqdn { get; set; }

        /// <summary>
        /// ICMP Code.
        /// </summary>
        [Input("icmpCode")]
        public Input<int>? IcmpCode { get; set; }

        /// <summary>
        /// ICMP Type.
        /// </summary>
        [Input("icmpType")]
        public Input<int>? IcmpType { get; set; }

        /// <summary>
        /// Start and end of the IP range associated with service. Ip or Ip range(eg: 1.1.1.1-1.1.1.100).
        /// </summary>
        [Input("iprange")]
        public Input<string>? Iprange { get; set; }

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

        /// <summary>
        /// Protocol type. Enum: ["TCP/UDP/SCTP", "ICMP", "ICMP6", "IP"]
        /// </summary>
        [Input("protocol")]
        public Input<string>? Protocol { get; set; }

        /// <summary>
        /// IP protocol number.
        /// </summary>
        [Input("protocolNumber")]
        public Input<int>? ProtocolNumber { get; set; }

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

        [Input("sctpPortranges")]
        private InputList<string>? _sctpPortranges;

        /// <summary>
        /// SCTP port ranges. e.g: ["dst-port-range:src-port-range"]
        /// </summary>
        public InputList<string> SctpPortranges
        {
            get => _sctpPortranges ?? (_sctpPortranges = new InputList<string>());
            set => _sctpPortranges = value;
        }

        [Input("tcpPortranges")]
        private InputList<string>? _tcpPortranges;

        /// <summary>
        /// TCP port ranges. e.g: ["dst-port-range:src-port-range"]
        /// </summary>
        public InputList<string> TcpPortranges
        {
            get => _tcpPortranges ?? (_tcpPortranges = new InputList<string>());
            set => _tcpPortranges = value;
        }

        [Input("udpPortranges")]
        private InputList<string>? _udpPortranges;

        /// <summary>
        /// UDP port ranges. e.g: ["dst-port-range:src-port-range"]
        /// </summary>
        public InputList<string> UdpPortranges
        {
            get => _udpPortranges ?? (_udpPortranges = new InputList<string>());
            set => _udpPortranges = value;
        }

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