<filename>sdk/dotnet/ServiceGroup.cs// *** 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 PiersKarsenbarg.Nutanix
{
    /// <summary>
    /// Provides a resource to create a service group based on the input parameters.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Nutanix = PiersKarsenbarg.Nutanix;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var test = new Nutanix.ServiceGroup("test", new Nutanix.ServiceGroupArgs
    ///         {
    ///             Description = "this is service group",
    ///             ServiceLists = 
    ///             {
    ///                 new Nutanix.Inputs.ServiceGroupServiceListArgs
    ///                 {
    ///                     Protocol = "TCP",
    ///                     TcpPortRangeLists = 
    ///                     {
    ///                         new Nutanix.Inputs.ServiceGroupServiceListTcpPortRangeListArgs
    ///                         {
    ///                             EndPort = 22,
    ///                             StartPort = 22,
    ///                         },
    ///                         new Nutanix.Inputs.ServiceGroupServiceListTcpPortRangeListArgs
    ///                         {
    ///                             EndPort = 2222,
    ///                             StartPort = 2222,
    ///                         },
    ///                     },
    ///                 },
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// </summary>
    [NutanixResourceType("nutanix:index/serviceGroup:ServiceGroup")]
    public partial class ServiceGroup : Pulumi.CustomResource
    {
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

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

        [Output("serviceLists")]
        public Output<ImmutableArray<Outputs.ServiceGroupServiceList>> ServiceLists { get; private set; } = null!;

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


        /// <summary>
        /// Create a ServiceGroup 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 ServiceGroup(string name, ServiceGroupArgs args, CustomResourceOptions? options = null)
            : base("nutanix:index/serviceGroup:ServiceGroup", name, args ?? new ServiceGroupArgs(), MakeResourceOptions(options, ""))
        {
        }

        private ServiceGroup(string name, Input<string> id, ServiceGroupState? state = null, CustomResourceOptions? options = null)
            : base("nutanix:index/serviceGroup:ServiceGroup", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "https://github.com/pierskarsenbarg/pulumi-nutanix/releases/download/${VERSION}",
            };
            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 ServiceGroup 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 ServiceGroup Get(string name, Input<string> id, ServiceGroupState? state = null, CustomResourceOptions? options = null)
        {
            return new ServiceGroup(name, id, state, options);
        }
    }

    public sealed class ServiceGroupArgs : Pulumi.ResourceArgs
    {
        [Input("description")]
        public Input<string>? Description { get; set; }

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

        [Input("serviceLists", required: true)]
        private InputList<Inputs.ServiceGroupServiceListArgs>? _serviceLists;
        public InputList<Inputs.ServiceGroupServiceListArgs> ServiceLists
        {
            get => _serviceLists ?? (_serviceLists = new InputList<Inputs.ServiceGroupServiceListArgs>());
            set => _serviceLists = value;
        }

        public ServiceGroupArgs()
        {
        }
    }

    public sealed class ServiceGroupState : Pulumi.ResourceArgs
    {
        [Input("description")]
        public Input<string>? Description { get; set; }

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

        [Input("serviceLists")]
        private InputList<Inputs.ServiceGroupServiceListGetArgs>? _serviceLists;
        public InputList<Inputs.ServiceGroupServiceListGetArgs> ServiceLists
        {
            get => _serviceLists ?? (_serviceLists = new InputList<Inputs.ServiceGroupServiceListGetArgs>());
            set => _serviceLists = value;
        }

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

        public ServiceGroupState()
        {
        }
    }
}
