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.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;
}
/**
* 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);
/**
* 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();
/**
* @see SoftLayer_Locale_Country::getCountriesAndStates
*/
@ApiMethod
public List getCountriesAndStates(Boolean usFirstFlag);
/**
* @see SoftLayer_Locale_Country::getObject
*/
@ApiMethod(instanceRequired = true)
public Country getObject();
/**
* @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#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#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 stateCount() {
withLocalProperty("stateCount");
return this;
}
}
}