diff --git a/api/openapi.yaml b/api/openapi.yaml index 9f88116..5851e28 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -1256,7 +1256,7 @@ components: userId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 parentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 referrer: referrer - isAnonymous: true + externalUserId: externalUserId closeTime: 1 campaign: name: name @@ -1317,9 +1317,11 @@ components: format: uuid nullable: true type: string - isAnonymous: - description: The flag that indicates whether the user is anonymous. - type: boolean + externalUserId: + description: "The external user ID that is used to identify the user on\ + \ the application side, unique across the workspace. It is always null\ + \ for anonymous users." + type: string window: $ref: '#/components/schemas/Session_window' closeTime: @@ -1361,7 +1363,7 @@ components: userId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 parentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 referrer: referrer - isAnonymous: true + externalUserId: externalUserId closeTime: 1 campaign: name: name @@ -1408,7 +1410,7 @@ components: userId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 parentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 referrer: referrer - isAnonymous: true + externalUserId: externalUserId closeTime: 1 campaign: name: name diff --git a/src/main/java/com/croct/client/export/model/Session.java b/src/main/java/com/croct/client/export/model/Session.java index 2008709..6e16d15 100644 --- a/src/main/java/com/croct/client/export/model/Session.java +++ b/src/main/java/com/croct/client/export/model/Session.java @@ -16,27 +16,13 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; -import com.croct.client.export.model.Campaign; -import com.croct.client.export.model.Location; -import com.croct.client.export.model.SessionStatistics; -import com.croct.client.export.model.SessionWindow; -import com.croct.client.export.model.WebClient; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.croct.client.export.JSON; - /** * Session @@ -45,7 +31,7 @@ Session.JSON_PROPERTY_SESSION_ID, Session.JSON_PROPERTY_USER_ID, Session.JSON_PROPERTY_PARENT_ID, - Session.JSON_PROPERTY_IS_ANONYMOUS, + Session.JSON_PROPERTY_EXTERNAL_USER_ID, Session.JSON_PROPERTY_WINDOW, Session.JSON_PROPERTY_CLOSE_TIME, Session.JSON_PROPERTY_REFERRER, @@ -67,8 +53,8 @@ public class Session { public static final String JSON_PROPERTY_PARENT_ID = "parentId"; private JsonNullable parentId = JsonNullable.undefined(); - public static final String JSON_PROPERTY_IS_ANONYMOUS = "isAnonymous"; - private Boolean isAnonymous; + public static final String JSON_PROPERTY_EXTERNAL_USER_ID = "externalUserId"; + private String externalUserId; public static final String JSON_PROPERTY_WINDOW = "window"; private SessionWindow window; @@ -97,7 +83,7 @@ public class Session { public static final String JSON_PROPERTY_STATISTICS = "statistics"; private SessionStatistics statistics; - public Session() { + public Session() { } public Session sessionId(UUID sessionId) { @@ -172,7 +158,7 @@ public UUID getParentId() { public JsonNullable getParentId_JsonNullable() { return parentId; } - + @JsonProperty(JSON_PROPERTY_PARENT_ID) public void setParentId_JsonNullable(JsonNullable parentId) { this.parentId = parentId; @@ -183,28 +169,30 @@ public void setParentId(UUID parentId) { } - public Session isAnonymous(Boolean isAnonymous) { - this.isAnonymous = isAnonymous; + public Session externalUserId(String externalUserId) { + this.externalUserId = externalUserId; return this; } /** - * The flag that indicates whether the user is anonymous. - * @return isAnonymous + * The external user ID that is used to identify the user on + * the application side, unique across the workspace. It is always null for anonymous users. + * + * @return externalUserId **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ANONYMOUS) + @JsonProperty(JSON_PROPERTY_EXTERNAL_USER_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsAnonymous() { - return isAnonymous; + public String getExternalUserId() { + return externalUserId; } - @JsonProperty(JSON_PROPERTY_IS_ANONYMOUS) + @JsonProperty(JSON_PROPERTY_EXTERNAL_USER_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsAnonymous(Boolean isAnonymous) { - this.isAnonymous = isAnonymous; + public void setExternalUserId(String externalUserId) { + this.externalUserId = externalUserId; } @@ -280,7 +268,7 @@ public String getReferrer() { public JsonNullable getReferrer_JsonNullable() { return referrer; } - + @JsonProperty(JSON_PROPERTY_REFERRER) public void setReferrer_JsonNullable(JsonNullable referrer) { this.referrer = referrer; @@ -313,7 +301,7 @@ public String getLandingPageUrl() { public JsonNullable getLandingPageUrl_JsonNullable() { return landingPageUrl; } - + @JsonProperty(JSON_PROPERTY_LANDING_PAGE_URL) public void setLandingPageUrl_JsonNullable(JsonNullable landingPageUrl) { this.landingPageUrl = landingPageUrl; @@ -472,7 +460,7 @@ public boolean equals(Object o) { return Objects.equals(this.sessionId, session.sessionId) && Objects.equals(this.userId, session.userId) && equalsNullable(this.parentId, session.parentId) && - Objects.equals(this.isAnonymous, session.isAnonymous) && + Objects.equals(this.externalUserId, session.externalUserId) && Objects.equals(this.window, session.window) && Objects.equals(this.closeTime, session.closeTime) && equalsNullable(this.referrer, session.referrer) && @@ -490,7 +478,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(sessionId, userId, hashCodeNullable(parentId), isAnonymous, window, closeTime, hashCodeNullable(referrer), hashCodeNullable(landingPageUrl), campaign, location, client, attributes, statistics); + return Objects.hash(sessionId, userId, hashCodeNullable(parentId), externalUserId, window, closeTime, hashCodeNullable(referrer), hashCodeNullable(landingPageUrl), campaign, location, client, attributes, statistics); } private static int hashCodeNullable(JsonNullable a) { @@ -507,7 +495,7 @@ public String toString() { sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); - sb.append(" isAnonymous: ").append(toIndentedString(isAnonymous)).append("\n"); + sb.append(" externalUserId: ").append(toIndentedString(externalUserId)).append("\n"); sb.append(" window: ").append(toIndentedString(window)).append("\n"); sb.append(" closeTime: ").append(toIndentedString(closeTime)).append("\n"); sb.append(" referrer: ").append(toIndentedString(referrer)).append("\n");