25
25
import java .util .Objects ;
26
26
27
27
/**
28
- * The class that encapsulates information about a project in Google Cloud DNS . A project is a top
29
- * level container for resources including {@code ManagedZone}s. Projects can be created only in the
30
- * APIs console.
28
+ * The class provides the Google Cloud DNS information associated with this project . A project is a
29
+ * top level container for resources including {@code ManagedZone}s. Projects can be created only in
30
+ * the APIs console.
31
31
*
32
32
* @see <a href="https://cloud.google.com/dns/api/v1/projects">Google Cloud DNS documentation</a>
33
33
*/
@@ -41,16 +41,17 @@ public class ProjectInfo implements Serializable {
41
41
/**
42
42
* This class represents quotas assigned to the {@code ProjectInfo}.
43
43
*
44
- * @see <a href="https://cloud.google.com/dns/api/v1/projects">Google Cloud DNS documentation</a>
44
+ * @see <a href="https://cloud.google.com/dns/api/v1/projects#quota">Google Cloud DNS
45
+ * documentation</a>
45
46
*/
46
47
public static class Quota {
47
48
48
- private Integer zones ;
49
- private Integer resourceRecordsPerRrset ;
50
- private Integer rrsetAdditionsPerChange ;
51
- private Integer rrsetDeletionsPerChange ;
52
- private Integer rrsetsPerManagedZone ;
53
- private Integer totalRrdataSizePerChange ;
49
+ private final int zones ;
50
+ private final int resourceRecordsPerRrset ;
51
+ private final int rrsetAdditionsPerChange ;
52
+ private final int rrsetDeletionsPerChange ;
53
+ private final int rrsetsPerManagedZone ;
54
+ private final int totalRrdataSizePerChange ;
54
55
55
56
/**
56
57
* Creates an instance of {@code Quota}.
@@ -59,61 +60,61 @@ public static class Quota {
59
60
* allow for specifying options, quota is an "all-or-nothing object" and we do not need a
60
61
* builder.
61
62
*/
62
- Quota (Integer zones ,
63
- Integer resourceRecordsPerRrset ,
64
- Integer rrsetAdditionsPerChange ,
65
- Integer rrsetDeletionsPerChange ,
66
- Integer rrsetsPerManagedZone ,
67
- Integer totalRrdataSizePerChange ) {
68
- this .zones = checkNotNull ( zones ) ;
69
- this .resourceRecordsPerRrset = checkNotNull ( resourceRecordsPerRrset ) ;
70
- this .rrsetAdditionsPerChange = checkNotNull ( rrsetAdditionsPerChange ) ;
71
- this .rrsetDeletionsPerChange = checkNotNull ( rrsetDeletionsPerChange ) ;
72
- this .rrsetsPerManagedZone = checkNotNull ( rrsetsPerManagedZone ) ;
73
- this .totalRrdataSizePerChange = checkNotNull ( totalRrdataSizePerChange ) ;
63
+ Quota (int zones ,
64
+ int resourceRecordsPerRrset ,
65
+ int rrsetAdditionsPerChange ,
66
+ int rrsetDeletionsPerChange ,
67
+ int rrsetsPerManagedZone ,
68
+ int totalRrdataSizePerChange ) {
69
+ this .zones = zones ;
70
+ this .resourceRecordsPerRrset = resourceRecordsPerRrset ;
71
+ this .rrsetAdditionsPerChange = rrsetAdditionsPerChange ;
72
+ this .rrsetDeletionsPerChange = rrsetDeletionsPerChange ;
73
+ this .rrsetsPerManagedZone = rrsetsPerManagedZone ;
74
+ this .totalRrdataSizePerChange = totalRrdataSizePerChange ;
74
75
}
75
76
76
77
/**
77
78
* Returns the maximum allowed number of managed zones in the project.
78
79
*/
79
- public Integer zones () {
80
+ public int zones () {
80
81
return zones ;
81
82
}
82
83
83
84
/**
84
85
* Returns the maximum allowed number of records per {@link DnsRecord}.
85
86
*/
86
- public Integer resourceRecordsPerRrset () {
87
+ public int resourceRecordsPerRrset () {
87
88
return resourceRecordsPerRrset ;
88
89
}
89
90
90
91
/**
91
92
* Returns the maximum allowed number of {@link DnsRecord}s to add per {@code ChangesRequest}.
92
93
*/
93
- public Integer rrsetAdditionsPerChange () {
94
+ public int rrsetAdditionsPerChange () {
94
95
return rrsetAdditionsPerChange ;
95
96
}
96
97
97
98
/**
98
99
* Returns the maximum allowed number of {@link DnsRecord}s to delete per {@code
99
100
* ChangesRequest}.
100
101
*/
101
- public Integer rrsetDeletionsPerChange () {
102
+ public int rrsetDeletionsPerChange () {
102
103
return rrsetDeletionsPerChange ;
103
104
}
104
105
105
106
/**
106
107
* Returns the maximum allowed number of {@link DnsRecord}s per {@code ManagedZone} in the
107
108
* project.
108
109
*/
109
- public Integer rrsetsPerManagedZone () {
110
+ public int rrsetsPerManagedZone () {
110
111
return rrsetsPerManagedZone ;
111
112
}
112
113
113
114
/**
114
115
* Returns the maximum allowed size for total records in one ChangesRequest in bytes.
115
116
*/
116
- public Integer totalRrdataSizePerChange () {
117
+ public int totalRrdataSizePerChange () {
117
118
return totalRrdataSizePerChange ;
118
119
}
119
120
@@ -220,32 +221,32 @@ static Builder builder() {
220
221
}
221
222
222
223
/**
223
- * Returns the user-assigned unique identifier for the project.
224
+ * Returns the {@code Quota} object which contains quotas assigned to this project.
224
225
*/
225
- public String id () {
226
- return id ;
226
+ public Quota quota () {
227
+ return quota ;
227
228
}
228
229
229
230
/**
230
- * Returns the unique numeric identifier for the project .
231
+ * Returns project number. For internal use only .
231
232
*/
232
- public BigInteger number () {
233
+ BigInteger number () {
233
234
return number ;
234
235
}
235
236
236
237
/**
237
- * Returns the {@code Quota} object which contains quotas assigned to this project .
238
+ * Returns project id. For internal use only .
238
239
*/
239
- public Quota quota () {
240
- return quota ;
240
+ String id () {
241
+ return id ;
241
242
}
242
243
243
244
com .google .api .services .dns .model .Project toPb () {
244
245
com .google .api .services .dns .model .Project pb = new com .google .api .services .dns .model .Project ();
245
- pb .setId (id () );
246
- pb .setNumber (number () );
247
- if (this .quota () != null ) {
248
- pb .setQuota (quota () .toPb ());
246
+ pb .setId (id );
247
+ pb .setNumber (number );
248
+ if (this .quota != null ) {
249
+ pb .setQuota (quota .toPb ());
249
250
}
250
251
return pb ;
251
252
}
@@ -266,7 +267,7 @@ static ProjectInfo fromPb(com.google.api.services.dns.model.Project pb) {
266
267
267
268
@ Override
268
269
public boolean equals (Object other ) {
269
- return (other instanceof ProjectInfo ) && this . toPb ().equals (((ProjectInfo ) other ).toPb ());
270
+ return (other instanceof ProjectInfo ) && toPb ().equals (((ProjectInfo ) other ).toPb ());
270
271
}
271
272
272
273
@ Override
0 commit comments