PacketCaptureStorageLocation Class

  • java.lang.Object
    • com.azure.resourcemanager.network.models.PacketCaptureStorageLocation

Implements

public final class PacketCaptureStorageLocation
implements JsonSerializable<PacketCaptureStorageLocation>

The storage location for a packet capture session.

Constructor Summary

Constructor Description
PacketCaptureStorageLocation()

Creates an instance of PacketCaptureStorageLocation class.

Method Summary

Modifier and Type Method and Description
String filePath()

Get the filePath property: This path is invalid if 'Continuous Capture' is provided with 'true' or 'false'.

static PacketCaptureStorageLocation fromJson(JsonReader jsonReader)

Reads an instance of PacketCaptureStorageLocation from the JsonReader.

String localPath()

Get the localPath property: This path is valid if 'Continuous Capture' is provided with 'true' or 'false' and required if no storage ID is provided, otherwise optional.

String storageId()

Get the storageId property: The ID of the storage account to save the packet capture session.

String storagePath()

Get the storagePath property: The URI of the storage path to save the packet capture.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

PacketCaptureStorageLocation withFilePath(String filePath)

Set the filePath property: This path is invalid if 'Continuous Capture' is provided with 'true' or 'false'.

PacketCaptureStorageLocation withLocalPath(String localPath)

Set the localPath property: This path is valid if 'Continuous Capture' is provided with 'true' or 'false' and required if no storage ID is provided, otherwise optional.

PacketCaptureStorageLocation withStorageId(String storageId)

Set the storageId property: The ID of the storage account to save the packet capture session.

PacketCaptureStorageLocation withStoragePath(String storagePath)

Set the storagePath property: The URI of the storage path to save the packet capture.

Methods inherited from java.lang.Object

Constructor Details

PacketCaptureStorageLocation

public PacketCaptureStorageLocation()

Creates an instance of PacketCaptureStorageLocation class.

Method Details

filePath

public String filePath()

Get the filePath property: This path is invalid if 'Continuous Capture' is provided with 'true' or 'false'. A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional.

Returns:

the filePath value.

fromJson

public static PacketCaptureStorageLocation fromJson(JsonReader jsonReader)

Reads an instance of PacketCaptureStorageLocation from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of PacketCaptureStorageLocation if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the PacketCaptureStorageLocation.

localPath

public String localPath()

Get the localPath property: This path is valid if 'Continuous Capture' is provided with 'true' or 'false' and required if no storage ID is provided, otherwise optional. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures.

Returns:

the localPath value.

storageId

public String storageId()

Get the storageId property: The ID of the storage account to save the packet capture session. Required if no localPath or filePath is provided.

Returns:

the storageId value.

storagePath

public String storagePath()

Get the storagePath property: The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture.

Returns:

the storagePath value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withFilePath

public PacketCaptureStorageLocation withFilePath(String filePath)

Set the filePath property: This path is invalid if 'Continuous Capture' is provided with 'true' or 'false'. A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional.

Parameters:

filePath - the filePath value to set.

Returns:

the PacketCaptureStorageLocation object itself.

withLocalPath

public PacketCaptureStorageLocation withLocalPath(String localPath)

Set the localPath property: This path is valid if 'Continuous Capture' is provided with 'true' or 'false' and required if no storage ID is provided, otherwise optional. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures.

Parameters:

localPath - the localPath value to set.

Returns:

the PacketCaptureStorageLocation object itself.

withStorageId

public PacketCaptureStorageLocation withStorageId(String storageId)

Set the storageId property: The ID of the storage account to save the packet capture session. Required if no localPath or filePath is provided.

Parameters:

storageId - the storageId value to set.

Returns:

the PacketCaptureStorageLocation object itself.

withStoragePath

public PacketCaptureStorageLocation withStoragePath(String storagePath)

Set the storagePath property: The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture.

Parameters:

storagePath - the storagePath value to set.

Returns:

the PacketCaptureStorageLocation object itself.

Applies to