Skip to content

Commit cbfc993

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@5644a792.
1 parent 41fcbc4 commit cbfc993

File tree

7 files changed

+261
-122
lines changed

7 files changed

+261
-122
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: 52.0.0
13+
Latest API and SDK version: 53.0.0
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>52.0.0</version>
31+
<version>53.0.0</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:52.0.0"
47+
implementation "com.segment.publicapi:segment-publicapi:53.0.0"
4848
}
4949
```
5050

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

5959
Then manually install the following JARs:
6060

61-
* `target/segment-publicapi-52.0.0.jar`
61+
* `target/segment-publicapi-53.0.0.jar`
6262
* `target/lib/*.jar`
6363

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

docs/DeliveryOverviewApi.md

Lines changed: 18 additions & 20 deletions
Large diffs are not rendered by default.

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>52.0.0</version>
8+
<version>53.0.0</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 52.0.0 (Java)");
126+
setUserAgent("Public API SDK 53.0.0 (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 = "52.0.0";
15+
public static final String VERSION = "53.0.0";
1616

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

src/main/java/com/segment/publicapi/api/DeliveryOverviewApi.java

Lines changed: 87 additions & 93 deletions
Large diffs are not rendered by default.

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

Lines changed: 149 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,21 @@ public class DeliveryOverviewDestinationFilterBy {
5959
@SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ID)
6060
private List<String> subscriptionId;
6161

62+
public static final String SERIALIZED_NAME_ACTIVATION_ID = "activationId";
63+
64+
@SerializedName(SERIALIZED_NAME_ACTIVATION_ID)
65+
private List<String> activationId;
66+
67+
public static final String SERIALIZED_NAME_AUDIENCE_ID = "audienceId";
68+
69+
@SerializedName(SERIALIZED_NAME_AUDIENCE_ID)
70+
private List<String> audienceId;
71+
72+
public static final String SERIALIZED_NAME_SPACE_ID = "spaceId";
73+
74+
@SerializedName(SERIALIZED_NAME_SPACE_ID)
75+
private List<String> spaceId;
76+
6277
public DeliveryOverviewDestinationFilterBy() {}
6378

6479
public DeliveryOverviewDestinationFilterBy discardReason(List<String> discardReason) {
@@ -204,6 +219,90 @@ public void setSubscriptionId(List<String> subscriptionId) {
204219
this.subscriptionId = subscriptionId;
205220
}
206221

222+
public DeliveryOverviewDestinationFilterBy activationId(List<String> activationId) {
223+
224+
this.activationId = activationId;
225+
return this;
226+
}
227+
228+
public DeliveryOverviewDestinationFilterBy addActivationIdItem(String activationIdItem) {
229+
if (this.activationId == null) {
230+
this.activationId = new ArrayList<>();
231+
}
232+
this.activationId.add(activationIdItem);
233+
return this;
234+
}
235+
236+
/**
237+
* A list of strings of event context IDs from a Linked Audience mapping/activation.
238+
*
239+
* @return activationId
240+
*/
241+
@javax.annotation.Nullable
242+
public List<String> getActivationId() {
243+
return activationId;
244+
}
245+
246+
public void setActivationId(List<String> activationId) {
247+
this.activationId = activationId;
248+
}
249+
250+
public DeliveryOverviewDestinationFilterBy audienceId(List<String> audienceId) {
251+
252+
this.audienceId = audienceId;
253+
return this;
254+
}
255+
256+
public DeliveryOverviewDestinationFilterBy addAudienceIdItem(String audienceIdItem) {
257+
if (this.audienceId == null) {
258+
this.audienceId = new ArrayList<>();
259+
}
260+
this.audienceId.add(audienceIdItem);
261+
return this;
262+
}
263+
264+
/**
265+
* A list of strings of audienceIDs for a Linked Audience.
266+
*
267+
* @return audienceId
268+
*/
269+
@javax.annotation.Nullable
270+
public List<String> getAudienceId() {
271+
return audienceId;
272+
}
273+
274+
public void setAudienceId(List<String> audienceId) {
275+
this.audienceId = audienceId;
276+
}
277+
278+
public DeliveryOverviewDestinationFilterBy spaceId(List<String> spaceId) {
279+
280+
this.spaceId = spaceId;
281+
return this;
282+
}
283+
284+
public DeliveryOverviewDestinationFilterBy addSpaceIdItem(String spaceIdItem) {
285+
if (this.spaceId == null) {
286+
this.spaceId = new ArrayList<>();
287+
}
288+
this.spaceId.add(spaceIdItem);
289+
return this;
290+
}
291+
292+
/**
293+
* A list of strings of spaceIDs for a Linked Audience.
294+
*
295+
* @return spaceId
296+
*/
297+
@javax.annotation.Nullable
298+
public List<String> getSpaceId() {
299+
return spaceId;
300+
}
301+
302+
public void setSpaceId(List<String> spaceId) {
303+
this.spaceId = spaceId;
304+
}
305+
207306
@Override
208307
public boolean equals(Object o) {
209308
if (this == o) {
@@ -219,12 +318,24 @@ public boolean equals(Object o) {
219318
&& Objects.equals(this.eventType, deliveryOverviewDestinationFilterBy.eventType)
220319
&& Objects.equals(this.appVersion, deliveryOverviewDestinationFilterBy.appVersion)
221320
&& Objects.equals(
222-
this.subscriptionId, deliveryOverviewDestinationFilterBy.subscriptionId);
321+
this.subscriptionId, deliveryOverviewDestinationFilterBy.subscriptionId)
322+
&& Objects.equals(
323+
this.activationId, deliveryOverviewDestinationFilterBy.activationId)
324+
&& Objects.equals(this.audienceId, deliveryOverviewDestinationFilterBy.audienceId)
325+
&& Objects.equals(this.spaceId, deliveryOverviewDestinationFilterBy.spaceId);
223326
}
224327

225328
@Override
226329
public int hashCode() {
227-
return Objects.hash(discardReason, eventName, eventType, appVersion, subscriptionId);
330+
return Objects.hash(
331+
discardReason,
332+
eventName,
333+
eventType,
334+
appVersion,
335+
subscriptionId,
336+
activationId,
337+
audienceId,
338+
spaceId);
228339
}
229340

230341
@Override
@@ -236,6 +347,9 @@ public String toString() {
236347
sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n");
237348
sb.append(" appVersion: ").append(toIndentedString(appVersion)).append("\n");
238349
sb.append(" subscriptionId: ").append(toIndentedString(subscriptionId)).append("\n");
350+
sb.append(" activationId: ").append(toIndentedString(activationId)).append("\n");
351+
sb.append(" audienceId: ").append(toIndentedString(audienceId)).append("\n");
352+
sb.append(" spaceId: ").append(toIndentedString(spaceId)).append("\n");
239353
sb.append("}");
240354
return sb.toString();
241355
}
@@ -262,6 +376,9 @@ private String toIndentedString(Object o) {
262376
openapiFields.add("eventType");
263377
openapiFields.add("appVersion");
264378
openapiFields.add("subscriptionId");
379+
openapiFields.add("activationId");
380+
openapiFields.add("audienceId");
381+
openapiFields.add("spaceId");
265382

266383
// a set of required properties/fields (JSON key names)
267384
openapiRequiredFields = new HashSet<String>();
@@ -349,6 +466,36 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
349466
+ " but got `%s`",
350467
jsonObj.get("subscriptionId").toString()));
351468
}
469+
// ensure the optional json data is an array if present
470+
if (jsonObj.get("activationId") != null
471+
&& !jsonObj.get("activationId").isJsonNull()
472+
&& !jsonObj.get("activationId").isJsonArray()) {
473+
throw new IllegalArgumentException(
474+
String.format(
475+
"Expected the field `activationId` to be an array in the JSON string"
476+
+ " but got `%s`",
477+
jsonObj.get("activationId").toString()));
478+
}
479+
// ensure the optional json data is an array if present
480+
if (jsonObj.get("audienceId") != null
481+
&& !jsonObj.get("audienceId").isJsonNull()
482+
&& !jsonObj.get("audienceId").isJsonArray()) {
483+
throw new IllegalArgumentException(
484+
String.format(
485+
"Expected the field `audienceId` to be an array in the JSON string but"
486+
+ " got `%s`",
487+
jsonObj.get("audienceId").toString()));
488+
}
489+
// ensure the optional json data is an array if present
490+
if (jsonObj.get("spaceId") != null
491+
&& !jsonObj.get("spaceId").isJsonNull()
492+
&& !jsonObj.get("spaceId").isJsonArray()) {
493+
throw new IllegalArgumentException(
494+
String.format(
495+
"Expected the field `spaceId` to be an array in the JSON string but got"
496+
+ " `%s`",
497+
jsonObj.get("spaceId").toString()));
498+
}
352499
}
353500

354501
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {

0 commit comments

Comments
 (0)