共用方式為


RoutingPolicy Class

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

Implements

public final class RoutingPolicy
implements JsonSerializable<RoutingPolicy>

The routing policy object used in a RoutingIntent resource.

Constructor Summary

Constructor Description
RoutingPolicy()

Creates an instance of RoutingPolicy class.

Method Summary

Modifier and Type Method and Description
List<String> destinations()

Get the destinations property: List of all destinations which this routing policy is applicable to (for example: Internet, PrivateTraffic).

static RoutingPolicy fromJson(JsonReader jsonReader)

Reads an instance of RoutingPolicy from the JsonReader.

String name()

Get the name property: The unique name for the routing policy.

String nextHop()

Get the nextHop property: The next hop resource id on which this routing policy is applicable to.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

RoutingPolicy withDestinations(List<String> destinations)

Set the destinations property: List of all destinations which this routing policy is applicable to (for example: Internet, PrivateTraffic).

RoutingPolicy withName(String name)

Set the name property: The unique name for the routing policy.

RoutingPolicy withNextHop(String nextHop)

Set the nextHop property: The next hop resource id on which this routing policy is applicable to.

Methods inherited from java.lang.Object

Constructor Details

RoutingPolicy

public RoutingPolicy()

Creates an instance of RoutingPolicy class.

Method Details

destinations

public List destinations()

Get the destinations property: List of all destinations which this routing policy is applicable to (for example: Internet, PrivateTraffic).

Returns:

the destinations value.

fromJson

public static RoutingPolicy fromJson(JsonReader jsonReader)

Reads an instance of RoutingPolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of RoutingPolicy 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.

name

public String name()

Get the name property: The unique name for the routing policy.

Returns:

the name value.

nextHop

public String nextHop()

Get the nextHop property: The next hop resource id on which this routing policy is applicable to.

Returns:

the nextHop value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withDestinations

public RoutingPolicy withDestinations(List destinations)

Set the destinations property: List of all destinations which this routing policy is applicable to (for example: Internet, PrivateTraffic).

Parameters:

destinations - the destinations value to set.

Returns:

the RoutingPolicy object itself.

withName

public RoutingPolicy withName(String name)

Set the name property: The unique name for the routing policy.

Parameters:

name - the name value to set.

Returns:

the RoutingPolicy object itself.

withNextHop

public RoutingPolicy withNextHop(String nextHop)

Set the nextHop property: The next hop resource id on which this routing policy is applicable to.

Parameters:

nextHop - the nextHop value to set.

Returns:

the RoutingPolicy object itself.

Applies to