/// <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="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="mailNickname">The mail alias for the user.</param>
 public UserUpdateParameters(bool?accountEnabled = default(bool?), string displayName = default(string), PasswordProfile passwordProfile = default(PasswordProfile), string mailNickname = default(string))
 {
     AccountEnabled  = accountEnabled;
     DisplayName     = displayName;
     PasswordProfile = passwordProfile;
     MailNickname    = mailNickname;
     CustomInit();
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the UserCreateParameters class.
 /// </summary>
 /// <param name="accountEnabled">Whether the account is
 /// enabled.</param>
 /// <param name="displayName">The display name of the user.</param>
 /// <param name="passwordProfile">Password Profile</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>
 /// <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>
 public UserCreateParameters(bool accountEnabled, string displayName, PasswordProfile passwordProfile, string userPrincipalName, string mailNickname, string immutableId = default(string))
 {
     AccountEnabled    = accountEnabled;
     DisplayName       = displayName;
     PasswordProfile   = passwordProfile;
     UserPrincipalName = userPrincipalName;
     MailNickname      = mailNickname;
     ImmutableId       = immutableId;
     CustomInit();
 }
Beispiel #4
0
 /// <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();
     }
 }