Skip to content

Commit

Permalink
Adjusted quota not to refer to ManagedZone.
Browse files Browse the repository at this point in the history
  • Loading branch information
mderka committed Jan 28, 2016
1 parent c364ff3 commit 2cab238
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static class Quota {
private final int resourceRecordsPerRrset;
private final int rrsetAdditionsPerChange;
private final int rrsetDeletionsPerChange;
private final int rrsetsPerManagedZone;
private final int rrsetsPerZone;
private final int totalRrdataSizePerChange;

/**
Expand All @@ -64,13 +64,13 @@ public static class Quota {
int resourceRecordsPerRrset,
int rrsetAdditionsPerChange,
int rrsetDeletionsPerChange,
int rrsetsPerManagedZone,
int rrsetsPerZone,
int totalRrdataSizePerChange) {
this.zones = zones;
this.resourceRecordsPerRrset = resourceRecordsPerRrset;
this.rrsetAdditionsPerChange = rrsetAdditionsPerChange;
this.rrsetDeletionsPerChange = rrsetDeletionsPerChange;
this.rrsetsPerManagedZone = rrsetsPerManagedZone;
this.rrsetsPerZone = rrsetsPerZone;
this.totalRrdataSizePerChange = totalRrdataSizePerChange;
}

Expand Down Expand Up @@ -107,8 +107,8 @@ public int rrsetDeletionsPerChange() {
* Returns the maximum allowed number of {@link DnsRecord}s per {@link ZoneInfo} in the
* project.
*/
public int rrsetsPerManagedZone() {
return rrsetsPerManagedZone;
public int rrsetsPerZone() {
return rrsetsPerZone;
}

/**
Expand All @@ -126,7 +126,7 @@ public boolean equals(Object other) {
@Override
public int hashCode() {
return Objects.hash(zones, resourceRecordsPerRrset, rrsetAdditionsPerChange,
rrsetDeletionsPerChange, rrsetsPerManagedZone, totalRrdataSizePerChange);
rrsetDeletionsPerChange, rrsetsPerZone, totalRrdataSizePerChange);
}

com.google.api.services.dns.model.Quota toPb() {
Expand All @@ -135,7 +135,7 @@ com.google.api.services.dns.model.Quota toPb() {
pb.setResourceRecordsPerRrset(resourceRecordsPerRrset);
pb.setRrsetAdditionsPerChange(rrsetAdditionsPerChange);
pb.setRrsetDeletionsPerChange(rrsetDeletionsPerChange);
pb.setRrsetsPerManagedZone(rrsetsPerManagedZone);
pb.setRrsetsPerManagedZone(rrsetsPerZone);
pb.setTotalRrdataSizePerChange(totalRrdataSizePerChange);
return pb;
}
Expand All @@ -158,7 +158,7 @@ public String toString() {
.add("resourceRecordsPerRrset", resourceRecordsPerRrset)
.add("rrsetAdditionsPerChange", rrsetAdditionsPerChange)
.add("rrsetDeletionsPerChange", rrsetDeletionsPerChange)
.add("rrsetsPerManagedZone", rrsetsPerManagedZone)
.add("rrsetsPerZone", rrsetsPerZone)
.add("totalRrdataSizePerChange", totalRrdataSizePerChange)
.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void testQuotaConstructor() {
assertEquals(2, QUOTA.resourceRecordsPerRrset());
assertEquals(3, QUOTA.rrsetAdditionsPerChange());
assertEquals(4, QUOTA.rrsetDeletionsPerChange());
assertEquals(5, QUOTA.rrsetsPerManagedZone());
assertEquals(5, QUOTA.rrsetsPerZone());
assertEquals(6, QUOTA.totalRrdataSizePerChange());
}

Expand Down

0 comments on commit 2cab238

Please sign in to comment.