Class Credentials
java.lang.Object
com.azure.resourcemanager.containerregistry.models.Credentials
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Credentials>
public final class Credentials
extends Object
implements com.azure.json.JsonSerializable<Credentials>
The parameters that describes a set of credentials that will be used when a run is invoked.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the customRegistries property: Describes the credential parameters for accessing other custom registries.static CredentialsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of Credentials from the JsonReader.Get the sourceRegistry property: Describes the credential parameters for accessing the source registry.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withCustomRegistries(Map<String, CustomRegistryCredentials> customRegistries) Set the customRegistries property: Describes the credential parameters for accessing other custom registries.withSourceRegistry(SourceRegistryCredentials sourceRegistry) Set the sourceRegistry property: Describes the credential parameters for accessing the source registry.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
-
Credentials
public Credentials()Creates an instance of Credentials class.
-
-
Method Details
-
sourceRegistry
Get the sourceRegistry property: Describes the credential parameters for accessing the source registry.- Returns:
- the sourceRegistry value.
-
withSourceRegistry
Set the sourceRegistry property: Describes the credential parameters for accessing the source registry.- Parameters:
sourceRegistry- the sourceRegistry value to set.- Returns:
- the Credentials object itself.
-
customRegistries
Get the customRegistries property: Describes the credential parameters for accessing other custom registries. The key for the dictionary item will be the registry login server (myregistry.azurecr.io) and the value of the item will be the registry credentials for accessing the registry.- Returns:
- the customRegistries value.
-
withCustomRegistries
Set the customRegistries property: Describes the credential parameters for accessing other custom registries. The key for the dictionary item will be the registry login server (myregistry.azurecr.io) and the value of the item will be the registry credentials for accessing the registry.- Parameters:
customRegistries- the customRegistries value to set.- Returns:
- the Credentials 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<Credentials>- Throws:
IOException
-
fromJson
Reads an instance of Credentials from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of Credentials 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 Credentials.
-