共用方式為


GeoFilter Class

  • java.lang.Object
    • com.azure.resourcemanager.cdn.models.GeoFilter

Implements

public final class GeoFilter
implements JsonSerializable<GeoFilter>

Rules defining user's geo access within a CDN endpoint.

Constructor Summary

Constructor Description
GeoFilter()

Creates an instance of GeoFilter class.

Method Summary

Modifier and Type Method and Description
GeoFilterActions action()

Get the action property: Action of the geo filter, i.e.

List<String> countryCodes()

Get the countryCodes property: Two letter country or region codes defining user country or region access in a geo filter, e.g.

static GeoFilter fromJson(JsonReader jsonReader)

Reads an instance of GeoFilter from the JsonReader.

String relativePath()

Get the relativePath property: Relative path applicable to geo filter.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

GeoFilter withAction(GeoFilterActions action)

Set the action property: Action of the geo filter, i.e.

GeoFilter withCountryCodes(List<String> countryCodes)

Set the countryCodes property: Two letter country or region codes defining user country or region access in a geo filter, e.g.

GeoFilter withRelativePath(String relativePath)

Set the relativePath property: Relative path applicable to geo filter.

Methods inherited from java.lang.Object

Constructor Details

GeoFilter

public GeoFilter()

Creates an instance of GeoFilter class.

Method Details

action

public GeoFilterActions action()

Get the action property: Action of the geo filter, i.e. allow or block access.

Returns:

the action value.

countryCodes

public List countryCodes()

Get the countryCodes property: Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US.

Returns:

the countryCodes value.

fromJson

public static GeoFilter fromJson(JsonReader jsonReader)

Reads an instance of GeoFilter from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

relativePath

public String relativePath()

Get the relativePath property: Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.).

Returns:

the relativePath value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAction

public GeoFilter withAction(GeoFilterActions action)

Set the action property: Action of the geo filter, i.e. allow or block access.

Parameters:

action - the action value to set.

Returns:

the GeoFilter object itself.

withCountryCodes

public GeoFilter withCountryCodes(List countryCodes)

Set the countryCodes property: Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US.

Parameters:

countryCodes - the countryCodes value to set.

Returns:

the GeoFilter object itself.

withRelativePath

public GeoFilter withRelativePath(String relativePath)

Set the relativePath property: Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.).

Parameters:

relativePath - the relativePath value to set.

Returns:

the GeoFilter object itself.

Applies to