
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.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 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 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::getObject
*/
@ApiMethod(instanceRequired = true)
public Country getObject();
/**
* 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#getObject}
*/
public Future getObject();
public Future> getObject(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 longName() {
withLocalProperty("longName");
return this;
}
public Mask shortName() {
withLocalProperty("shortName");
return this;
}
public Mask stateCount() {
withLocalProperty("stateCount");
return this;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy