generated/api/Models/CreatePlanEntityRule.cs

// Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.2, generator: @autorest/powershell@3.0.494)
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

namespace Commvault.Powershell.Models
{
    using static Commvault.Powershell.Runtime.Extensions;

    /// <summary>
    /// This object will send details to create new plan rule. User can provide all rule options or can specify a specific rule
    /// group. Be default, for rule to be applicable for association to a workload, ALL specified rules in that Rule need to be
    /// matched.
    /// </summary>
    public partial class CreatePlanEntityRule :
        Commvault.Powershell.Models.ICreatePlanEntityRule,
        Commvault.Powershell.Models.ICreatePlanEntityRuleInternal
    {

        /// <summary>Internal Acessors for Company</summary>
        Commvault.Powershell.Models.IIdName Commvault.Powershell.Models.ICreatePlanEntityRuleInternal.Company { get => (this._company = this._company ?? new Commvault.Powershell.Models.IdName()); set { {_company = value;} } }

        /// <summary>Internal Acessors for Plan</summary>
        Commvault.Powershell.Models.IIdName Commvault.Powershell.Models.ICreatePlanEntityRuleInternal.Plan { get => (this._plan = this._plan ?? new Commvault.Powershell.Models.IdName()); set { {_plan = value;} } }

        /// <summary>Backing field for <see cref="Company" /> property.</summary>
        private Commvault.Powershell.Models.IIdName _company;

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        internal Commvault.Powershell.Models.IIdName Company { get => (this._company = this._company ?? new Commvault.Powershell.Models.IdName()); set => this._company = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public long? CompanyId { get => ((Commvault.Powershell.Models.IIdNameInternal)Company).Id; set => ((Commvault.Powershell.Models.IIdNameInternal)Company).Id = value ?? default(long); }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public string CompanyName { get => ((Commvault.Powershell.Models.IIdNameInternal)Company).Name; set => ((Commvault.Powershell.Models.IIdNameInternal)Company).Name = value ?? null; }

        /// <summary>Backing field for <see cref="Plan" /> property.</summary>
        private Commvault.Powershell.Models.IIdName _plan;

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        internal Commvault.Powershell.Models.IIdName Plan { get => (this._plan = this._plan ?? new Commvault.Powershell.Models.IdName()); set => this._plan = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public long? PlanId { get => ((Commvault.Powershell.Models.IIdNameInternal)Plan).Id; set => ((Commvault.Powershell.Models.IIdNameInternal)Plan).Id = value ?? default(long); }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public string PlanName { get => ((Commvault.Powershell.Models.IIdNameInternal)Plan).Name; set => ((Commvault.Powershell.Models.IIdNameInternal)Plan).Name = value ?? null; }

        /// <summary>Backing field for <see cref="Rank" /> property.</summary>
        private long? _rank;

        /// <summary>
        /// Optional field to suggest priority/rank of the rule. If not present, we will process rule in the same order they are created.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public long? Rank { get => this._rank; set => this._rank = value; }

        /// <summary>Backing field for <see cref="Regions" /> property.</summary>
        private Commvault.Powershell.Models.IIdName[] _regions;

        /// <summary>
        /// This will include list of regions that should be evaluated against workload region for plan association.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public Commvault.Powershell.Models.IIdName[] Regions { get => this._regions; set => this._regions = value; }

        /// <summary>Backing field for <see cref="ServerGroups" /> property.</summary>
        private Commvault.Powershell.Models.IIdName[] _serverGroups;

        /// <summary>
        /// This will include list of Server groups that should be evaluated against workload server group for plan association.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public Commvault.Powershell.Models.IIdName[] ServerGroups { get => this._serverGroups; set => this._serverGroups = value; }

        /// <summary>Backing field for <see cref="Solutions" /> property.</summary>
        private Commvault.Powershell.Models.IIdName[] _solutions;

        /// <summary>
        /// This will include list of solutions that should be evaluated against workload for plan association
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public Commvault.Powershell.Models.IIdName[] Solutions { get => this._solutions; set => this._solutions = value; }

        /// <summary>Backing field for <see cref="Tags" /> property.</summary>
        private Commvault.Powershell.Models.IPlanEntityRuleTag[] _tags;

        /// <summary>
        /// This will include list of tags that should be evaluated against workload for plan association
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public Commvault.Powershell.Models.IPlanEntityRuleTag[] Tags { get => this._tags; set => this._tags = value; }

        /// <summary>Backing field for <see cref="Workloads" /> property.</summary>
        private Commvault.Powershell.Models.IIdName[] _workloads;

        /// <summary>
        /// This will include list of apptypes that should be evaluated against workload apptype for plan association.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public Commvault.Powershell.Models.IIdName[] Workloads { get => this._workloads; set => this._workloads = value; }

        /// <summary>Creates an new <see cref="CreatePlanEntityRule" /> instance.</summary>
        public CreatePlanEntityRule()
        {

        }
    }
    /// This object will send details to create new plan rule. User can provide all rule options or can specify a specific rule
    /// group. Be default, for rule to be applicable for association to a workload, ALL specified rules in that Rule need to be
    /// matched.
    public partial interface ICreatePlanEntityRule :
        Commvault.Powershell.Runtime.IJsonSerializable
    {
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"",
        SerializedName = @"id",
        PossibleTypes = new [] { typeof(long) })]
        long? CompanyId { get; set; }

        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"",
        SerializedName = @"name",
        PossibleTypes = new [] { typeof(string) })]
        string CompanyName { get; set; }

        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"",
        SerializedName = @"id",
        PossibleTypes = new [] { typeof(long) })]
        long? PlanId { get; set; }

        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"",
        SerializedName = @"name",
        PossibleTypes = new [] { typeof(string) })]
        string PlanName { get; set; }
        /// <summary>
        /// Optional field to suggest priority/rank of the rule. If not present, we will process rule in the same order they are created.
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Optional field to suggest priority/rank of the rule. If not present, we will process rule in the same order they are created.",
        SerializedName = @"rank",
        PossibleTypes = new [] { typeof(long) })]
        long? Rank { get; set; }
        /// <summary>
        /// This will include list of regions that should be evaluated against workload region for plan association.
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"This will include list of regions that should be evaluated against workload region for plan association.",
        SerializedName = @"regions",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IIdName) })]
        Commvault.Powershell.Models.IIdName[] Regions { get; set; }
        /// <summary>
        /// This will include list of Server groups that should be evaluated against workload server group for plan association.
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"This will include list of Server groups that should be evaluated against workload server group for plan association.",
        SerializedName = @"serverGroups",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IIdName) })]
        Commvault.Powershell.Models.IIdName[] ServerGroups { get; set; }
        /// <summary>
        /// This will include list of solutions that should be evaluated against workload for plan association
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"This will include list of solutions that should be evaluated against workload for plan association",
        SerializedName = @"solutions",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IIdName) })]
        Commvault.Powershell.Models.IIdName[] Solutions { get; set; }
        /// <summary>
        /// This will include list of tags that should be evaluated against workload for plan association
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"This will include list of tags that should be evaluated against workload for plan association",
        SerializedName = @"tags",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IPlanEntityRuleTag) })]
        Commvault.Powershell.Models.IPlanEntityRuleTag[] Tags { get; set; }
        /// <summary>
        /// This will include list of apptypes that should be evaluated against workload apptype for plan association.
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"This will include list of apptypes that should be evaluated against workload apptype for plan association.",
        SerializedName = @"workloads",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IIdName) })]
        Commvault.Powershell.Models.IIdName[] Workloads { get; set; }

    }
    /// This object will send details to create new plan rule. User can provide all rule options or can specify a specific rule
    /// group. Be default, for rule to be applicable for association to a workload, ALL specified rules in that Rule need to be
    /// matched.
    internal partial interface ICreatePlanEntityRuleInternal

    {
        Commvault.Powershell.Models.IIdName Company { get; set; }

        long? CompanyId { get; set; }

        string CompanyName { get; set; }

        Commvault.Powershell.Models.IIdName Plan { get; set; }

        long? PlanId { get; set; }

        string PlanName { get; set; }
        /// <summary>
        /// Optional field to suggest priority/rank of the rule. If not present, we will process rule in the same order they are created.
        /// </summary>
        long? Rank { get; set; }
        /// <summary>
        /// This will include list of regions that should be evaluated against workload region for plan association.
        /// </summary>
        Commvault.Powershell.Models.IIdName[] Regions { get; set; }
        /// <summary>
        /// This will include list of Server groups that should be evaluated against workload server group for plan association.
        /// </summary>
        Commvault.Powershell.Models.IIdName[] ServerGroups { get; set; }
        /// <summary>
        /// This will include list of solutions that should be evaluated against workload for plan association
        /// </summary>
        Commvault.Powershell.Models.IIdName[] Solutions { get; set; }
        /// <summary>
        /// This will include list of tags that should be evaluated against workload for plan association
        /// </summary>
        Commvault.Powershell.Models.IPlanEntityRuleTag[] Tags { get; set; }
        /// <summary>
        /// This will include list of apptypes that should be evaluated against workload apptype for plan association.
        /// </summary>
        Commvault.Powershell.Models.IIdName[] Workloads { get; set; }

    }
}