generated/api/Models/Location.cs

// Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.4, generator: @autorest/powershell@3.0.415)
// 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 Location :
        Commvault.Powershell.Models.ILocation,
        Commvault.Powershell.Models.ILocationInternal,
        Commvault.Powershell.Runtime.IValidates
    {
        /// <summary>
        /// Backing field for Inherited model <see cref= "Commvault.Powershell.Models.IIdName" />
        /// </summary>
        private Commvault.Powershell.Models.IIdName __idName = new Commvault.Powershell.Models.IdName();

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public long? Id { get => ((Commvault.Powershell.Models.IIdNameInternal)__idName).Id; set => ((Commvault.Powershell.Models.IIdNameInternal)__idName).Id = value; }

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inherited)]
        public string Name { get => ((Commvault.Powershell.Models.IIdNameInternal)__idName).Name; set => ((Commvault.Powershell.Models.IIdNameInternal)__idName).Name = value; }

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

        /// <summary>location type.</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public long? Type { get => this._type; set => this._type = value; }

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

        }

        /// <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(__idName), __idName);
            await eventListener.AssertObjectIsValid(nameof(__idName), __idName);
        }
    }
    public partial interface ILocation :
        Commvault.Powershell.Runtime.IJsonSerializable,
        Commvault.Powershell.Models.IIdName
    {
        /// <summary>location type.</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"location type.",
        SerializedName = @"type",
        PossibleTypes = new [] { typeof(long) })]
        long? Type { get; set; }

    }
    internal partial interface ILocationInternal :
        Commvault.Powershell.Models.IIdNameInternal
    {
        /// <summary>location type.</summary>
        long? Type { get; set; }

    }
}