Share via


ImportSource Class

  • java.lang.Object
    • com.azure.resourcemanager.containerregistry.models.ImportSource

Implements

public final class ImportSource
implements JsonSerializable<ImportSource>

The ImportSource model.

Constructor Summary

Constructor Description
ImportSource()

Creates an instance of ImportSource class.

Method Summary

Modifier and Type Method and Description
ImportSourceCredentials credentials()

Get the credentials property: Credentials used when importing from a registry uri.

static ImportSource fromJson(JsonReader jsonReader)

Reads an instance of ImportSource from the JsonReader.

String registryUri()

Get the registryUri property: The address of the source registry (e.g.

String resourceId()

Get the resourceId property: The resource identifier of the source Azure Container Registry.

String sourceImage()

Get the sourceImage property: Repository name of the source image.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ImportSource withCredentials(ImportSourceCredentials credentials)

Set the credentials property: Credentials used when importing from a registry uri.

ImportSource withRegistryUri(String registryUri)

Set the registryUri property: The address of the source registry (e.g.

ImportSource withResourceId(String resourceId)

Set the resourceId property: The resource identifier of the source Azure Container Registry.

ImportSource withSourceImage(String sourceImage)

Set the sourceImage property: Repository name of the source image.

Methods inherited from java.lang.Object

Constructor Details

ImportSource

public ImportSource()

Creates an instance of ImportSource class.

Method Details

credentials

public ImportSourceCredentials credentials()

Get the credentials property: Credentials used when importing from a registry uri.

Returns:

the credentials value.

fromJson

public static ImportSource fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

registryUri

public String registryUri()

Get the registryUri property: The address of the source registry (e.g. 'mcr.microsoft.com').

Returns:

the registryUri value.

resourceId

public String resourceId()

Get the resourceId property: The resource identifier of the source Azure Container Registry.

Returns:

the resourceId value.

sourceImage

public String 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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCredentials

public ImportSource withCredentials(ImportSourceCredentials credentials)

Set the credentials property: Credentials used when importing from a registry uri.

Parameters:

credentials - the credentials value to set.

Returns:

the ImportSource object itself.

withRegistryUri

public ImportSource withRegistryUri(String registryUri)

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.

withResourceId

public ImportSource withResourceId(String resourceId)

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.

withSourceImage

public ImportSource withSourceImage(String sourceImage)

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.

Applies to