Skip to content

Commit cfdb6a4

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@cc3bddcf.
1 parent 6e02b9f commit cfdb6a4

7 files changed

Lines changed: 865 additions & 35 deletions

File tree

docs/AudiencesApi.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ All URIs are relative to *https://api.segmentapis.com*
1919

2020
## Operation: createAudience
2121

22-
> CreateAudience200Response createAudience(spaceId, createAudienceAlphaInput)
22+
> CreateAudience200Response createAudience(spaceId, createAudienceBetaInput)
2323
2424
Create Audience
2525

26-
Creates Audience. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Audience Created` event in the [audit trail](/tag/Audit-Trail). Note: The definition for an Audience created using the API is not editable through the Segment App. The rate limit for this endpoint is 10 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
26+
Creates Audience. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Audience Created` event in the [audit trail](/tag/Audit-Trail). Note: The definition for an Audience created using the API is not editable through the Segment App. The rate limit for this endpoint is 10 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
2727

2828
### Example
2929

@@ -46,9 +46,9 @@ public class Example {
4646

4747
AudiencesApi apiInstance = new AudiencesApi(defaultClient);
4848
String spaceId = "9aQ1Lj62S4bomZKLF4DPqW"; // String |
49-
CreateAudienceAlphaInput createAudienceAlphaInput = new CreateAudienceAlphaInput(); // CreateAudienceAlphaInput |
49+
CreateAudienceBetaInput createAudienceBetaInput = new CreateAudienceBetaInput(); // CreateAudienceBetaInput |
5050
try {
51-
CreateAudience200Response result = apiInstance.createAudience(spaceId, createAudienceAlphaInput);
51+
CreateAudience200Response result = apiInstance.createAudience(spaceId, createAudienceBetaInput);
5252
System.out.println(result);
5353
} catch (ApiException e) {
5454
System.err.println("Exception when calling AudiencesApi#createAudience");
@@ -67,7 +67,7 @@ public class Example {
6767
| Name | Type | Description | Notes |
6868
|------------- | ------------- | ------------- | -------------|
6969
| **spaceId** | **String**| | |
70-
| **createAudienceAlphaInput** | [**CreateAudienceAlphaInput**](CreateAudienceAlphaInput.md)| | |
70+
| **createAudienceBetaInput** | [**CreateAudienceBetaInput**](CreateAudienceBetaInput.md)| | |
7171

7272
### Return type
7373

@@ -79,8 +79,8 @@ public class Example {
7979

8080
### HTTP request headers
8181

82-
- **Content-Type**: application/vnd.segment.v1alpha+json
83-
- **Accept**: application/vnd.segment.v1alpha+json, application/json
82+
- **Content-Type**: application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
83+
- **Accept**: application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json, application/json
8484

8585

8686
### HTTP response details

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,21 @@ private static Class getClassByDiscriminator(
257257
gsonBuilder.registerTypeAdapterFactory(
258258
new com.segment.publicapi.models.CreateAudience200Response
259259
.CustomTypeAdapterFactory());
260+
gsonBuilder.registerTypeAdapterFactory(
261+
new com.segment.publicapi.models.CreateAudience200Response1
262+
.CustomTypeAdapterFactory());
260263
gsonBuilder.registerTypeAdapterFactory(
261264
new com.segment.publicapi.models.CreateAudienceAlphaInput
262265
.CustomTypeAdapterFactory());
263266
gsonBuilder.registerTypeAdapterFactory(
264267
new com.segment.publicapi.models.CreateAudienceAlphaOutput
265268
.CustomTypeAdapterFactory());
269+
gsonBuilder.registerTypeAdapterFactory(
270+
new com.segment.publicapi.models.CreateAudienceBetaInput
271+
.CustomTypeAdapterFactory());
272+
gsonBuilder.registerTypeAdapterFactory(
273+
new com.segment.publicapi.models.CreateAudienceBetaOutput
274+
.CustomTypeAdapterFactory());
266275
gsonBuilder.registerTypeAdapterFactory(
267276
new com.segment.publicapi.models.CreateAudiencePreview200Response
268277
.CustomTypeAdapterFactory());

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

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import com.segment.publicapi.Configuration;
2020
import com.segment.publicapi.Pair;
2121
import com.segment.publicapi.models.CreateAudience200Response;
22-
import com.segment.publicapi.models.CreateAudienceAlphaInput;
22+
import com.segment.publicapi.models.CreateAudienceBetaInput;
2323
import com.segment.publicapi.models.CreateAudiencePreview200Response;
2424
import com.segment.publicapi.models.CreateAudiencePreviewBetaInput;
2525
import com.segment.publicapi.models.GetAudience200Response;
@@ -82,7 +82,7 @@ public void setCustomBaseUrl(String customBaseUrl) {
8282
* Build call for createAudience
8383
*
8484
* @param spaceId (required)
85-
* @param createAudienceAlphaInput (required)
85+
* @param createAudienceBetaInput (required)
8686
* @param _callback Callback for upload/download progress
8787
* @return Call to execute
8888
* @throws ApiException If fail to serialize the request body object
@@ -97,7 +97,7 @@ public void setCustomBaseUrl(String customBaseUrl) {
9797
*/
9898
public okhttp3.Call createAudienceCall(
9999
String spaceId,
100-
CreateAudienceAlphaInput createAudienceAlphaInput,
100+
CreateAudienceBetaInput createAudienceBetaInput,
101101
final ApiCallback _callback)
102102
throws ApiException {
103103
String basePath = null;
@@ -113,7 +113,7 @@ public okhttp3.Call createAudienceCall(
113113
basePath = null;
114114
}
115115

116-
Object localVarPostBody = createAudienceAlphaInput;
116+
Object localVarPostBody = createAudienceBetaInput;
117117

118118
// create path and map variables
119119
String localVarPath =
@@ -129,14 +129,18 @@ public okhttp3.Call createAudienceCall(
129129
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
130130

131131
final String[] localVarAccepts = {
132-
"application/vnd.segment.v1alpha+json", "application/json"
132+
"application/vnd.segment.v1beta+json",
133+
"application/vnd.segment.v1alpha+json",
134+
"application/json"
133135
};
134136
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
135137
if (localVarAccept != null) {
136138
localVarHeaderParams.put("Accept", localVarAccept);
137139
}
138140

139-
final String[] localVarContentTypes = {"application/vnd.segment.v1alpha+json"};
141+
final String[] localVarContentTypes = {
142+
"application/vnd.segment.v1beta+json", "application/vnd.segment.v1alpha+json"
143+
};
140144
final String localVarContentType =
141145
localVarApiClient.selectHeaderContentType(localVarContentTypes);
142146
if (localVarContentType != null) {
@@ -161,7 +165,7 @@ public okhttp3.Call createAudienceCall(
161165
@SuppressWarnings("rawtypes")
162166
private okhttp3.Call createAudienceValidateBeforeCall(
163167
String spaceId,
164-
CreateAudienceAlphaInput createAudienceAlphaInput,
168+
CreateAudienceBetaInput createAudienceBetaInput,
165169
final ApiCallback _callback)
166170
throws ApiException {
167171
// verify the required parameter 'spaceId' is set
@@ -170,18 +174,18 @@ private okhttp3.Call createAudienceValidateBeforeCall(
170174
"Missing the required parameter 'spaceId' when calling createAudience(Async)");
171175
}
172176

173-
// verify the required parameter 'createAudienceAlphaInput' is set
174-
if (createAudienceAlphaInput == null) {
177+
// verify the required parameter 'createAudienceBetaInput' is set
178+
if (createAudienceBetaInput == null) {
175179
throw new ApiException(
176-
"Missing the required parameter 'createAudienceAlphaInput' when calling"
180+
"Missing the required parameter 'createAudienceBetaInput' when calling"
177181
+ " createAudience(Async)");
178182
}
179183

180-
return createAudienceCall(spaceId, createAudienceAlphaInput, _callback);
184+
return createAudienceCall(spaceId, createAudienceBetaInput, _callback);
181185
}
182186

183187
/**
184-
* Create Audience Creates Audience. • This endpoint is in **Alpha** testing. Please submit any
188+
* Create Audience Creates Audience. • This endpoint is in **Beta** testing. Please submit any
185189
* feedback by sending an email to friends@segment.com. • In order to successfully call this
186190
* endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach
187191
* out to your customer success manager for more information. • When called, this endpoint may
@@ -193,7 +197,7 @@ private okhttp3.Call createAudienceValidateBeforeCall(
193197
* Limiting](/#tag/Rate-Limits) for more information.
194198
*
195199
* @param spaceId (required)
196-
* @param createAudienceAlphaInput (required)
200+
* @param createAudienceBetaInput (required)
197201
* @return CreateAudience200Response
198202
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
199203
* response body
@@ -207,14 +211,14 @@ private okhttp3.Call createAudienceValidateBeforeCall(
207211
* </table>
208212
*/
209213
public CreateAudience200Response createAudience(
210-
String spaceId, CreateAudienceAlphaInput createAudienceAlphaInput) throws ApiException {
214+
String spaceId, CreateAudienceBetaInput createAudienceBetaInput) throws ApiException {
211215
ApiResponse<CreateAudience200Response> localVarResp =
212-
createAudienceWithHttpInfo(spaceId, createAudienceAlphaInput);
216+
createAudienceWithHttpInfo(spaceId, createAudienceBetaInput);
213217
return localVarResp.getData();
214218
}
215219

216220
/**
217-
* Create Audience Creates Audience. • This endpoint is in **Alpha** testing. Please submit any
221+
* Create Audience Creates Audience. • This endpoint is in **Beta** testing. Please submit any
218222
* feedback by sending an email to friends@segment.com. • In order to successfully call this
219223
* endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach
220224
* out to your customer success manager for more information. • When called, this endpoint may
@@ -226,7 +230,7 @@ public CreateAudience200Response createAudience(
226230
* Limiting](/#tag/Rate-Limits) for more information.
227231
*
228232
* @param spaceId (required)
229-
* @param createAudienceAlphaInput (required)
233+
* @param createAudienceBetaInput (required)
230234
* @return ApiResponse&lt;CreateAudience200Response&gt;
231235
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
232236
* response body
@@ -240,15 +244,15 @@ public CreateAudience200Response createAudience(
240244
* </table>
241245
*/
242246
public ApiResponse<CreateAudience200Response> createAudienceWithHttpInfo(
243-
String spaceId, CreateAudienceAlphaInput createAudienceAlphaInput) throws ApiException {
247+
String spaceId, CreateAudienceBetaInput createAudienceBetaInput) throws ApiException {
244248
okhttp3.Call localVarCall =
245-
createAudienceValidateBeforeCall(spaceId, createAudienceAlphaInput, null);
249+
createAudienceValidateBeforeCall(spaceId, createAudienceBetaInput, null);
246250
Type localVarReturnType = new TypeToken<CreateAudience200Response>() {}.getType();
247251
return localVarApiClient.execute(localVarCall, localVarReturnType);
248252
}
249253

250254
/**
251-
* Create Audience (asynchronously) Creates Audience. • This endpoint is in **Alpha** testing.
255+
* Create Audience (asynchronously) Creates Audience. • This endpoint is in **Beta** testing.
252256
* Please submit any feedback by sending an email to friends@segment.com. • In order to
253257
* successfully call this endpoint, the specified Workspace needs to have the Audience feature
254258
* enabled. Please reach out to your customer success manager for more information. • When
@@ -260,7 +264,7 @@ public ApiResponse<CreateAudience200Response> createAudienceWithHttpInfo(
260264
* parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
261265
*
262266
* @param spaceId (required)
263-
* @param createAudienceAlphaInput (required)
267+
* @param createAudienceBetaInput (required)
264268
* @param _callback The callback to be executed when the API call finishes
265269
* @return The request call
266270
* @throws ApiException If fail to process the API call, e.g. serializing the request body
@@ -276,12 +280,12 @@ public ApiResponse<CreateAudience200Response> createAudienceWithHttpInfo(
276280
*/
277281
public okhttp3.Call createAudienceAsync(
278282
String spaceId,
279-
CreateAudienceAlphaInput createAudienceAlphaInput,
283+
CreateAudienceBetaInput createAudienceBetaInput,
280284
final ApiCallback<CreateAudience200Response> _callback)
281285
throws ApiException {
282286

283287
okhttp3.Call localVarCall =
284-
createAudienceValidateBeforeCall(spaceId, createAudienceAlphaInput, _callback);
288+
createAudienceValidateBeforeCall(spaceId, createAudienceBetaInput, _callback);
285289
Type localVarReturnType = new TypeToken<CreateAudience200Response>() {}.getType();
286290
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
287291
return localVarCall;

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ public class CreateAudience200Response {
3232
public static final String SERIALIZED_NAME_DATA = "data";
3333

3434
@SerializedName(SERIALIZED_NAME_DATA)
35-
private CreateAudienceAlphaOutput data;
35+
private CreateAudienceBetaOutput data;
3636

3737
public CreateAudience200Response() {}
3838

39-
public CreateAudience200Response data(CreateAudienceAlphaOutput data) {
39+
public CreateAudience200Response data(CreateAudienceBetaOutput data) {
4040

4141
this.data = data;
4242
return this;
@@ -48,11 +48,11 @@ public CreateAudience200Response data(CreateAudienceAlphaOutput data) {
4848
* @return data
4949
*/
5050
@javax.annotation.Nullable
51-
public CreateAudienceAlphaOutput getData() {
51+
public CreateAudienceBetaOutput getData() {
5252
return data;
5353
}
5454

55-
public void setData(CreateAudienceAlphaOutput data) {
55+
public void setData(CreateAudienceBetaOutput data) {
5656
this.data = data;
5757
}
5858

@@ -137,7 +137,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
137137
JsonObject jsonObj = jsonElement.getAsJsonObject();
138138
// validate the optional field `data`
139139
if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) {
140-
CreateAudienceAlphaOutput.validateJsonElement(jsonObj.get("data"));
140+
CreateAudienceBetaOutput.validateJsonElement(jsonObj.get("data"));
141141
}
142142
}
143143

0 commit comments

Comments
 (0)