<reponame>Twingate-Labs/pulumi-twingate// *** 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 TwingateLabs.Twingate
{
    [TwingateResourceType("twingate:index/twingateGroup:TwingateGroup")]
    public partial class TwingateGroup : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Determines whether User assignments to this Group will override any existing assignments. Default is `true`. If set to
        /// `false`, assignments made outside of Terraform will be ignored.
        /// </summary>
        [Output("isAuthoritative")]
        public Output<bool> IsAuthoritative { get; private set; } = null!;

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

        /// <summary>
        /// Defines which Security Policy applies to this Group. The Security Policy ID can be obtained from the
        /// `twingate_security_policy` and `twingate_security_policies` data sources.
        /// </summary>
        [Output("securityPolicyId")]
        public Output<string> SecurityPolicyId { get; private set; } = null!;

        /// <summary>
        /// List of User IDs that have permission to access the Group.
        /// </summary>
        [Output("userIds")]
        public Output<ImmutableArray<string>> UserIds { get; private set; } = null!;


        /// <summary>
        /// Create a TwingateGroup 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 TwingateGroup(string name, TwingateGroupArgs? args = null, CustomResourceOptions? options = null)
            : base("twingate:index/twingateGroup:TwingateGroup", name, args ?? new TwingateGroupArgs(), MakeResourceOptions(options, ""))
        {
        }

        private TwingateGroup(string name, Input<string> id, TwingateGroupState? state = null, CustomResourceOptions? options = null)
            : base("twingate:index/twingateGroup:TwingateGroup", 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/twingate-labs",
            };
            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 TwingateGroup 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 TwingateGroup Get(string name, Input<string> id, TwingateGroupState? state = null, CustomResourceOptions? options = null)
        {
            return new TwingateGroup(name, id, state, options);
        }
    }

    public sealed class TwingateGroupArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Determines whether User assignments to this Group will override any existing assignments. Default is `true`. If set to
        /// `false`, assignments made outside of Terraform will be ignored.
        /// </summary>
        [Input("isAuthoritative")]
        public Input<bool>? IsAuthoritative { get; set; }

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

        /// <summary>
        /// Defines which Security Policy applies to this Group. The Security Policy ID can be obtained from the
        /// `twingate_security_policy` and `twingate_security_policies` data sources.
        /// </summary>
        [Input("securityPolicyId")]
        public Input<string>? SecurityPolicyId { get; set; }

        [Input("userIds")]
        private InputList<string>? _userIds;

        /// <summary>
        /// List of User IDs that have permission to access the Group.
        /// </summary>
        public InputList<string> UserIds
        {
            get => _userIds ?? (_userIds = new InputList<string>());
            set => _userIds = value;
        }

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

    public sealed class TwingateGroupState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Determines whether User assignments to this Group will override any existing assignments. Default is `true`. If set to
        /// `false`, assignments made outside of Terraform will be ignored.
        /// </summary>
        [Input("isAuthoritative")]
        public Input<bool>? IsAuthoritative { get; set; }

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

        /// <summary>
        /// Defines which Security Policy applies to this Group. The Security Policy ID can be obtained from the
        /// `twingate_security_policy` and `twingate_security_policies` data sources.
        /// </summary>
        [Input("securityPolicyId")]
        public Input<string>? SecurityPolicyId { get; set; }

        [Input("userIds")]
        private InputList<string>? _userIds;

        /// <summary>
        /// List of User IDs that have permission to access the Group.
        /// </summary>
        public InputList<string> UserIds
        {
            get => _userIds ?? (_userIds = new InputList<string>());
            set => _userIds = value;
        }

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