diff --git a/src/main/java/com/auth0/json/mgmt/logevents/LogEvent.java b/src/main/java/com/auth0/json/mgmt/logevents/LogEvent.java index e8bc20618..f813d99cc 100644 --- a/src/main/java/com/auth0/json/mgmt/logevents/LogEvent.java +++ b/src/main/java/com/auth0/json/mgmt/logevents/LogEvent.java @@ -49,6 +49,24 @@ public class LogEvent { private String hostname; @JsonProperty("audience") private String audience; + @JsonProperty("scope") + private String scope; + @JsonProperty("strategy") + private String strategy; + @JsonProperty("strategy_type") + private String strategyType; + @JsonProperty("isMobile") + private boolean isMobile; + @JsonProperty("user_agent") + private String userAgent; + @JsonProperty("organization_id") + private String organizationId; + @JsonProperty("organization_name") + private String organizationName; + @JsonProperty("tenant_name") + private String tenantName; + @JsonProperty("$event_schema") + private Object eventSchema; /** * Getter for the id of this event. @@ -131,6 +149,51 @@ public String getUserId() { return userId; } + /** + * Getter for the scope of this event. + * @return the scope. + */ + @JsonProperty("scope") + public String getScope() { + return scope; + } + + /** + * Getter for the strategy of this event. + * @return the strategy. + */ + @JsonProperty("strategy") + public String getStrategy() { + return strategy; + } + + /** + * Getter for the strategy type of this event. + * @return the strategy type. + */ + @JsonProperty("strategy_type") + public String getStrategyType() { + return strategyType; + } + + /** + * Getter for the isMobile flag of this event. + * @return the isMobile flag. + */ + @JsonProperty("isMobile") + public boolean isMobile() { + return isMobile; + } + + /** + * Getter for the user agent related to this event. + * @return the user agent. + */ + @JsonProperty("user_agent") + public String getUserAgent() { + return userAgent; + } + /** * Getter for the user name related to this event. * @@ -195,4 +258,33 @@ public String getHostname() { public String getAudience() { return audience; } + + /** + * @return the organization ID. + */ + public String getOrganizationId() { + return organizationId; + } + + /** + * @return the organization name. + */ + public String getOrganizationName() { + return organizationName; + } + + /** + * @return the tenant name. + */ + public String getTenantName() { + return tenantName; + } + + /** + * Getter for the event schema object. + * @return the event schema object. + */ + public Object getEventSchema() { + return eventSchema; + } } diff --git a/src/test/java/com/auth0/json/mgmt/logevents/LogEventTest.java b/src/test/java/com/auth0/json/mgmt/logevents/LogEventTest.java index 2caa26c50..9d9b791fc 100644 --- a/src/test/java/com/auth0/json/mgmt/logevents/LogEventTest.java +++ b/src/test/java/com/auth0/json/mgmt/logevents/LogEventTest.java @@ -25,7 +25,16 @@ public class LogEventTest extends JsonTest { " \"connection_id\": \"connectionId\",\n" + " \"description\": \"description\",\n" + " \"hostname\": \"hostname\",\n" + - " \"audience\": \"audience\"\n" + + " \"audience\": \"audience\",\n" + + " \"organization_id\": \"org_1\",\n" + + " \"organization_name\": \"org2\",\n" + + " \"$event_schema\": {\n" + + " \"version\": \"1.0.0\"\n" + + " },\n" + + " \"tenant_name\": \"paid-testing\",\n" + + " \"audience\": \"audience\",\n" + + " \"isMobile\": \"false\",\n" + + " \"user_agent\": \"okhttp 4.11.0 / Other 0.0.0\"\n" + "}"; @Test @@ -49,6 +58,11 @@ public void shouldDeserialize() throws Exception { assertThat(logEvent.getConnectionId(), is("connectionId")); assertThat(logEvent.getHostname(), is("hostname")); assertThat(logEvent.getDescription(), is("description")); - + assertThat(logEvent.isMobile(), is(false)); + assertThat(logEvent.getUserAgent(), is("okhttp 4.11.0 / Other 0.0.0")); + assertThat(logEvent.getOrganizationId(), is("org_1")); + assertThat(logEvent.getOrganizationName(), is("org2")); + assertThat(logEvent.getTenantName(), is("paid-testing")); + assertThat(logEvent.getEventSchema(), is(notNullValue())); } }