diff --git a/java/google/registry/flows/domain/DomainAllocateFlow.java b/java/google/registry/flows/domain/DomainAllocateFlow.java index e59967e6d..959d464c5 100644 --- a/java/google/registry/flows/domain/DomainAllocateFlow.java +++ b/java/google/registry/flows/domain/DomainAllocateFlow.java @@ -32,7 +32,6 @@ import static google.registry.model.EppResourceUtils.createDomainRepoId; import static google.registry.model.EppResourceUtils.loadDomainApplication; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.registry.label.ReservedList.matchesAnchorTenantReservation; -import static google.registry.model.reporting.DomainTransactionRecord.TransactionFieldAmount.TransactionReportField.netAddsFieldFromYears; import static google.registry.pricing.PricingEngineProxy.getDomainCreateCost; import static google.registry.util.CollectionUtils.isNullOrEmpty; import static google.registry.util.DateTimeUtils.END_OF_TIME; @@ -87,7 +86,7 @@ import google.registry.model.poll.PollMessage; import google.registry.model.registry.Registry; import google.registry.model.registry.label.ReservationType; import google.registry.model.reporting.DomainTransactionRecord; -import google.registry.model.reporting.DomainTransactionRecord.TransactionFieldAmount; +import google.registry.model.reporting.DomainTransactionRecord.TransactionReportField; import google.registry.model.reporting.HistoryEntry; import google.registry.model.reporting.IcannReportingTypes.ActivityReportField; import google.registry.tmch.LordnTask; @@ -241,11 +240,13 @@ public class DomainAllocateFlow implements TransactionalFlow { .setPeriod(period) .setModificationTime(now) .setParent(Key.create(DomainResource.class, repoId)) - .setDomainTransactionRecord( - DomainTransactionRecord.create( - tld, - now.plus(addGracePeriod), - TransactionFieldAmount.create(netAddsFieldFromYears(period.getValue()), 1))) + .setDomainTransactionRecords( + ImmutableSet.of( + DomainTransactionRecord.create( + tld, + now.plus(addGracePeriod), + TransactionReportField.netAddsFieldFromYears(period.getValue()), + 1))) .build(); } diff --git a/java/google/registry/flows/domain/DomainCreateFlow.java b/java/google/registry/flows/domain/DomainCreateFlow.java index 333ce9665..07d3bbe6c 100644 --- a/java/google/registry/flows/domain/DomainCreateFlow.java +++ b/java/google/registry/flows/domain/DomainCreateFlow.java @@ -42,7 +42,6 @@ import static google.registry.model.eppcommon.StatusValue.SERVER_UPDATE_PROHIBIT import static google.registry.model.index.DomainApplicationIndex.loadActiveApplicationsByDomainName; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.registry.label.ReservedList.matchesAnchorTenantReservation; -import static google.registry.model.reporting.DomainTransactionRecord.TransactionFieldAmount.TransactionReportField.netAddsFieldFromYears; import static google.registry.util.DateTimeUtils.END_OF_TIME; import static google.registry.util.DateTimeUtils.leapSafeAddYears; @@ -100,7 +99,7 @@ import google.registry.model.poll.PollMessage.Autorenew; import google.registry.model.registry.Registry; import google.registry.model.registry.Registry.TldState; import google.registry.model.reporting.DomainTransactionRecord; -import google.registry.model.reporting.DomainTransactionRecord.TransactionFieldAmount; +import google.registry.model.reporting.DomainTransactionRecord.TransactionReportField; import google.registry.model.reporting.HistoryEntry; import google.registry.model.reporting.IcannReportingTypes.ActivityReportField; import google.registry.tmch.LordnTask; @@ -372,11 +371,13 @@ public class DomainCreateFlow implements TransactionalFlow { .setPeriod(period) .setModificationTime(now) .setParent(Key.create(DomainResource.class, repoId)) - .setDomainTransactionRecord( - DomainTransactionRecord.create( - tld, - now.plus(addGracePeriod), - TransactionFieldAmount.create(netAddsFieldFromYears(period.getValue()), 1))) + .setDomainTransactionRecords( + ImmutableSet.of( + DomainTransactionRecord.create( + tld, + now.plus(addGracePeriod), + TransactionReportField.netAddsFieldFromYears(period.getValue()), + 1))) .build(); } diff --git a/java/google/registry/flows/domain/DomainRenewFlow.java b/java/google/registry/flows/domain/DomainRenewFlow.java index ac535640c..7fcd252bc 100644 --- a/java/google/registry/flows/domain/DomainRenewFlow.java +++ b/java/google/registry/flows/domain/DomainRenewFlow.java @@ -28,7 +28,6 @@ import static google.registry.flows.domain.DomainFlowUtils.validateFeeChallenge; import static google.registry.flows.domain.DomainFlowUtils.validateRegistrationPeriod; import static google.registry.flows.domain.DomainFlowUtils.verifyUnitIsYears; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.reporting.DomainTransactionRecord.TransactionFieldAmount.TransactionReportField.netRenewsFieldFromYears; import static google.registry.util.DateTimeUtils.leapSafeAddYears; import com.google.common.base.Optional; @@ -72,7 +71,7 @@ import google.registry.model.eppoutput.EppResponse; import google.registry.model.poll.PollMessage; import google.registry.model.registry.Registry; import google.registry.model.reporting.DomainTransactionRecord; -import google.registry.model.reporting.DomainTransactionRecord.TransactionFieldAmount; +import google.registry.model.reporting.DomainTransactionRecord.TransactionReportField; import google.registry.model.reporting.HistoryEntry; import google.registry.model.reporting.IcannReportingTypes.ActivityReportField; import javax.inject.Inject; @@ -220,11 +219,13 @@ public final class DomainRenewFlow implements TransactionalFlow { .setPeriod(period) .setModificationTime(now) .setParent(Key.create(existingDomain)) - .setDomainTransactionRecord( - DomainTransactionRecord.create( - existingDomain.getTld(), - now.plus(renewGracePeriod), - TransactionFieldAmount.create(netRenewsFieldFromYears(period.getValue()), 1))) + .setDomainTransactionRecords( + ImmutableSet.of( + DomainTransactionRecord.create( + existingDomain.getTld(), + now.plus(renewGracePeriod), + TransactionReportField.netRenewsFieldFromYears(period.getValue()), + 1))) .build(); } diff --git a/java/google/registry/flows/domain/DomainRestoreRequestFlow.java b/java/google/registry/flows/domain/DomainRestoreRequestFlow.java index ab0bc0ad1..ce525f24b 100644 --- a/java/google/registry/flows/domain/DomainRestoreRequestFlow.java +++ b/java/google/registry/flows/domain/DomainRestoreRequestFlow.java @@ -26,7 +26,6 @@ import static google.registry.flows.domain.DomainFlowUtils.validateFeeChallenge; import static google.registry.flows.domain.DomainFlowUtils.verifyNotReserved; import static google.registry.flows.domain.DomainFlowUtils.verifyPremiumNameIsNotBlocked; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.reporting.DomainTransactionRecord.TransactionFieldAmount.TransactionReportField.RESTORED_DOMAINS; import static google.registry.util.DateTimeUtils.END_OF_TIME; import com.google.common.base.Optional; @@ -65,7 +64,7 @@ import google.registry.model.eppoutput.EppResponse; import google.registry.model.poll.PollMessage; import google.registry.model.registry.Registry; import google.registry.model.reporting.DomainTransactionRecord; -import google.registry.model.reporting.DomainTransactionRecord.TransactionFieldAmount; +import google.registry.model.reporting.DomainTransactionRecord.TransactionReportField; import google.registry.model.reporting.HistoryEntry; import google.registry.model.reporting.IcannReportingTypes.ActivityReportField; import javax.inject.Inject; @@ -177,9 +176,10 @@ public final class DomainRestoreRequestFlow implements TransactionalFlow { .setType(HistoryEntry.Type.DOMAIN_RESTORE) .setModificationTime(now) .setParent(Key.create(existingDomain)) - .setDomainTransactionRecord( - DomainTransactionRecord.create( - existingDomain.getTld(), now, TransactionFieldAmount.create(RESTORED_DOMAINS, 1))) + .setDomainTransactionRecords( + ImmutableSet.of( + DomainTransactionRecord.create( + existingDomain.getTld(), now, TransactionReportField.RESTORED_DOMAINS, 1))) .build(); } diff --git a/java/google/registry/model/reporting/DomainTransactionRecord.java b/java/google/registry/model/reporting/DomainTransactionRecord.java index 8bedc167b..69395aab6 100644 --- a/java/google/registry/model/reporting/DomainTransactionRecord.java +++ b/java/google/registry/model/reporting/DomainTransactionRecord.java @@ -17,11 +17,9 @@ package google.registry.model.reporting; import static com.google.common.base.Preconditions.checkArgument; import static google.registry.util.PreconditionsUtils.checkArgumentNotNull; -import com.google.common.collect.ImmutableSet; import com.googlecode.objectify.annotation.Embed; import google.registry.model.Buildable; import google.registry.model.ImmutableObject; -import java.util.Set; import org.joda.time.DateTime; /** @@ -37,6 +35,9 @@ import org.joda.time.DateTime; @Embed public class DomainTransactionRecord extends ImmutableObject implements Buildable { + /** The TLD this record operates on. */ + String tld; + /** * The time this Transaction takes effect (counting grace periods and other nuances). * @@ -50,96 +51,77 @@ public class DomainTransactionRecord extends ImmutableObject implements Buildabl */ DateTime reportingTime; - /** The TLD this record operates on. */ - String tld; + /** The transaction report field we add reportAmount to for this registrar. */ + TransactionReportField reportField; - /** The fields affected by this transaction, and the amounts they're affected by. */ - Set transactionFieldAmounts; + /** + * The amount this record increases or decreases a registrar's report field. + * + *

For adds, renews, deletes, and restores, this is +1. For their respective cancellations, + * this is -1. + * + *

For transfers, the gaining party gets a +1 for TRANSFER_GAINING_SUCCESSFUL, whereas the + * losing party gets a +1 for TRANSFER_LOSING_SUCCESSFUL. Nacks result in +1 for + * TRANSFER_GAINING_NACKED and TRANSFER_LOSING_NACKED, as well as -1 entries to cancel out the + * original SUCCESSFUL transfer counters. Finally, if we explicitly allow a transfer, the report + * amount is 0, as we've already counted the transfer in the original request. + */ + Integer reportAmount; - /** A tuple that encapsulates an amount to add to a specified field in the report. */ - @Embed - public static class TransactionFieldAmount extends ImmutableObject { + /** + * The field added to by reportAmount within the transaction report. + * + *

The reportField specifies which column the reportAmount contributes to in the overall + * report. ICANN wants a column for every add/renew broken down by number of years, so we have + * the NET_ADDS_#_YR and NET_RENEWS_#_YR boilerplate to facilitate report generation. + */ + public enum TransactionReportField { + NET_ADDS_1_YR, + NET_ADDS_2_YR, + NET_ADDS_3_YR, + NET_ADDS_4_YR, + NET_ADDS_5_YR, + NET_ADDS_6_YR, + NET_ADDS_7_YR, + NET_ADDS_8_YR, + NET_ADDS_9_YR, + NET_ADDS_10_YR, + NET_RENEWS_1_YR, + NET_RENEWS_2_YR, + NET_RENEWS_3_YR, + NET_RENEWS_4_YR, + NET_RENEWS_5_YR, + NET_RENEWS_6_YR, + NET_RENEWS_7_YR, + NET_RENEWS_8_YR, + NET_RENEWS_9_YR, + NET_RENEWS_10_YR, + TRANSFER_GAINING_SUCCESSFUL, + TRANSFER_GAINING_NACKED, + TRANSFER_LOSING_SUCCESSFUL, + TRANSFER_LOSING_NACKED, + DELETED_DOMAINS_GRACE, + DELETED_DOMAINS_NOGRACE, + RESTORED_DOMAINS; - public static TransactionFieldAmount create( - TransactionReportField reportField, int reportAmount) { - TransactionFieldAmount instance = new TransactionFieldAmount(); - instance.reportField = reportField; - instance.reportAmount = reportAmount; - return instance; + /** Boilerplate to simplify getting the NET_ADDS_#_YR enum from a number of years. */ + public static TransactionReportField netAddsFieldFromYears(int years) { + return nameToField("NET_ADDS_%d_YR", years); } - /** The transaction report field we add reportAmount to for this registrar. */ - TransactionReportField reportField; + /** Boilerplate to simplify getting the NET_RENEWS_#_YR enum from a number of years. */ + public static TransactionReportField netRenewsFieldFromYears(int years) { + return nameToField("NET_RENEWS_%d_YR", years); + } - /** - * The amount this record increases or decreases a registrar's report field. - * - *

For adds, renews, deletes, and restores, this is +1. For their respective cancellations, - * this is -1. - * - *

For transfers, the gaining party gets a +1 for TRANSFER_GAINING_SUCCESSFUL, whereas the - * losing party gets a +1 for TRANSFER_LOSING_SUCCESSFUL. Nacks result in +1 for - * TRANSFER_GAINING_NACKED and TRANSFER_LOSING_NACKED, as well as -1 entries to cancel out the - * original SUCCESSFUL transfer counters. Finally, if we explicitly allow a transfer, the report - * amount is 0, as we've already counted the transfer in the original request. - */ - int reportAmount; - - /** - * The field added to by reportAmount within the transaction report. - * - *

The reportField specifies which column the reportAmount contributes to in the overall - * report. ICANN wants a column for every add/renew broken down by number of years, so we have - * the NET_ADDS_#_YR and NET_RENEWS_#_YR boilerplate to facilitate report generation. - */ - public enum TransactionReportField { - NET_ADDS_1_YR, - NET_ADDS_2_YR, - NET_ADDS_3_YR, - NET_ADDS_4_YR, - NET_ADDS_5_YR, - NET_ADDS_6_YR, - NET_ADDS_7_YR, - NET_ADDS_8_YR, - NET_ADDS_9_YR, - NET_ADDS_10_YR, - NET_RENEWS_1_YR, - NET_RENEWS_2_YR, - NET_RENEWS_3_YR, - NET_RENEWS_4_YR, - NET_RENEWS_5_YR, - NET_RENEWS_6_YR, - NET_RENEWS_7_YR, - NET_RENEWS_8_YR, - NET_RENEWS_9_YR, - NET_RENEWS_10_YR, - TRANSFER_GAINING_SUCCESSFUL, - TRANSFER_GAINING_NACKED, - TRANSFER_LOSING_SUCCESSFUL, - TRANSFER_LOSING_NACKED, - DELETED_DOMAINS_GRACE, - DELETED_DOMAINS_NOGRACE, - RESTORED_DOMAINS; - - /** Boilerplate to simplify getting the NET_ADDS_#_YR enum from a number of years. */ - public static TransactionReportField netAddsFieldFromYears(int years) { - return nameToField("NET_ADDS_%d_YR", years); - } - - /** Boilerplate to simplify getting the NET_RENEWS_#_YR enum from a number of years. */ - public static TransactionReportField netRenewsFieldFromYears(int years) { - return nameToField("NET_RENEWS_%d_YR", years); - } - - private static TransactionReportField nameToField(String enumTemplate, int years) { - checkArgument( - years >= 1 && years <= 10, "domain add and renew years must be between 1 and 10"); - try { - return TransactionReportField.valueOf(String.format(enumTemplate, years)); - } catch (IllegalArgumentException e) { - throw new IllegalArgumentException( - "Unexpected error converting add/renew years to enum TransactionReportField", e); - } + private static TransactionReportField nameToField(String enumTemplate, int years) { + checkArgument( + years >= 1 && years <= 10, "domain add and renew years must be between 1 and 10"); + try { + return TransactionReportField.valueOf(String.format(enumTemplate, years)); + } catch (IllegalArgumentException e) { + throw new IllegalArgumentException( + "Unexpected error converting add/renew years to enum TransactionReportField", e); } } } @@ -152,20 +134,26 @@ public class DomainTransactionRecord extends ImmutableObject implements Buildabl return tld; } - public Set getTransactionFieldAmounts() { - return transactionFieldAmounts; + public TransactionReportField getReportField() { + return reportField; + } + + public int getReportAmount() { + return reportAmount; } /** An alternative construction method when the builder is not necessary. */ public static DomainTransactionRecord create( String tld, DateTime reportingTime, - TransactionFieldAmount... transactionFieldAmounts) { + TransactionReportField transactionReportField, + int reportAmount) { return new DomainTransactionRecord.Builder() .setTld(tld) // We report this event when the grace period ends, if applicable .setReportingTime(reportingTime) - .setTransactionFieldAmounts(ImmutableSet.copyOf(transactionFieldAmounts)) + .setReportField(transactionReportField) + .setReportAmount(reportAmount) .build(); } @@ -184,30 +172,37 @@ public class DomainTransactionRecord extends ImmutableObject implements Buildabl checkArgumentNotNull(instance, "DomainTransactionRecord instance must not be null"); } - public Builder setReportingTime(DateTime reportingTime) { - checkArgumentNotNull(reportingTime, "reportingTime must not be mull"); - getInstance().reportingTime = reportingTime; - return this; - } - public Builder setTld(String tld) { checkArgumentNotNull(tld, "tld must not be null"); getInstance().tld = tld; return this; } - public Builder setTransactionFieldAmounts( - ImmutableSet transactionFieldAmounts) { - getInstance().transactionFieldAmounts = transactionFieldAmounts; + public Builder setReportingTime(DateTime reportingTime) { + checkArgumentNotNull(reportingTime, "reportingTime must not be mull"); + getInstance().reportingTime = reportingTime; + return this; + } + + public Builder setReportField(TransactionReportField reportField) { + checkArgumentNotNull(reportField, "reportField must not be null"); + getInstance().reportField = reportField; + return this; + } + + public Builder setReportAmount(Integer reportAmount) { + checkArgumentNotNull(reportAmount, "reportAmount must not be null"); + getInstance().reportAmount = reportAmount; return this; } @Override public DomainTransactionRecord build() { - checkArgumentNotNull(getInstance().reportingTime, "reportingTime must not be null"); - checkArgumentNotNull(getInstance().tld, "tld must not be null"); + checkArgumentNotNull(getInstance().reportingTime, "reportingTime must be set"); + checkArgumentNotNull(getInstance().tld, "tld must be set"); checkArgumentNotNull( - getInstance().transactionFieldAmounts, "transactionFieldAmounts must not be null"); + getInstance().reportField, "reportField must be set"); + checkArgumentNotNull(getInstance().reportAmount, "reportAmount must be set"); return super.build(); } } diff --git a/java/google/registry/model/reporting/HistoryEntry.java b/java/google/registry/model/reporting/HistoryEntry.java index eea84ef9e..2bd02e3dc 100644 --- a/java/google/registry/model/reporting/HistoryEntry.java +++ b/java/google/registry/model/reporting/HistoryEntry.java @@ -14,6 +14,9 @@ package google.registry.model.reporting; +import static google.registry.util.CollectionUtils.nullToEmptyImmutableCopy; + +import com.google.common.collect.ImmutableSet; import com.googlecode.objectify.Key; import com.googlecode.objectify.annotation.Entity; import com.googlecode.objectify.annotation.Id; @@ -27,7 +30,7 @@ import google.registry.model.ImmutableObject; import google.registry.model.annotations.ReportedOn; import google.registry.model.domain.Period; import google.registry.model.eppcommon.Trid; -import javax.annotation.Nullable; +import java.util.Set; import org.joda.time.DateTime; /** A record of an EPP command that mutated a resource. */ @@ -128,12 +131,11 @@ public class HistoryEntry extends ImmutableObject implements Buildable { /** * Logging field for transaction reporting. * - *

This will be null for any HistoryEntry generated before this field was added. This will - * also be null if the HistoryEntry refers to an EPP mutation that does not affect domain + *

This will be empty for any HistoryEntry generated before this field was added. This will + * also be empty if the HistoryEntry refers to an EPP mutation that does not affect domain * transaction counts (such as contact or host mutations). */ - @Nullable - DomainTransactionRecord domainTransactionRecord; + Set domainTransactionRecords; public Key getParent() { return parent; @@ -179,9 +181,8 @@ public class HistoryEntry extends ImmutableObject implements Buildable { return requestedByRegistrar; } - @Nullable - public DomainTransactionRecord getDomainTransactionRecord() { - return domainTransactionRecord; + public ImmutableSet getDomainTransactionRecords() { + return nullToEmptyImmutableCopy(domainTransactionRecords); } @Override @@ -257,8 +258,9 @@ public class HistoryEntry extends ImmutableObject implements Buildable { return this; } - public Builder setDomainTransactionRecord(DomainTransactionRecord domainTransactionRecord) { - getInstance().domainTransactionRecord = domainTransactionRecord; + public Builder setDomainTransactionRecords( + ImmutableSet domainTransactionRecords) { + getInstance().domainTransactionRecords = domainTransactionRecords; return this; } } diff --git a/javatests/google/registry/flows/domain/DomainAllocateFlowTest.java b/javatests/google/registry/flows/domain/DomainAllocateFlowTest.java index 83c14587a..f76e41af8 100644 --- a/javatests/google/registry/flows/domain/DomainAllocateFlowTest.java +++ b/javatests/google/registry/flows/domain/DomainAllocateFlowTest.java @@ -18,7 +18,6 @@ import static com.google.common.io.BaseEncoding.base16; import static com.google.common.truth.Truth.assertThat; import static google.registry.model.EppResourceUtils.loadDomainApplication; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.reporting.DomainTransactionRecord.TransactionFieldAmount.TransactionReportField.netAddsFieldFromYears; import static google.registry.testing.DatastoreHelper.assertBillingEvents; import static google.registry.testing.DatastoreHelper.createTld; import static google.registry.testing.DatastoreHelper.getOnlyHistoryEntryOfType; @@ -73,7 +72,7 @@ import google.registry.model.poll.PollMessage; import google.registry.model.registry.Registry; import google.registry.model.registry.Registry.TldState; import google.registry.model.reporting.DomainTransactionRecord; -import google.registry.model.reporting.DomainTransactionRecord.TransactionFieldAmount; +import google.registry.model.reporting.DomainTransactionRecord.TransactionReportField; import google.registry.model.reporting.HistoryEntry; import google.registry.model.smd.EncodedSignedMark; import google.registry.testing.TaskQueueHelper.TaskMatcher; @@ -675,12 +674,11 @@ public class DomainAllocateFlowTest DomainResource domain = reloadResourceByForeignKey(); HistoryEntry historyEntry = getOnlyHistoryEntryOfType(domain, HistoryEntry.Type.DOMAIN_ALLOCATE); - DomainTransactionRecord transactionRecord = historyEntry.getDomainTransactionRecord(); - - assertThat(transactionRecord.getTld()).isEqualTo("tld"); - assertThat(transactionRecord.getReportingTime()) - .isEqualTo(historyEntry.getModificationTime().plusMinutes(9)); - assertThat(transactionRecord.getTransactionFieldAmounts()) - .containsExactly(TransactionFieldAmount.create(netAddsFieldFromYears(2), 1)); + assertThat(historyEntry.getDomainTransactionRecords()).containsExactly( + DomainTransactionRecord.create( + "tld", + historyEntry.getModificationTime().plusMinutes(9), + TransactionReportField.netAddsFieldFromYears(2), + 1)); } } diff --git a/javatests/google/registry/flows/domain/DomainCreateFlowTest.java b/javatests/google/registry/flows/domain/DomainCreateFlowTest.java index 3ab08c3ba..0d9da464d 100644 --- a/javatests/google/registry/flows/domain/DomainCreateFlowTest.java +++ b/javatests/google/registry/flows/domain/DomainCreateFlowTest.java @@ -22,7 +22,6 @@ import static google.registry.model.eppcommon.StatusValue.OK; import static google.registry.model.eppcommon.StatusValue.SERVER_TRANSFER_PROHIBITED; import static google.registry.model.eppcommon.StatusValue.SERVER_UPDATE_PROHIBITED; import static google.registry.model.ofy.ObjectifyService.ofy; -import static google.registry.model.reporting.DomainTransactionRecord.TransactionFieldAmount.TransactionReportField.netAddsFieldFromYears; import static google.registry.pricing.PricingEngineProxy.isDomainPremium; import static google.registry.testing.DatastoreHelper.assertBillingEvents; import static google.registry.testing.DatastoreHelper.assertPollMessagesForResource; @@ -129,7 +128,7 @@ import google.registry.model.poll.PollMessage; import google.registry.model.registry.Registry; import google.registry.model.registry.Registry.TldState; import google.registry.model.reporting.DomainTransactionRecord; -import google.registry.model.reporting.DomainTransactionRecord.TransactionFieldAmount; +import google.registry.model.reporting.DomainTransactionRecord.TransactionReportField; import google.registry.model.reporting.HistoryEntry; import google.registry.monitoring.whitebox.EppMetric; import google.registry.testing.DatastoreHelper; @@ -2003,14 +2002,12 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase transactionFieldAmounts; org.joda.time.DateTime reportingTime; } -class google.registry.model.reporting.DomainTransactionRecord$TransactionFieldAmount { - google.registry.model.reporting.DomainTransactionRecord$TransactionFieldAmount$TransactionReportField reportField; - int reportAmount; -} -enum google.registry.model.reporting.DomainTransactionRecord$TransactionFieldAmount$TransactionReportField { +enum google.registry.model.reporting.DomainTransactionRecord$TransactionReportField { DELETED_DOMAINS_GRACE; DELETED_DOMAINS_NOGRACE; NET_ADDS_10_YR; @@ -826,12 +823,12 @@ class google.registry.model.reporting.HistoryEntry { byte[] xmlBytes; google.registry.model.domain.Period period; google.registry.model.eppcommon.Trid trid; - google.registry.model.reporting.DomainTransactionRecord domainTransactionRecord; google.registry.model.reporting.HistoryEntry$Type type; java.lang.Boolean requestedByRegistrar; java.lang.String clientId; java.lang.String otherClientId; java.lang.String reason; + java.util.Set domainTransactionRecords; org.joda.time.DateTime modificationTime; } enum google.registry.model.reporting.HistoryEntry$Type {