@Test public void testSetEventValue() throws JSONException { CustomEvent event; event = CustomEvent.newBuilder("event name").setEventValue(Integer.MAX_VALUE).build(); EventTestUtils.validateEventValue(event, "event_value", 2147483647000000L); event = CustomEvent.newBuilder("event name").setEventValue(Integer.MIN_VALUE).build(); EventTestUtils.validateEventValue(event, "event_value", -2147483648000000L); event = CustomEvent.newBuilder("event name").setEventValue(0).build(); EventTestUtils.validateEventValue(event, "event_value", 0); event = CustomEvent.newBuilder("event name").setEventValue(Double.MIN_VALUE).build(); EventTestUtils.validateEventValue(event, "event_value", 0); event = CustomEvent.newBuilder("event name").setEventValue((double) Integer.MAX_VALUE).build(); EventTestUtils.validateEventValue(event, "event_value", 2147483647000000L); event = CustomEvent.newBuilder("event name").setEventValue((double) Integer.MIN_VALUE).build(); EventTestUtils.validateEventValue(event, "event_value", -2147483648000000L); event = CustomEvent.newBuilder("event name").setEventValue(String.valueOf(Integer.MAX_VALUE)).build(); EventTestUtils.validateEventValue(event, "event_value", 2147483647000000L); event = CustomEvent.newBuilder("event name").setEventValue(String.valueOf(Integer.MIN_VALUE)).build(); EventTestUtils.validateEventValue(event, "event_value", -2147483648000000L); event = CustomEvent.newBuilder("event name").setEventValue("0").build(); EventTestUtils.validateEventValue(event, "event_value", 0); event = CustomEvent.newBuilder("event name").setEventValue((String) null).build(); EventTestUtils.validateEventValue(event, "event_value", null); event = CustomEvent.newBuilder("event name").setEventValue(new BigDecimal(123)).build(); EventTestUtils.validateEventValue(event, "event_value", 123000000L); BigDecimal maxDecimal = new BigDecimal(Integer.MAX_VALUE); event = CustomEvent.newBuilder("event name").setEventValue(maxDecimal).build(); EventTestUtils.validateEventValue(event, "event_value", 2147483647000000L); BigDecimal minDecimal = new BigDecimal(Integer.MIN_VALUE); event = CustomEvent.newBuilder("event name").setEventValue(minDecimal).build(); EventTestUtils.validateEventValue(event, "event_value", -2147483648000000L); event = CustomEvent.newBuilder("event name").setEventValue((BigDecimal) null).build(); EventTestUtils.validateEventValue(event, "event_value", null); }
@NonNull public static Builder newBuilder(@NonNull String name) { return new Builder(name); }
CustomEvent extends Event implements JsonSerializable { @NonNull public static Builder newBuilder(@NonNull String name) { return new Builder(name); } }
CustomEvent extends Event implements JsonSerializable { @NonNull public static Builder newBuilder(@NonNull String name) { return new Builder(name); } private  CustomEvent(@NonNull Builder builder); }
CustomEvent extends Event implements JsonSerializable { @NonNull public static Builder newBuilder(@NonNull String name) { return new Builder(name); } 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(); }
CustomEvent extends Event implements JsonSerializable { @NonNull public static Builder newBuilder(@NonNull String name) { return new Builder(name); } 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; }