Class TrafficSelectorPolicy
java.lang.Object
com.azure.resourcemanager.network.models.TrafficSelectorPolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<TrafficSelectorPolicy>
public final class TrafficSelectorPolicy
extends Object
implements com.azure.json.JsonSerializable<TrafficSelectorPolicy>
An traffic selector policy for a virtual network gateway connection.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TrafficSelectorPolicyfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of TrafficSelectorPolicy from the JsonReader.Get the localAddressRanges property: A collection of local address spaces in CIDR format.Get the remoteAddressRanges property: A collection of remote address spaces in CIDR format.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withLocalAddressRanges(List<String> localAddressRanges) Set the localAddressRanges property: A collection of local address spaces in CIDR format.withRemoteAddressRanges(List<String> remoteAddressRanges) Set the remoteAddressRanges property: A collection of remote address spaces in CIDR format.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
-
TrafficSelectorPolicy
public TrafficSelectorPolicy()Creates an instance of TrafficSelectorPolicy class.
-
-
Method Details
-
localAddressRanges
Get the localAddressRanges property: A collection of local address spaces in CIDR format.- Returns:
- the localAddressRanges value.
-
withLocalAddressRanges
Set the localAddressRanges property: A collection of local address spaces in CIDR format.- Parameters:
localAddressRanges- the localAddressRanges value to set.- Returns:
- the TrafficSelectorPolicy object itself.
-
remoteAddressRanges
Get the remoteAddressRanges property: A collection of remote address spaces in CIDR format.- Returns:
- the remoteAddressRanges value.
-
withRemoteAddressRanges
Set the remoteAddressRanges property: A collection of remote address spaces in CIDR format.- Parameters:
remoteAddressRanges- the remoteAddressRanges value to set.- Returns:
- the TrafficSelectorPolicy 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<TrafficSelectorPolicy>- Throws:
IOException
-
fromJson
public static TrafficSelectorPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of TrafficSelectorPolicy from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of TrafficSelectorPolicy 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 TrafficSelectorPolicy.
-