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
Copy file name to clipboardExpand all lines: branches/dns-alpha-batch/gcloud-java-dns/src/main/java/com/google/gcloud/dns/DnsRecord.java
+26-21Lines changed: 26 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@
33
33
*
34
34
* <p>A {@code DnsRecord} is the unit of data that will be returned by the DNS servers upon a DNS
35
35
* request for a specific domain. The {@code DnsRecord} holds the current state of the DNS records
36
-
* that make up a managed zone. You can read the records but you do not modify them directly.
36
+
* that make up a managed zone. You can read the records but you cannot modify them directly.
37
37
* Rather, you edit the records in a managed zone by creating a ChangeRequest.
38
38
*
39
39
* @see <a href="https://cloud.google.com/dns/api/v1/resourceRecordSets">Google Cloud DNS
@@ -45,7 +45,7 @@ public class DnsRecord implements Serializable {
45
45
privatefinalStringname;
46
46
privatefinalList<String> rrdatas;
47
47
privatefinalIntegerttl;
48
-
privatefinalDnsRecordTypetype;
48
+
privatefinalTypetype;
49
49
50
50
/**
51
51
* Enum for the DNS record types supported by Cloud DNS.
@@ -56,7 +56,7 @@ public class DnsRecord implements Serializable {
56
56
* @see <a href="https://cloud.google.com/dns/what-is-cloud-dns#supported_record_types">Cloud DNS
57
57
* supported record types</a>
58
58
*/
59
-
publicenumDnsRecordType {
59
+
publicenumType {
60
60
/**
61
61
* Address record, which is used to map host names to their IPv4 address.
62
62
*/
@@ -105,14 +105,19 @@ public enum DnsRecordType {
105
105
TXT
106
106
}
107
107
108
+
/**
109
+
* A builder of {@link DnsRecord}.
110
+
*/
108
111
publicstaticclassBuilder {
109
112
110
113
privateList<String> rrdatas = newLinkedList<>();
111
114
privateStringname;
112
115
privateIntegerttl;
113
-
privateDnsRecordTypetype;
116
+
privateTypetype;
114
117
115
-
privateBuilder() {
118
+
privateBuilder(Stringname, Typetype) {
119
+
this.name = checkNotNull(name);
120
+
this.type = checkNotNull(type);
116
121
}
117
122
118
123
/**
@@ -177,15 +182,15 @@ public Builder name(String name) {
177
182
* @param ttl A non-negative number of seconds
178
183
*/
179
184
publicBuilderttl(intttl) {
180
-
checkArgument(ttl >= 0, "TTL cannot be negative. The supplied value was " + ttl + ".");
185
+
checkArgument(ttl >= 0, "TTL cannot be negative. The supplied value was %s.", ttl);
181
186
this.ttl = ttl;
182
187
returnthis;
183
188
}
184
189
185
190
/**
186
191
* The identifier of a supported record type, for example, A, AAAA, MX, TXT, and so on.
0 commit comments