Skip to content

Commit 7b6d278

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 4bcd34f commit 7b6d278

File tree

725 files changed

+1125
-728
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

725 files changed

+1125
-728
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ See the next sections for more information on how to use the Segment Public API.
1111

1212
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
1313

14-
- API version: 71.0.0
15-
- Package version: 71.0.0
14+
- API version: 72.0.0
15+
- Package version: 72.0.0
1616
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1717

1818
For more information, please visit [https://docs.segmentapis.com](https://docs.segmentapis.com)

docs/ActivationsApi.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Method | HTTP request | Description
1111
[**list_destinations_from_audience**](ActivationsApi.md#list_destinations_from_audience) | **GET** /spaces/{spaceId}/audiences/{audienceId}/destination-connections | List Destinations from Audience
1212
[**list_supported_destinations_from_audience**](ActivationsApi.md#list_supported_destinations_from_audience) | **GET** /spaces/{spaceId}/audienceType/{audienceType}/supported-destinations | List Supported Destinations from Audience
1313
[**remove_activation_from_audience**](ActivationsApi.md#remove_activation_from_audience) | **DELETE** /spaces/{spaceId}/audiences/{audienceId}/activations/{id} | Remove Activation from Audience
14+
[**remove_destination_from_audience**](ActivationsApi.md#remove_destination_from_audience) | **DELETE** /spaces/{spaceId}/audiences/{audienceId}/destination-connections/{destinationId} | Remove Destination from Audience
1415
[**update_activation_for_audience**](ActivationsApi.md#update_activation_for_audience) | **PATCH** /spaces/{spaceId}/audiences/{audienceId}/activations/{id} | Update Activation for Audience
1516

1617

@@ -562,6 +563,83 @@ Name | Type | Description | Notes
562563
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
563564

564565

566+
## Operation: remove_destination_from_audience
567+
568+
> RemoveDestinationFromAudience200Response remove_destination_from_audience(space_id, audience_id, destination_id)
569+
570+
Remove Destination from Audience
571+
572+
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 `Destination Removed from Audience` event in the [audit trail](/tag/Audit-Trail).
573+
574+
### Example
575+
576+
* Bearer Authentication (token):
577+
```python
578+
import time
579+
import os
580+
import segment_public_api
581+
from segment_public_api.models.remove_destination_from_audience200_response import RemoveDestinationFromAudience200Response
582+
from segment_public_api.rest import ApiException
583+
from pprint import pprint
584+
585+
586+
587+
# Configure Bearer authorization: token
588+
configuration = segment_public_api.Configuration(
589+
access_token = os.environ["BEARER_TOKEN"]
590+
)
591+
592+
# Enter a context with an instance of the API client
593+
with segment_public_api.ApiClient(configuration) as api_client:
594+
# Create an instance of the API class
595+
api_instance = segment_public_api.ActivationsApi(api_client)
596+
space_id = 'spa_9aQ1Lj62S4bomZKLF4DPqW' # str |
597+
audience_id = 'aud_0ujsszwN8NRY24YaXiTIE2VWDTS' # str |
598+
destination_id = 'ii_123456789' # str |
599+
600+
try:
601+
# Remove Destination from Audience
602+
api_response = api_instance.remove_destination_from_audience(space_id, audience_id, destination_id)
603+
print("The response of ActivationsApi->remove_destination_from_audience:\n")
604+
pprint(api_response)
605+
except Exception as e:
606+
print("Exception when calling ActivationsApi->remove_destination_from_audience: %s\n" % e)
607+
```
608+
609+
610+
611+
### Parameters
612+
613+
Name | Type | Description | Notes
614+
------------- | ------------- | ------------- | -------------
615+
**space_id** | **str**| |
616+
**audience_id** | **str**| |
617+
**destination_id** | **str**| |
618+
619+
### Return type
620+
621+
[**RemoveDestinationFromAudience200Response**](RemoveDestinationFromAudience200Response.md)
622+
623+
### Authorization
624+
625+
[token](../README.md#token)
626+
627+
### HTTP request headers
628+
629+
- **Content-Type**: Not defined
630+
- **Accept**: application/vnd.segment.v1alpha+json, application/json
631+
632+
### HTTP response details
633+
| Status code | Description | Response headers |
634+
|-------------|-------------|------------------|
635+
**200** | OK | - |
636+
**404** | Resource not found | - |
637+
**422** | Validation failure | - |
638+
**429** | Too many requests | - |
639+
640+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
641+
642+
565643
## Operation: update_activation_for_audience
566644

567645
> UpdateActivationForAudience200Response update_activation_for_audience(space_id, audience_id, id, update_activation_for_audience_alpha_input)

segment_public_api/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
88
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
99
10-
The version of the OpenAPI document: 71.0.0
10+
The version of the OpenAPI document: 72.0.0
1111
Contact: friends@segment.com
1212
Generated by OpenAPI Generator (https://openapi-generator.tech)
1313
1414
Do not edit the class manually.
1515
""" # noqa: E501
1616

1717

18-
__version__ = "71.0.0"
18+
__version__ = "72.0.0"
1919

2020
# import apis into sdk package
2121
from segment_public_api.api.api_calls_api import APICallsApi
@@ -573,6 +573,8 @@
573573
from segment_public_api.models.remove_audience_schedule_from_audience_output import RemoveAudienceScheduleFromAudienceOutput
574574
from segment_public_api.models.remove_computed_trait_from_space200_response import RemoveComputedTraitFromSpace200Response
575575
from segment_public_api.models.remove_computed_trait_from_space_alpha_output import RemoveComputedTraitFromSpaceAlphaOutput
576+
from segment_public_api.models.remove_destination_from_audience200_response import RemoveDestinationFromAudience200Response
577+
from segment_public_api.models.remove_destination_from_audience_alpha_output import RemoveDestinationFromAudienceAlphaOutput
576578
from segment_public_api.models.remove_filter_from_destination200_response import RemoveFilterFromDestination200Response
577579
from segment_public_api.models.remove_filter_from_destination_v1_output import RemoveFilterFromDestinationV1Output
578580
from segment_public_api.models.remove_profiles_warehouse_from_space200_response import RemoveProfilesWarehouseFromSpace200Response

segment_public_api/api/activations_api.py

Lines changed: 161 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
77
8-
The version of the OpenAPI document: 71.0.0
8+
The version of the OpenAPI document: 72.0.0
99
Contact: friends@segment.com
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
@@ -34,6 +34,7 @@
3434
from segment_public_api.models.list_supported_destinations_from_audience200_response import ListSupportedDestinationsFromAudience200Response
3535
from segment_public_api.models.pagination_input import PaginationInput
3636
from segment_public_api.models.remove_activation_from_audience200_response import RemoveActivationFromAudience200Response
37+
from segment_public_api.models.remove_destination_from_audience200_response import RemoveDestinationFromAudience200Response
3738
from segment_public_api.models.update_activation_for_audience200_response import UpdateActivationForAudience200Response
3839
from segment_public_api.models.update_activation_for_audience_alpha_input import UpdateActivationForAudienceAlphaInput
3940

@@ -1200,6 +1201,165 @@ def remove_activation_from_audience_with_http_info(self, space_id : constr(stric
12001201
collection_formats=_collection_formats,
12011202
_request_auth=_params.get('_request_auth'))
12021203

1204+
@validate_arguments
1205+
def remove_destination_from_audience(self, space_id : constr(strict=True), audience_id : constr(strict=True), destination_id : constr(strict=True), **kwargs) -> RemoveDestinationFromAudience200Response: # noqa: E501
1206+
"""Remove Destination from Audience # noqa: E501
1207+
1208+
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 `Destination Removed from Audience` event in the [audit trail](/tag/Audit-Trail). # noqa: E501
1209+
This method makes a synchronous HTTP request by default. To make an
1210+
asynchronous HTTP request, please pass async_req=True
1211+
1212+
>>> thread = api.remove_destination_from_audience(space_id, audience_id, destination_id, async_req=True)
1213+
>>> result = thread.get()
1214+
1215+
:param space_id: (required)
1216+
:type space_id: str
1217+
:param audience_id: (required)
1218+
:type audience_id: str
1219+
:param destination_id: (required)
1220+
:type destination_id: str
1221+
:param async_req: Whether to execute the request asynchronously.
1222+
:type async_req: bool, optional
1223+
:param _request_timeout: timeout setting for this request.
1224+
If one number provided, it will be total request
1225+
timeout. It can also be a pair (tuple) of
1226+
(connection, read) timeouts.
1227+
:return: Returns the result object.
1228+
If the method is called asynchronously,
1229+
returns the request thread.
1230+
:rtype: RemoveDestinationFromAudience200Response
1231+
"""
1232+
kwargs['_return_http_data_only'] = True
1233+
if '_preload_content' in kwargs:
1234+
message = "Error! Please call the remove_destination_from_audience_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
1235+
raise ValueError(message)
1236+
return self.remove_destination_from_audience_with_http_info(space_id, audience_id, destination_id, **kwargs) # noqa: E501
1237+
1238+
@validate_arguments
1239+
def remove_destination_from_audience_with_http_info(self, space_id : constr(strict=True), audience_id : constr(strict=True), destination_id : constr(strict=True), **kwargs) -> ApiResponse: # noqa: E501
1240+
"""Remove Destination from Audience # noqa: E501
1241+
1242+
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 `Destination Removed from Audience` event in the [audit trail](/tag/Audit-Trail). # noqa: E501
1243+
This method makes a synchronous HTTP request by default. To make an
1244+
asynchronous HTTP request, please pass async_req=True
1245+
1246+
>>> thread = api.remove_destination_from_audience_with_http_info(space_id, audience_id, destination_id, async_req=True)
1247+
>>> result = thread.get()
1248+
1249+
:param space_id: (required)
1250+
:type space_id: str
1251+
:param audience_id: (required)
1252+
:type audience_id: str
1253+
:param destination_id: (required)
1254+
:type destination_id: str
1255+
:param async_req: Whether to execute the request asynchronously.
1256+
:type async_req: bool, optional
1257+
:param _preload_content: if False, the ApiResponse.data will
1258+
be set to none and raw_data will store the
1259+
HTTP response body without reading/decoding.
1260+
Default is True.
1261+
:type _preload_content: bool, optional
1262+
:param _return_http_data_only: response data instead of ApiResponse
1263+
object with status code, headers, etc
1264+
:type _return_http_data_only: bool, optional
1265+
:param _request_timeout: timeout setting for this request. If one
1266+
number provided, it will be total request
1267+
timeout. It can also be a pair (tuple) of
1268+
(connection, read) timeouts.
1269+
:param _request_auth: set to override the auth_settings for an a single
1270+
request; this effectively ignores the authentication
1271+
in the spec for a single request.
1272+
:type _request_auth: dict, optional
1273+
:type _content_type: string, optional: force content-type for the request
1274+
:return: Returns the result object.
1275+
If the method is called asynchronously,
1276+
returns the request thread.
1277+
:rtype: tuple(RemoveDestinationFromAudience200Response, status_code(int), headers(HTTPHeaderDict))
1278+
"""
1279+
1280+
_params = locals()
1281+
1282+
_all_params = [
1283+
'space_id',
1284+
'audience_id',
1285+
'destination_id'
1286+
]
1287+
_all_params.extend(
1288+
[
1289+
'async_req',
1290+
'_return_http_data_only',
1291+
'_preload_content',
1292+
'_request_timeout',
1293+
'_request_auth',
1294+
'_content_type',
1295+
'_headers'
1296+
]
1297+
)
1298+
1299+
# validate the arguments
1300+
for _key, _val in _params['kwargs'].items():
1301+
if _key not in _all_params:
1302+
raise ApiTypeError(
1303+
"Got an unexpected keyword argument '%s'"
1304+
" to method remove_destination_from_audience" % _key
1305+
)
1306+
_params[_key] = _val
1307+
del _params['kwargs']
1308+
1309+
_collection_formats = {}
1310+
1311+
# process the path parameters
1312+
_path_params = {}
1313+
if _params['space_id']:
1314+
_path_params['spaceId'] = _params['space_id']
1315+
1316+
if _params['audience_id']:
1317+
_path_params['audienceId'] = _params['audience_id']
1318+
1319+
if _params['destination_id']:
1320+
_path_params['destinationId'] = _params['destination_id']
1321+
1322+
1323+
# process the query parameters
1324+
_query_params = []
1325+
# process the header parameters
1326+
_header_params = dict(_params.get('_headers', {}))
1327+
# process the form parameters
1328+
_form_params = []
1329+
_files = {}
1330+
# process the body parameter
1331+
_body_params = None
1332+
# set the HTTP header `Accept`
1333+
_header_params['Accept'] = self.api_client.select_header_accept(
1334+
['application/vnd.segment.v1alpha+json', 'application/json']) # noqa: E501
1335+
1336+
# authentication setting
1337+
_auth_settings = ['token'] # noqa: E501
1338+
1339+
_response_types_map = {
1340+
'200': "RemoveDestinationFromAudience200Response",
1341+
'404': "RequestErrorEnvelope",
1342+
'422': "RequestErrorEnvelope",
1343+
'429': "RequestErrorEnvelope",
1344+
}
1345+
1346+
return self.api_client.call_api(
1347+
'/spaces/{spaceId}/audiences/{audienceId}/destination-connections/{destinationId}', 'DELETE',
1348+
_path_params,
1349+
_query_params,
1350+
_header_params,
1351+
body=_body_params,
1352+
post_params=_form_params,
1353+
files=_files,
1354+
response_types_map=_response_types_map,
1355+
auth_settings=_auth_settings,
1356+
async_req=_params.get('async_req'),
1357+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
1358+
_preload_content=_params.get('_preload_content', True),
1359+
_request_timeout=_params.get('_request_timeout'),
1360+
collection_formats=_collection_formats,
1361+
_request_auth=_params.get('_request_auth'))
1362+
12031363
@validate_arguments
12041364
def update_activation_for_audience(self, space_id : constr(strict=True), audience_id : constr(strict=True), id : constr(strict=True), update_activation_for_audience_alpha_input : UpdateActivationForAudienceAlphaInput, **kwargs) -> UpdateActivationForAudience200Response: # noqa: E501
12051365
"""Update Activation for Audience # noqa: E501

segment_public_api/api/api_calls_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
77
8-
The version of the OpenAPI document: 71.0.0
8+
The version of the OpenAPI document: 72.0.0
99
Contact: friends@segment.com
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

segment_public_api/api/audiences_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
77
8-
The version of the OpenAPI document: 71.0.0
8+
The version of the OpenAPI document: 72.0.0
99
Contact: friends@segment.com
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

segment_public_api/api/audit_trail_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
77
8-
The version of the OpenAPI document: 71.0.0
8+
The version of the OpenAPI document: 72.0.0
99
Contact: friends@segment.com
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

0 commit comments

Comments
 (0)