generated/api/Models/User.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;

    /// <summary>Returns the details of of the user whose userId has been provided</summary>
    public partial class User :
        Commvault.Powershell.Models.IUser,
        Commvault.Powershell.Models.IUserInternal
    {

        /// <summary>Backing field for <see cref="AssociatedUserGroups" /> property.</summary>
        private Commvault.Powershell.Models.IIdNameProvider[] _associatedUserGroups;

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public Commvault.Powershell.Models.IIdNameProvider[] AssociatedUserGroups { get => this._associatedUserGroups; set => this._associatedUserGroups = value; }

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

        /// <summary>Specifies authentication method used by user. Default value is Commcell.</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string AuthenticationMethod { get => this._authenticationMethod; set => this._authenticationMethod = value; }

        /// <summary>Backing field for <see cref="AuthenticationMethodServer" /> property.</summary>
        private Commvault.Powershell.Models.IIdNameCompany _authenticationMethodServer;

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        internal Commvault.Powershell.Models.IIdNameCompany AuthenticationMethodServer { get => (this._authenticationMethodServer = this._authenticationMethodServer ?? new Commvault.Powershell.Models.IdNameCompany()); set => this._authenticationMethodServer = value; }

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

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

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

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

        /// <summary>Internal Acessors for AuthenticationMethodServer</summary>
        Commvault.Powershell.Models.IIdNameCompany Commvault.Powershell.Models.IUserInternal.AuthenticationMethodServer { get => (this._authenticationMethodServer = this._authenticationMethodServer ?? new Commvault.Powershell.Models.IdNameCompany()); set { {_authenticationMethodServer = value;} } }

        /// <summary>Internal Acessors for AuthenticationMethodServerCompany</summary>
        Commvault.Powershell.Models.IIdName Commvault.Powershell.Models.IUserInternal.AuthenticationMethodServerCompany { get => ((Commvault.Powershell.Models.IIdNameCompanyInternal)AuthenticationMethodServer).Company; set => ((Commvault.Powershell.Models.IIdNameCompanyInternal)AuthenticationMethodServer).Company = value; }

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

        /// <summary>Internal Acessors for LockInfo</summary>
        Commvault.Powershell.Models.ILockProperties Commvault.Powershell.Models.IUserInternal.LockInfo { get => (this._lockInfo = this._lockInfo ?? new Commvault.Powershell.Models.LockProperties()); set { {_lockInfo = value;} } }

        /// <summary>Internal Acessors for Plan</summary>
        Commvault.Powershell.Models.IIdName Commvault.Powershell.Models.IUserInternal.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; }

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

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string Description { get => this._description; set => this._description = value; }

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

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string Email { get => this._email; set => this._email = value; }

        /// <summary>Backing field for <see cref="Enabled" /> property.</summary>
        private bool? _enabled;

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public bool? Enabled { get => this._enabled; set => this._enabled = value; }

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

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string FullName { get => this._fullName; set => this._fullName = value; }

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

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string Guid { get => this._guid; set => this._guid = value; }

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

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public long? Id { get => this._id; set => this._id = value; }

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

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

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

        /// <summary>
        /// Returns the most recent time the user was logged in. It is provided in unix format.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public long? LastLoggedIn { get => this._lastLoggedIn; set => this._lastLoggedIn = value; }

        /// <summary>Backing field for <see cref="LockInfo" /> property.</summary>
        private Commvault.Powershell.Models.ILockProperties _lockInfo;

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        internal Commvault.Powershell.Models.ILockProperties LockInfo { get => (this._lockInfo = this._lockInfo ?? new Commvault.Powershell.Models.LockProperties()); set => this._lockInfo = value; }

        /// <summary>If the user is locked, it returns user lock end time in unix time format.</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public long? LockInfoEndTime { get => ((Commvault.Powershell.Models.ILockPropertiesInternal)LockInfo).EndTime; set => ((Commvault.Powershell.Models.ILockPropertiesInternal)LockInfo).EndTime = value ?? default(long); }

        /// <summary>Returns if the user is locked or unlocked.</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public bool? LockInfoIsLocked { get => ((Commvault.Powershell.Models.ILockPropertiesInternal)LockInfo).IsLocked; set => ((Commvault.Powershell.Models.ILockPropertiesInternal)LockInfo).IsLocked = value ?? default(bool); }

        /// <summary>If the user is locked, it returns user lock start time in unix time format.</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Inlined)]
        public long? LockInfoStartTime { get => ((Commvault.Powershell.Models.ILockPropertiesInternal)LockInfo).StartTime; set => ((Commvault.Powershell.Models.ILockPropertiesInternal)LockInfo).StartTime = value ?? default(long); }

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

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string Name { get => this._name; set => this._name = value; }

        /// <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="ServiceType" /> property.</summary>
        private string _serviceType;

        /// <summary>
        /// The values that are returned by serviceType are- 0(unknown),1(commserver users),2(Active directory users),3(domino directory
        /// service users),4(hosted exchange users),5(company users),12(dummy domain users)
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string ServiceType { get => this._serviceType; set => this._serviceType = value; }

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

        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string UserPrincipalName { get => this._userPrincipalName; set => this._userPrincipalName = value; }

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

        }
    }
    /// Returns the details of of the user whose userId has been provided
    public partial interface IUser :
        Commvault.Powershell.Runtime.IJsonSerializable
    {
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"",
        SerializedName = @"associatedUserGroups",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IIdNameProvider) })]
        Commvault.Powershell.Models.IIdNameProvider[] AssociatedUserGroups { get; set; }
        /// <summary>Specifies authentication method used by user. Default value is Commcell.</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Specifies authentication method used by user. Default value is Commcell.",
        SerializedName = @"authenticationMethod",
        PossibleTypes = new [] { typeof(string) })]
        string AuthenticationMethod { get; set; }

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

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

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

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

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

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

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

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

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

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

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

        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"",
        SerializedName = @"id",
        PossibleTypes = new [] { typeof(long) })]
        long? IdNameId { get; set; }
        /// <summary>
        /// Returns the most recent time the user was logged in. It is provided in unix format.
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Returns the most recent time the user was logged in. It is provided in unix format.",
        SerializedName = @"lastLoggedIn",
        PossibleTypes = new [] { typeof(long) })]
        long? LastLoggedIn { get; set; }
        /// <summary>If the user is locked, it returns user lock end time in unix time format.</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"If the user is locked, it returns user lock end time in unix time format.",
        SerializedName = @"endTime",
        PossibleTypes = new [] { typeof(long) })]
        long? LockInfoEndTime { get; set; }
        /// <summary>Returns if the user is locked or unlocked.</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Returns if the user is locked or unlocked.",
        SerializedName = @"isLocked",
        PossibleTypes = new [] { typeof(bool) })]
        bool? LockInfoIsLocked { get; set; }
        /// <summary>If the user is locked, it returns user lock start time in unix time format.</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"If the user is locked, it returns user lock start time in unix time format.",
        SerializedName = @"startTime",
        PossibleTypes = new [] { typeof(long) })]
        long? LockInfoStartTime { get; set; }

        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"",
        SerializedName = @"name",
        PossibleTypes = new [] { typeof(string) })]
        string Name { 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>
        /// The values that are returned by serviceType are- 0(unknown),1(commserver users),2(Active directory users),3(domino directory
        /// service users),4(hosted exchange users),5(company users),12(dummy domain users)
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"The values that are returned by serviceType are- 0(unknown),1(commserver users),2(Active directory users),3(domino directory service users),4(hosted exchange users),5(company users),12(dummy domain users)",
        SerializedName = @"serviceType",
        PossibleTypes = new [] { typeof(string) })]
        string ServiceType { get; set; }

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

    }
    /// Returns the details of of the user whose userId has been provided
    internal partial interface IUserInternal

    {
        Commvault.Powershell.Models.IIdNameProvider[] AssociatedUserGroups { get; set; }
        /// <summary>Specifies authentication method used by user. Default value is Commcell.</summary>
        string AuthenticationMethod { get; set; }

        Commvault.Powershell.Models.IIdNameCompany AuthenticationMethodServer { get; set; }

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

        long? AuthenticationMethodServerCompanyId { get; set; }

        string AuthenticationMethodServerCompanyName { get; set; }

        long? AuthenticationMethodServerId { get; set; }

        string AuthenticationMethodServerName { get; set; }

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

        string Description { get; set; }

        string Email { get; set; }

        bool? Enabled { get; set; }

        string FullName { get; set; }

        string Guid { get; set; }

        long? Id { get; set; }

        string IdName { get; set; }

        long? IdNameId { get; set; }
        /// <summary>
        /// Returns the most recent time the user was logged in. It is provided in unix format.
        /// </summary>
        long? LastLoggedIn { get; set; }

        Commvault.Powershell.Models.ILockProperties LockInfo { get; set; }
        /// <summary>If the user is locked, it returns user lock end time in unix time format.</summary>
        long? LockInfoEndTime { get; set; }
        /// <summary>Returns if the user is locked or unlocked.</summary>
        bool? LockInfoIsLocked { get; set; }
        /// <summary>If the user is locked, it returns user lock start time in unix time format.</summary>
        long? LockInfoStartTime { get; set; }

        string Name { get; set; }

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

        long? PlanId { get; set; }

        string PlanName { get; set; }
        /// <summary>
        /// The values that are returned by serviceType are- 0(unknown),1(commserver users),2(Active directory users),3(domino directory
        /// service users),4(hosted exchange users),5(company users),12(dummy domain users)
        /// </summary>
        string ServiceType { get; set; }

        string UserPrincipalName { get; set; }

    }
}