<filename>sdk/dotnet/Tencentcloud/Rum/Project.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 TencentCloudIAC.PulumiPackage.Tencentcloud.Rum
{
    /// <summary>
    /// Provides a resource to create a rum project
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var project = new Tencentcloud.Rum.Project("project", new Tencentcloud.Rum.ProjectArgs
    ///         {
    ///             Desc = "projectDesc-1",
    ///             EnableUrlGroup = 0,
    ///             InstanceId = "rum-pasZKEI3RLgakj",
    ///             Rate = "100",
    ///             Repo = "",
    ///             Type = "web",
    ///             Url = "iac-tf.com",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// rum project can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Rum/project:Project project project_id
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Rum/project:Project")]
    public partial class Project : Pulumi.CustomResource
    {
        /// <summary>
        /// Creata Time.
        /// </summary>
        [Output("createTime")]
        public Output<string> CreateTime { get; private set; } = null!;

        /// <summary>
        /// Creator ID.
        /// </summary>
        [Output("creator")]
        public Output<string> Creator { get; private set; } = null!;

        /// <summary>
        /// Description of the created project (optional and up to 1,000 characters).
        /// </summary>
        [Output("desc")]
        public Output<string?> Desc { get; private set; } = null!;

        /// <summary>
        /// Whether to enable aggregation.
        /// </summary>
        [Output("enableUrlGroup")]
        public Output<int> EnableUrlGroup { get; private set; } = null!;

        /// <summary>
        /// Business system ID.
        /// </summary>
        [Output("instanceId")]
        public Output<string> InstanceId { get; private set; } = null!;

        /// <summary>
        /// Instance key.
        /// </summary>
        [Output("instanceKey")]
        public Output<string> InstanceKey { get; private set; } = null!;

        /// <summary>
        /// Instance name.
        /// </summary>
        [Output("instanceName")]
        public Output<string> InstanceName { get; private set; } = null!;

        /// <summary>
        /// Starred status. `1`: yes; `0`: no.
        /// </summary>
        [Output("isStar")]
        public Output<int> IsStar { get; private set; } = null!;

        /// <summary>
        /// Unique project key (12 characters).
        /// </summary>
        [Output("key")]
        public Output<string> Key { get; private set; } = null!;

        /// <summary>
        /// Name of the created project (required and up to 200 characters).
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Project status (`1`: Creating; `2`: Running; `3`: Abnormal; `4`: Restarting; `5`: Stopping; `6`: Stopped; `7`: Terminating; `8`: Terminated).
        /// </summary>
        [Output("projectStatus")]
        public Output<int> ProjectStatus { get; private set; } = null!;

        /// <summary>
        /// Project sampling rate (greater than or equal to 0).
        /// </summary>
        [Output("rate")]
        public Output<string> Rate { get; private set; } = null!;

        /// <summary>
        /// Repository address of the project (optional and up to 256 characters).
        /// </summary>
        [Output("repo")]
        public Output<string?> Repo { get; private set; } = null!;

        /// <summary>
        /// Project type (valid values: `web`, `mp`, `android`, `ios`, `node`, `hippy`, `weex`, `viola`, `rn`).
        /// </summary>
        [Output("type")]
        public Output<string> Type { get; private set; } = null!;

        /// <summary>
        /// Webpage address of the project (optional and up to 256 characters).
        /// </summary>
        [Output("url")]
        public Output<string?> Url { get; private set; } = null!;


        /// <summary>
        /// Create a Project 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 Project(string name, ProjectArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Rum/project:Project", name, args ?? new ProjectArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Project(string name, Input<string> id, ProjectState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Rum/project:Project", 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/tencentcloudstack",
            };
            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 Project 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 Project Get(string name, Input<string> id, ProjectState? state = null, CustomResourceOptions? options = null)
        {
            return new Project(name, id, state, options);
        }
    }

    public sealed class ProjectArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Description of the created project (optional and up to 1,000 characters).
        /// </summary>
        [Input("desc")]
        public Input<string>? Desc { get; set; }

        /// <summary>
        /// Whether to enable aggregation.
        /// </summary>
        [Input("enableUrlGroup", required: true)]
        public Input<int> EnableUrlGroup { get; set; } = null!;

        /// <summary>
        /// Business system ID.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

        /// <summary>
        /// Name of the created project (required and up to 200 characters).
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Project sampling rate (greater than or equal to 0).
        /// </summary>
        [Input("rate", required: true)]
        public Input<string> Rate { get; set; } = null!;

        /// <summary>
        /// Repository address of the project (optional and up to 256 characters).
        /// </summary>
        [Input("repo")]
        public Input<string>? Repo { get; set; }

        /// <summary>
        /// Project type (valid values: `web`, `mp`, `android`, `ios`, `node`, `hippy`, `weex`, `viola`, `rn`).
        /// </summary>
        [Input("type", required: true)]
        public Input<string> Type { get; set; } = null!;

        /// <summary>
        /// Webpage address of the project (optional and up to 256 characters).
        /// </summary>
        [Input("url")]
        public Input<string>? Url { get; set; }

        public ProjectArgs()
        {
        }
    }

    public sealed class ProjectState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Creata Time.
        /// </summary>
        [Input("createTime")]
        public Input<string>? CreateTime { get; set; }

        /// <summary>
        /// Creator ID.
        /// </summary>
        [Input("creator")]
        public Input<string>? Creator { get; set; }

        /// <summary>
        /// Description of the created project (optional and up to 1,000 characters).
        /// </summary>
        [Input("desc")]
        public Input<string>? Desc { get; set; }

        /// <summary>
        /// Whether to enable aggregation.
        /// </summary>
        [Input("enableUrlGroup")]
        public Input<int>? EnableUrlGroup { get; set; }

        /// <summary>
        /// Business system ID.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        /// <summary>
        /// Instance key.
        /// </summary>
        [Input("instanceKey")]
        public Input<string>? InstanceKey { get; set; }

        /// <summary>
        /// Instance name.
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// Starred status. `1`: yes; `0`: no.
        /// </summary>
        [Input("isStar")]
        public Input<int>? IsStar { get; set; }

        /// <summary>
        /// Unique project key (12 characters).
        /// </summary>
        [Input("key")]
        public Input<string>? Key { get; set; }

        /// <summary>
        /// Name of the created project (required and up to 200 characters).
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Project status (`1`: Creating; `2`: Running; `3`: Abnormal; `4`: Restarting; `5`: Stopping; `6`: Stopped; `7`: Terminating; `8`: Terminated).
        /// </summary>
        [Input("projectStatus")]
        public Input<int>? ProjectStatus { get; set; }

        /// <summary>
        /// Project sampling rate (greater than or equal to 0).
        /// </summary>
        [Input("rate")]
        public Input<string>? Rate { get; set; }

        /// <summary>
        /// Repository address of the project (optional and up to 256 characters).
        /// </summary>
        [Input("repo")]
        public Input<string>? Repo { get; set; }

        /// <summary>
        /// Project type (valid values: `web`, `mp`, `android`, `ios`, `node`, `hippy`, `weex`, `viola`, `rn`).
        /// </summary>
        [Input("type")]
        public Input<string>? Type { get; set; }

        /// <summary>
        /// Webpage address of the project (optional and up to 256 characters).
        /// </summary>
        [Input("url")]
        public Input<string>? Url { get; set; }

        public ProjectState()
        {
        }
    }
}
