Criterion Class

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

Implements

public final class Criterion
implements JsonSerializable<Criterion>

A matching criteria which matches routes based on route prefix, community, and AS path.

Constructor Summary

Constructor Description
Criterion()

Creates an instance of Criterion class.

Method Summary

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

Get the asPath property: List of AS paths which this criteria matches.

List<String> community()

Get the community property: List of BGP communities which this criteria matches.

static Criterion fromJson(JsonReader jsonReader)

Reads an instance of Criterion from the JsonReader.

RouteMapMatchCondition matchCondition()

Get the matchCondition property: Match condition to apply RouteMap rules.

List<String> routePrefix()

Get the routePrefix property: List of route prefixes which this criteria matches.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Criterion withAsPath(List<String> asPath)

Set the asPath property: List of AS paths which this criteria matches.

Criterion withCommunity(List<String> community)

Set the community property: List of BGP communities which this criteria matches.

Criterion withMatchCondition(RouteMapMatchCondition matchCondition)

Set the matchCondition property: Match condition to apply RouteMap rules.

Criterion withRoutePrefix(List<String> routePrefix)

Set the routePrefix property: List of route prefixes which this criteria matches.

Methods inherited from java.lang.Object

Constructor Details

Criterion

public Criterion()

Creates an instance of Criterion class.

Method Details

asPath

public List asPath()

Get the asPath property: List of AS paths which this criteria matches.

Returns:

the asPath value.

community

public List community()

Get the community property: List of BGP communities which this criteria matches.

Returns:

the community value.

fromJson

public static Criterion fromJson(JsonReader jsonReader)

Reads an instance of Criterion from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

matchCondition

public RouteMapMatchCondition matchCondition()

Get the matchCondition property: Match condition to apply RouteMap rules.

Returns:

the matchCondition value.

routePrefix

public List routePrefix()

Get the routePrefix property: List of route prefixes which this criteria matches.

Returns:

the routePrefix value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAsPath

public Criterion withAsPath(List asPath)

Set the asPath property: List of AS paths which this criteria matches.

Parameters:

asPath - the asPath value to set.

Returns:

the Criterion object itself.

withCommunity

public Criterion withCommunity(List community)

Set the community property: List of BGP communities which this criteria matches.

Parameters:

community - the community value to set.

Returns:

the Criterion object itself.

withMatchCondition

public Criterion withMatchCondition(RouteMapMatchCondition matchCondition)

Set the matchCondition property: Match condition to apply RouteMap rules.

Parameters:

matchCondition - the matchCondition value to set.

Returns:

the Criterion object itself.

withRoutePrefix

public Criterion withRoutePrefix(List routePrefix)

Set the routePrefix property: List of route prefixes which this criteria matches.

Parameters:

routePrefix - the routePrefix value to set.

Returns:

the Criterion object itself.

Applies to