Class GrantAccessData
java.lang.Object
com.azure.resourcemanager.compute.models.GrantAccessData
- All Implemented Interfaces:
com.azure.json.JsonSerializable<GrantAccessData>
public final class GrantAccessData
extends Object
implements com.azure.json.JsonSerializable<GrantAccessData>
Data used for requesting a SAS.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccess()Get the access property: The Access Level, accepted values include None, Read, Write.intGet the durationInSeconds property: Time duration in seconds until the SAS access expires.Get the fileFormat property: Used to specify the file format when making request for SAS on a VHDX file format snapshot.static GrantAccessDatafromJson(com.azure.json.JsonReader jsonReader) Reads an instance of GrantAccessData from the JsonReader.Get the getSecureVMGuestStateSas property: Set this flag to true to get additional SAS for VM guest state.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withAccess(AccessLevel access) Set the access property: The Access Level, accepted values include None, Read, Write.withDurationInSeconds(int durationInSeconds) Set the durationInSeconds property: Time duration in seconds until the SAS access expires.withFileFormat(FileFormat fileFormat) Set the fileFormat property: Used to specify the file format when making request for SAS on a VHDX file format snapshot.withGetSecureVMGuestStateSas(Boolean getSecureVMGuestStateSas) Set the getSecureVMGuestStateSas property: Set this flag to true to get additional SAS for VM guest state.Methods inherited from class 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
-
GrantAccessData
public GrantAccessData()Creates an instance of GrantAccessData class.
-
-
Method Details
-
access
Get the access property: The Access Level, accepted values include None, Read, Write.- Returns:
- the access value.
-
withAccess
Set the access property: The Access Level, accepted values include None, Read, Write.- Parameters:
access- the access value to set.- Returns:
- the GrantAccessData object itself.
-
durationInSeconds
public int durationInSeconds()Get the durationInSeconds property: Time duration in seconds until the SAS access expires.- Returns:
- the durationInSeconds value.
-
withDurationInSeconds
Set the durationInSeconds property: Time duration in seconds until the SAS access expires.- Parameters:
durationInSeconds- the durationInSeconds value to set.- Returns:
- the GrantAccessData object itself.
-
getSecureVMGuestStateSas
Get the getSecureVMGuestStateSas property: Set this flag to true to get additional SAS for VM guest state.- Returns:
- the getSecureVMGuestStateSas value.
-
withGetSecureVMGuestStateSas
Set the getSecureVMGuestStateSas property: Set this flag to true to get additional SAS for VM guest state.- Parameters:
getSecureVMGuestStateSas- the getSecureVMGuestStateSas value to set.- Returns:
- the GrantAccessData object itself.
-
fileFormat
Get the fileFormat property: Used to specify the file format when making request for SAS on a VHDX file format snapshot.- Returns:
- the fileFormat value.
-
withFileFormat
Set the fileFormat property: Used to specify the file format when making request for SAS on a VHDX file format snapshot.- Parameters:
fileFormat- the fileFormat value to set.- Returns:
- the GrantAccessData 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<GrantAccessData>- Throws:
IOException
-
fromJson
Reads an instance of GrantAccessData from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of GrantAccessData 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 GrantAccessData.
-