Skip to content

Commit a0e5a59

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@478a3c7e.
1 parent 2ca1d5d commit a0e5a59

File tree

10 files changed

+784
-8
lines changed

10 files changed

+784
-8
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: 71.0.0
13+
Latest API and SDK version: 72.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>71.0.0</version>
31+
<version>72.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:71.0.0"
47+
implementation "com.segment.publicapi:segment-publicapi:72.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-71.0.0.jar`
61+
* `target/segment-publicapi-72.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-
71.0.0
1+
72.0.0

docs/ActivationsApi.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ All URIs are relative to *https://api.segmentapis.com*
1111
| [**listDestinationsFromAudience**](ActivationsApi.md#listDestinationsFromAudience) | **GET** /spaces/{spaceId}/audiences/{audienceId}/destination-connections | List Destinations from Audience |
1212
| [**listSupportedDestinationsFromAudience**](ActivationsApi.md#listSupportedDestinationsFromAudience) | **GET** /spaces/{spaceId}/audienceType/{audienceType}/supported-destinations | List Supported Destinations from Audience |
1313
| [**removeActivationFromAudience**](ActivationsApi.md#removeActivationFromAudience) | **DELETE** /spaces/{spaceId}/audiences/{audienceId}/activations/{id} | Remove Activation from Audience |
14+
| [**removeDestinationFromAudience**](ActivationsApi.md#removeDestinationFromAudience) | **DELETE** /spaces/{spaceId}/audiences/{audienceId}/destination-connections/{destinationId} | Remove Destination from Audience |
1415
| [**updateActivationForAudience**](ActivationsApi.md#updateActivationForAudience) | **PATCH** /spaces/{spaceId}/audiences/{audienceId}/activations/{id} | Update Activation for Audience |
1516

1617

@@ -558,6 +559,83 @@ public class Example {
558559
| **429** | Too many requests | - |
559560

560561

562+
## Operation: removeDestinationFromAudience
563+
564+
> RemoveDestinationFromAudience200Response removeDestinationFromAudience(spaceId, audienceId, destinationId)
565+
566+
Remove Destination from Audience
567+
568+
Removes a Destination from an Audience. If there are activations associated with the Destination, the request will return a 409 Conflict error. • 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 &#x60;Destination Removed from Audience&#x60; event in the [audit trail](/tag/Audit-Trail).
569+
570+
### Example
571+
572+
```java
573+
// Import classes:
574+
import com.segment.publicapi.ApiClient;
575+
import com.segment.publicapi.ApiException;
576+
import com.segment.publicapi.Configuration;
577+
import com.segment.publicapi.auth.*;
578+
import com.segment.publicapi.models.*;
579+
import com.segment.publicapi.api.ActivationsApi;
580+
581+
public class Example {
582+
public static void main(String[] args) {
583+
ApiClient defaultClient = Configuration.getDefaultApiClient();
584+
585+
// Configure HTTP bearer authorization: token
586+
HttpBearerAuth token = (HttpBearerAuth) defaultClient.getAuthentication("token");
587+
token.setBearerToken("BEARER TOKEN");
588+
589+
ActivationsApi apiInstance = new ActivationsApi(defaultClient);
590+
String spaceId = "spa_9aQ1Lj62S4bomZKLF4DPqW"; // String |
591+
String audienceId = "aud_0ujsszwN8NRY24YaXiTIE2VWDTS"; // String |
592+
String destinationId = "ii_123456789"; // String |
593+
try {
594+
RemoveDestinationFromAudience200Response result = apiInstance.removeDestinationFromAudience(spaceId, audienceId, destinationId);
595+
System.out.println(result);
596+
} catch (ApiException e) {
597+
System.err.println("Exception when calling ActivationsApi#removeDestinationFromAudience");
598+
System.err.println("Status code: " + e.getCode());
599+
System.err.println("Reason: " + e.getResponseBody());
600+
System.err.println("Response headers: " + e.getResponseHeaders());
601+
e.printStackTrace();
602+
}
603+
}
604+
}
605+
```
606+
607+
### Parameters
608+
609+
610+
| Name | Type | Description | Notes |
611+
|------------- | ------------- | ------------- | -------------|
612+
| **spaceId** | **String**| | |
613+
| **audienceId** | **String**| | |
614+
| **destinationId** | **String**| | |
615+
616+
### Return type
617+
618+
[**RemoveDestinationFromAudience200Response**](RemoveDestinationFromAudience200Response.md)
619+
620+
### Authorization
621+
622+
[token](../README.md#token)
623+
624+
### HTTP request headers
625+
626+
- **Content-Type**: Not defined
627+
- **Accept**: application/vnd.segment.v1alpha+json, application/json
628+
629+
630+
### HTTP response details
631+
| Status code | Description | Response headers |
632+
|-------------|-------------|------------------|
633+
| **200** | OK | - |
634+
| **404** | Resource not found | - |
635+
| **422** | Validation failure | - |
636+
| **429** | Too many requests | - |
637+
638+
561639
## Operation: updateActivationForAudience
562640

563641
> UpdateActivationForAudience200Response updateActivationForAudience(spaceId, audienceId, id, updateActivationForAudienceAlphaInput)

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>71.0.0</version>
8+
<version>72.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 71.0.0 (Java)");
126+
setUserAgent("Public API SDK 72.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 = "71.0.0";
15+
public static final String VERSION = "72.0.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
@@ -1502,6 +1502,12 @@ private static Class getClassByDiscriminator(
15021502
gsonBuilder.registerTypeAdapterFactory(
15031503
new com.segment.publicapi.models.RemoveComputedTraitFromSpaceAlphaOutput
15041504
.CustomTypeAdapterFactory());
1505+
gsonBuilder.registerTypeAdapterFactory(
1506+
new com.segment.publicapi.models.RemoveDestinationFromAudience200Response
1507+
.CustomTypeAdapterFactory());
1508+
gsonBuilder.registerTypeAdapterFactory(
1509+
new com.segment.publicapi.models.RemoveDestinationFromAudienceAlphaOutput
1510+
.CustomTypeAdapterFactory());
15051511
gsonBuilder.registerTypeAdapterFactory(
15061512
new com.segment.publicapi.models.RemoveFilterFromDestination200Response
15071513
.CustomTypeAdapterFactory());

0 commit comments

Comments
 (0)