DdosGeoMatch Class

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

Implements

public final class DdosGeoMatch
implements JsonSerializable<DdosGeoMatch>

A geographic source match. The service validates that at least one of continent or countryCode is specified. If both are specified, the service validates that the country belongs to the continent according to the service-defined mapping. For example, RU, TR, and KZ map to Asia, EG maps to Africa, and CY maps to Europe.

Constructor Summary

Constructor Description
DdosGeoMatch()

Creates an instance of DdosGeoMatch class.

Method Summary

Modifier and Type Method and Description
DdosContinent continent()

Get the continent property: The continent to match.

String countryCode()

Get the countryCode property: The uppercase two-letter ISO 3166-1 alpha-2 code for the country or territory to match.

static DdosGeoMatch fromJson(JsonReader jsonReader)

Reads an instance of DdosGeoMatch from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

DdosGeoMatch withContinent(DdosContinent continent)

Set the continent property: The continent to match.

DdosGeoMatch withCountryCode(String countryCode)

Set the countryCode property: The uppercase two-letter ISO 3166-1 alpha-2 code for the country or territory to match.

Methods inherited from java.lang.Object

Constructor Details

DdosGeoMatch

public DdosGeoMatch()

Creates an instance of DdosGeoMatch class.

Method Details

continent

public DdosContinent continent()

Get the continent property: The continent to match. Country membership follows the service-defined mapping documented on DdosGeoMatch.

Returns:

the continent value.

countryCode

public String countryCode()

Get the countryCode property: The uppercase two-letter ISO 3166-1 alpha-2 code for the country or territory to match.

Returns:

the countryCode value.

fromJson

public static DdosGeoMatch fromJson(JsonReader jsonReader)

Reads an instance of DdosGeoMatch from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withContinent

public DdosGeoMatch withContinent(DdosContinent continent)

Set the continent property: The continent to match. Country membership follows the service-defined mapping documented on DdosGeoMatch.

Parameters:

continent - the continent value to set.

Returns:

the DdosGeoMatch object itself.

withCountryCode

public DdosGeoMatch withCountryCode(String countryCode)

Set the countryCode property: The uppercase two-letter ISO 3166-1 alpha-2 code for the country or territory to match.

Parameters:

countryCode - the countryCode value to set.

Returns:

the DdosGeoMatch object itself.

Applies to