generated/api/Models/ModifySoftwareCacheAssociations.cs

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

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

    public partial class ModifySoftwareCacheAssociations :
        Commvault.Powershell.Models.IModifySoftwareCacheAssociations,
        Commvault.Powershell.Models.IModifySoftwareCacheAssociationsInternal,
        Commvault.Powershell.Runtime.IValidates
    {
        /// <summary>
        /// Backing field for Inherited model <see cref= "Commvault.Powershell.Models.IServerOrServerGroupAssociation" />
        /// </summary>
        private Commvault.Powershell.Models.IServerOrServerGroupAssociation __serverOrServerGroupAssociation = new Commvault.Powershell.Models.ServerOrServerGroupAssociation();

        /// <summary>Id of server or server group</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public long? Id { get => ((Commvault.Powershell.Models.IServerOrServerGroupAssociationInternal)__serverOrServerGroupAssociation).Id; set => ((Commvault.Powershell.Models.IServerOrServerGroupAssociationInternal)__serverOrServerGroupAssociation).Id = value ?? default(long); }

        /// <summary>Name of server or server group</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public string Name { get => ((Commvault.Powershell.Models.IServerOrServerGroupAssociationInternal)__serverOrServerGroupAssociation).Name; set => ((Commvault.Powershell.Models.IServerOrServerGroupAssociationInternal)__serverOrServerGroupAssociation).Name = value ?? null; }

        /// <summary>Backing field for <see cref="OpType" /> property.</summary>
        private string _opType;

        /// <summary>Basic operation types</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string OpType { get => this._opType; set => this._opType = value; }

        /// <summary>ServerOrServerGroupTypes</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public string Type { get => ((Commvault.Powershell.Models.IServerOrServerGroupAssociationInternal)__serverOrServerGroupAssociation).Type; set => ((Commvault.Powershell.Models.IServerOrServerGroupAssociationInternal)__serverOrServerGroupAssociation).Type = value ?? null; }

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

        }

        /// <summary>Validates that this object meets the validation criteria.</summary>
        /// <param name="eventListener">an <see cref="Commvault.Powershell.Runtime.IEventListener" /> instance that will receive validation
        /// events.</param>
        /// <returns>
        /// A <see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed.
        /// </returns>
        public async global::System.Threading.Tasks.Task Validate(Commvault.Powershell.Runtime.IEventListener eventListener)
        {
            await eventListener.AssertNotNull(nameof(__serverOrServerGroupAssociation), __serverOrServerGroupAssociation);
            await eventListener.AssertObjectIsValid(nameof(__serverOrServerGroupAssociation), __serverOrServerGroupAssociation);
        }
    }
    public partial interface IModifySoftwareCacheAssociations :
        Commvault.Powershell.Runtime.IJsonSerializable,
        Commvault.Powershell.Models.IServerOrServerGroupAssociation
    {
        /// <summary>Basic operation types</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = false,
        Read = true,
        Create = true,
        Update = true,
        Description = @"Basic operation types",
        SerializedName = @"opType",
        PossibleTypes = new [] { typeof(string) })]
        string OpType { get; set; }

    }
    internal partial interface IModifySoftwareCacheAssociationsInternal :
        Commvault.Powershell.Models.IServerOrServerGroupAssociationInternal
    {
        /// <summary>Basic operation types</summary>
        string OpType { get; set; }

    }
}