com.softlayer.api.service.dns.Secondary 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.dns;
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.dns.Domain;
import com.softlayer.api.service.dns.Message;
import com.softlayer.api.service.dns.Status;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;
/**
* The SoftLayer_Dns_Secondary data type contains information on a single secondary DNS zone which is managed through SoftLayer's zone transfer service. Domains created via zone transfer may not be modified by the SoftLayer portal or API.
*
* @see SoftLayer_Dns_Secondary
*/
@ApiType("SoftLayer_Dns_Secondary")
public class Secondary extends Entity {
/**
* The SoftLayer account that owns a secondary DNS record.
*/
@ApiProperty
protected Account account;
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
/**
* The domain record created by zone transfer from a secondary DNS record.
*/
@ApiProperty
protected Domain domain;
public Domain getDomain() {
return domain;
}
public void setDomain(Domain domain) {
this.domain = domain;
}
/**
* The error messages created during secondary DNS record transfer.
*/
@ApiProperty
protected List errorMessages;
public List getErrorMessages() {
if (errorMessages == null) {
errorMessages = new ArrayList();
}
return errorMessages;
}
/**
* The current status of the secondary DNS zone.
*/
@ApiProperty
protected Status status;
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
/**
* The date a secondary DNS record was created.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected GregorianCalendar createDate;
public GregorianCalendar getCreateDate() {
return createDate;
}
public void setCreateDate(GregorianCalendar createDate) {
createDateSpecified = true;
this.createDate = createDate;
}
protected boolean createDateSpecified;
public boolean isCreateDateSpecified() {
return createDateSpecified;
}
public void unsetCreateDate() {
createDate = null;
createDateSpecified = false;
}
/**
* The internal identifier for a secondary DNS record.
*/
@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;
}
/**
* The date when the most recent secondary DNS zone transfer took place.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected GregorianCalendar lastUpdate;
public GregorianCalendar getLastUpdate() {
return lastUpdate;
}
public void setLastUpdate(GregorianCalendar lastUpdate) {
lastUpdateSpecified = true;
this.lastUpdate = lastUpdate;
}
protected boolean lastUpdateSpecified;
public boolean isLastUpdateSpecified() {
return lastUpdateSpecified;
}
public void unsetLastUpdate() {
lastUpdate = null;
lastUpdateSpecified = false;
}
/**
* The IP address of the master name server where a secondary DNS zone is transferred from.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String masterIpAddress;
public String getMasterIpAddress() {
return masterIpAddress;
}
public void setMasterIpAddress(String masterIpAddress) {
masterIpAddressSpecified = true;
this.masterIpAddress = masterIpAddress;
}
protected boolean masterIpAddressSpecified;
public boolean isMasterIpAddressSpecified() {
return masterIpAddressSpecified;
}
public void unsetMasterIpAddress() {
masterIpAddress = null;
masterIpAddressSpecified = false;
}
/**
* The current status of a secondary DNS record. The status may be one of the following:
* :*'''0''': Disabled
* :*'''1''': Active
* :*'''2''': Transfer Now
* :*'''3''': An error occurred that prevented the zone transfer from being completed.
*/
@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;
}
/**
* The textual representation of a secondary DNS zone's status.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String statusText;
public String getStatusText() {
return statusText;
}
public void setStatusText(String statusText) {
statusTextSpecified = true;
this.statusText = statusText;
}
protected boolean statusTextSpecified;
public boolean isStatusTextSpecified() {
return statusTextSpecified;
}
public void unsetStatusText() {
statusText = null;
statusTextSpecified = false;
}
/**
* How often a secondary DNS zone should be transferred in minutes.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long transferFrequency;
public Long getTransferFrequency() {
return transferFrequency;
}
public void setTransferFrequency(Long transferFrequency) {
transferFrequencySpecified = true;
this.transferFrequency = transferFrequency;
}
protected boolean transferFrequencySpecified;
public boolean isTransferFrequencySpecified() {
return transferFrequencySpecified;
}
public void unsetTransferFrequency() {
transferFrequency = null;
transferFrequencySpecified = false;
}
/**
* The name of the zone that is transferred.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String zoneName;
public String getZoneName() {
return zoneName;
}
public void setZoneName(String zoneName) {
zoneNameSpecified = true;
this.zoneName = zoneName;
}
protected boolean zoneNameSpecified;
public boolean isZoneNameSpecified() {
return zoneNameSpecified;
}
public void unsetZoneName() {
zoneName = null;
zoneNameSpecified = false;
}
/**
* A count of the error messages created during secondary DNS record transfer.
*/
@ApiProperty
protected Long errorMessageCount;
public Long getErrorMessageCount() {
return errorMessageCount;
}
public void setErrorMessageCount(Long errorMessageCount) {
this.errorMessageCount = errorMessageCount;
}
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 secondary DNS service allows you to use SoftLayer's name servers as a secondary server to your domain's name servers. This is accomplished through the use of zone transfers. Each record created within the secondary DNS service defines which zone is transferred, what server it is transferred from, and the frequency that zone transfers occur at. Zone transfers are performed automatically based on the transfer frequency set on the secondary DNS record. Domains created via zone transfer may not be modified by the SoftLayer portal or API.
*
* The secondary DNS service also provides the ability to manually initiate a zone transfer through the [[SoftLayer_Dns_Secondary::transferNow]] method. The daemon that performs zone transfers runs once a minute, therefore it could take a full minute for the zone transfer to be completed.
*
* Secondary DNS transfers may periodically generate notification or error messages. Please use the [[SoftLayer_Dns_Message]] service to retrieve these notifications.
*
* @see SoftLayer_Dns_Secondary
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Dns_Secondary")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* A secondary DNS record may be converted to a primary DNS record. By converting a secondary DNS record, the SoftLayer name servers will be the authoritative nameserver for this domain and will be directly editable in the SoftLayer API and Portal.
*
* Primary DNS record conversion performs the following steps:
* * The SOA record is updated with SoftLayer's primary name server.
* * All NS records are removed and replaced with SoftLayer's NS records.
* * The secondary DNS record is removed.
*
*
* After the DNS records are converted, the following restrictions will apply to the new domain record:
* * You will need to manage the zone record using the [[SoftLayer_Dns_Domain]] service.
* * You may not edit the SOA or NS records.
* * You may only edit the following resource records: A, AAAA, CNAME, MX, TX, SRV.
*
*
* This change can not be undone, and the record can not be converted back into a secondary DNS record once the conversion is complete.
*
* @see SoftLayer_Dns_Secondary::convertToPrimary
*/
@ApiMethod(instanceRequired = true)
public Boolean convertToPrimary();
/**
* Create a secondary DNS record. The ''zoneName'', ''masterIpAddress'', and ''transferFrequency'' properties in the templateObject parameter are required parameters to create a secondary DNS record.
*
* @see SoftLayer_Dns_Secondary::createObject
*/
@ApiMethod
public Secondary createObject(Secondary templateObject);
/**
* Create multiple secondary DNS records. Each record passed to ''createObjects'' follows the logic in the SoftLayer_Dns_Secondary [[SoftLayer_Dns_Secondary::createObject|createObject]] method.
*
* @see SoftLayer_Dns_Secondary::createObjects
*/
@ApiMethod
public List createObjects(List templateObjects);
/**
* Delete a secondary DNS Record. This will also remove any associated domain records and resource records on the SoftLayer nameservers that were created as a result of the zone transfers. This action cannot be undone.
*
* @see SoftLayer_Dns_Secondary::deleteObject
*/
@ApiMethod(instanceRequired = true)
public Boolean deleteObject();
/**
* Edit the properties of a secondary DNS record by passing in a modified instance of a SoftLayer_Dns_Secondary object. You may only edit the ''masterIpAddress'' and ''transferFrequency'' properties of your secondary DNS record. ''ZoneName'' may not be altered after a secondary DNS record has been created. Please remove and re-create the record if you need to make changes to your zone name.
*
* @see SoftLayer_Dns_Secondary::editObject
*/
@ApiMethod(instanceRequired = true)
public Boolean editObject(Secondary templateObject);
/**
* Search for [[SoftLayer_Dns_Secondary]] records by domain name. getByDomainName() performs an inclusive search for secondary domain records, returning multiple records based on partial name matches. Use this method to locate secondary domain records if you don't have access to their id numbers.
*
* @see SoftLayer_Dns_Secondary::getByDomainName
*/
@ApiMethod
public List getByDomainName(String name);
/**
* getObject retrieves the SoftLayer_Dns_Secondary object whose ID number corresponds to the ID number of the init paramater passed to the SoftLayer_Dns_Secondary service. You can only retrieve a secondary DNS record that is assigned to your SoftLayer customer account.
*
* @see SoftLayer_Dns_Secondary::getObject
*/
@ApiMethod(instanceRequired = true)
public Secondary getObject();
/**
* Force a secondary DNS zone transfer by setting it's status "Transfer Now". A zone transfer will be initiated within a minute of receiving this API call.
*
* @see SoftLayer_Dns_Secondary::transferNow
*/
@ApiMethod(instanceRequired = true)
public Boolean transferNow();
/**
* The SoftLayer account that owns a secondary DNS record.
*
* @see SoftLayer_Dns_Secondary::getAccount
*/
@ApiMethod(instanceRequired = true)
public Account getAccount();
/**
* The domain record created by zone transfer from a secondary DNS record.
*
* @see SoftLayer_Dns_Secondary::getDomain
*/
@ApiMethod(instanceRequired = true)
public Domain getDomain();
/**
* The error messages created during secondary DNS record transfer.
*
* @see SoftLayer_Dns_Secondary::getErrorMessages
*/
@ApiMethod(instanceRequired = true)
public List getErrorMessages();
/**
* The current status of the secondary DNS zone.
*
* @see SoftLayer_Dns_Secondary::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#convertToPrimary}
*/
public Future convertToPrimary();
public Future> convertToPrimary(ResponseHandler callback);
/**
* Async version of {@link Service#createObject}
*/
public Future createObject(Secondary templateObject);
public Future> createObject(Secondary templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#createObjects}
*/
public Future> createObjects(List templateObjects);
public Future> createObjects(List templateObjects, ResponseHandler> callback);
/**
* Async version of {@link Service#deleteObject}
*/
public Future deleteObject();
public Future> deleteObject(ResponseHandler callback);
/**
* Async version of {@link Service#editObject}
*/
public Future editObject(Secondary templateObject);
public Future> editObject(Secondary templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#getByDomainName}
*/
public Future> getByDomainName(String name);
public Future> getByDomainName(String name, ResponseHandler> callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#transferNow}
*/
public Future transferNow();
public Future> transferNow(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#getDomain}
*/
public Future getDomain();
/**
* Async callback version of {@link Service#getDomain}
*/
public Future> getDomain(ResponseHandler callback);
/**
* Async version of {@link Service#getErrorMessages}
*/
public Future> getErrorMessages();
/**
* Async callback version of {@link Service#getErrorMessages}
*/
public Future> getErrorMessages(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 Domain.Mask domain() {
return withSubMask("domain", Domain.Mask.class);
}
public Message.Mask errorMessages() {
return withSubMask("errorMessages", Message.Mask.class);
}
public Status.Mask status() {
return withSubMask("status", Status.Mask.class);
}
public Mask createDate() {
withLocalProperty("createDate");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask lastUpdate() {
withLocalProperty("lastUpdate");
return this;
}
public Mask masterIpAddress() {
withLocalProperty("masterIpAddress");
return this;
}
public Mask statusId() {
withLocalProperty("statusId");
return this;
}
public Mask statusText() {
withLocalProperty("statusText");
return this;
}
public Mask transferFrequency() {
withLocalProperty("transferFrequency");
return this;
}
public Mask zoneName() {
withLocalProperty("zoneName");
return this;
}
public Mask errorMessageCount() {
withLocalProperty("errorMessageCount");
return this;
}
}
}