// *** 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/catalogAccessControl:CatalogAccessControl")]
    public partial class CatalogAccessControl : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The ID of Catalog to use
        /// </summary>
        [Output("catalogId")]
        public Output<string> CatalogId { get; private set; } = null!;

        /// <summary>
        /// Access level when the Catalog is shared with everyone (only ReadOnly is available). Required when shared_with_everyone
        /// is set
        /// </summary>
        [Output("everyoneAccessLevel")]
        public Output<string?> EveryoneAccessLevel { 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>
        /// Whether the Catalog is shared with everyone
        /// </summary>
        [Output("sharedWithEveryone")]
        public Output<bool> SharedWithEveryone { get; private set; } = null!;

        [Output("sharedWiths")]
        public Output<ImmutableArray<Outputs.CatalogAccessControlSharedWith>> SharedWiths { get; private set; } = null!;


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

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

    public sealed class CatalogAccessControlArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The ID of Catalog to use
        /// </summary>
        [Input("catalogId", required: true)]
        public Input<string> CatalogId { get; set; } = null!;

        /// <summary>
        /// Access level when the Catalog is shared with everyone (only ReadOnly is available). Required when shared_with_everyone
        /// is set
        /// </summary>
        [Input("everyoneAccessLevel")]
        public Input<string>? EveryoneAccessLevel { 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>
        /// Whether the Catalog is shared with everyone
        /// </summary>
        [Input("sharedWithEveryone", required: true)]
        public Input<bool> SharedWithEveryone { get; set; } = null!;

        [Input("sharedWiths")]
        private InputList<Inputs.CatalogAccessControlSharedWithArgs>? _sharedWiths;
        public InputList<Inputs.CatalogAccessControlSharedWithArgs> SharedWiths
        {
            get => _sharedWiths ?? (_sharedWiths = new InputList<Inputs.CatalogAccessControlSharedWithArgs>());
            set => _sharedWiths = value;
        }

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

    public sealed class CatalogAccessControlState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The ID of Catalog to use
        /// </summary>
        [Input("catalogId")]
        public Input<string>? CatalogId { get; set; }

        /// <summary>
        /// Access level when the Catalog is shared with everyone (only ReadOnly is available). Required when shared_with_everyone
        /// is set
        /// </summary>
        [Input("everyoneAccessLevel")]
        public Input<string>? EveryoneAccessLevel { 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>
        /// Whether the Catalog is shared with everyone
        /// </summary>
        [Input("sharedWithEveryone")]
        public Input<bool>? SharedWithEveryone { get; set; }

        [Input("sharedWiths")]
        private InputList<Inputs.CatalogAccessControlSharedWithGetArgs>? _sharedWiths;
        public InputList<Inputs.CatalogAccessControlSharedWithGetArgs> SharedWiths
        {
            get => _sharedWiths ?? (_sharedWiths = new InputList<Inputs.CatalogAccessControlSharedWithGetArgs>());
            set => _sharedWiths = value;
        }

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