Class ImageRegistryCredential
java.lang.Object
com.azure.resourcemanager.containerinstance.models.ImageRegistryCredential
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ImageRegistryCredential>
public final class ImageRegistryCredential
extends Object
implements com.azure.json.JsonSerializable<ImageRegistryCredential>
Image registry credential.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ImageRegistryCredential class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImageRegistryCredentialfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ImageRegistryCredential from the JsonReader.identity()Get the identity property: The identity for the private registry.Get the identityUrl property: The identity URL for the private registry.password()Get the password property: The password for the private registry.server()Get the server property: The Docker image registry server without a protocol such as "http" and "https".com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) username()Get the username property: The username for the private registry.voidvalidate()Validates the instance.withIdentity(String identity) Set the identity property: The identity for the private registry.withIdentityUrl(String identityUrl) Set the identityUrl property: The identity URL for the private registry.withPassword(String password) Set the password property: The password for the private registry.withServer(String server) Set the server property: The Docker image registry server without a protocol such as "http" and "https".withUsername(String username) Set the username property: The username for the private 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
-
ImageRegistryCredential
public ImageRegistryCredential()Creates an instance of ImageRegistryCredential class.
-
-
Method Details
-
server
Get the server property: The Docker image registry server without a protocol such as "http" and "https".- Returns:
- the server value.
-
withServer
Set the server property: The Docker image registry server without a protocol such as "http" and "https".- Parameters:
server- the server value to set.- Returns:
- the ImageRegistryCredential object itself.
-
username
Get the username property: The username for the private registry.- Returns:
- the username value.
-
withUsername
Set the username property: The username for the private registry.- Parameters:
username- the username value to set.- Returns:
- the ImageRegistryCredential object itself.
-
password
Get the password property: The password for the private registry.- Returns:
- the password value.
-
withPassword
Set the password property: The password for the private registry.- Parameters:
password- the password value to set.- Returns:
- the ImageRegistryCredential object itself.
-
identity
Get the identity property: The identity for the private registry.- Returns:
- the identity value.
-
withIdentity
Set the identity property: The identity for the private registry.- Parameters:
identity- the identity value to set.- Returns:
- the ImageRegistryCredential object itself.
-
identityUrl
Get the identityUrl property: The identity URL for the private registry.- Returns:
- the identityUrl value.
-
withIdentityUrl
Set the identityUrl property: The identity URL for the private registry.- Parameters:
identityUrl- the identityUrl value to set.- Returns:
- the ImageRegistryCredential 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<ImageRegistryCredential>- Throws:
IOException
-
fromJson
public static ImageRegistryCredential fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ImageRegistryCredential from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ImageRegistryCredential if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the ImageRegistryCredential.
-