Class ImportImageParameters
java.lang.Object
com.azure.resourcemanager.containerregistry.models.ImportImageParameters
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ImportImageParameters>
public final class ImportImageParameters
extends Object
implements com.azure.json.JsonSerializable<ImportImageParameters>
The ImportImageParameters model.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ImportImageParametersfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ImportImageParameters from the JsonReader.mode()Get the mode property: When Force, any existing target tags will be overwritten.source()Get the source property: The source of the image.Get the targetTags property: List of strings of the form repo[:tag].com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Get the untaggedTargetRepositories property: List of strings of repository names to do a manifest only copy.voidvalidate()Validates the instance.withMode(ImportMode mode) Set the mode property: When Force, any existing target tags will be overwritten.withSource(ImportSource source) Set the source property: The source of the image.withTargetTags(List<String> targetTags) Set the targetTags property: List of strings of the form repo[:tag].withUntaggedTargetRepositories(List<String> untaggedTargetRepositories) Set the untaggedTargetRepositories property: List of strings of repository names to do a manifest only copy.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
-
ImportImageParameters
public ImportImageParameters()Creates an instance of ImportImageParameters class.
-
-
Method Details
-
source
Get the source property: The source of the image.- Returns:
- the source value.
-
withSource
Set the source property: The source of the image.- Parameters:
source- the source value to set.- Returns:
- the ImportImageParameters object itself.
-
targetTags
Get the targetTags property: List of strings of the form repo[:tag]. When tag is omitted the source will be used (or 'latest' if source tag is also omitted).- Returns:
- the targetTags value.
-
withTargetTags
Set the targetTags property: List of strings of the form repo[:tag]. When tag is omitted the source will be used (or 'latest' if source tag is also omitted).- Parameters:
targetTags- the targetTags value to set.- Returns:
- the ImportImageParameters object itself.
-
untaggedTargetRepositories
Get the untaggedTargetRepositories property: List of strings of repository names to do a manifest only copy. No tag will be created.- Returns:
- the untaggedTargetRepositories value.
-
withUntaggedTargetRepositories
public ImportImageParameters withUntaggedTargetRepositories(List<String> untaggedTargetRepositories) Set the untaggedTargetRepositories property: List of strings of repository names to do a manifest only copy. No tag will be created.- Parameters:
untaggedTargetRepositories- the untaggedTargetRepositories value to set.- Returns:
- the ImportImageParameters object itself.
-
mode
Get the mode property: When Force, any existing target tags will be overwritten. When NoForce, any existing target tags will fail the operation before any copying begins.- Returns:
- the mode value.
-
withMode
Set the mode property: When Force, any existing target tags will be overwritten. When NoForce, any existing target tags will fail the operation before any copying begins.- Parameters:
mode- the mode value to set.- Returns:
- the ImportImageParameters 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<ImportImageParameters>- Throws:
IOException
-
fromJson
public static ImportImageParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ImportImageParameters from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ImportImageParameters 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 ImportImageParameters.
-