generated/api/Models/UpdateUser.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>Used to update an existing user.</summary>
    public partial class UpdateUser :
        Commvault.Powershell.Models.IUpdateUser,
        Commvault.Powershell.Models.IUpdateUserInternal
    {

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

        /// <summary>
        /// Change the current authentication method of user. SAML user association can be removed using this.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string AuthenticationMethod { get => this._authenticationMethod; set => this._authenticationMethod = value; }

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

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

        /// <summary>Change email-id for existing user. This email-id can be used for logging-in.</summary>
        [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;

        /// <summary>enable or disable the user.</summary>
        [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;

        /// <summary>Change name for existing user</summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string FullName { get => this._fullName; set => this._fullName = value; }

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

        /// <summary>
        /// Change user name for existing user. Username can be used for logging-in as an alternate to email-id if duplicate email-ids
        /// are present.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string NewName { get => this._newName; set => this._newName = value; }

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

        /// <summary>
        /// Change existing password for user. validationPassword must also be provided when changing password. Password should be
        /// in provided in Base64 format.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string NewPassword { get => this._newPassword; set => this._newPassword = 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="UserGroupOperation" /> property.</summary>
        private string _userGroupOperation;

        /// <summary>
        /// Allows adding to, overwriting and deleting existing user groups. default is adding to existing userGroups
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string UserGroupOperation { get => this._userGroupOperation; set => this._userGroupOperation = value; }

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

        /// <summary>
        /// Provide a list of userGroups that the user should be a part of. Note that for external users, user groups cannot be modified.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public Commvault.Powershell.Models.IIdName[] UserGroups { get => this._userGroups; set => this._userGroups = value; }

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

        /// <summary>
        /// Change User Principal Name(UPN) for existing user. This User Principal Name can be used for logging-in.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string UserPrincipalName { get => this._userPrincipalName; set => this._userPrincipalName = value; }

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

        /// <summary>
        /// Provide the old password in Base64 format when updating the password. The new password has to be provided in the password
        /// tag.
        /// </summary>
        [Commvault.Powershell.Origin(Commvault.Powershell.PropertyOrigin.Owned)]
        public string ValidationPassword { get => this._validationPassword; set => this._validationPassword = value; }

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

        }
    }
    /// Used to update an existing user.
    public partial interface IUpdateUser :
        Commvault.Powershell.Runtime.IJsonSerializable
    {
        /// <summary>
        /// Change the current authentication method of user. SAML user association can be removed using this.
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Change the current authentication method of user. SAML user association can be removed using this.",
        SerializedName = @"authenticationMethod",
        PossibleTypes = new [] { typeof(string) })]
        string AuthenticationMethod { get; set; }
        /// <summary>Change email-id for existing user. This email-id can be used for logging-in.</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Change email-id for existing user. This email-id can be used for logging-in.",
        SerializedName = @"email",
        PossibleTypes = new [] { typeof(string) })]
        string Email { get; set; }
        /// <summary>enable or disable the user.</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"enable or disable the user.",
        SerializedName = @"enabled",
        PossibleTypes = new [] { typeof(bool) })]
        bool? Enabled { get; set; }
        /// <summary>Change name for existing user</summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Change name for existing user",
        SerializedName = @"fullName",
        PossibleTypes = new [] { typeof(string) })]
        string FullName { get; set; }
        /// <summary>
        /// Change user name for existing user. Username can be used for logging-in as an alternate to email-id if duplicate email-ids
        /// are present.
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Change user name for existing user. Username can be used for logging-in as an alternate to email-id if duplicate email-ids are present.",
        SerializedName = @"newName",
        PossibleTypes = new [] { typeof(string) })]
        string NewName { get; set; }
        /// <summary>
        /// Change existing password for user. validationPassword must also be provided when changing password. Password should be
        /// in provided in Base64 format.
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Change existing password for user. validationPassword must also be provided when changing password. Password should be in provided in Base64 format.",
        SerializedName = @"newPassword",
        PossibleTypes = new [] { typeof(string) })]
        string NewPassword { 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>
        /// Allows adding to, overwriting and deleting existing user groups. default is adding to existing userGroups
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Allows adding to, overwriting and deleting existing user groups. default is adding to existing userGroups",
        SerializedName = @"userGroupOperation",
        PossibleTypes = new [] { typeof(string) })]
        string UserGroupOperation { get; set; }
        /// <summary>
        /// Provide a list of userGroups that the user should be a part of. Note that for external users, user groups cannot be modified.
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Provide a list of userGroups that the user should be a part of. Note that for external users, user groups cannot be modified.",
        SerializedName = @"userGroups",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IIdName) })]
        Commvault.Powershell.Models.IIdName[] UserGroups { get; set; }
        /// <summary>
        /// Change User Principal Name(UPN) for existing user. This User Principal Name can be used for logging-in.
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Change User Principal Name(UPN) for existing user. This User Principal Name can be used for logging-in.",
        SerializedName = @"userPrincipalName",
        PossibleTypes = new [] { typeof(string) })]
        string UserPrincipalName { get; set; }
        /// <summary>
        /// Provide the old password in Base64 format when updating the password. The new password has to be provided in the password
        /// tag.
        /// </summary>
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Provide the old password in Base64 format when updating the password. The new password has to be provided in the password tag.",
        SerializedName = @"validationPassword",
        PossibleTypes = new [] { typeof(string) })]
        string ValidationPassword { get; set; }

    }
    /// Used to update an existing user.
    internal partial interface IUpdateUserInternal

    {
        /// <summary>
        /// Change the current authentication method of user. SAML user association can be removed using this.
        /// </summary>
        string AuthenticationMethod { get; set; }
        /// <summary>Change email-id for existing user. This email-id can be used for logging-in.</summary>
        string Email { get; set; }
        /// <summary>enable or disable the user.</summary>
        bool? Enabled { get; set; }
        /// <summary>Change name for existing user</summary>
        string FullName { get; set; }
        /// <summary>
        /// Change user name for existing user. Username can be used for logging-in as an alternate to email-id if duplicate email-ids
        /// are present.
        /// </summary>
        string NewName { get; set; }
        /// <summary>
        /// Change existing password for user. validationPassword must also be provided when changing password. Password should be
        /// in provided in Base64 format.
        /// </summary>
        string NewPassword { get; set; }

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

        long? PlanId { get; set; }

        string PlanName { get; set; }
        /// <summary>
        /// Allows adding to, overwriting and deleting existing user groups. default is adding to existing userGroups
        /// </summary>
        string UserGroupOperation { get; set; }
        /// <summary>
        /// Provide a list of userGroups that the user should be a part of. Note that for external users, user groups cannot be modified.
        /// </summary>
        Commvault.Powershell.Models.IIdName[] UserGroups { get; set; }
        /// <summary>
        /// Change User Principal Name(UPN) for existing user. This User Principal Name can be used for logging-in.
        /// </summary>
        string UserPrincipalName { get; set; }
        /// <summary>
        /// Provide the old password in Base64 format when updating the password. The new password has to be provided in the password
        /// tag.
        /// </summary>
        string ValidationPassword { get; set; }

    }
}