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

namespace Pulumi.Vcd
{
    [VcdResourceType("vcd:index/nsxtSecurityGroup:NsxtSecurityGroup")]
    public partial class NsxtSecurityGroup : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Security Group description
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// Edge Gateway ID in which security group is located
        /// </summary>
        [Output("edgeGatewayId")]
        public Output<string> EdgeGatewayId { get; private set; } = null!;

        /// <summary>
        /// Set of Org VDC network IDs attached to this security group
        /// </summary>
        [Output("memberOrgNetworkIds")]
        public Output<ImmutableArray<string>> MemberOrgNetworkIds { get; private set; } = null!;

        /// <summary>
        /// Set of VM IDs
        /// </summary>
        [Output("memberVms")]
        public Output<ImmutableArray<Outputs.NsxtSecurityGroupMemberVm>> MemberVms { get; private set; } = null!;

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

        /// <summary>
        /// The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across
        /// different organizations
        /// </summary>
        [Output("org")]
        public Output<string?> Org { get; private set; } = null!;

        /// <summary>
        /// ID of VDC or VDC Group
        /// </summary>
        [Output("ownerId")]
        public Output<string> OwnerId { get; private set; } = null!;

        /// <summary>
        /// The name of VDC to use, optional if defined at provider level
        /// </summary>
        [Output("vdc")]
        public Output<string> Vdc { get; private set; } = null!;


        /// <summary>
        /// Create a NsxtSecurityGroup 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 NsxtSecurityGroup(string name, NsxtSecurityGroupArgs args, CustomResourceOptions? options = null)
            : base("vcd:index/nsxtSecurityGroup:NsxtSecurityGroup", name, args ?? new NsxtSecurityGroupArgs(), MakeResourceOptions(options, ""))
        {
        }

        private NsxtSecurityGroup(string name, Input<string> id, NsxtSecurityGroupState? state = null, CustomResourceOptions? options = null)
            : base("vcd:index/nsxtSecurityGroup:NsxtSecurityGroup", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.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 NsxtSecurityGroup 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 NsxtSecurityGroup Get(string name, Input<string> id, NsxtSecurityGroupState? state = null, CustomResourceOptions? options = null)
        {
            return new NsxtSecurityGroup(name, id, state, options);
        }
    }

    public sealed class NsxtSecurityGroupArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Security Group description
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Edge Gateway ID in which security group is located
        /// </summary>
        [Input("edgeGatewayId", required: true)]
        public Input<string> EdgeGatewayId { get; set; } = null!;

        [Input("memberOrgNetworkIds")]
        private InputList<string>? _memberOrgNetworkIds;

        /// <summary>
        /// Set of Org VDC network IDs attached to this security group
        /// </summary>
        public InputList<string> MemberOrgNetworkIds
        {
            get => _memberOrgNetworkIds ?? (_memberOrgNetworkIds = new InputList<string>());
            set => _memberOrgNetworkIds = value;
        }

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

        /// <summary>
        /// The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across
        /// different organizations
        /// </summary>
        [Input("org")]
        public Input<string>? Org { get; set; }

        /// <summary>
        /// The name of VDC to use, optional if defined at provider level
        /// </summary>
        [Input("vdc")]
        public Input<string>? Vdc { get; set; }

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

    public sealed class NsxtSecurityGroupState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Security Group description
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Edge Gateway ID in which security group is located
        /// </summary>
        [Input("edgeGatewayId")]
        public Input<string>? EdgeGatewayId { get; set; }

        [Input("memberOrgNetworkIds")]
        private InputList<string>? _memberOrgNetworkIds;

        /// <summary>
        /// Set of Org VDC network IDs attached to this security group
        /// </summary>
        public InputList<string> MemberOrgNetworkIds
        {
            get => _memberOrgNetworkIds ?? (_memberOrgNetworkIds = new InputList<string>());
            set => _memberOrgNetworkIds = value;
        }

        [Input("memberVms")]
        private InputList<Inputs.NsxtSecurityGroupMemberVmGetArgs>? _memberVms;

        /// <summary>
        /// Set of VM IDs
        /// </summary>
        public InputList<Inputs.NsxtSecurityGroupMemberVmGetArgs> MemberVms
        {
            get => _memberVms ?? (_memberVms = new InputList<Inputs.NsxtSecurityGroupMemberVmGetArgs>());
            set => _memberVms = value;
        }

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

        /// <summary>
        /// The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across
        /// different organizations
        /// </summary>
        [Input("org")]
        public Input<string>? Org { get; set; }

        /// <summary>
        /// ID of VDC or VDC Group
        /// </summary>
        [Input("ownerId")]
        public Input<string>? OwnerId { get; set; }

        /// <summary>
        /// The name of VDC to use, optional if defined at provider level
        /// </summary>
        [Input("vdc")]
        public Input<string>? Vdc { get; set; }

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