Package it.ernytech.tdlib

## Class TdApi.SetPassword

- java.lang.Object
- - it.ernytech.tdlib.TdApi.Object
  - - it.ernytech.tdlib.TdApi.Function
    - - it.ernytech.tdlib.TdApi.SetPassword

Enclosing class:
  TdApi

    public static class TdApi.SetPassword
    extends TdApi.Function

Changes the password for the user. If a new recovery email address is specified, then the error EMAILUNCONFIRMED is returned and the password change will not be applied until the new recovery email address has been confirmed. The application should periodically call getPasswordState to check whether the new email address has been confirmed.

Returns `PasswordState`

### Field Summary

Fields
`static int` `CONSTRUCTOR` Identifier uniquely determining type of the object.
`java.lang.String` `newHint` New password hint; may be empty.
`java.lang.String` `newPassword` New password of the user; may be empty to remove the password.
`java.lang.String` `newRecoveryEmailAddress` New recovery email address; may be empty.
`java.lang.String` `oldPassword` Previous password of the user.
`boolean` `setRecoveryEmailAddress` Pass true if the recovery email address should be changed.

### Constructor Summary

Constructors
`SetPassword()` Default constructor.
`SetPassword​(java.lang.String oldPassword, java.lang.String newPassword, java.lang.String newHint, boolean setRecoveryEmailAddress, java.lang.String newRecoveryEmailAddress)` Constructor for initialization of all fields.

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getConstructor()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from class it.ernytech.tdlib.TdApi.Function

`toString`

### Field Detail

#### oldPassword

    public java.lang.String oldPassword

Previous password of the user.

#### newPassword

    public java.lang.String newPassword

New password of the user; may be empty to remove the password.

#### newHint

    public java.lang.String newHint

New password hint; may be empty.

#### setRecoveryEmailAddress

    public boolean setRecoveryEmailAddress

Pass true if the recovery email address should be changed.

#### newRecoveryEmailAddress

    public java.lang.String newRecoveryEmailAddress

New recovery email address; may be empty.

#### CONSTRUCTOR

    public static final int CONSTRUCTOR

Identifier uniquely determining type of the object.

See Also:
  Constant Field Values

### Constructor Detail

#### SetPassword

    public SetPassword()

Default constructor.

#### SetPassword

    public SetPassword​(java.lang.String oldPassword,
                       java.lang.String newPassword,
                       java.lang.String newHint,
                       boolean setRecoveryEmailAddress,
                       java.lang.String newRecoveryEmailAddress)

Constructor for initialization of all fields.

Parameters:
  `oldPassword` - Previous password of the user.
  `newPassword` - New password of the user; may be empty to remove the password.
  `newHint` - New password hint; may be empty.
  `setRecoveryEmailAddress` - Pass true if the recovery email address should be changed.
  `newRecoveryEmailAddress` - New recovery email address; may be empty.

### Method Detail

#### getConstructor

    public int getConstructor()

Specified by:
  `getConstructor` in class `TdApi.Object`
Returns:
  this.CONSTRUCTOR