You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* A class that represents Google Cloud DNS record set.
31
32
*
32
-
* <p>A unit of data that will be returned by the DNS servers.
33
+
* <p>A unit of data that will be returned by the DNS servers.
33
34
*
34
35
* @see <a href="https://cloud.google.com/dns/api/v1/resourceRecordSets">Google Cloud DNS
35
36
* documentation</a>
@@ -44,9 +45,6 @@ public class DnsRecord implements Serializable {
44
45
privatefinalStringzoneName;
45
46
privatefinalLongzoneId;
46
47
47
-
/**
48
-
* A private constructor. Obtain an instance using {@link DnsRecord#Builder}.
49
-
*/
50
48
privateDnsRecord() {
51
49
this.name = null;
52
50
this.rrdatas = null;
@@ -68,7 +66,7 @@ private DnsRecord() {
68
66
/**
69
67
* Enum for the DNS record types supported by Cloud DNS.
70
68
*
71
-
* <p>Google Cloud DNS currently supports records of type A, AAAA, CNAME, MX NAPTR, NS, PTR, SOA,
69
+
* <p>Google Cloud DNS currently supports records of type A, AAAA, CNAME, MX NAPTR, NS, PTR, SOA,
72
70
* SPF, SRV, TXT.
73
71
*
74
72
* @see <a href="https://cloud.google.com/dns/what-is-cloud-dns#supported_record_types">Cloud DNS
@@ -85,7 +83,7 @@ public enum DnsRecordType {
85
83
SOA,
86
84
SPF,
87
85
SRV,
88
-
TXT;
86
+
TXT
89
87
}
90
88
91
89
publicstaticclassBuilder {
@@ -162,13 +160,23 @@ public DnsRecord build() {
162
160
163
161
/**
164
162
* Sets references to the managed zone that this DNS record belongs to.
163
+
*
164
+
* todo(mderka): consider if this method is needed; may not be possible when listing records
165
165
*/
166
-
publicBuildermanagedZone(ManagedZoneInfoparent) {
166
+
BuildermanagedZone(ManagedZoneInfoparent) {
167
167
checkNotNull(parent);
168
168
this.zoneId = parent.id();
169
169
this.zoneName = parent.name();
170
170
returnthis;
171
171
}
172
+
173
+
/**
174
+
* Sets name reference to the managed zone that this DNS record belongs to.
175
+
*/
176
+
BuildermanagedZone(StringmanagedZoneName) {
177
+
this.zoneName = checkNotNull(managedZoneName);
178
+
returnthis;
179
+
}
172
180
}
173
181
174
182
/**
@@ -196,12 +204,12 @@ public String name() {
196
204
* Returns a list of DNS record stored in this record set.
197
205
*/
198
206
publicList<String> rrdatas() {
199
-
returnImmutableList.copyOf(rrdatas);
207
+
returnrrdatas;
200
208
}
201
209
202
210
/**
203
-
* Returns the number of seconds that this ResourceRecordSet can be cached by resolvers. This
204
-
* number is provided by the user.
211
+
* Returns the number of seconds that this DnsResource can be cached by resolvers. This number is
212
+
* provided by the user.
205
213
*/
206
214
publicIntegerttl() {
207
215
returnttl;
@@ -224,9 +232,9 @@ public String zoneName() {
224
232
}
225
233
226
234
/**
227
-
* Returns name of the managed zone that this record belongs to.
235
+
* Returns id of the managed zone that this record belongs to.
228
236
*
229
-
* <p>The id of the managed zone is determined by the server when the managed zone is created. It
237
+
* <p>The id of the managed zone is determined by the server when the managed zone is created. It
230
238
* is a read only value. If this DNS record is not associated with a managed zone, or if the id of
231
239
* the managed zone was not loaded from the cloud service, this returns null.
0 commit comments