Package com.google.cloud.dns
Class ChangeRequest
- java.lang.Object
-
- com.google.cloud.dns.ChangeRequestInfo
-
- com.google.cloud.dns.ChangeRequest
-
- All Implemented Interfaces:
Serializable
public class ChangeRequest extends ChangeRequestInfo
An immutable class representing an atomic update to a collection ofRecordSets within aZone.- See Also:
- Google Cloud DNS documentation, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classChangeRequest.BuilderA builder forChangeRequests.-
Nested classes/interfaces inherited from class com.google.cloud.dns.ChangeRequestInfo
ChangeRequestInfo.Status
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChangeRequestapplyTo(String zoneName, Dns.ChangeRequestOption... options)Applies this change request to the zone identified byzoneName.booleanequals(Object obj)DnsgetDns()Returns the change request'sDnsobject used to issue requests.StringgetZone()Returns the name of theZoneassociated with this change request.inthashCode()booleanisDone()Returnstrueif the change request has been completed.ChangeRequestreload(Dns.ChangeRequestOption... options)Retrieves the up-to-date information about the change request from Google Cloud DNS.ChangeRequest.BuildertoBuilder()Creates a builder populated with values of thisChangeRequestInfo.-
Methods inherited from class com.google.cloud.dns.ChangeRequestInfo
getAdditions, getDeletions, getGeneratedId, getStartTimeMillis, getStatus, newBuilder, status, toString
-
-
-
-
Method Detail
-
getDns
public Dns getDns()
Returns the change request'sDnsobject used to issue requests.
-
applyTo
public ChangeRequest applyTo(String zoneName, Dns.ChangeRequestOption... options)
Applies this change request to the zone identified byzoneName.- Throws:
DnsException- upon failure or if zone is not found
-
reload
public ChangeRequest reload(Dns.ChangeRequestOption... options)
Retrieves the up-to-date information about the change request from Google Cloud DNS. Parameteroptionscan be used to restrict the fields to be included in the updated object the same way as inDns.getChangeRequest(String, String, Dns.ChangeRequestOption...). Ifoptionsare provided, any field other than generatedId which is not included in theoptionswill benullregardless of whether they are initialized or not inthisinstance.- Returns:
- an object with the updated information or
nullif it does not exist - Throws:
DnsException- upon failure of the API call or if the associated zone was not found
-
isDone
public boolean isDone()
Returnstrueif the change request has been completed. If the status is notChangeRequestInfo.Status.DONEalready, the method makes an API call to Google Cloud DNS to update the change request first.- Throws:
DnsException- upon failure of the API call or if the associated zone was not found
-
toBuilder
public ChangeRequest.Builder toBuilder()
Description copied from class:ChangeRequestInfoCreates a builder populated with values of thisChangeRequestInfo.- Overrides:
toBuilderin classChangeRequestInfo
-
equals
public final boolean equals(Object obj)
- Overrides:
equalsin classChangeRequestInfo
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classChangeRequestInfo
-
-