From 2cab2389e5edb978d5889cc807b853f484f36467 Mon Sep 17 00:00:00 2001 From: Martin Derka Date: Thu, 28 Jan 2016 10:27:21 -0800 Subject: [PATCH] Adjusted quota not to refer to ManagedZone. --- .../java/com/google/gcloud/dns/ProjectInfo.java | 16 ++++++++-------- .../com/google/gcloud/dns/ProjectInfoTest.java | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gcloud-java-dns/src/main/java/com/google/gcloud/dns/ProjectInfo.java b/gcloud-java-dns/src/main/java/com/google/gcloud/dns/ProjectInfo.java index b7933956ed88..4db0497946b1 100644 --- a/gcloud-java-dns/src/main/java/com/google/gcloud/dns/ProjectInfo.java +++ b/gcloud-java-dns/src/main/java/com/google/gcloud/dns/ProjectInfo.java @@ -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; /** @@ -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; } @@ -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; } /** @@ -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() { @@ -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; } @@ -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(); } diff --git a/gcloud-java-dns/src/test/java/com/google/gcloud/dns/ProjectInfoTest.java b/gcloud-java-dns/src/test/java/com/google/gcloud/dns/ProjectInfoTest.java index 2af8b5ad3995..5c2f2692c2c1 100644 --- a/gcloud-java-dns/src/test/java/com/google/gcloud/dns/ProjectInfoTest.java +++ b/gcloud-java-dns/src/test/java/com/google/gcloud/dns/ProjectInfoTest.java @@ -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()); }