/** * Creates or finds a CountryIsoCode based on the specified code. * @param code a country ISO code * @return a CountryIsoCode */ public static CountryIsoCode fromString(String code) { return fromString(code, CountryIsoCode.class); } }
/** * @return known country ISO codes */ public static Collection<CountryIsoCode> values() { return values(CountryIsoCode.class); }
@Override public DomainContactImpl withCountry(CountryIsoCode country) { inner().addressMailing().withCountry(country.toString()); return this; }
@Override public CdnEndpointImpl withGeoFilter(String relativePath, GeoFilterActions action, CountryIsoCode countryCode) { GeoFilter geoFilter = this.createGeoFiltersObject(relativePath, action); if (geoFilter.countryCodes() == null) { geoFilter.withCountryCodes(new ArrayList<String>()); } geoFilter.countryCodes().add(countryCode.toString()); this.inner().geoFilters().add(geoFilter); return this; }
/** * Creates or finds a CountryIsoCode based on the specified code. * @param code a country ISO code * @return a CountryIsoCode */ public static CountryIsoCode fromString(String code) { return fromString(code, CountryIsoCode.class); } }
/** * @return known country ISO codes */ public static Collection<CountryIsoCode> values() { return values(CountryIsoCode.class); }
@Override public CdnEndpointImpl withGeoFilter(String relativePath, GeoFilterActions action, CountryIsoCode countryCode) { GeoFilter geoFilter = this.createGeoFiltersObject(relativePath, action); if (geoFilter.countryCodes() == null) { geoFilter.withCountryCodes(new ArrayList<String>()); } geoFilter.countryCodes().add(countryCode.toString()); this.inner().geoFilters().add(geoFilter); return this; }
@Override public CountryIsoCode usageLocation() { return CountryIsoCode.fromString(inner().usageLocation()); }
@Override public CdnEndpointImpl withGeoFilter(String relativePath, GeoFilterActions action, Collection<CountryIsoCode> countryCodes) { GeoFilter geoFilter = this.createGeoFiltersObject(relativePath, action); if (geoFilter.countryCodes() == null) { geoFilter.withCountryCodes(new ArrayList<String>()); } else { geoFilter.countryCodes().clear(); } for (CountryIsoCode countryCode : countryCodes) { geoFilter.countryCodes().add(countryCode.toString()); } this.inner().geoFilters().add(geoFilter); return this; }
@Override public CdnEndpointImpl withGeoFilter(String relativePath, GeoFilterActions action, Collection<CountryIsoCode> countryCodes) { GeoFilter geoFilter = this.createGeoFiltersObject(relativePath, action); if (geoFilter.countryCodes() == null) { geoFilter.withCountryCodes(new ArrayList<String>()); } else { geoFilter.countryCodes().clear(); } for (CountryIsoCode countryCode : countryCodes) { geoFilter.countryCodes().add(countryCode.toString()); } this.inner().geoFilters().add(geoFilter); return this; }