com.softlayer.api.service.locale.Country Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of softlayer-api-client Show documentation
Show all versions of softlayer-api-client Show documentation
API client for accessing the SoftLayer API
package com.softlayer.api.service.locale;
import com.softlayer.api.ApiClient;
import com.softlayer.api.ResponseHandler;
import com.softlayer.api.annotation.ApiMethod;
import com.softlayer.api.annotation.ApiProperty;
import com.softlayer.api.annotation.ApiType;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.container.collection.locale.CountryCode;
import com.softlayer.api.service.container.collection.locale.VatCountryCodeAndFormat;
import com.softlayer.api.service.locale.StateProvince;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
/**
* This service provides methods to retrieve country locale information.
*
* @see SoftLayer_Locale_Country
*/
@ApiType("SoftLayer_Locale_Country")
public class Country extends Entity {
/**
* States that belong to this country.
*/
@ApiProperty
protected List states;
public List getStates() {
if (states == null) {
states = new ArrayList();
}
return states;
}
/**
* Binary flag denoting if this country is part of the European Union
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long isEuropeanUnionFlag;
public Long getIsEuropeanUnionFlag() {
return isEuropeanUnionFlag;
}
public void setIsEuropeanUnionFlag(Long isEuropeanUnionFlag) {
isEuropeanUnionFlagSpecified = true;
this.isEuropeanUnionFlag = isEuropeanUnionFlag;
}
protected boolean isEuropeanUnionFlagSpecified;
public boolean isIsEuropeanUnionFlagSpecified() {
return isEuropeanUnionFlagSpecified;
}
public void unsetIsEuropeanUnionFlag() {
isEuropeanUnionFlag = null;
isEuropeanUnionFlagSpecified = false;
}
@ApiProperty(canBeNullOrNotSet = true)
protected String isoCodeAlphaThree;
public String getIsoCodeAlphaThree() {
return isoCodeAlphaThree;
}
public void setIsoCodeAlphaThree(String isoCodeAlphaThree) {
isoCodeAlphaThreeSpecified = true;
this.isoCodeAlphaThree = isoCodeAlphaThree;
}
protected boolean isoCodeAlphaThreeSpecified;
public boolean isIsoCodeAlphaThreeSpecified() {
return isoCodeAlphaThreeSpecified;
}
public void unsetIsoCodeAlphaThree() {
isoCodeAlphaThree = null;
isoCodeAlphaThreeSpecified = false;
}
@ApiProperty(canBeNullOrNotSet = true)
protected String longName;
public String getLongName() {
return longName;
}
public void setLongName(String longName) {
longNameSpecified = true;
this.longName = longName;
}
protected boolean longNameSpecified;
public boolean isLongNameSpecified() {
return longNameSpecified;
}
public void unsetLongName() {
longName = null;
longNameSpecified = false;
}
@ApiProperty(canBeNullOrNotSet = true)
protected String postalCodeFormat;
public String getPostalCodeFormat() {
return postalCodeFormat;
}
public void setPostalCodeFormat(String postalCodeFormat) {
postalCodeFormatSpecified = true;
this.postalCodeFormat = postalCodeFormat;
}
protected boolean postalCodeFormatSpecified;
public boolean isPostalCodeFormatSpecified() {
return postalCodeFormatSpecified;
}
public void unsetPostalCodeFormat() {
postalCodeFormat = null;
postalCodeFormatSpecified = false;
}
@ApiProperty(canBeNullOrNotSet = true)
protected Long postalCodeRequiredFlag;
public Long getPostalCodeRequiredFlag() {
return postalCodeRequiredFlag;
}
public void setPostalCodeRequiredFlag(Long postalCodeRequiredFlag) {
postalCodeRequiredFlagSpecified = true;
this.postalCodeRequiredFlag = postalCodeRequiredFlag;
}
protected boolean postalCodeRequiredFlagSpecified;
public boolean isPostalCodeRequiredFlagSpecified() {
return postalCodeRequiredFlagSpecified;
}
public void unsetPostalCodeRequiredFlag() {
postalCodeRequiredFlag = null;
postalCodeRequiredFlagSpecified = false;
}
@ApiProperty(canBeNullOrNotSet = true)
protected String shortName;
public String getShortName() {
return shortName;
}
public void setShortName(String shortName) {
shortNameSpecified = true;
this.shortName = shortName;
}
protected boolean shortNameSpecified;
public boolean isShortNameSpecified() {
return shortNameSpecified;
}
public void unsetShortName() {
shortName = null;
shortNameSpecified = false;
}
@ApiProperty(canBeNullOrNotSet = true)
protected String vatIdRegex;
public String getVatIdRegex() {
return vatIdRegex;
}
public void setVatIdRegex(String vatIdRegex) {
vatIdRegexSpecified = true;
this.vatIdRegex = vatIdRegex;
}
protected boolean vatIdRegexSpecified;
public boolean isVatIdRegexSpecified() {
return vatIdRegexSpecified;
}
public void unsetVatIdRegex() {
vatIdRegex = null;
vatIdRegexSpecified = false;
}
@ApiProperty(canBeNullOrNotSet = true)
protected Boolean vatIdRequiredFlag;
public Boolean getVatIdRequiredFlag() {
return vatIdRequiredFlag;
}
public void setVatIdRequiredFlag(Boolean vatIdRequiredFlag) {
vatIdRequiredFlagSpecified = true;
this.vatIdRequiredFlag = vatIdRequiredFlag;
}
protected boolean vatIdRequiredFlagSpecified;
public boolean isVatIdRequiredFlagSpecified() {
return vatIdRequiredFlagSpecified;
}
public void unsetVatIdRequiredFlag() {
vatIdRequiredFlag = null;
vatIdRequiredFlagSpecified = false;
}
/**
* A count of states that belong to this country.
*/
@ApiProperty
protected Long stateCount;
public Long getStateCount() {
return stateCount;
}
public void setStateCount(Long stateCount) {
this.stateCount = stateCount;
}
public static Service service(ApiClient client) {
return client.createService(Service.class, null);
}
/**
* This service provides methods to retrieve country locale information.
*
* @see SoftLayer_Locale_Country
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Locale_Country")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* This method is to get the collection of VAT country codes and VAT ID Regexes.
*
* @see SoftLayer_Locale_Country::getAllVatCountryCodesAndVatIdRegexes
*/
@ApiMethod
public List getAllVatCountryCodesAndVatIdRegexes();
/**
* Use this method to retrieve a list of countries and locale information available to the current user.
*
* @see SoftLayer_Locale_Country::getAvailableCountries
*/
@ApiMethod
public List getAvailableCountries();
/**
* Use this method to retrieve a list of countries and locale information such as country code and state/provinces.
*
* @see SoftLayer_Locale_Country::getCountries
*/
@ApiMethod
public List getCountries();
/**
* This method will return a collection of [[SoftLayer_Container_Collection_Locale_CountryCode]] objects. If the country has states, a [[SoftLayer_Container_Collection_Locale_StateCode]] collection will be provided with the country.
*
* @see SoftLayer_Locale_Country::getCountriesAndStates
*/
@ApiMethod
public List getCountriesAndStates(Boolean usFirstFlag);
/**
* @see SoftLayer_Locale_Country::getObject
*/
@ApiMethod(instanceRequired = true)
public Country getObject();
/**
* This method will return an array of ISO 3166 Alpha-2 country codes that use a Value-Added Tax (VAT) ID. Note the difference between [[SoftLayer_Locale_Country/getVatRequiredCountryCodes]] - this method will provide all country codes that use VAT ID, including those which are required.
*
* @see SoftLayer_Locale_Country::getVatCountries
*/
@ApiMethod
public List getVatCountries();
/**
* This method will return an array of ISO 3166 Alpha-2 country codes that use a Value-Added Tax (VAT) ID. Note the difference between [[SoftLayer_Locale_Country/getVatCountries]] - this method will provide country codes where a VAT ID is required for onboarding to IBM Cloud.
*
* @see SoftLayer_Locale_Country::getVatRequiredCountryCodes
*/
@ApiMethod
public List getVatRequiredCountryCodes();
/**
* Returns true if the country code is in the European Union (EU), false otherwise.
*
* @see SoftLayer_Locale_Country::isEuropeanUnionCountry
*/
@ApiMethod
public Boolean isEuropeanUnionCountry(String iso2CountryCode);
/**
* States that belong to this country.
*
* @see SoftLayer_Locale_Country::getStates
*/
@ApiMethod(instanceRequired = true)
public List getStates();
}
public static interface ServiceAsync extends com.softlayer.api.ServiceAsync {
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Async version of {@link Service#getAllVatCountryCodesAndVatIdRegexes}
*/
public Future> getAllVatCountryCodesAndVatIdRegexes();
public Future> getAllVatCountryCodesAndVatIdRegexes(ResponseHandler> callback);
/**
* Async version of {@link Service#getAvailableCountries}
*/
public Future> getAvailableCountries();
public Future> getAvailableCountries(ResponseHandler> callback);
/**
* Async version of {@link Service#getCountries}
*/
public Future> getCountries();
public Future> getCountries(ResponseHandler> callback);
/**
* Async version of {@link Service#getCountriesAndStates}
*/
public Future> getCountriesAndStates(Boolean usFirstFlag);
public Future> getCountriesAndStates(Boolean usFirstFlag, ResponseHandler> callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getVatCountries}
*/
public Future> getVatCountries();
public Future> getVatCountries(ResponseHandler> callback);
/**
* Async version of {@link Service#getVatRequiredCountryCodes}
*/
public Future> getVatRequiredCountryCodes();
public Future> getVatRequiredCountryCodes(ResponseHandler> callback);
/**
* Async version of {@link Service#isEuropeanUnionCountry}
*/
public Future isEuropeanUnionCountry(String iso2CountryCode);
public Future> isEuropeanUnionCountry(String iso2CountryCode, ResponseHandler callback);
/**
* Async version of {@link Service#getStates}
*/
public Future> getStates();
/**
* Async callback version of {@link Service#getStates}
*/
public Future> getStates(ResponseHandler> callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public StateProvince.Mask states() {
return withSubMask("states", StateProvince.Mask.class);
}
public Mask isEuropeanUnionFlag() {
withLocalProperty("isEuropeanUnionFlag");
return this;
}
public Mask isoCodeAlphaThree() {
withLocalProperty("isoCodeAlphaThree");
return this;
}
public Mask longName() {
withLocalProperty("longName");
return this;
}
public Mask postalCodeFormat() {
withLocalProperty("postalCodeFormat");
return this;
}
public Mask postalCodeRequiredFlag() {
withLocalProperty("postalCodeRequiredFlag");
return this;
}
public Mask shortName() {
withLocalProperty("shortName");
return this;
}
public Mask vatIdRegex() {
withLocalProperty("vatIdRegex");
return this;
}
public Mask vatIdRequiredFlag() {
withLocalProperty("vatIdRequiredFlag");
return this;
}
public Mask stateCount() {
withLocalProperty("stateCount");
return this;
}
}
}