Skip to content

Commit

Permalink
feat: make identification field tag required
Browse files Browse the repository at this point in the history
BREAKING CHANGE: make identification field `confidence` optional
  • Loading branch information
TheUnderScorer committed Feb 27, 2024
1 parent efb8fd6 commit 069d9c5
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 54 deletions.
6 changes: 3 additions & 3 deletions docs/ProductsResponseIdentificationData.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
|**ipLocation** | [**DeprecatedIPLocation**](DeprecatedIPLocation.md) | | [optional] |
|**timestamp** | **Long** | Timestamp of the event with millisecond precision in Unix time. | |
|**time** | **OffsetDateTime** | Time expressed according to ISO 8601 in UTC format. | |
|**url** | **URI** | Page URL from which identification request was sent. | |
|**tag** | **Map<String, Object>** | A customer-provided value or an object that was sent with identification request. | [optional] |
|**url** | **URI** | Page URL from which the identification request was sent. | |
|**tag** | **Map<String, Object>** | A customer-provided value or an object that was sent with identification request. | |
|**linkedId** | **String** | A customer-provided id that was sent with identification request. | [optional] |
|**confidence** | [**Confidence**](Confidence.md) | | |
|**confidence** | [**Confidence**](Confidence.md) | | [optional] |
|**visitorFound** | **Boolean** | Attribute represents if a visitor had been identified before. | |
|**firstSeenAt** | [**SeenAt**](SeenAt.md) | | |
|**lastSeenAt** | [**SeenAt**](SeenAt.md) | | |
Expand Down
4 changes: 2 additions & 2 deletions docs/ResponseVisits.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
|**ipLocation** | [**DeprecatedIPLocation**](DeprecatedIPLocation.md) | | [optional] |
|**timestamp** | **Long** | Timestamp of the event with millisecond precision in Unix time. | |
|**time** | **OffsetDateTime** | Time expressed according to ISO 8601 in UTC format. | |
|**url** | **URI** | Page URL from which identification request was sent. | |
|**url** | **URI** | Page URL from which the identification request was sent. | |
|**tag** | **Map<String, Object>** | A customer-provided value or an object that was sent with identification request. | |
|**linkedId** | **String** | A customer-provided id that was sent with identification request. | [optional] |
|**confidence** | [**Confidence**](Confidence.md) | | |
|**confidence** | [**Confidence**](Confidence.md) | | [optional] |
|**visitorFound** | **Boolean** | Attribute represents if a visitor had been identified before. | |
|**firstSeenAt** | [**SeenAt**](SeenAt.md) | | |
|**lastSeenAt** | [**SeenAt**](SeenAt.md) | | |
Expand Down
2 changes: 1 addition & 1 deletion docs/Visit.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
|**url** | **URI** | Page URL from which the identification request was sent. | |
|**tag** | **Map<String, Object>** | A customer-provided value or an object that was sent with identification request. | |
|**linkedId** | **String** | A customer-provided id that was sent with identification request. | [optional] |
|**confidence** | [**Confidence**](Confidence.md) | | |
|**confidence** | [**Confidence**](Confidence.md) | | [optional] |
|**visitorFound** | **Boolean** | Attribute represents if a visitor had been identified before. | |
|**firstSeenAt** | [**SeenAt**](SeenAt.md) | | |
|**lastSeenAt** | [**SeenAt**](SeenAt.md) | | |
Expand Down
6 changes: 3 additions & 3 deletions docs/WebhookVisit.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
|**ipLocation** | [**DeprecatedIPLocation**](DeprecatedIPLocation.md) | | [optional] |
|**timestamp** | **Long** | Timestamp of the event with millisecond precision in Unix time. | |
|**time** | **OffsetDateTime** | Time expressed according to ISO 8601 in UTC format. | |
|**url** | **URI** | Page URL from which identification request was sent. | |
|**tag** | **Map<String, Object>** | A customer-provided value or an object that was sent with identification request. | [optional] |
|**url** | **URI** | Page URL from which the identification request was sent. | |
|**tag** | **Map<String, Object>** | A customer-provided value or an object that was sent with identification request. | |
|**linkedId** | **String** | A customer-provided id that was sent with identification request. | [optional] |
|**confidence** | [**Confidence**](Confidence.md) | | |
|**confidence** | [**Confidence**](Confidence.md) | | [optional] |
|**visitorFound** | **Boolean** | Attribute represents if a visitor had been identified before. | |
|**firstSeenAt** | [**SeenAt**](SeenAt.md) | | |
|**lastSeenAt** | [**SeenAt**](SeenAt.md) | | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public class ProductsResponseIdentificationData {
private URI url;

public static final String JSON_PROPERTY_TAG = "tag";
private Map<String, Object> tag = null;
private Map<String, Object> tag = new HashMap<>();

public static final String JSON_PROPERTY_LINKED_ID = "linkedId";
private String linkedId;
Expand Down Expand Up @@ -296,11 +296,11 @@ public ProductsResponseIdentificationData url(URI url) {
}

/**
* Page URL from which identification request was sent.
* Page URL from which the identification request was sent.
* @return url
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "https://some.website/path?query=params", required = true, value = "Page URL from which identification request was sent.")
@ApiModelProperty(example = "https://some.website/path?query=params", required = true, value = "Page URL from which the identification request was sent.")
@JsonProperty(JSON_PROPERTY_URL)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

Expand All @@ -322,9 +322,6 @@ public ProductsResponseIdentificationData tag(Map<String, Object> tag) {
}

public ProductsResponseIdentificationData putTagItem(String key, Object tagItem) {
if (this.tag == null) {
this.tag = new HashMap<>();
}
this.tag.put(key, tagItem);
return this;
}
Expand All @@ -333,18 +330,18 @@ public ProductsResponseIdentificationData putTagItem(String key, Object tagItem)
* A customer-provided value or an object that was sent with identification request.
* @return tag
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "A customer-provided value or an object that was sent with identification request.")
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "A customer-provided value or an object that was sent with identification request.")
@JsonProperty(JSON_PROPERTY_TAG)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS)

public Map<String, Object> getTag() {
return tag;
}


@JsonProperty(JSON_PROPERTY_TAG)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS)
public void setTag(Map<String, Object> tag) {
this.tag = tag;
}
Expand Down Expand Up @@ -385,18 +382,18 @@ public ProductsResponseIdentificationData confidence(Confidence confidence) {
* Get confidence
* @return confidence
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CONFIDENCE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public Confidence getConfidence() {
return confidence;
}


@JsonProperty(JSON_PROPERTY_CONFIDENCE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setConfidence(Confidence confidence) {
this.confidence = confidence;
}
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/fingerprint/model/ResponseVisits.java
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,11 @@ public ResponseVisits url(URI url) {
}

/**
* Page URL from which identification request was sent.
* Page URL from which the identification request was sent.
* @return url
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "https://some.website/path?query=params", required = true, value = "Page URL from which identification request was sent.")
@ApiModelProperty(example = "https://some.website/path?query=params", required = true, value = "Page URL from which the identification request was sent.")
@JsonProperty(JSON_PROPERTY_URL)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

Expand Down Expand Up @@ -378,18 +378,18 @@ public ResponseVisits confidence(Confidence confidence) {
* Get confidence
* @return confidence
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CONFIDENCE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public Confidence getConfidence() {
return confidence;
}


@JsonProperty(JSON_PROPERTY_CONFIDENCE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setConfidence(Confidence confidence) {
this.confidence = confidence;
}
Expand Down
19 changes: 8 additions & 11 deletions src/main/java/com/fingerprint/model/Visit.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public class Visit {
private URI url;

public static final String JSON_PROPERTY_TAG = "tag";
private Map<String, Object> tag = null;
private Map<String, Object> tag = new HashMap<>();

public static final String JSON_PROPERTY_LINKED_ID = "linkedId";
private String linkedId;
Expand Down Expand Up @@ -292,11 +292,11 @@ public Visit url(URI url) {
}

/**
* Page URL from which identification request was sent.
* Page URL from which the identification request was sent.
* @return url
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "https://some.website/path?query=params", required = true, value = "Page URL from which identification request was sent.")
@ApiModelProperty(example = "https://some.website/path?query=params", required = true, value = "Page URL from which the identification request was sent.")
@JsonProperty(JSON_PROPERTY_URL)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

Expand All @@ -318,9 +318,6 @@ public Visit tag(Map<String, Object> tag) {
}

public Visit putTagItem(String key, Object tagItem) {
if (this.tag == null) {
this.tag = new HashMap<>();
}
this.tag.put(key, tagItem);
return this;
}
Expand All @@ -340,7 +337,7 @@ public Map<String, Object> getTag() {


@JsonProperty(JSON_PROPERTY_TAG)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS)
public void setTag(Map<String, Object> tag) {
this.tag = tag;
}
Expand Down Expand Up @@ -381,18 +378,18 @@ public Visit confidence(Confidence confidence) {
* Get confidence
* @return confidence
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CONFIDENCE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public Confidence getConfidence() {
return confidence;
}


@JsonProperty(JSON_PROPERTY_CONFIDENCE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setConfidence(Confidence confidence) {
this.confidence = confidence;
}
Expand Down
25 changes: 11 additions & 14 deletions src/main/java/com/fingerprint/model/WebhookVisit.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public class WebhookVisit {
private URI url;

public static final String JSON_PROPERTY_TAG = "tag";
private Map<String, Object> tag = null;
private Map<String, Object> tag = new HashMap<>();

public static final String JSON_PROPERTY_LINKED_ID = "linkedId";
private String linkedId;
Expand Down Expand Up @@ -983,11 +983,11 @@ public WebhookVisit url(URI url) {
}

/**
* Page URL from which identification request was sent.
* Page URL from which the identification request was sent.
* @return url
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "https://some.website/path?query=params", required = true, value = "Page URL from which identification request was sent.")
@ApiModelProperty(example = "https://some.website/path?query=params", required = true, value = "Page URL from which the identification request was sent.")
@JsonProperty(JSON_PROPERTY_URL)
@JsonInclude(value = JsonInclude.Include.ALWAYS)

Expand All @@ -1009,9 +1009,6 @@ public WebhookVisit tag(Map<String, Object> tag) {
}

public WebhookVisit putTagItem(String key, Object tagItem) {
if (this.tag == null) {
this.tag = new HashMap<>();
}
this.tag.put(key, tagItem);
return this;
}
Expand All @@ -1020,18 +1017,18 @@ public WebhookVisit putTagItem(String key, Object tagItem) {
* A customer-provided value or an object that was sent with identification request.
* @return tag
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "A customer-provided value or an object that was sent with identification request.")
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "A customer-provided value or an object that was sent with identification request.")
@JsonProperty(JSON_PROPERTY_TAG)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS)

public Map<String, Object> getTag() {
return tag;
}


@JsonProperty(JSON_PROPERTY_TAG)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS)
public void setTag(Map<String, Object> tag) {
this.tag = tag;
}
Expand Down Expand Up @@ -1072,18 +1069,18 @@ public WebhookVisit confidence(Confidence confidence) {
* Get confidence
* @return confidence
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CONFIDENCE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public Confidence getConfidence() {
return confidence;
}


@JsonProperty(JSON_PROPERTY_CONFIDENCE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setConfidence(Confidence confidence) {
this.confidence = confidence;
}
Expand Down

0 comments on commit 069d9c5

Please sign in to comment.