TrafficSelectorPolicy Class

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

Implements

public final class TrafficSelectorPolicy
implements JsonSerializable<TrafficSelectorPolicy>

An traffic selector policy for a virtual network gateway connection.

Constructor Summary

Constructor Description
TrafficSelectorPolicy()

Creates an instance of TrafficSelectorPolicy class.

Method Summary

Modifier and Type Method and Description
static TrafficSelectorPolicy fromJson(JsonReader jsonReader)

Reads an instance of TrafficSelectorPolicy from the JsonReader.

List<String> localAddressRanges()

Get the localAddressRanges property: A collection of local address spaces in CIDR format.

List<String> remoteAddressRanges()

Get the remoteAddressRanges property: A collection of remote address spaces in CIDR format.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

TrafficSelectorPolicy withLocalAddressRanges(List<String> localAddressRanges)

Set the localAddressRanges property: A collection of local address spaces in CIDR format.

TrafficSelectorPolicy withRemoteAddressRanges(List<String> remoteAddressRanges)

Set the remoteAddressRanges property: A collection of remote address spaces in CIDR format.

Methods inherited from java.lang.Object

Constructor Details

TrafficSelectorPolicy

public TrafficSelectorPolicy()

Creates an instance of TrafficSelectorPolicy class.

Method Details

fromJson

public static TrafficSelectorPolicy fromJson(JsonReader jsonReader)

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:

IOException

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

localAddressRanges

public List localAddressRanges()

Get the localAddressRanges property: A collection of local address spaces in CIDR format.

Returns:

the localAddressRanges value.

remoteAddressRanges

public List remoteAddressRanges()

Get the remoteAddressRanges property: A collection of remote address spaces in CIDR format.

Returns:

the remoteAddressRanges value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withLocalAddressRanges

public TrafficSelectorPolicy withLocalAddressRanges(List localAddressRanges)

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.

withRemoteAddressRanges

public TrafficSelectorPolicy withRemoteAddressRanges(List remoteAddressRanges)

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.

Applies to