com.softlayer.api.service.network.Gateway 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.network;
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.network.gateway.Member;
import com.softlayer.api.service.network.gateway.Status;
import com.softlayer.api.service.network.gateway.Vlan;
import com.softlayer.api.service.network.subnet.IpAddress;
import com.softlayer.api.service.network.vlan.Firewall;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
/**
* A network gateway is a set of members which have a configurable set of VLANs trunked through them. This is helpful for creating proxies. Each network gateway can have a configurable set of hardware and VLANs within the same pod routed to it. Gateways can be bypassed or unbypassed either as a whole or for specific VLANs. They are also provided gateway VLANs for management that are never bypassed. Members cannot be simply removed once attached to a gateway, they must be reclaimed.
*
* @see SoftLayer_Network_Gateway
*/
@ApiType("SoftLayer_Network_Gateway")
public class Gateway extends Entity {
/**
* The account for this gateway.
*/
@ApiProperty
protected Account account;
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
/**
* All VLANs trunked to this gateway.
*/
@ApiProperty
protected List insideVlans;
public List getInsideVlans() {
if (insideVlans == null) {
insideVlans = new ArrayList();
}
return insideVlans;
}
/**
* The members for this gateway.
*/
@ApiProperty
protected List members;
public List getMembers() {
if (members == null) {
members = new ArrayList();
}
return members;
}
/**
* The firewall associated with this gateway, if any.
*/
@ApiProperty
protected Firewall networkFirewall;
public Firewall getNetworkFirewall() {
return networkFirewall;
}
public void setNetworkFirewall(Firewall networkFirewall) {
this.networkFirewall = networkFirewall;
}
/**
* Whether or not there is a firewall associated with this gateway.
*/
@ApiProperty
protected Boolean networkFirewallFlag;
public Boolean getNetworkFirewallFlag() {
return networkFirewallFlag;
}
public void setNetworkFirewallFlag(Boolean networkFirewallFlag) {
this.networkFirewallFlag = networkFirewallFlag;
}
/**
* The private gateway IP address.
*/
@ApiProperty
protected IpAddress privateIpAddress;
public IpAddress getPrivateIpAddress() {
return privateIpAddress;
}
public void setPrivateIpAddress(IpAddress privateIpAddress) {
this.privateIpAddress = privateIpAddress;
}
/**
* The private VLAN for accessing this gateway.
*/
@ApiProperty
protected com.softlayer.api.service.network.Vlan privateVlan;
public com.softlayer.api.service.network.Vlan getPrivateVlan() {
return privateVlan;
}
public void setPrivateVlan(com.softlayer.api.service.network.Vlan privateVlan) {
this.privateVlan = privateVlan;
}
/**
* The public gateway IP address.
*/
@ApiProperty
protected IpAddress publicIpAddress;
public IpAddress getPublicIpAddress() {
return publicIpAddress;
}
public void setPublicIpAddress(IpAddress publicIpAddress) {
this.publicIpAddress = publicIpAddress;
}
/**
* The public gateway IPv6 address.
*/
@ApiProperty
protected IpAddress publicIpv6Address;
public IpAddress getPublicIpv6Address() {
return publicIpv6Address;
}
public void setPublicIpv6Address(IpAddress publicIpv6Address) {
this.publicIpv6Address = publicIpv6Address;
}
/**
* The public VLAN for accessing this gateway.
*/
@ApiProperty
protected com.softlayer.api.service.network.Vlan publicVlan;
public com.softlayer.api.service.network.Vlan getPublicVlan() {
return publicVlan;
}
public void setPublicVlan(com.softlayer.api.service.network.Vlan publicVlan) {
this.publicVlan = publicVlan;
}
/**
* The current status of the gateway.
*/
@ApiProperty
protected Status status;
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
/**
* The internal identifier of the account assigned to this gateway.
*/
@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;
}
/**
* The VRRP group number for this gateway. This is set internally and cannot be provided on create.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long groupNumber;
public Long getGroupNumber() {
return groupNumber;
}
public void setGroupNumber(Long groupNumber) {
groupNumberSpecified = true;
this.groupNumber = groupNumber;
}
protected boolean groupNumberSpecified;
public boolean isGroupNumberSpecified() {
return groupNumberSpecified;
}
public void unsetGroupNumber() {
groupNumber = null;
groupNumberSpecified = false;
}
/**
* A gateway's internal identifier.
*/
@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;
}
/**
* A gateway's name. This is required on create and can be no more than 255 characters.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String name;
public String getName() {
return name;
}
public void setName(String name) {
nameSpecified = true;
this.name = name;
}
protected boolean nameSpecified;
public boolean isNameSpecified() {
return nameSpecified;
}
public void unsetName() {
name = null;
nameSpecified = false;
}
/**
* A gateway's network space. Currently, only 'private' or 'both' is allowed. When this value is 'private', it is a backend gateway only. Otherwise, it is a gateway for both frontend and backend traffic.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String networkSpace;
public String getNetworkSpace() {
return networkSpace;
}
public void setNetworkSpace(String networkSpace) {
networkSpaceSpecified = true;
this.networkSpace = networkSpace;
}
protected boolean networkSpaceSpecified;
public boolean isNetworkSpaceSpecified() {
return networkSpaceSpecified;
}
public void unsetNetworkSpace() {
networkSpace = null;
networkSpaceSpecified = false;
}
/**
* The internal identifier of the private IP address for this gateway.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long privateIpAddressId;
public Long getPrivateIpAddressId() {
return privateIpAddressId;
}
public void setPrivateIpAddressId(Long privateIpAddressId) {
privateIpAddressIdSpecified = true;
this.privateIpAddressId = privateIpAddressId;
}
protected boolean privateIpAddressIdSpecified;
public boolean isPrivateIpAddressIdSpecified() {
return privateIpAddressIdSpecified;
}
public void unsetPrivateIpAddressId() {
privateIpAddressId = null;
privateIpAddressIdSpecified = false;
}
/**
* The internal identifier of the private VLAN for this gateway.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long privateVlanId;
public Long getPrivateVlanId() {
return privateVlanId;
}
public void setPrivateVlanId(Long privateVlanId) {
privateVlanIdSpecified = true;
this.privateVlanId = privateVlanId;
}
protected boolean privateVlanIdSpecified;
public boolean isPrivateVlanIdSpecified() {
return privateVlanIdSpecified;
}
public void unsetPrivateVlanId() {
privateVlanId = null;
privateVlanIdSpecified = false;
}
/**
* The internal identifier of the public IP address for this gateway.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long publicIpAddressId;
public Long getPublicIpAddressId() {
return publicIpAddressId;
}
public void setPublicIpAddressId(Long publicIpAddressId) {
publicIpAddressIdSpecified = true;
this.publicIpAddressId = publicIpAddressId;
}
protected boolean publicIpAddressIdSpecified;
public boolean isPublicIpAddressIdSpecified() {
return publicIpAddressIdSpecified;
}
public void unsetPublicIpAddressId() {
publicIpAddressId = null;
publicIpAddressIdSpecified = false;
}
/**
* The internal identifier of the public IPv6 address for this gateway.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long publicIpv6AddressId;
public Long getPublicIpv6AddressId() {
return publicIpv6AddressId;
}
public void setPublicIpv6AddressId(Long publicIpv6AddressId) {
publicIpv6AddressIdSpecified = true;
this.publicIpv6AddressId = publicIpv6AddressId;
}
protected boolean publicIpv6AddressIdSpecified;
public boolean isPublicIpv6AddressIdSpecified() {
return publicIpv6AddressIdSpecified;
}
public void unsetPublicIpv6AddressId() {
publicIpv6AddressId = null;
publicIpv6AddressIdSpecified = false;
}
/**
* The internal identifier of the public VLAN for this gateway. This is set internally and cannot be provided on create.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long publicVlanId;
public Long getPublicVlanId() {
return publicVlanId;
}
public void setPublicVlanId(Long publicVlanId) {
publicVlanIdSpecified = true;
this.publicVlanId = publicVlanId;
}
protected boolean publicVlanIdSpecified;
public boolean isPublicVlanIdSpecified() {
return publicVlanIdSpecified;
}
public void unsetPublicVlanId() {
publicVlanId = null;
publicVlanIdSpecified = false;
}
/**
* The current status of this gateway. This is always active unless there is a process running to change the gateway. This can not be set on creation.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long statusId;
public Long getStatusId() {
return statusId;
}
public void setStatusId(Long statusId) {
statusIdSpecified = true;
this.statusId = statusId;
}
protected boolean statusIdSpecified;
public boolean isStatusIdSpecified() {
return statusIdSpecified;
}
public void unsetStatusId() {
statusId = null;
statusIdSpecified = false;
}
/**
* A count of all VLANs trunked to this gateway.
*/
@ApiProperty
protected Long insideVlanCount;
public Long getInsideVlanCount() {
return insideVlanCount;
}
public void setInsideVlanCount(Long insideVlanCount) {
this.insideVlanCount = insideVlanCount;
}
/**
* A count of the members for this gateway.
*/
@ApiProperty
protected Long memberCount;
public Long getMemberCount() {
return memberCount;
}
public void setMemberCount(Long memberCount) {
this.memberCount = memberCount;
}
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());
}
/**
* A network gateway is a set of members which have a configurable set of VLANs trunked through them. This is helpful for creating proxies. Each network gateway can have a configurable set of hardware and VLANs within the same pod routed to it. Gateways can be bypassed or unbypassed either as a whole or for specific VLANs. They are also provided gateway VLANs for management that are never bypassed. Members cannot be simply removed once attached to a gateway, they must be reclaimed.
*
* @see SoftLayer_Network_Gateway
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Network_Gateway")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Start the asynchronous process to bypass all VLANs. Any VLANs that are already bypassed will be ignored. The status field can be checked for progress.
*
* @see SoftLayer_Network_Gateway::bypassAllVlans
*/
@ApiMethod(instanceRequired = true)
public Void bypassAllVlans();
/**
* Start the asynchronous process to bypass the provided VLANs. The VLANs must already be attached. Any VLANs that are already bypassed will be ignored. The status field can be checked for progress.
*
* @see SoftLayer_Network_Gateway::bypassVlans
*/
@ApiMethod(instanceRequired = true)
public Void bypassVlans(List vlans);
/**
* Create and return a new gateway. This object can be created with any number of members or VLANs, but they all must be in the same pod. By creating a gateway with members and/or VLANs attached, it is the equivalent of individually calling their createObject methods except this will start a single asynchronous process to setup the gateway. The status of this process can be checked using the status field.
*
* @see SoftLayer_Network_Gateway::createObject
*/
@ApiMethod
public Gateway createObject(Gateway templateObject);
/**
* Edit this gateway. Currently, the only value that can be edited is the name.
*
* @see SoftLayer_Network_Gateway::editObject
*/
@ApiMethod(instanceRequired = true)
public Boolean editObject(Gateway templateObject);
/**
* Returns the Gbps capacity of the gateway object
*
*
*
* @see SoftLayer_Network_Gateway::getCapacity
*/
@ApiMethod(instanceRequired = true)
public String getCapacity();
/**
* Returns manufacturer name for a given gateway object
*
*
*
* @see SoftLayer_Network_Gateway::getManufacturer
*/
@ApiMethod(instanceRequired = true)
public String getManufacturer();
/**
* @see SoftLayer_Network_Gateway::getObject
*/
@ApiMethod(instanceRequired = true)
public Gateway getObject();
/**
* Get all VLANs that can become inside VLANs on this gateway. This means the VLAN must not already be an inside VLAN, on the same router as this gateway, not a gateway transit VLAN, and not firewalled.
*
* @see SoftLayer_Network_Gateway::getPossibleInsideVlans
*/
@ApiMethod(instanceRequired = true)
public List getPossibleInsideVlans();
/**
* Rebuild a vSRX gateway with HA cluster by destroying existing vSRX and installing new vSRX on both gateway servers, then creating HA cluster between 2 vSRX. This is a destructive process which will remove existing vSRX configuration and stop all gateway capabilities. vSRX will need to be re-configured after this operation.
*
*
*
* @see SoftLayer_Network_Gateway::rebuildvSRXHACluster
*/
@ApiMethod(instanceRequired = true)
public Boolean rebuildvSRXHACluster();
/**
* Start the asynchronous process to unbypass all VLANs. Any VLANs that are already unbypassed will be ignored. The status field can be checked for progress.
*
* @see SoftLayer_Network_Gateway::unbypassAllVlans
*/
@ApiMethod(instanceRequired = true)
public Void unbypassAllVlans();
/**
* Start the asynchronous process to unbypass the provided VLANs. The VLANs must already be attached. Any VLANs that are already unbypassed will be ignored. The status field can be checked for progress.
*
* @see SoftLayer_Network_Gateway::unbypassVlans
*/
@ApiMethod(instanceRequired = true)
public Void unbypassVlans(List vlans);
/**
* The account for this gateway.
*
* @see SoftLayer_Network_Gateway::getAccount
*/
@ApiMethod(instanceRequired = true)
public Account getAccount();
/**
* All VLANs trunked to this gateway.
*
* @see SoftLayer_Network_Gateway::getInsideVlans
*/
@ApiMethod(instanceRequired = true)
public List getInsideVlans();
/**
* The members for this gateway.
*
* @see SoftLayer_Network_Gateway::getMembers
*/
@ApiMethod(instanceRequired = true)
public List getMembers();
/**
* The firewall associated with this gateway, if any.
*
* @see SoftLayer_Network_Gateway::getNetworkFirewall
*/
@ApiMethod(instanceRequired = true)
public Firewall getNetworkFirewall();
/**
* Whether or not there is a firewall associated with this gateway.
*
* @see SoftLayer_Network_Gateway::getNetworkFirewallFlag
*/
@ApiMethod(instanceRequired = true)
public Boolean getNetworkFirewallFlag();
/**
* The private gateway IP address.
*
* @see SoftLayer_Network_Gateway::getPrivateIpAddress
*/
@ApiMethod(instanceRequired = true)
public IpAddress getPrivateIpAddress();
/**
* The private VLAN for accessing this gateway.
*
* @see SoftLayer_Network_Gateway::getPrivateVlan
*/
@ApiMethod(instanceRequired = true)
public com.softlayer.api.service.network.Vlan getPrivateVlan();
/**
* The public gateway IP address.
*
* @see SoftLayer_Network_Gateway::getPublicIpAddress
*/
@ApiMethod(instanceRequired = true)
public IpAddress getPublicIpAddress();
/**
* The public gateway IPv6 address.
*
* @see SoftLayer_Network_Gateway::getPublicIpv6Address
*/
@ApiMethod(instanceRequired = true)
public IpAddress getPublicIpv6Address();
/**
* The public VLAN for accessing this gateway.
*
* @see SoftLayer_Network_Gateway::getPublicVlan
*/
@ApiMethod(instanceRequired = true)
public com.softlayer.api.service.network.Vlan getPublicVlan();
/**
* The current status of the gateway.
*
* @see SoftLayer_Network_Gateway::getStatus
*/
@ApiMethod(instanceRequired = true)
public Status getStatus();
}
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#bypassAllVlans}
*/
public Future bypassAllVlans();
public Future> bypassAllVlans(ResponseHandler callback);
/**
* Async version of {@link Service#bypassVlans}
*/
public Future bypassVlans(List vlans);
public Future> bypassVlans(List vlans, ResponseHandler callback);
/**
* Async version of {@link Service#createObject}
*/
public Future createObject(Gateway templateObject);
public Future> createObject(Gateway templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#editObject}
*/
public Future editObject(Gateway templateObject);
public Future> editObject(Gateway templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#getCapacity}
*/
public Future getCapacity();
public Future> getCapacity(ResponseHandler callback);
/**
* Async version of {@link Service#getManufacturer}
*/
public Future getManufacturer();
public Future> getManufacturer(ResponseHandler callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getPossibleInsideVlans}
*/
public Future> getPossibleInsideVlans();
public Future> getPossibleInsideVlans(ResponseHandler> callback);
/**
* Async version of {@link Service#rebuildvSRXHACluster}
*/
public Future rebuildvSRXHACluster();
public Future> rebuildvSRXHACluster(ResponseHandler callback);
/**
* Async version of {@link Service#unbypassAllVlans}
*/
public Future unbypassAllVlans();
public Future> unbypassAllVlans(ResponseHandler callback);
/**
* Async version of {@link Service#unbypassVlans}
*/
public Future unbypassVlans(List vlans);
public Future> unbypassVlans(List vlans, 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#getInsideVlans}
*/
public Future> getInsideVlans();
/**
* Async callback version of {@link Service#getInsideVlans}
*/
public Future> getInsideVlans(ResponseHandler> callback);
/**
* Async version of {@link Service#getMembers}
*/
public Future> getMembers();
/**
* Async callback version of {@link Service#getMembers}
*/
public Future> getMembers(ResponseHandler> callback);
/**
* Async version of {@link Service#getNetworkFirewall}
*/
public Future getNetworkFirewall();
/**
* Async callback version of {@link Service#getNetworkFirewall}
*/
public Future> getNetworkFirewall(ResponseHandler callback);
/**
* Async version of {@link Service#getNetworkFirewallFlag}
*/
public Future getNetworkFirewallFlag();
/**
* Async callback version of {@link Service#getNetworkFirewallFlag}
*/
public Future> getNetworkFirewallFlag(ResponseHandler callback);
/**
* Async version of {@link Service#getPrivateIpAddress}
*/
public Future getPrivateIpAddress();
/**
* Async callback version of {@link Service#getPrivateIpAddress}
*/
public Future> getPrivateIpAddress(ResponseHandler callback);
/**
* Async version of {@link Service#getPrivateVlan}
*/
public Future getPrivateVlan();
/**
* Async callback version of {@link Service#getPrivateVlan}
*/
public Future> getPrivateVlan(ResponseHandler callback);
/**
* Async version of {@link Service#getPublicIpAddress}
*/
public Future getPublicIpAddress();
/**
* Async callback version of {@link Service#getPublicIpAddress}
*/
public Future> getPublicIpAddress(ResponseHandler callback);
/**
* Async version of {@link Service#getPublicIpv6Address}
*/
public Future getPublicIpv6Address();
/**
* Async callback version of {@link Service#getPublicIpv6Address}
*/
public Future> getPublicIpv6Address(ResponseHandler callback);
/**
* Async version of {@link Service#getPublicVlan}
*/
public Future getPublicVlan();
/**
* Async callback version of {@link Service#getPublicVlan}
*/
public Future> getPublicVlan(ResponseHandler callback);
/**
* Async version of {@link Service#getStatus}
*/
public Future getStatus();
/**
* Async callback version of {@link Service#getStatus}
*/
public Future> getStatus(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.network.gateway.Vlan.Mask insideVlans() {
return withSubMask("insideVlans", com.softlayer.api.service.network.gateway.Vlan.Mask.class);
}
public com.softlayer.api.service.network.gateway.Member.Mask members() {
return withSubMask("members", com.softlayer.api.service.network.gateway.Member.Mask.class);
}
public com.softlayer.api.service.network.vlan.Firewall.Mask networkFirewall() {
return withSubMask("networkFirewall", com.softlayer.api.service.network.vlan.Firewall.Mask.class);
}
public Mask networkFirewallFlag() {
withLocalProperty("networkFirewallFlag");
return this;
}
public com.softlayer.api.service.network.subnet.IpAddress.Mask privateIpAddress() {
return withSubMask("privateIpAddress", com.softlayer.api.service.network.subnet.IpAddress.Mask.class);
}
public Vlan.Mask privateVlan() {
return withSubMask("privateVlan", Vlan.Mask.class);
}
public com.softlayer.api.service.network.subnet.IpAddress.Mask publicIpAddress() {
return withSubMask("publicIpAddress", com.softlayer.api.service.network.subnet.IpAddress.Mask.class);
}
public com.softlayer.api.service.network.subnet.IpAddress.Mask publicIpv6Address() {
return withSubMask("publicIpv6Address", com.softlayer.api.service.network.subnet.IpAddress.Mask.class);
}
public Vlan.Mask publicVlan() {
return withSubMask("publicVlan", Vlan.Mask.class);
}
public com.softlayer.api.service.network.gateway.Status.Mask status() {
return withSubMask("status", com.softlayer.api.service.network.gateway.Status.Mask.class);
}
public Mask accountId() {
withLocalProperty("accountId");
return this;
}
public Mask groupNumber() {
withLocalProperty("groupNumber");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask name() {
withLocalProperty("name");
return this;
}
public Mask networkSpace() {
withLocalProperty("networkSpace");
return this;
}
public Mask privateIpAddressId() {
withLocalProperty("privateIpAddressId");
return this;
}
public Mask privateVlanId() {
withLocalProperty("privateVlanId");
return this;
}
public Mask publicIpAddressId() {
withLocalProperty("publicIpAddressId");
return this;
}
public Mask publicIpv6AddressId() {
withLocalProperty("publicIpv6AddressId");
return this;
}
public Mask publicVlanId() {
withLocalProperty("publicVlanId");
return this;
}
public Mask statusId() {
withLocalProperty("statusId");
return this;
}
public Mask insideVlanCount() {
withLocalProperty("insideVlanCount");
return this;
}
public Mask memberCount() {
withLocalProperty("memberCount");
return this;
}
}
}