Class GenerateCredentialsParameters
java.lang.Object
com.azure.resourcemanager.containerregistry.models.GenerateCredentialsParameters
- All Implemented Interfaces:
com.azure.json.JsonSerializable<GenerateCredentialsParameters>
public final class GenerateCredentialsParameters
extends Object
implements com.azure.json.JsonSerializable<GenerateCredentialsParameters>
The parameters used to generate credentials for a specified token or user of a container registry.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of GenerateCredentialsParameters class. -
Method Summary
Modifier and TypeMethodDescriptionexpiry()Get the expiry property: The expiry date of the generated credentials after which the credentials become invalid.fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of GenerateCredentialsParameters from the JsonReader.name()Get the name property: Specifies name of the password which should be regenerated if any -- password1 or password2.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) tokenId()Get the tokenId property: The resource ID of the token for which credentials have to be generated.voidvalidate()Validates the instance.withExpiry(OffsetDateTime expiry) Set the expiry property: The expiry date of the generated credentials after which the credentials become invalid.withName(TokenPasswordName name) Set the name property: Specifies name of the password which should be regenerated if any -- password1 or password2.withTokenId(String tokenId) Set the tokenId property: The resource ID of the token for which credentials have to be generated.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
-
GenerateCredentialsParameters
public GenerateCredentialsParameters()Creates an instance of GenerateCredentialsParameters class.
-
-
Method Details
-
tokenId
Get the tokenId property: The resource ID of the token for which credentials have to be generated.- Returns:
- the tokenId value.
-
withTokenId
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.
-
expiry
Get the expiry property: The expiry date of the generated credentials after which the credentials become invalid.- Returns:
- the expiry value.
-
withExpiry
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.
-
name
Get the name property: Specifies name of the password which should be regenerated if any -- password1 or password2.- Returns:
- the name value.
-
withName
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.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<GenerateCredentialsParameters>- Throws:
IOException
-
fromJson
public static GenerateCredentialsParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException 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.
-