Class ImportSource
java.lang.Object
com.azure.resourcemanager.containerregistry.models.ImportSource
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ImportSource>
public final class ImportSource
extends Object
implements com.azure.json.JsonSerializable<ImportSource>
The ImportSource model.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the credentials property: Credentials used when importing from a registry uri.static ImportSourcefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ImportSource from the JsonReader.Get the registryUri property: The address of the source registry (e.g.Get the resourceId property: The resource identifier of the source Azure Container Registry.Get the sourceImage property: Repository name of the source image.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withCredentials(ImportSourceCredentials credentials) Set the credentials property: Credentials used when importing from a registry uri.withRegistryUri(String registryUri) Set the registryUri property: The address of the source registry (e.g.withResourceId(String resourceId) Set the resourceId property: The resource identifier of the source Azure Container Registry.withSourceImage(String sourceImage) Set the sourceImage property: Repository name of the source image.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
-
ImportSource
public ImportSource()Creates an instance of ImportSource class.
-
-
Method Details
-
resourceId
Get the resourceId property: The resource identifier of the source Azure Container Registry.- Returns:
- the resourceId value.
-
withResourceId
Set the resourceId property: The resource identifier of the source Azure Container Registry.- Parameters:
resourceId- the resourceId value to set.- Returns:
- the ImportSource object itself.
-
registryUri
Get the registryUri property: The address of the source registry (e.g. 'mcr.microsoft.com').- Returns:
- the registryUri value.
-
withRegistryUri
Set the registryUri property: The address of the source registry (e.g. 'mcr.microsoft.com').- Parameters:
registryUri- the registryUri value to set.- Returns:
- the ImportSource object itself.
-
credentials
Get the credentials property: Credentials used when importing from a registry uri.- Returns:
- the credentials value.
-
withCredentials
Set the credentials property: Credentials used when importing from a registry uri.- Parameters:
credentials- the credentials value to set.- Returns:
- the ImportSource object itself.
-
sourceImage
Get the sourceImage property: Repository name of the source image. Specify an image by repository ('hello-world'). This will use the 'latest' tag. Specify an image by tag ('hello-world:latest'). Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123').- Returns:
- the sourceImage value.
-
withSourceImage
Set the sourceImage property: Repository name of the source image. Specify an image by repository ('hello-world'). This will use the 'latest' tag. Specify an image by tag ('hello-world:latest'). Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123').- Parameters:
sourceImage- the sourceImage value to set.- Returns:
- the ImportSource 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<ImportSource>- Throws:
IOException
-
fromJson
Reads an instance of ImportSource from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ImportSource 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 ImportSource.
-