com.softlayer.api.service.account.Address 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.account;
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.Account;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.Location;
import com.softlayer.api.service.account.address.Type;
import com.softlayer.api.service.user.Customer;
import com.softlayer.api.service.user.Employee;
import java.util.List;
import java.util.concurrent.Future;
/**
* The SoftLayer_Account_Address data type contains information on an address associated with a SoftLayer account.
*
* @see SoftLayer_Account_Address
*/
@ApiType("SoftLayer_Account_Address")
public class Address extends Entity {
/**
* The account to which this address belongs.
*/
@ApiProperty
protected Account account;
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
/**
* The customer user who created this address.
*/
@ApiProperty
protected Customer createUser;
public Customer getCreateUser() {
return createUser;
}
public void setCreateUser(Customer createUser) {
this.createUser = createUser;
}
/**
* The location of this address.
*/
@ApiProperty
protected Location location;
public Location getLocation() {
return location;
}
public void setLocation(Location location) {
this.location = location;
}
/**
* The employee who last modified this address.
*/
@ApiProperty
protected Employee modifyEmployee;
public Employee getModifyEmployee() {
return modifyEmployee;
}
public void setModifyEmployee(Employee modifyEmployee) {
this.modifyEmployee = modifyEmployee;
}
/**
* The customer user who last modified this address.
*/
@ApiProperty
protected Customer modifyUser;
public Customer getModifyUser() {
return modifyUser;
}
public void setModifyUser(Customer modifyUser) {
this.modifyUser = modifyUser;
}
/**
* An account address' type.
*/
@ApiProperty
protected Type type;
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
@ApiProperty(canBeNullOrNotSet = true)
protected Long accountId;
public Long getAccountId() {
return accountId;
}
public void setAccountId(Long accountId) {
accountIdSpecified = true;
this.accountId = accountId;
}
protected boolean accountIdSpecified;
public boolean isAccountIdSpecified() {
return accountIdSpecified;
}
public void unsetAccountId() {
accountId = null;
accountIdSpecified = false;
}
/**
* Line 1 of the address (normally the street address).
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String address1;
public String getAddress1() {
return address1;
}
public void setAddress1(String address1) {
address1Specified = true;
this.address1 = address1;
}
protected boolean address1Specified;
public boolean isAddress1Specified() {
return address1Specified;
}
public void unsetAddress1() {
address1 = null;
address1Specified = false;
}
/**
* Line 2 of the address.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String address2;
public String getAddress2() {
return address2;
}
public void setAddress2(String address2) {
address2Specified = true;
this.address2 = address2;
}
protected boolean address2Specified;
public boolean isAddress2Specified() {
return address2Specified;
}
public void unsetAddress2() {
address2 = null;
address2Specified = false;
}
/**
* The city of the address.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String city;
public String getCity() {
return city;
}
public void setCity(String city) {
citySpecified = true;
this.city = city;
}
protected boolean citySpecified;
public boolean isCitySpecified() {
return citySpecified;
}
public void unsetCity() {
city = null;
citySpecified = false;
}
/**
* The contact name (person, office) of the address.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String contactName;
public String getContactName() {
return contactName;
}
public void setContactName(String contactName) {
contactNameSpecified = true;
this.contactName = contactName;
}
protected boolean contactNameSpecified;
public boolean isContactNameSpecified() {
return contactNameSpecified;
}
public void unsetContactName() {
contactName = null;
contactNameSpecified = false;
}
/**
* The country of the address.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String country;
public String getCountry() {
return country;
}
public void setCountry(String country) {
countrySpecified = true;
this.country = country;
}
protected boolean countrySpecified;
public boolean isCountrySpecified() {
return countrySpecified;
}
public void unsetCountry() {
country = null;
countrySpecified = false;
}
/**
* The description of the address.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String description;
public String getDescription() {
return description;
}
public void setDescription(String description) {
descriptionSpecified = true;
this.description = description;
}
protected boolean descriptionSpecified;
public boolean isDescriptionSpecified() {
return descriptionSpecified;
}
public void unsetDescription() {
description = null;
descriptionSpecified = false;
}
/**
* The unique id of the address.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
idSpecified = true;
this.id = id;
}
protected boolean idSpecified;
public boolean isIdSpecified() {
return idSpecified;
}
public void unsetId() {
id = null;
idSpecified = false;
}
/**
* Flag to show whether the address is active.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long isActive;
public Long getIsActive() {
return isActive;
}
public void setIsActive(Long isActive) {
isActiveSpecified = true;
this.isActive = isActive;
}
protected boolean isActiveSpecified;
public boolean isIsActiveSpecified() {
return isActiveSpecified;
}
public void unsetIsActive() {
isActive = null;
isActiveSpecified = false;
}
/**
* The location id of the address.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long locationId;
public Long getLocationId() {
return locationId;
}
public void setLocationId(Long locationId) {
locationIdSpecified = true;
this.locationId = locationId;
}
protected boolean locationIdSpecified;
public boolean isLocationIdSpecified() {
return locationIdSpecified;
}
public void unsetLocationId() {
locationId = null;
locationIdSpecified = false;
}
/**
* The postal (zip) code of the address.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String postalCode;
public String getPostalCode() {
return postalCode;
}
public void setPostalCode(String postalCode) {
postalCodeSpecified = true;
this.postalCode = postalCode;
}
protected boolean postalCodeSpecified;
public boolean isPostalCodeSpecified() {
return postalCodeSpecified;
}
public void unsetPostalCode() {
postalCode = null;
postalCodeSpecified = false;
}
/**
* The state of the address.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String state;
public String getState() {
return state;
}
public void setState(String state) {
stateSpecified = true;
this.state = state;
}
protected boolean stateSpecified;
public boolean isStateSpecified() {
return stateSpecified;
}
public void unsetState() {
state = null;
stateSpecified = false;
}
public Service asService(ApiClient client) {
return service(client, id);
}
public static Service service(ApiClient client) {
return client.createService(Service.class, null);
}
public static Service service(ApiClient client, Long id) {
return client.createService(Service.class, id == null ? null : id.toString());
}
/**
* SoftLayer's address service allows you to access and manage addresses associated with your account.
*
* @see SoftLayer_Account_Address
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Account_Address")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Create a new address record. The ''typeId'', ''accountId'', ''description'', ''address1'', ''city'', ''state'', ''country'', and ''postalCode'' properties in the templateObject parameter are required properties and may not be null or empty. Users will be restricted to creating addresses for their account.
*
* @see SoftLayer_Account_Address::createObject
*/
@ApiMethod
public Address createObject(Address templateObject);
/**
* Edit the properties of an address record by passing in a modified instance of a SoftLayer_Account_Address object. Users will be restricted to modifying addresses for their account.
*
* @see SoftLayer_Account_Address::editObject
*/
@ApiMethod(instanceRequired = true)
public Boolean editObject(Address templateObject);
/**
* Retrieve a list of SoftLayer datacenter addresses.
*
* @see SoftLayer_Account_Address::getAllDataCenters
*/
@ApiMethod
public List getAllDataCenters();
/**
* Retrieve a list of SoftLayer datacenter addresses.
*
* @see SoftLayer_Account_Address::getNetworkAddress
*/
@ApiMethod
public List getNetworkAddress(String name);
/**
* @see SoftLayer_Account_Address::getObject
*/
@ApiMethod(instanceRequired = true)
public Address getObject();
/**
* The account to which this address belongs.
*
* @see SoftLayer_Account_Address::getAccount
*/
@ApiMethod(instanceRequired = true)
public Account getAccount();
/**
* The customer user who created this address.
*
* @see SoftLayer_Account_Address::getCreateUser
*/
@ApiMethod(instanceRequired = true)
public Customer getCreateUser();
/**
* The location of this address.
*
* @see SoftLayer_Account_Address::getLocation
*/
@ApiMethod(instanceRequired = true)
public Location getLocation();
/**
* The employee who last modified this address.
*
* @see SoftLayer_Account_Address::getModifyEmployee
*/
@ApiMethod(instanceRequired = true)
public Employee getModifyEmployee();
/**
* The customer user who last modified this address.
*
* @see SoftLayer_Account_Address::getModifyUser
*/
@ApiMethod(instanceRequired = true)
public Customer getModifyUser();
/**
* An account address' type.
*
* @see SoftLayer_Account_Address::getType
*/
@ApiMethod(instanceRequired = true)
public Type getType();
}
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#createObject}
*/
public Future createObject(Address templateObject);
public Future> createObject(Address templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#editObject}
*/
public Future editObject(Address templateObject);
public Future> editObject(Address templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#getAllDataCenters}
*/
public Future> getAllDataCenters();
public Future> getAllDataCenters(ResponseHandler> callback);
/**
* Async version of {@link Service#getNetworkAddress}
*/
public Future> getNetworkAddress(String name);
public Future> getNetworkAddress(String name, ResponseHandler> callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getAccount}
*/
public Future getAccount();
/**
* Async callback version of {@link Service#getAccount}
*/
public Future> getAccount(ResponseHandler callback);
/**
* Async version of {@link Service#getCreateUser}
*/
public Future getCreateUser();
/**
* Async callback version of {@link Service#getCreateUser}
*/
public Future> getCreateUser(ResponseHandler callback);
/**
* Async version of {@link Service#getLocation}
*/
public Future getLocation();
/**
* Async callback version of {@link Service#getLocation}
*/
public Future> getLocation(ResponseHandler callback);
/**
* Async version of {@link Service#getModifyEmployee}
*/
public Future getModifyEmployee();
/**
* Async callback version of {@link Service#getModifyEmployee}
*/
public Future> getModifyEmployee(ResponseHandler callback);
/**
* Async version of {@link Service#getModifyUser}
*/
public Future getModifyUser();
/**
* Async callback version of {@link Service#getModifyUser}
*/
public Future> getModifyUser(ResponseHandler callback);
/**
* Async version of {@link Service#getType}
*/
public Future getType();
/**
* Async callback version of {@link Service#getType}
*/
public Future> getType(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public com.softlayer.api.service.Account.Mask account() {
return withSubMask("account", com.softlayer.api.service.Account.Mask.class);
}
public com.softlayer.api.service.user.Customer.Mask createUser() {
return withSubMask("createUser", com.softlayer.api.service.user.Customer.Mask.class);
}
public com.softlayer.api.service.Location.Mask location() {
return withSubMask("location", com.softlayer.api.service.Location.Mask.class);
}
public com.softlayer.api.service.user.Employee.Mask modifyEmployee() {
return withSubMask("modifyEmployee", com.softlayer.api.service.user.Employee.Mask.class);
}
public com.softlayer.api.service.user.Customer.Mask modifyUser() {
return withSubMask("modifyUser", com.softlayer.api.service.user.Customer.Mask.class);
}
public com.softlayer.api.service.account.address.Type.Mask type() {
return withSubMask("type", com.softlayer.api.service.account.address.Type.Mask.class);
}
public Mask accountId() {
withLocalProperty("accountId");
return this;
}
public Mask address1() {
withLocalProperty("address1");
return this;
}
public Mask address2() {
withLocalProperty("address2");
return this;
}
public Mask city() {
withLocalProperty("city");
return this;
}
public Mask contactName() {
withLocalProperty("contactName");
return this;
}
public Mask country() {
withLocalProperty("country");
return this;
}
public Mask description() {
withLocalProperty("description");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask isActive() {
withLocalProperty("isActive");
return this;
}
public Mask locationId() {
withLocalProperty("locationId");
return this;
}
public Mask postalCode() {
withLocalProperty("postalCode");
return this;
}
public Mask state() {
withLocalProperty("state");
return this;
}
}
}