Class GitRepoVolume
java.lang.Object
com.azure.resourcemanager.containerinstance.models.GitRepoVolume
- All Implemented Interfaces:
com.azure.json.JsonSerializable<GitRepoVolume>
public final class GitRepoVolume
extends Object
implements com.azure.json.JsonSerializable<GitRepoVolume>
Represents a volume that is populated with the contents of a git repository.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the directory property: Target directory name.static GitRepoVolumefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of GitRepoVolume from the JsonReader.Get the repository property: Repository URL.revision()Get the revision property: Commit hash for the specified revision.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDirectory(String directory) Set the directory property: Target directory name.withRepository(String repository) Set the repository property: Repository URL.withRevision(String revision) Set the revision property: Commit hash for the specified revision.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
-
GitRepoVolume
public GitRepoVolume()Creates an instance of GitRepoVolume class.
-
-
Method Details
-
directory
Get the directory property: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.- Returns:
- the directory value.
-
withDirectory
Set the directory property: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.- Parameters:
directory- the directory value to set.- Returns:
- the GitRepoVolume object itself.
-
repository
Get the repository property: Repository URL.- Returns:
- the repository value.
-
withRepository
Set the repository property: Repository URL.- Parameters:
repository- the repository value to set.- Returns:
- the GitRepoVolume object itself.
-
revision
Get the revision property: Commit hash for the specified revision.- Returns:
- the revision value.
-
withRevision
Set the revision property: Commit hash for the specified revision.- Parameters:
revision- the revision value to set.- Returns:
- the GitRepoVolume 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<GitRepoVolume>- Throws:
IOException
-
fromJson
Reads an instance of GitRepoVolume from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of GitRepoVolume 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 GitRepoVolume.
-