GitRepoVolume Class

  • java.lang.Object
    • com.azure.resourcemanager.containerinstance.models.GitRepoVolume

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 GitRepoVolume class.

Method Summary

Modifier and Type Method and Description
String directory()

Get the directory property: Target directory name.

static GitRepoVolume fromJson(JsonReader jsonReader)

Reads an instance of GitRepoVolume from the JsonReader.

String repository()

Get the repository property: Repository URL.

String revision()

Get the revision property: Commit hash for the specified revision.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

GitRepoVolume withDirectory(String directory)

Set the directory property: Target directory name.

GitRepoVolume withRepository(String repository)

Set the repository property: Repository URL.

GitRepoVolume 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:

the directory value.

fromJson

public static GitRepoVolume fromJson(JsonReader jsonReader)

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:

IOException

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

repository

public String repository()

Get the repository property: Repository URL.

Returns:

the repository value.

revision

public String revision()

Get the revision property: Commit hash for the specified revision.

Returns:

the revision value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

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:

directory - the directory value to set.

Returns:

the GitRepoVolume object itself.

withRepository

public GitRepoVolume withRepository(String repository)

Set the repository property: Repository URL.

Parameters:

repository - the repository value to set.

Returns:

the GitRepoVolume object itself.

withRevision

public GitRepoVolume withRevision(String revision)

Set the revision property: Commit hash for the specified revision.

Parameters:

revision - the revision value to set.

Returns:

the GitRepoVolume object itself.

Applies to