Skip to content

Commit 0ae7b2c

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@468a31d2.
1 parent e9b468d commit 0ae7b2c

File tree

9 files changed

+782
-7
lines changed

9 files changed

+782
-7
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: 60.0.0
13+
Latest API and SDK version: 60.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>60.0.0</version>
31+
<version>60.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:60.0.0"
47+
implementation "com.segment.publicapi:segment-publicapi:60.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-60.0.0.jar`
61+
* `target/segment-publicapi-60.1.0.jar`
6262
* `target/lib/*.jar`
6363

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

docs/AudiencesApi.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ All URIs are relative to *https://api.segmentapis.com*
1515
| [**listAudienceSchedulesFromSpaceAndAudience**](AudiencesApi.md#listAudienceSchedulesFromSpaceAndAudience) | **GET** /spaces/{spaceId}/audiences/{id}/schedules | List Audience Schedules from Space And Audience |
1616
| [**listAudiences**](AudiencesApi.md#listAudiences) | **GET** /spaces/{spaceId}/audiences | List Audiences |
1717
| [**removeAudienceFromSpace**](AudiencesApi.md#removeAudienceFromSpace) | **DELETE** /spaces/{spaceId}/audiences/{id} | Remove Audience from Space |
18+
| [**removeAudienceScheduleFromAudience**](AudiencesApi.md#removeAudienceScheduleFromAudience) | **DELETE** /spaces/{spaceId}/audiences/{id}/schedules/{scheduleId} | Remove Audience Schedule from Audience |
1819
| [**updateAudienceForSpace**](AudiencesApi.md#updateAudienceForSpace) | **PATCH** /spaces/{spaceId}/audiences/{id} | Update Audience for Space |
1920
| [**updateAudienceScheduleForAudience**](AudiencesApi.md#updateAudienceScheduleForAudience) | **PATCH** /spaces/{spaceId}/audiences/{id}/schedules/{scheduleId} | Update Audience Schedule for Audience |
2021

@@ -861,6 +862,83 @@ public class Example {
861862
| **429** | Too many requests | - |
862863

863864

865+
## Operation: removeAudienceScheduleFromAudience
866+
867+
> RemoveAudienceScheduleFromAudience200Response removeAudienceScheduleFromAudience(spaceId, id, scheduleId)
868+
869+
Remove Audience Schedule from Audience
870+
871+
Deletes an audience schedule for a Linked Audience (audienceType &#x3D; LINKED). • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to [email protected]. • 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.
872+
873+
### Example
874+
875+
```java
876+
// Import classes:
877+
import com.segment.publicapi.ApiClient;
878+
import com.segment.publicapi.ApiException;
879+
import com.segment.publicapi.Configuration;
880+
import com.segment.publicapi.auth.*;
881+
import com.segment.publicapi.models.*;
882+
import com.segment.publicapi.api.AudiencesApi;
883+
884+
public class Example {
885+
public static void main(String[] args) {
886+
ApiClient defaultClient = Configuration.getDefaultApiClient();
887+
888+
// Configure HTTP bearer authorization: token
889+
HttpBearerAuth token = (HttpBearerAuth) defaultClient.getAuthentication("token");
890+
token.setBearerToken("BEARER TOKEN");
891+
892+
AudiencesApi apiInstance = new AudiencesApi(defaultClient);
893+
String spaceId = "9aQ1Lj62S4bomZKLF4DPqW"; // String |
894+
String id = "aud_0ujsszwN8NRY24YaXiTIE2VWDTS"; // String |
895+
String scheduleId = "sch_0ujsszwN8NRY24YaXiTIE2VWDTS"; // String |
896+
try {
897+
RemoveAudienceScheduleFromAudience200Response result = apiInstance.removeAudienceScheduleFromAudience(spaceId, id, scheduleId);
898+
System.out.println(result);
899+
} catch (ApiException e) {
900+
System.err.println("Exception when calling AudiencesApi#removeAudienceScheduleFromAudience");
901+
System.err.println("Status code: " + e.getCode());
902+
System.err.println("Reason: " + e.getResponseBody());
903+
System.err.println("Response headers: " + e.getResponseHeaders());
904+
e.printStackTrace();
905+
}
906+
}
907+
}
908+
```
909+
910+
### Parameters
911+
912+
913+
| Name | Type | Description | Notes |
914+
|------------- | ------------- | ------------- | -------------|
915+
| **spaceId** | **String**| | |
916+
| **id** | **String**| | |
917+
| **scheduleId** | **String**| | |
918+
919+
### Return type
920+
921+
[**RemoveAudienceScheduleFromAudience200Response**](RemoveAudienceScheduleFromAudience200Response.md)
922+
923+
### Authorization
924+
925+
[token](../README.md#token)
926+
927+
### HTTP request headers
928+
929+
- **Content-Type**: Not defined
930+
- **Accept**: application/vnd.segment.v1alpha+json, application/json
931+
932+
933+
### HTTP response details
934+
| Status code | Description | Response headers |
935+
|-------------|-------------|------------------|
936+
| **200** | OK | - |
937+
| **404** | Resource not found | - |
938+
| **422** | Validation failure | - |
939+
| **429** | Too many requests | - |
940+
941+
864942
## Operation: updateAudienceForSpace
865943

866944
> UpdateAudienceForSpace200Response updateAudienceForSpace(spaceId, id, updateAudienceForSpaceBetaInput)

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

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

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,12 @@ private static Class getClassByDiscriminator(
14191419
gsonBuilder.registerTypeAdapterFactory(
14201420
new com.segment.publicapi.models.RemoveAudienceFromSpaceBetaOutput
14211421
.CustomTypeAdapterFactory());
1422+
gsonBuilder.registerTypeAdapterFactory(
1423+
new com.segment.publicapi.models.RemoveAudienceScheduleFromAudience200Response
1424+
.CustomTypeAdapterFactory());
1425+
gsonBuilder.registerTypeAdapterFactory(
1426+
new com.segment.publicapi.models.RemoveAudienceScheduleFromAudienceAlphaOutput
1427+
.CustomTypeAdapterFactory());
14221428
gsonBuilder.registerTypeAdapterFactory(
14231429
new com.segment.publicapi.models.RemoveComputedTraitFromSpace200Response
14241430
.CustomTypeAdapterFactory());

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

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import com.segment.publicapi.models.ListAudiencesPaginationInput;
3737
import com.segment.publicapi.models.PaginationInput;
3838
import com.segment.publicapi.models.RemoveAudienceFromSpace200Response;
39+
import com.segment.publicapi.models.RemoveAudienceScheduleFromAudience200Response;
3940
import com.segment.publicapi.models.UpdateAudienceForSpace200Response;
4041
import com.segment.publicapi.models.UpdateAudienceForSpaceBetaInput;
4142
import com.segment.publicapi.models.UpdateAudienceScheduleForAudience200Response;
@@ -2473,6 +2474,217 @@ public okhttp3.Call removeAudienceFromSpaceAsync(
24732474
return localVarCall;
24742475
}
24752476

2477+
/**
2478+
* Build call for removeAudienceScheduleFromAudience
2479+
*
2480+
* @param spaceId (required)
2481+
* @param id (required)
2482+
* @param scheduleId (required)
2483+
* @param _callback Callback for upload/download progress
2484+
* @return Call to execute
2485+
* @throws ApiException If fail to serialize the request body object
2486+
* @http.response.details
2487+
* <table summary="Response Details" border="1">
2488+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
2489+
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
2490+
* <tr><td> 404 </td><td> Resource not found </td><td> - </td></tr>
2491+
* <tr><td> 422 </td><td> Validation failure </td><td> - </td></tr>
2492+
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
2493+
* </table>
2494+
*/
2495+
public okhttp3.Call removeAudienceScheduleFromAudienceCall(
2496+
String spaceId, String id, String scheduleId, final ApiCallback _callback)
2497+
throws ApiException {
2498+
String basePath = null;
2499+
// Operation Servers
2500+
String[] localBasePaths = new String[] {};
2501+
2502+
// Determine Base Path to Use
2503+
if (localCustomBaseUrl != null) {
2504+
basePath = localCustomBaseUrl;
2505+
} else if (localBasePaths.length > 0) {
2506+
basePath = localBasePaths[localHostIndex];
2507+
} else {
2508+
basePath = null;
2509+
}
2510+
2511+
Object localVarPostBody = null;
2512+
2513+
// create path and map variables
2514+
String localVarPath =
2515+
"/spaces/{spaceId}/audiences/{id}/schedules/{scheduleId}"
2516+
.replace(
2517+
"{" + "spaceId" + "}",
2518+
localVarApiClient.escapeString(spaceId.toString()))
2519+
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()))
2520+
.replace(
2521+
"{" + "scheduleId" + "}",
2522+
localVarApiClient.escapeString(scheduleId.toString()));
2523+
2524+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
2525+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
2526+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
2527+
Map<String, String> localVarCookieParams = new HashMap<String, String>();
2528+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
2529+
2530+
final String[] localVarAccepts = {
2531+
"application/vnd.segment.v1alpha+json", "application/json"
2532+
};
2533+
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
2534+
if (localVarAccept != null) {
2535+
localVarHeaderParams.put("Accept", localVarAccept);
2536+
}
2537+
2538+
final String[] localVarContentTypes = {};
2539+
final String localVarContentType =
2540+
localVarApiClient.selectHeaderContentType(localVarContentTypes);
2541+
if (localVarContentType != null) {
2542+
localVarHeaderParams.put("Content-Type", localVarContentType);
2543+
}
2544+
2545+
String[] localVarAuthNames = new String[] {"token"};
2546+
return localVarApiClient.buildCall(
2547+
basePath,
2548+
localVarPath,
2549+
"DELETE",
2550+
localVarQueryParams,
2551+
localVarCollectionQueryParams,
2552+
localVarPostBody,
2553+
localVarHeaderParams,
2554+
localVarCookieParams,
2555+
localVarFormParams,
2556+
localVarAuthNames,
2557+
_callback);
2558+
}
2559+
2560+
@SuppressWarnings("rawtypes")
2561+
private okhttp3.Call removeAudienceScheduleFromAudienceValidateBeforeCall(
2562+
String spaceId, String id, String scheduleId, final ApiCallback _callback)
2563+
throws ApiException {
2564+
// verify the required parameter 'spaceId' is set
2565+
if (spaceId == null) {
2566+
throw new ApiException(
2567+
"Missing the required parameter 'spaceId' when calling"
2568+
+ " removeAudienceScheduleFromAudience(Async)");
2569+
}
2570+
2571+
// verify the required parameter 'id' is set
2572+
if (id == null) {
2573+
throw new ApiException(
2574+
"Missing the required parameter 'id' when calling"
2575+
+ " removeAudienceScheduleFromAudience(Async)");
2576+
}
2577+
2578+
// verify the required parameter 'scheduleId' is set
2579+
if (scheduleId == null) {
2580+
throw new ApiException(
2581+
"Missing the required parameter 'scheduleId' when calling"
2582+
+ " removeAudienceScheduleFromAudience(Async)");
2583+
}
2584+
2585+
return removeAudienceScheduleFromAudienceCall(spaceId, id, scheduleId, _callback);
2586+
}
2587+
2588+
/**
2589+
* Remove Audience Schedule from Audience Deletes an audience schedule for a Linked Audience
2590+
* (audienceType &#x3D; LINKED). • This endpoint is in **Alpha** testing. Please submit any
2591+
* feedback by sending an email to [email protected]. • In order to successfully call this
2592+
* endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach
2593+
* out to your customer success manager for more information.
2594+
*
2595+
* @param spaceId (required)
2596+
* @param id (required)
2597+
* @param scheduleId (required)
2598+
* @return RemoveAudienceScheduleFromAudience200Response
2599+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
2600+
* response body
2601+
* @http.response.details
2602+
* <table summary="Response Details" border="1">
2603+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
2604+
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
2605+
* <tr><td> 404 </td><td> Resource not found </td><td> - </td></tr>
2606+
* <tr><td> 422 </td><td> Validation failure </td><td> - </td></tr>
2607+
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
2608+
* </table>
2609+
*/
2610+
public RemoveAudienceScheduleFromAudience200Response removeAudienceScheduleFromAudience(
2611+
String spaceId, String id, String scheduleId) throws ApiException {
2612+
ApiResponse<RemoveAudienceScheduleFromAudience200Response> localVarResp =
2613+
removeAudienceScheduleFromAudienceWithHttpInfo(spaceId, id, scheduleId);
2614+
return localVarResp.getData();
2615+
}
2616+
2617+
/**
2618+
* Remove Audience Schedule from Audience Deletes an audience schedule for a Linked Audience
2619+
* (audienceType &#x3D; LINKED). • This endpoint is in **Alpha** testing. Please submit any
2620+
* feedback by sending an email to [email protected]. • In order to successfully call this
2621+
* endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach
2622+
* out to your customer success manager for more information.
2623+
*
2624+
* @param spaceId (required)
2625+
* @param id (required)
2626+
* @param scheduleId (required)
2627+
* @return ApiResponse&lt;RemoveAudienceScheduleFromAudience200Response&gt;
2628+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
2629+
* response body
2630+
* @http.response.details
2631+
* <table summary="Response Details" border="1">
2632+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
2633+
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
2634+
* <tr><td> 404 </td><td> Resource not found </td><td> - </td></tr>
2635+
* <tr><td> 422 </td><td> Validation failure </td><td> - </td></tr>
2636+
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
2637+
* </table>
2638+
*/
2639+
public ApiResponse<RemoveAudienceScheduleFromAudience200Response>
2640+
removeAudienceScheduleFromAudienceWithHttpInfo(
2641+
String spaceId, String id, String scheduleId) throws ApiException {
2642+
okhttp3.Call localVarCall =
2643+
removeAudienceScheduleFromAudienceValidateBeforeCall(spaceId, id, scheduleId, null);
2644+
Type localVarReturnType =
2645+
new TypeToken<RemoveAudienceScheduleFromAudience200Response>() {}.getType();
2646+
return localVarApiClient.execute(localVarCall, localVarReturnType);
2647+
}
2648+
2649+
/**
2650+
* Remove Audience Schedule from Audience (asynchronously) Deletes an audience schedule for a
2651+
* Linked Audience (audienceType &#x3D; LINKED). • This endpoint is in **Alpha** testing. Please
2652+
* submit any feedback by sending an email to [email protected]. • In order to successfully
2653+
* call this endpoint, the specified Workspace needs to have the Audience feature enabled.
2654+
* Please reach out to your customer success manager for more information.
2655+
*
2656+
* @param spaceId (required)
2657+
* @param id (required)
2658+
* @param scheduleId (required)
2659+
* @param _callback The callback to be executed when the API call finishes
2660+
* @return The request call
2661+
* @throws ApiException If fail to process the API call, e.g. serializing the request body
2662+
* object
2663+
* @http.response.details
2664+
* <table summary="Response Details" border="1">
2665+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
2666+
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
2667+
* <tr><td> 404 </td><td> Resource not found </td><td> - </td></tr>
2668+
* <tr><td> 422 </td><td> Validation failure </td><td> - </td></tr>
2669+
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
2670+
* </table>
2671+
*/
2672+
public okhttp3.Call removeAudienceScheduleFromAudienceAsync(
2673+
String spaceId,
2674+
String id,
2675+
String scheduleId,
2676+
final ApiCallback<RemoveAudienceScheduleFromAudience200Response> _callback)
2677+
throws ApiException {
2678+
2679+
okhttp3.Call localVarCall =
2680+
removeAudienceScheduleFromAudienceValidateBeforeCall(
2681+
spaceId, id, scheduleId, _callback);
2682+
Type localVarReturnType =
2683+
new TypeToken<RemoveAudienceScheduleFromAudience200Response>() {}.getType();
2684+
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
2685+
return localVarCall;
2686+
}
2687+
24762688
/**
24772689
* Build call for updateAudienceForSpace
24782690
*

0 commit comments

Comments
 (0)