<filename>sdk/dotnet/Team.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.Octopusdeploy
{
    /// <summary>
    /// This resource manages teams in Octopus Deploy.
    /// 
    /// &gt; **NOTE on Team User Roles and Scoped User Roles:** We currently
    /// provides both a standalone Scoped User Role resource
    /// and a Team resource with `user_roles` blocks defined in-line. At this time you
    /// cannot use a Team with in-line user_roles in conjunction with any Scoped User Role
    /// resources. Doing so will cause a conflict of user role settings and will overwrite
    /// user roles.
    /// </summary>
    [OctopusdeployResourceType("octopusdeploy:index/team:Team")]
    public partial class Team : global::Pulumi.CustomResource
    {
        [Output("canBeDeleted")]
        public Output<bool> CanBeDeleted { get; private set; } = null!;

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

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

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

        /// <summary>
        /// The user-friendly description of this team.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        [Output("externalSecurityGroups")]
        public Output<ImmutableArray<Outputs.TeamExternalSecurityGroup>> ExternalSecurityGroups { get; private set; } = null!;

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

        /// <summary>
        /// The space associated with this team.
        /// </summary>
        [Output("spaceId")]
        public Output<string> SpaceId { get; private set; } = null!;

        [Output("userRoles")]
        public Output<ImmutableArray<Outputs.TeamUserRole>> UserRoles { get; private set; } = null!;

        /// <summary>
        /// A list of user IDs designated to be members of this team.
        /// </summary>
        [Output("users")]
        public Output<ImmutableArray<string>> Users { get; private set; } = null!;


        /// <summary>
        /// Create a Team 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 Team(string name, TeamArgs? args = null, CustomResourceOptions? options = null)
            : base("octopusdeploy:index/team:Team", name, args ?? new TeamArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Team(string name, Input<string> id, TeamState? state = null, CustomResourceOptions? options = null)
            : base("octopusdeploy:index/team:Team", 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 Team 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 Team Get(string name, Input<string> id, TeamState? state = null, CustomResourceOptions? options = null)
        {
            return new Team(name, id, state, options);
        }
    }

    public sealed class TeamArgs : global::Pulumi.ResourceArgs
    {
        [Input("canBeDeleted")]
        public Input<bool>? CanBeDeleted { get; set; }

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

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

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

        /// <summary>
        /// The user-friendly description of this team.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        [Input("externalSecurityGroups")]
        private InputList<Inputs.TeamExternalSecurityGroupArgs>? _externalSecurityGroups;
        public InputList<Inputs.TeamExternalSecurityGroupArgs> ExternalSecurityGroups
        {
            get => _externalSecurityGroups ?? (_externalSecurityGroups = new InputList<Inputs.TeamExternalSecurityGroupArgs>());
            set => _externalSecurityGroups = value;
        }

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

        /// <summary>
        /// The space associated with this team.
        /// </summary>
        [Input("spaceId")]
        public Input<string>? SpaceId { get; set; }

        [Input("userRoles")]
        private InputList<Inputs.TeamUserRoleArgs>? _userRoles;
        public InputList<Inputs.TeamUserRoleArgs> UserRoles
        {
            get => _userRoles ?? (_userRoles = new InputList<Inputs.TeamUserRoleArgs>());
            set => _userRoles = value;
        }

        [Input("users")]
        private InputList<string>? _users;

        /// <summary>
        /// A list of user IDs designated to be members of this team.
        /// </summary>
        public InputList<string> Users
        {
            get => _users ?? (_users = new InputList<string>());
            set => _users = value;
        }

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

    public sealed class TeamState : global::Pulumi.ResourceArgs
    {
        [Input("canBeDeleted")]
        public Input<bool>? CanBeDeleted { get; set; }

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

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

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

        /// <summary>
        /// The user-friendly description of this team.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        [Input("externalSecurityGroups")]
        private InputList<Inputs.TeamExternalSecurityGroupGetArgs>? _externalSecurityGroups;
        public InputList<Inputs.TeamExternalSecurityGroupGetArgs> ExternalSecurityGroups
        {
            get => _externalSecurityGroups ?? (_externalSecurityGroups = new InputList<Inputs.TeamExternalSecurityGroupGetArgs>());
            set => _externalSecurityGroups = value;
        }

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

        /// <summary>
        /// The space associated with this team.
        /// </summary>
        [Input("spaceId")]
        public Input<string>? SpaceId { get; set; }

        [Input("userRoles")]
        private InputList<Inputs.TeamUserRoleGetArgs>? _userRoles;
        public InputList<Inputs.TeamUserRoleGetArgs> UserRoles
        {
            get => _userRoles ?? (_userRoles = new InputList<Inputs.TeamUserRoleGetArgs>());
            set => _userRoles = value;
        }

        [Input("users")]
        private InputList<string>? _users;

        /// <summary>
        /// A list of user IDs designated to be members of this team.
        /// </summary>
        public InputList<string> Users
        {
            get => _users ?? (_users = new InputList<string>());
            set => _users = value;
        }

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