Class TokenPassword
java.lang.Object
com.azure.resourcemanager.containerregistry.models.TokenPassword
- All Implemented Interfaces:
com.azure.json.JsonSerializable<TokenPassword>
public final class TokenPassword
extends Object
implements com.azure.json.JsonSerializable<TokenPassword>
The password that will be used for authenticating the token of a container registry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the creationTime property: The creation datetime of the password.expiry()Get the expiry property: The expiry datetime of the password.static TokenPasswordfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of TokenPassword from the JsonReader.name()Get the name property: The password name "password1" or "password2".com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.value()Get the value property: The password value.withCreationTime(OffsetDateTime creationTime) Set the creationTime property: The creation datetime of the password.withExpiry(OffsetDateTime expiry) Set the expiry property: The expiry datetime of the password.withName(TokenPasswordName name) Set the name property: The password name "password1" or "password2".Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
TokenPassword
public TokenPassword()Creates an instance of TokenPassword class.
-
-
Method Details
-
creationTime
Get the creationTime property: The creation datetime of the password.- Returns:
- the creationTime value.
-
withCreationTime
Set the creationTime property: The creation datetime of the password.- Parameters:
creationTime- the creationTime value to set.- Returns:
- the TokenPassword object itself.
-
expiry
Get the expiry property: The expiry datetime of the password.- Returns:
- the expiry value.
-
withExpiry
Set the expiry property: The expiry datetime of the password.- Parameters:
expiry- the expiry value to set.- Returns:
- the TokenPassword object itself.
-
name
Get the name property: The password name "password1" or "password2".- Returns:
- the name value.
-
withName
Set the name property: The password name "password1" or "password2".- Parameters:
name- the name value to set.- Returns:
- the TokenPassword object itself.
-
value
Get the value property: The password value.- Returns:
- the value value.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<TokenPassword>- Throws:
IOException
-
fromJson
Reads an instance of TokenPassword from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of TokenPassword if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the TokenPassword.
-