Skip to content

Commit 28ff530

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@3363268f.
1 parent ec82fea commit 28ff530

File tree

5 files changed

+89
-9
lines changed

5 files changed

+89
-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: 54.0.0
13+
Latest API and SDK version: 54.1.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>54.0.0</version>
31+
<version>54.1.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:54.0.0"
47+
implementation "com.segment.publicapi:segment-publicapi:54.1.0"
4848
}
4949
```
5050

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

5959
Then manually install the following JARs:
6060

61-
* `target/segment-publicapi-54.0.0.jar`
61+
* `target/segment-publicapi-54.1.0.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>54.0.0</version>
8+
<version>54.1.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 54.0.0 (Java)");
126+
setUserAgent("Public API SDK 54.1.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 = "54.0.0";
15+
public static final String VERSION = "54.1.0";
1616

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

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

Lines changed: 82 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ public class DestinationSubscriptionUpdateInput {
5050
@SerializedName(SERIALIZED_NAME_SETTINGS)
5151
private Map<String, Object> settings;
5252

53+
public static final String SERIALIZED_NAME_REVERSE_E_T_L_MODEL_ID = "reverseETLModelId";
54+
55+
@SerializedName(SERIALIZED_NAME_REVERSE_E_T_L_MODEL_ID)
56+
private String reverseETLModelId;
57+
58+
public static final String SERIALIZED_NAME_REVERSE_E_T_L_SCHEDULE = "reverseETLSchedule";
59+
60+
@SerializedName(SERIALIZED_NAME_REVERSE_E_T_L_SCHEDULE)
61+
private ReverseEtlScheduleDefinition reverseETLSchedule;
62+
5363
public DestinationSubscriptionUpdateInput() {}
5464

5565
public DestinationSubscriptionUpdateInput name(String name) {
@@ -140,6 +150,47 @@ public void setSettings(Map<String, Object> settings) {
140150
this.settings = settings;
141151
}
142152

153+
public DestinationSubscriptionUpdateInput reverseETLModelId(String reverseETLModelId) {
154+
155+
this.reverseETLModelId = reverseETLModelId;
156+
return this;
157+
}
158+
159+
/**
160+
* (Reverse ETL only) The reverse ETL model to attach this subscription to.
161+
*
162+
* @return reverseETLModelId
163+
*/
164+
@javax.annotation.Nullable
165+
public String getReverseETLModelId() {
166+
return reverseETLModelId;
167+
}
168+
169+
public void setReverseETLModelId(String reverseETLModelId) {
170+
this.reverseETLModelId = reverseETLModelId;
171+
}
172+
173+
public DestinationSubscriptionUpdateInput reverseETLSchedule(
174+
ReverseEtlScheduleDefinition reverseETLSchedule) {
175+
176+
this.reverseETLSchedule = reverseETLSchedule;
177+
return this;
178+
}
179+
180+
/**
181+
* Get reverseETLSchedule
182+
*
183+
* @return reverseETLSchedule
184+
*/
185+
@javax.annotation.Nullable
186+
public ReverseEtlScheduleDefinition getReverseETLSchedule() {
187+
return reverseETLSchedule;
188+
}
189+
190+
public void setReverseETLSchedule(ReverseEtlScheduleDefinition reverseETLSchedule) {
191+
this.reverseETLSchedule = reverseETLSchedule;
192+
}
193+
143194
@Override
144195
public boolean equals(Object o) {
145196
if (this == o) {
@@ -153,12 +204,19 @@ public boolean equals(Object o) {
153204
return Objects.equals(this.name, destinationSubscriptionUpdateInput.name)
154205
&& Objects.equals(this.trigger, destinationSubscriptionUpdateInput.trigger)
155206
&& Objects.equals(this.enabled, destinationSubscriptionUpdateInput.enabled)
156-
&& Objects.equals(this.settings, destinationSubscriptionUpdateInput.settings);
207+
&& Objects.equals(this.settings, destinationSubscriptionUpdateInput.settings)
208+
&& Objects.equals(
209+
this.reverseETLModelId,
210+
destinationSubscriptionUpdateInput.reverseETLModelId)
211+
&& Objects.equals(
212+
this.reverseETLSchedule,
213+
destinationSubscriptionUpdateInput.reverseETLSchedule);
157214
}
158215

159216
@Override
160217
public int hashCode() {
161-
return Objects.hash(name, trigger, enabled, settings);
218+
return Objects.hash(
219+
name, trigger, enabled, settings, reverseETLModelId, reverseETLSchedule);
162220
}
163221

164222
@Override
@@ -169,6 +227,12 @@ public String toString() {
169227
sb.append(" trigger: ").append(toIndentedString(trigger)).append("\n");
170228
sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n");
171229
sb.append(" settings: ").append(toIndentedString(settings)).append("\n");
230+
sb.append(" reverseETLModelId: ")
231+
.append(toIndentedString(reverseETLModelId))
232+
.append("\n");
233+
sb.append(" reverseETLSchedule: ")
234+
.append(toIndentedString(reverseETLSchedule))
235+
.append("\n");
172236
sb.append("}");
173237
return sb.toString();
174238
}
@@ -194,6 +258,8 @@ private String toIndentedString(Object o) {
194258
openapiFields.add("trigger");
195259
openapiFields.add("enabled");
196260
openapiFields.add("settings");
261+
openapiFields.add("reverseETLModelId");
262+
openapiFields.add("reverseETLSchedule");
197263

198264
// a set of required properties/fields (JSON key names)
199265
openapiRequiredFields = new HashSet<String>();
@@ -247,6 +313,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
247313
+ " but got `%s`",
248314
jsonObj.get("trigger").toString()));
249315
}
316+
if ((jsonObj.get("reverseETLModelId") != null
317+
&& !jsonObj.get("reverseETLModelId").isJsonNull())
318+
&& !jsonObj.get("reverseETLModelId").isJsonPrimitive()) {
319+
throw new IllegalArgumentException(
320+
String.format(
321+
"Expected the field `reverseETLModelId` to be a primitive type in the"
322+
+ " JSON string but got `%s`",
323+
jsonObj.get("reverseETLModelId").toString()));
324+
}
325+
// validate the optional field `reverseETLSchedule`
326+
if (jsonObj.get("reverseETLSchedule") != null
327+
&& !jsonObj.get("reverseETLSchedule").isJsonNull()) {
328+
ReverseEtlScheduleDefinition.validateJsonElement(jsonObj.get("reverseETLSchedule"));
329+
}
250330
}
251331

252332
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {

0 commit comments

Comments
 (0)