GitRepoVolume Class
- java.
lang. Object - com.
azure. resourcemanager. containerinstance. models. GitRepoVolume
- com.
Implements
public final class GitRepoVolume
implements JsonSerializable<GitRepoVolume>
Represents a volume that is populated with the contents of a git repository.
Constructor Summary
Constructor | Description |
---|---|
GitRepoVolume() |
Creates an instance of Git |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
directory()
Get the directory property: Target directory name. |
static
Git |
fromJson(JsonReader jsonReader)
Reads an instance of Git |
String |
repository()
Get the repository property: Repository URL. |
String |
revision()
Get the revision property: Commit hash for the specified revision. |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Git |
withDirectory(String directory)
Set the directory property: Target directory name. |
Git |
withRepository(String repository)
Set the repository property: Repository URL. |
Git |
withRevision(String revision)
Set the revision property: Commit hash for the specified revision. |
Methods inherited from java.lang.Object
Constructor Details
GitRepoVolume
public GitRepoVolume()
Creates an instance of GitRepoVolume class.
Method Details
directory
public String 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:
fromJson
public static GitRepoVolume fromJson(JsonReader jsonReader)
Reads an instance of GitRepoVolume from the JsonReader.
Parameters:
Returns:
Throws:
repository
public String repository()
Get the repository property: Repository URL.
Returns:
revision
public String revision()
Get the revision property: Commit hash for the specified revision.
Returns:
toJson
validate
public void validate()
Validates the instance.
withDirectory
public GitRepoVolume withDirectory(String directory)
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:
Returns:
withRepository
public GitRepoVolume withRepository(String repository)
Set the repository property: Repository URL.
Parameters:
Returns:
withRevision
public GitRepoVolume withRevision(String revision)
Set the revision property: Commit hash for the specified revision.
Parameters:
Returns:
Applies to
Azure SDK for Java