TokenPassword Class

  • java.lang.Object
    • com.azure.resourcemanager.containerregistry.models.TokenPassword

Implements

public final class TokenPassword
implements JsonSerializable<TokenPassword>

The password that will be used for authenticating the token of a container registry.

Constructor Summary

Constructor Description
TokenPassword()

Creates an instance of TokenPassword class.

Method Summary

Modifier and Type Method and Description
OffsetDateTime creationTime()

Get the creationTime property: The creation datetime of the password.

OffsetDateTime expiry()

Get the expiry property: The expiry datetime of the password.

static TokenPassword fromJson(JsonReader jsonReader)

Reads an instance of TokenPassword from the JsonReader.

TokenPasswordName name()

Get the name property: The password name "password1" or "password2".

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

String value()

Get the value property: The password value.

TokenPassword withCreationTime(OffsetDateTime creationTime)

Set the creationTime property: The creation datetime of the password.

TokenPassword withExpiry(OffsetDateTime expiry)

Set the expiry property: The expiry datetime of the password.

TokenPassword withName(TokenPasswordName name)

Set the name property: The password name "password1" or "password2".

Methods inherited from java.lang.Object

Constructor Details

TokenPassword

public TokenPassword()

Creates an instance of TokenPassword class.

Method Details

creationTime

public OffsetDateTime creationTime()

Get the creationTime property: The creation datetime of the password.

Returns:

the creationTime value.

expiry

public OffsetDateTime expiry()

Get the expiry property: The expiry datetime of the password.

Returns:

the expiry value.

fromJson

public static TokenPassword fromJson(JsonReader jsonReader)

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.

name

public TokenPasswordName name()

Get the name property: The password name "password1" or "password2".

Returns:

the name value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

value

public String value()

Get the value property: The password value.

Returns:

the value value.

withCreationTime

public TokenPassword withCreationTime(OffsetDateTime creationTime)

Set the creationTime property: The creation datetime of the password.

Parameters:

creationTime - the creationTime value to set.

Returns:

the TokenPassword object itself.

withExpiry

public TokenPassword withExpiry(OffsetDateTime expiry)

Set the expiry property: The expiry datetime of the password.

Parameters:

expiry - the expiry value to set.

Returns:

the TokenPassword object itself.

withName

public TokenPassword withName(TokenPasswordName name)

Set the name property: The password name "password1" or "password2".

Parameters:

name - the name value to set.

Returns:

the TokenPassword object itself.

Applies to