Share via


GenerateCredentialsParameters Class

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

Implements

public final class GenerateCredentialsParameters
implements JsonSerializable<GenerateCredentialsParameters>

The parameters used to generate credentials for a specified token or user of a container registry.

Constructor Summary

Constructor Description
GenerateCredentialsParameters()

Creates an instance of GenerateCredentialsParameters class.

Method Summary

Modifier and Type Method and Description
OffsetDateTime expiry()

Get the expiry property: The expiry date of the generated credentials after which the credentials become invalid.

static GenerateCredentialsParameters fromJson(JsonReader jsonReader)

Reads an instance of GenerateCredentialsParameters from the JsonReader.

TokenPasswordName name()

Get the name property: Specifies name of the password which should be regenerated if any -- password1 or password2.

JsonWriter toJson(JsonWriter jsonWriter)
String tokenId()

Get the tokenId property: The resource ID of the token for which credentials have to be generated.

void validate()

Validates the instance.

GenerateCredentialsParameters withExpiry(OffsetDateTime expiry)

Set the expiry property: The expiry date of the generated credentials after which the credentials become invalid.

GenerateCredentialsParameters withName(TokenPasswordName name)

Set the name property: Specifies name of the password which should be regenerated if any -- password1 or password2.

GenerateCredentialsParameters withTokenId(String tokenId)

Set the tokenId property: The resource ID of the token for which credentials have to be generated.

Methods inherited from java.lang.Object

Constructor Details

GenerateCredentialsParameters

public GenerateCredentialsParameters()

Creates an instance of GenerateCredentialsParameters class.

Method Details

expiry

public OffsetDateTime expiry()

Get the expiry property: The expiry date of the generated credentials after which the credentials become invalid.

Returns:

the expiry value.

fromJson

public static GenerateCredentialsParameters fromJson(JsonReader jsonReader)

Reads an instance of GenerateCredentialsParameters from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of GenerateCredentialsParameters 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 GenerateCredentialsParameters.

name

public TokenPasswordName name()

Get the name property: Specifies name of the password which should be regenerated if any -- password1 or password2.

Returns:

the name value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

tokenId

public String tokenId()

Get the tokenId property: The resource ID of the token for which credentials have to be generated.

Returns:

the tokenId value.

validate

public void validate()

Validates the instance.

withExpiry

public GenerateCredentialsParameters withExpiry(OffsetDateTime expiry)

Set the expiry property: The expiry date of the generated credentials after which the credentials become invalid.

Parameters:

expiry - the expiry value to set.

Returns:

the GenerateCredentialsParameters object itself.

withName

public GenerateCredentialsParameters withName(TokenPasswordName name)

Set the name property: Specifies name of the password which should be regenerated if any -- password1 or password2.

Parameters:

name - the name value to set.

Returns:

the GenerateCredentialsParameters object itself.

withTokenId

public GenerateCredentialsParameters withTokenId(String tokenId)

Set the tokenId property: The resource ID of the token for which credentials have to be generated.

Parameters:

tokenId - the tokenId value to set.

Returns:

the GenerateCredentialsParameters object itself.

Applies to