Skip to content

Commit 0efc609

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@ab889224.
1 parent 9c8abac commit 0efc609

File tree

5 files changed

+29
-9
lines changed

5 files changed

+29
-9
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ All endpoints in the API follow REST conventions and use standard HTTP methods.
1010

1111
See the next sections for more information on how to use the Segment Public API Java SDK.
1212

13-
Latest API and SDK version: 61.1.2
13+
Latest API and SDK version: 61.1.3
1414

1515
## Requirements
1616

@@ -28,7 +28,7 @@ Add this dependency to your project's POM:
2828
<dependency>
2929
<groupId>com.segment.publicapi</groupId>
3030
<artifactId>segment-publicapi</artifactId>
31-
<version>61.1.2</version>
31+
<version>61.1.3</version>
3232
<scope>compile</scope>
3333
</dependency>
3434
```
@@ -44,7 +44,7 @@ Add this dependency to your project's build file:
4444
}
4545
4646
dependencies {
47-
implementation "com.segment.publicapi:segment-publicapi:61.1.2"
47+
implementation "com.segment.publicapi:segment-publicapi:61.1.3"
4848
}
4949
```
5050

@@ -58,7 +58,7 @@ mvn clean package
5858

5959
Then manually install the following JARs:
6060

61-
* `target/segment-publicapi-61.1.2.jar`
61+
* `target/segment-publicapi-61.1.3.jar`
6262
* `target/lib/*.jar`
6363

6464
You are now ready to start making calls to Public API!

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>segment-publicapi</artifactId>
66
<packaging>jar</packaging>
77
<name>segment-publicapi</name>
8-
<version>61.1.2</version>
8+
<version>61.1.3</version>
99
<url>https://segment.com/docs/api/public-api/</url>
1010
<description>Segment Public API</description>
1111
<scm>

src/main/java/com/segment/publicapi/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private void init() {
123123
json = new JSON();
124124

125125
// Set default User-Agent.
126-
setUserAgent("Public API SDK 61.1.2 (Java)");
126+
setUserAgent("Public API SDK 61.1.3 (Java)");
127127

128128
authentications = new HashMap<String, Authentication>();
129129
}

src/main/java/com/segment/publicapi/Configuration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
package com.segment.publicapi;
1313

1414
public class Configuration {
15-
public static final String VERSION = "61.1.2";
15+
public static final String VERSION = "61.1.3";
1616

1717
private static ApiClient defaultApiClient = new ApiClient();
1818

src/main/java/com/segment/publicapi/models/AudienceDefinition.java

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@
2222
import com.google.gson.stream.JsonWriter;
2323
import com.segment.publicapi.JSON;
2424
import java.io.IOException;
25+
import java.util.Arrays;
2526
import java.util.HashSet;
2627
import java.util.Map;
2728
import java.util.Objects;
2829
import java.util.Set;
30+
import org.openapitools.jackson.nullable.JsonNullable;
2931

3032
/** AudienceDefinition */
3133
public class AudienceDefinition {
@@ -48,8 +50,10 @@ public AudienceDefinition targetEntity(String targetEntity) {
4850
}
4951

5052
/**
51-
* The target entity relationship slug, required in a linked audience, default to profile if not
52-
* specified.
53+
* The target entity relationship slug, only applicable for linked audiences. Use
54+
* &#x60;&#x60;&#x60;profile&#x60;&#x60;&#x60; when the targeting the profile. Note that the
55+
* value defaults to profile if not specified. Also note, that the value will be returned as
56+
* null if the target entity is removed from the data graph.
5357
*
5458
* @return targetEntity
5559
*/
@@ -97,11 +101,27 @@ public boolean equals(Object o) {
97101
&& Objects.equals(this.query, audienceDefinition.query);
98102
}
99103

104+
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
105+
return a == b
106+
|| (a != null
107+
&& b != null
108+
&& a.isPresent()
109+
&& b.isPresent()
110+
&& Objects.deepEquals(a.get(), b.get()));
111+
}
112+
100113
@Override
101114
public int hashCode() {
102115
return Objects.hash(targetEntity, query);
103116
}
104117

118+
private static <T> int hashCodeNullable(JsonNullable<T> a) {
119+
if (a == null) {
120+
return 1;
121+
}
122+
return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31;
123+
}
124+
105125
@Override
106126
public String toString() {
107127
StringBuilder sb = new StringBuilder();

0 commit comments

Comments
 (0)