Class PacketCaptureStorageLocation
java.lang.Object
com.azure.resourcemanager.network.models.PacketCaptureStorageLocation
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PacketCaptureStorageLocation>
public final class PacketCaptureStorageLocation
extends Object
implements com.azure.json.JsonSerializable<PacketCaptureStorageLocation>
The storage location for a packet capture session.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of PacketCaptureStorageLocation class. -
Method Summary
Modifier and TypeMethodDescriptionfilePath()Get the filePath property: This path is invalid if 'Continuous Capture' is provided with 'true' or 'false'.static PacketCaptureStorageLocationfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of PacketCaptureStorageLocation from the JsonReader.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.Get the storageId property: The ID of the storage account to save the packet capture session.Get the storagePath property: The URI of the storage path to save the packet capture.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withFilePath(String filePath) Set the filePath property: This path is invalid if 'Continuous Capture' is provided with 'true' or 'false'.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.withStorageId(String storageId) Set the storageId property: The ID of the storage account to save the packet capture session.withStoragePath(String storagePath) Set the storagePath property: The URI of the storage path to save the packet capture.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
-
PacketCaptureStorageLocation
public PacketCaptureStorageLocation()Creates an instance of PacketCaptureStorageLocation class.
-
-
Method Details
-
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.
-
withStorageId
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.
-
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.
-
withStoragePath
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.
-
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.
-
withFilePath
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.
-
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.
-
withLocalPath
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.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<PacketCaptureStorageLocation>- Throws:
IOException
-
fromJson
public static PacketCaptureStorageLocation fromJson(com.azure.json.JsonReader jsonReader) throws IOException 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.
-