Class SourceRegistryCredentials
java.lang.Object
com.azure.resourcemanager.containerregistry.models.SourceRegistryCredentials
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SourceRegistryCredentials>
public final class SourceRegistryCredentials
extends Object
implements com.azure.json.JsonSerializable<SourceRegistryCredentials>
Describes the credential parameters for accessing the source registry.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of SourceRegistryCredentials class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SourceRegistryCredentialsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SourceRegistryCredentials from the JsonReader.Get the loginMode property: The authentication mode which determines the source registry login scope.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withLoginMode(SourceRegistryLoginMode loginMode) Set the loginMode property: The authentication mode which determines the source registry login scope.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
-
SourceRegistryCredentials
public SourceRegistryCredentials()Creates an instance of SourceRegistryCredentials class.
-
-
Method Details
-
loginMode
Get the loginMode property: The authentication mode which determines the source registry login scope. The credentials for the source registry will be generated using the given scope. These credentials will be used to login to the source registry during the run.- Returns:
- the loginMode value.
-
withLoginMode
Set the loginMode property: The authentication mode which determines the source registry login scope. The credentials for the source registry will be generated using the given scope. These credentials will be used to login to the source registry during the run.- Parameters:
loginMode- the loginMode value to set.- Returns:
- the SourceRegistryCredentials 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<SourceRegistryCredentials>- Throws:
IOException
-
fromJson
public static SourceRegistryCredentials fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of SourceRegistryCredentials from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of SourceRegistryCredentials 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 SourceRegistryCredentials.
-