Skip to content

Commit 46497a9

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@d685b232.
1 parent c6320da commit 46497a9

File tree

13 files changed

+897
-78
lines changed

13 files changed

+897
-78
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: 62.0.6
13+
Latest API and SDK version: 63.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>62.0.6</version>
31+
<version>63.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:62.0.6"
47+
implementation "com.segment.publicapi:segment-publicapi:63.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-62.0.6.jar`
61+
* `target/segment-publicapi-63.0.0.jar`
6262
* `target/lib/*.jar`
6363

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

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
62.0.6
1+
63.0.0

docs/AudiencesApi.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ public class Example {
100100

101101
## Operation: createAudience
102102

103-
> CreateAudience200Response createAudience(spaceId, createAudienceBetaInput)
103+
> CreateAudience200Response createAudience(spaceId, createAudienceInput)
104104
105105
Create Audience
106106

107-
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 &#x60;Audience Created&#x60; 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 50 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.
107+
Creates Audience. • 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 &#x60;Audience Created&#x60; 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 50 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.
108108

109109
### Example
110110

@@ -127,9 +127,9 @@ public class Example {
127127

128128
AudiencesApi apiInstance = new AudiencesApi(defaultClient);
129129
String spaceId = "9aQ1Lj62S4bomZKLF4DPqW"; // String |
130-
CreateAudienceBetaInput createAudienceBetaInput = new CreateAudienceBetaInput(); // CreateAudienceBetaInput |
130+
CreateAudienceInput createAudienceInput = new CreateAudienceInput(); // CreateAudienceInput |
131131
try {
132-
CreateAudience200Response result = apiInstance.createAudience(spaceId, createAudienceBetaInput);
132+
CreateAudience200Response result = apiInstance.createAudience(spaceId, createAudienceInput);
133133
System.out.println(result);
134134
} catch (ApiException e) {
135135
System.err.println("Exception when calling AudiencesApi#createAudience");
@@ -148,7 +148,7 @@ public class Example {
148148
| Name | Type | Description | Notes |
149149
|------------- | ------------- | ------------- | -------------|
150150
| **spaceId** | **String**| | |
151-
| **createAudienceBetaInput** | [**CreateAudienceBetaInput**](CreateAudienceBetaInput.md)| | |
151+
| **createAudienceInput** | [**CreateAudienceInput**](CreateAudienceInput.md)| | |
152152

153153
### Return type
154154

@@ -160,8 +160,8 @@ public class Example {
160160

161161
### HTTP request headers
162162

163-
- **Content-Type**: application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
164-
- **Accept**: application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json, application/json
163+
- **Content-Type**: application/json, application/vnd.segment.v1+json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
164+
- **Accept**: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
165165

166166

167167
### HTTP response details

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

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

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ private static Class getClassByDiscriminator(
274274
gsonBuilder.registerTypeAdapterFactory(
275275
new com.segment.publicapi.models.CreateAudience200Response1
276276
.CustomTypeAdapterFactory());
277+
gsonBuilder.registerTypeAdapterFactory(
278+
new com.segment.publicapi.models.CreateAudience200Response2
279+
.CustomTypeAdapterFactory());
277280
gsonBuilder.registerTypeAdapterFactory(
278281
new com.segment.publicapi.models.CreateAudienceAlphaInput
279282
.CustomTypeAdapterFactory());
@@ -286,6 +289,10 @@ private static Class getClassByDiscriminator(
286289
gsonBuilder.registerTypeAdapterFactory(
287290
new com.segment.publicapi.models.CreateAudienceBetaOutput
288291
.CustomTypeAdapterFactory());
292+
gsonBuilder.registerTypeAdapterFactory(
293+
new com.segment.publicapi.models.CreateAudienceInput.CustomTypeAdapterFactory());
294+
gsonBuilder.registerTypeAdapterFactory(
295+
new com.segment.publicapi.models.CreateAudienceOutput.CustomTypeAdapterFactory());
289296
gsonBuilder.registerTypeAdapterFactory(
290297
new com.segment.publicapi.models.CreateAudiencePreview200Response
291298
.CustomTypeAdapterFactory());

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

Lines changed: 50 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import com.segment.publicapi.models.AddAudienceScheduleToAudience200Response;
2222
import com.segment.publicapi.models.AddAudienceScheduleToAudienceAlphaInput;
2323
import com.segment.publicapi.models.CreateAudience200Response;
24-
import com.segment.publicapi.models.CreateAudienceBetaInput;
24+
import com.segment.publicapi.models.CreateAudienceInput;
2525
import com.segment.publicapi.models.CreateAudiencePreview200Response;
2626
import com.segment.publicapi.models.CreateAudiencePreviewBetaInput;
2727
import com.segment.publicapi.models.ForceExecuteAudienceRun200Response;
@@ -327,7 +327,7 @@ public okhttp3.Call addAudienceScheduleToAudienceAsync(
327327
* Build call for createAudience
328328
*
329329
* @param spaceId (required)
330-
* @param createAudienceBetaInput (required)
330+
* @param createAudienceInput (required)
331331
* @param _callback Callback for upload/download progress
332332
* @return Call to execute
333333
* @throws ApiException If fail to serialize the request body object
@@ -341,9 +341,7 @@ public okhttp3.Call addAudienceScheduleToAudienceAsync(
341341
* </table>
342342
*/
343343
public okhttp3.Call createAudienceCall(
344-
String spaceId,
345-
CreateAudienceBetaInput createAudienceBetaInput,
346-
final ApiCallback _callback)
344+
String spaceId, CreateAudienceInput createAudienceInput, final ApiCallback _callback)
347345
throws ApiException {
348346
String basePath = null;
349347
// Operation Servers
@@ -358,7 +356,7 @@ public okhttp3.Call createAudienceCall(
358356
basePath = null;
359357
}
360358

361-
Object localVarPostBody = createAudienceBetaInput;
359+
Object localVarPostBody = createAudienceInput;
362360

363361
// create path and map variables
364362
String localVarPath =
@@ -374,17 +372,21 @@ public okhttp3.Call createAudienceCall(
374372
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
375373

376374
final String[] localVarAccepts = {
375+
"application/vnd.segment.v1+json",
376+
"application/json",
377377
"application/vnd.segment.v1beta+json",
378-
"application/vnd.segment.v1alpha+json",
379-
"application/json"
378+
"application/vnd.segment.v1alpha+json"
380379
};
381380
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
382381
if (localVarAccept != null) {
383382
localVarHeaderParams.put("Accept", localVarAccept);
384383
}
385384

386385
final String[] localVarContentTypes = {
387-
"application/vnd.segment.v1beta+json", "application/vnd.segment.v1alpha+json"
386+
"application/json",
387+
"application/vnd.segment.v1+json",
388+
"application/vnd.segment.v1beta+json",
389+
"application/vnd.segment.v1alpha+json"
388390
};
389391
final String localVarContentType =
390392
localVarApiClient.selectHeaderContentType(localVarContentTypes);
@@ -409,40 +411,37 @@ public okhttp3.Call createAudienceCall(
409411

410412
@SuppressWarnings("rawtypes")
411413
private okhttp3.Call createAudienceValidateBeforeCall(
412-
String spaceId,
413-
CreateAudienceBetaInput createAudienceBetaInput,
414-
final ApiCallback _callback)
414+
String spaceId, CreateAudienceInput createAudienceInput, final ApiCallback _callback)
415415
throws ApiException {
416416
// verify the required parameter 'spaceId' is set
417417
if (spaceId == null) {
418418
throw new ApiException(
419419
"Missing the required parameter 'spaceId' when calling createAudience(Async)");
420420
}
421421

422-
// verify the required parameter 'createAudienceBetaInput' is set
423-
if (createAudienceBetaInput == null) {
422+
// verify the required parameter 'createAudienceInput' is set
423+
if (createAudienceInput == null) {
424424
throw new ApiException(
425-
"Missing the required parameter 'createAudienceBetaInput' when calling"
425+
"Missing the required parameter 'createAudienceInput' when calling"
426426
+ " createAudience(Async)");
427427
}
428428

429-
return createAudienceCall(spaceId, createAudienceBetaInput, _callback);
429+
return createAudienceCall(spaceId, createAudienceInput, _callback);
430430
}
431431

432432
/**
433-
* Create Audience Creates Audience. • This endpoint is in **Beta** testing. Please submit any
434-
* feedback by sending an email to friends@segment.com. • In order to successfully call this
435-
* endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach
436-
* out to your customer success manager for more information. • When called, this endpoint may
437-
* generate the &#x60;Audience Created&#x60; event in the [audit trail](/tag/Audit-Trail). Note:
438-
* The definition for an Audience created using the API is not editable through the Segment App.
439-
* The rate limit for this endpoint is 50 requests per minute, which is lower than the default
440-
* due to access pattern restrictions. Once reached, this endpoint will respond with the 429
441-
* HTTP status code with headers indicating the limit parameters. See [Rate
433+
* Create Audience Creates Audience. • In order to successfully call this endpoint, the
434+
* specified Workspace needs to have the Audience feature enabled. Please reach out to your
435+
* customer success manager for more information. • When called, this endpoint may generate the
436+
* &#x60;Audience Created&#x60; event in the [audit trail](/tag/Audit-Trail). Note: The
437+
* definition for an Audience created using the API is not editable through the Segment App. The
438+
* rate limit for this endpoint is 50 requests per minute, which is lower than the default due
439+
* to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP
440+
* status code with headers indicating the limit parameters. See [Rate
442441
* Limiting](/#tag/Rate-Limits) for more information.
443442
*
444443
* @param spaceId (required)
445-
* @param createAudienceBetaInput (required)
444+
* @param createAudienceInput (required)
446445
* @return CreateAudience200Response
447446
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
448447
* response body
@@ -456,26 +455,25 @@ private okhttp3.Call createAudienceValidateBeforeCall(
456455
* </table>
457456
*/
458457
public CreateAudience200Response createAudience(
459-
String spaceId, CreateAudienceBetaInput createAudienceBetaInput) throws ApiException {
458+
String spaceId, CreateAudienceInput createAudienceInput) throws ApiException {
460459
ApiResponse<CreateAudience200Response> localVarResp =
461-
createAudienceWithHttpInfo(spaceId, createAudienceBetaInput);
460+
createAudienceWithHttpInfo(spaceId, createAudienceInput);
462461
return localVarResp.getData();
463462
}
464463

465464
/**
466-
* Create Audience Creates Audience. • This endpoint is in **Beta** testing. Please submit any
467-
* feedback by sending an email to friends@segment.com. • In order to successfully call this
468-
* endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach
469-
* out to your customer success manager for more information. • When called, this endpoint may
470-
* generate the &#x60;Audience Created&#x60; event in the [audit trail](/tag/Audit-Trail). Note:
471-
* The definition for an Audience created using the API is not editable through the Segment App.
472-
* The rate limit for this endpoint is 50 requests per minute, which is lower than the default
473-
* due to access pattern restrictions. Once reached, this endpoint will respond with the 429
474-
* HTTP status code with headers indicating the limit parameters. See [Rate
465+
* Create Audience Creates Audience. • In order to successfully call this endpoint, the
466+
* specified Workspace needs to have the Audience feature enabled. Please reach out to your
467+
* customer success manager for more information. • When called, this endpoint may generate the
468+
* &#x60;Audience Created&#x60; event in the [audit trail](/tag/Audit-Trail). Note: The
469+
* definition for an Audience created using the API is not editable through the Segment App. The
470+
* rate limit for this endpoint is 50 requests per minute, which is lower than the default due
471+
* to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP
472+
* status code with headers indicating the limit parameters. See [Rate
475473
* Limiting](/#tag/Rate-Limits) for more information.
476474
*
477475
* @param spaceId (required)
478-
* @param createAudienceBetaInput (required)
476+
* @param createAudienceInput (required)
479477
* @return ApiResponse&lt;CreateAudience200Response&gt;
480478
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
481479
* response body
@@ -489,27 +487,26 @@ public CreateAudience200Response createAudience(
489487
* </table>
490488
*/
491489
public ApiResponse<CreateAudience200Response> createAudienceWithHttpInfo(
492-
String spaceId, CreateAudienceBetaInput createAudienceBetaInput) throws ApiException {
490+
String spaceId, CreateAudienceInput createAudienceInput) throws ApiException {
493491
okhttp3.Call localVarCall =
494-
createAudienceValidateBeforeCall(spaceId, createAudienceBetaInput, null);
492+
createAudienceValidateBeforeCall(spaceId, createAudienceInput, null);
495493
Type localVarReturnType = new TypeToken<CreateAudience200Response>() {}.getType();
496494
return localVarApiClient.execute(localVarCall, localVarReturnType);
497495
}
498496

499497
/**
500-
* Create Audience (asynchronously) Creates Audience. • This endpoint is in **Beta** testing.
501-
* Please submit any feedback by sending an email to friends@segment.com. • In order to
502-
* successfully call this endpoint, the specified Workspace needs to have the Audience feature
503-
* enabled. Please reach out to your customer success manager for more information. • When
504-
* called, this endpoint may generate the &#x60;Audience Created&#x60; event in the [audit
505-
* trail](/tag/Audit-Trail). Note: The definition for an Audience created using the API is not
506-
* editable through the Segment App. The rate limit for this endpoint is 50 requests per minute,
507-
* which is lower than the default due to access pattern restrictions. Once reached, this
508-
* endpoint will respond with the 429 HTTP status code with headers indicating the limit
509-
* parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
498+
* Create Audience (asynchronously) Creates Audience. • In order to successfully call this
499+
* endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach
500+
* out to your customer success manager for more information. • When called, this endpoint may
501+
* generate the &#x60;Audience Created&#x60; event in the [audit trail](/tag/Audit-Trail). Note:
502+
* The definition for an Audience created using the API is not editable through the Segment App.
503+
* The rate limit for this endpoint is 50 requests per minute, which is lower than the default
504+
* due to access pattern restrictions. Once reached, this endpoint will respond with the 429
505+
* HTTP status code with headers indicating the limit parameters. See [Rate
506+
* Limiting](/#tag/Rate-Limits) for more information.
510507
*
511508
* @param spaceId (required)
512-
* @param createAudienceBetaInput (required)
509+
* @param createAudienceInput (required)
513510
* @param _callback The callback to be executed when the API call finishes
514511
* @return The request call
515512
* @throws ApiException If fail to process the API call, e.g. serializing the request body
@@ -525,12 +522,12 @@ public ApiResponse<CreateAudience200Response> createAudienceWithHttpInfo(
525522
*/
526523
public okhttp3.Call createAudienceAsync(
527524
String spaceId,
528-
CreateAudienceBetaInput createAudienceBetaInput,
525+
CreateAudienceInput createAudienceInput,
529526
final ApiCallback<CreateAudience200Response> _callback)
530527
throws ApiException {
531528

532529
okhttp3.Call localVarCall =
533-
createAudienceValidateBeforeCall(spaceId, createAudienceBetaInput, _callback);
530+
createAudienceValidateBeforeCall(spaceId, createAudienceInput, _callback);
534531
Type localVarReturnType = new TypeToken<CreateAudience200Response>() {}.getType();
535532
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
536533
return localVarCall;

0 commit comments

Comments
 (0)