CustomEvent extends Event implements JsonSerializable { private CustomEvent(@NonNull Builder builder) { this.eventName = builder.eventName; this.eventValue = builder.value; this.transactionId = UAStringUtil.isEmpty(builder.transactionId) ? null : builder.transactionId; this.interactionType = UAStringUtil.isEmpty(builder.interactionType) ? null : builder.interactionType; this.interactionId = UAStringUtil.isEmpty(builder.interactionId) ? null : builder.interactionId; this.sendId = builder.pushSendId; this.templateType = builder.templateType; this.properties = new JsonMap(builder.properties); } private  CustomEvent(@NonNull Builder builder); @NonNull static Builder newBuilder(@NonNull String name); @NonNull String getEventName(); @Nullable BigDecimal getEventValue(); @Nullable String getTransactionId(); @Nullable String getInteractionType(); @Nullable String getInteractionId(); @NonNull JsonMap getProperties(); @NonNull @Override final String getType(); @NonNull @Override @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) final JsonMap getEventData(); @NonNull @Override JsonValue toJsonValue(); @Override boolean isValid(); @NonNull CustomEvent track(); @NonNull
    static final String INTERACTION_ID; @NonNull
    static final String INTERACTION_TYPE; @NonNull
    static final String EVENT_NAME; @NonNull
    static final String EVENT_VALUE; @NonNull
    static final String TRANSACTION_ID; @NonNull
    static final String MCRAP_TRANSACTION_TYPE; @NonNull
    static final String CONVERSION_SEND_ID; @NonNull
    static final String CONVERSION_METADATA; @NonNull
    static final String LAST_RECEIVED_METADATA; @NonNull
    static final String TEMPLATE_TYPE; @NonNull
    static final String PROPERTIES; static final int MAX_CHARACTER_LENGTH; static final int MAX_TOTAL_PROPERTIES_SIZE; }
@Test public void testCustomEvent() throws JSONException { String eventName = createFixedSizeString('a', 255); String interactionId = createFixedSizeString('b', 255); String interactionType = createFixedSizeString('c', 255); String transactionId = createFixedSizeString('d', 255); String templateType = createFixedSizeString('e', 255); CustomEvent event = CustomEvent.newBuilder(eventName) .setTransactionId(transactionId) .setInteraction(interactionType, interactionId) .setEventValue(100.123456) .setTemplateType(templateType) .build(); EventTestUtils.validateEventValue(event, "event_name", eventName); EventTestUtils.validateEventValue(event, "event_value", 100123456L); EventTestUtils.validateEventValue(event, "transaction_id", transactionId); EventTestUtils.validateEventValue(event, "interaction_id", interactionId); EventTestUtils.validateEventValue(event, "interaction_type", interactionType); EventTestUtils.validateEventValue(event, "template_type", templateType); }