Class GeoFilter
- java.lang.Object
-
- com.azure.resourcemanager.cdn.models.GeoFilter
-
public final class GeoFilter extends Object
Rules defining user's geo access within a CDN endpoint.
-
-
Constructor Summary
Constructors Constructor Description GeoFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeoFilterActionsaction()Get the action property: Action of the geo filter, i.e.List<String>countryCodes()Get the countryCodes property: Two letter country codes defining user country access in a geo filter, e.g.StringrelativePath()Get the relativePath property: Relative path applicable to geo filter.voidvalidate()Validates the instance.GeoFilterwithAction(GeoFilterActions action)Set the action property: Action of the geo filter, i.e.GeoFilterwithCountryCodes(List<String> countryCodes)Set the countryCodes property: Two letter country codes defining user country access in a geo filter, e.g.GeoFilterwithRelativePath(String relativePath)Set the relativePath property: Relative path applicable to geo filter.
-
-
-
Method Detail
-
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.
-
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.
-
action
public GeoFilterActions action()
Get the action property: Action of the geo filter, i.e. allow or block access.- Returns:
- the action value.
-
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.
-
countryCodes
public List<String> countryCodes()
Get the countryCodes property: Two letter country codes defining user country access in a geo filter, e.g. AU, MX, US.- Returns:
- the countryCodes value.
-
withCountryCodes
public GeoFilter withCountryCodes(List<String> countryCodes)
Set the countryCodes property: Two letter country codes defining user country access in a geo filter, e.g. AU, MX, US.- Parameters:
countryCodes- the countryCodes value to set.- Returns:
- the GeoFilter object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-