/// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="Rest.ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (PasswordProfile != null)
     {
         PasswordProfile.Validate();
     }
 }
 /// <summary>
 /// Initializes a new instance of the UserUpdateParameters class.
 /// </summary>
 /// <param name="additionalProperties">Unmatched properties from the
 /// message are deserialized this collection</param>
 /// <param name="immutableId">This must be specified if you are using a
 /// federated domain for the user's userPrincipalName (UPN) property
 /// when creating a new user account. It is used to associate an
 /// on-premises Active Directory user account with their Azure AD user
 /// object.</param>
 /// <param name="usageLocation">A two letter country code (ISO standard
 /// 3166). Required for users that will be assigned licenses due to
 /// legal requirement to check for availability of services in
 /// countries. Examples include: "US", "JP", and "GB".</param>
 /// <param name="givenName">The given name for the user.</param>
 /// <param name="surname">The user's surname (family name or last
 /// name).</param>
 /// <param name="userType">A string value that can be used to classify
 /// user types in your directory, such as 'Member' and 'Guest'.
 /// Possible values include: 'Member', 'Guest'</param>
 /// <param name="accountEnabled">Whether the account is
 /// enabled.</param>
 /// <param name="displayName">The display name of the user.</param>
 /// <param name="passwordProfile">The password profile of the
 /// user.</param>
 /// <param name="userPrincipalName">The user principal name
 /// ([email protected]). It must contain one of the verified domains
 /// for the tenant.</param>
 /// <param name="mailNickname">The mail alias for the user.</param>
 public UserUpdateParameters(IDictionary <string, object> additionalProperties = default(IDictionary <string, object>), string immutableId = default(string), string usageLocation = default(string), string givenName = default(string), string surname = default(string), string userType = default(string), bool?accountEnabled = default(bool?), string displayName = default(string), PasswordProfile passwordProfile = default(PasswordProfile), string userPrincipalName = default(string), string mailNickname = default(string))
     : base(additionalProperties, immutableId, usageLocation, givenName, surname, userType)
 {
     AccountEnabled    = accountEnabled;
     DisplayName       = displayName;
     PasswordProfile   = passwordProfile;
     UserPrincipalName = userPrincipalName;
     MailNickname      = mailNickname;
     CustomInit();
 }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (DisplayName == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "DisplayName");
     }
     if (PasswordProfile == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "PasswordProfile");
     }
     if (UserPrincipalName == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "UserPrincipalName");
     }
     if (MailNickname == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "MailNickname");
     }
     if (PasswordProfile != null)
     {
         PasswordProfile.Validate();
     }
 }