Skip to content

Commit e99a059

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@675319cb.
1 parent 930573a commit e99a059

File tree

684 files changed

+1191
-686
lines changed

Some content is hidden

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

684 files changed

+1191
-686
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: 59.4.0
15-
- Package version: 59.4.0
14+
- API version: 59.5.0
15+
- Package version: 59.5.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/AudiencesApi.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Method | HTTP request | Description
1515
[**list_audiences**](AudiencesApi.md#list_audiences) | **GET** /spaces/{spaceId}/audiences | List Audiences
1616
[**remove_audience_from_space**](AudiencesApi.md#remove_audience_from_space) | **DELETE** /spaces/{spaceId}/audiences/{id} | Remove Audience from Space
1717
[**update_audience_for_space**](AudiencesApi.md#update_audience_for_space) | **PATCH** /spaces/{spaceId}/audiences/{id} | Update Audience for Space
18+
[**update_audience_schedule_for_audience**](AudiencesApi.md#update_audience_schedule_for_audience) | **PATCH** /spaces/{spaceId}/audiences/{id}/schedules/{scheduleId} | Update Audience Schedule for Audience
1819

1920

2021

@@ -869,3 +870,83 @@ Name | Type | Description | Notes
869870

870871
[[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)
871872

873+
874+
## Operation: update_audience_schedule_for_audience
875+
876+
> UpdateAudienceScheduleForAudience200Response update_audience_schedule_for_audience(space_id, id, schedule_id, update_audience_schedule_for_audience_alpha_input)
877+
878+
Update Audience Schedule for Audience
879+
880+
Updates an audience schedule for a Linked Audience (audienceType = 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.
881+
882+
### Example
883+
884+
* Bearer Authentication (token):
885+
```python
886+
import time
887+
import os
888+
import segment_public_api
889+
from segment_public_api.models.update_audience_schedule_for_audience200_response import UpdateAudienceScheduleForAudience200Response
890+
from segment_public_api.models.update_audience_schedule_for_audience_alpha_input import UpdateAudienceScheduleForAudienceAlphaInput
891+
from segment_public_api.rest import ApiException
892+
from pprint import pprint
893+
894+
895+
896+
# Configure Bearer authorization: token
897+
configuration = segment_public_api.Configuration(
898+
access_token = os.environ["BEARER_TOKEN"]
899+
)
900+
901+
# Enter a context with an instance of the API client
902+
with segment_public_api.ApiClient(configuration) as api_client:
903+
# Create an instance of the API class
904+
api_instance = segment_public_api.AudiencesApi(api_client)
905+
space_id = '9aQ1Lj62S4bomZKLF4DPqW' # str |
906+
id = 'aud_0ujsszwN8NRY24YaXiTIE2VWDTS' # str |
907+
schedule_id = 'sch_0ujsszwN8NRY24YaXiTIE2VWDTS' # str |
908+
update_audience_schedule_for_audience_alpha_input = {"strategy":"SPECIFIC_DAYS","config":{"days":[1,3,4],"hours":[9,16],"timezone":"America/New_York"}} # UpdateAudienceScheduleForAudienceAlphaInput |
909+
910+
try:
911+
# Update Audience Schedule for Audience
912+
api_response = api_instance.update_audience_schedule_for_audience(space_id, id, schedule_id, update_audience_schedule_for_audience_alpha_input)
913+
print("The response of AudiencesApi->update_audience_schedule_for_audience:\n")
914+
pprint(api_response)
915+
except Exception as e:
916+
print("Exception when calling AudiencesApi->update_audience_schedule_for_audience: %s\n" % e)
917+
```
918+
919+
920+
921+
### Parameters
922+
923+
Name | Type | Description | Notes
924+
------------- | ------------- | ------------- | -------------
925+
**space_id** | **str**| |
926+
**id** | **str**| |
927+
**schedule_id** | **str**| |
928+
**update_audience_schedule_for_audience_alpha_input** | [**UpdateAudienceScheduleForAudienceAlphaInput**](UpdateAudienceScheduleForAudienceAlphaInput.md)| |
929+
930+
### Return type
931+
932+
[**UpdateAudienceScheduleForAudience200Response**](UpdateAudienceScheduleForAudience200Response.md)
933+
934+
### Authorization
935+
936+
[token](../README.md#token)
937+
938+
### HTTP request headers
939+
940+
- **Content-Type**: application/vnd.segment.v1alpha+json
941+
- **Accept**: application/vnd.segment.v1alpha+json, application/json
942+
943+
### HTTP response details
944+
| Status code | Description | Response headers |
945+
|-------------|-------------|------------------|
946+
**200** | OK | - |
947+
**404** | Resource not found | - |
948+
**422** | Validation failure | - |
949+
**429** | Too many requests | - |
950+
951+
[[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)
952+

segment_public_api/__init__.py

Lines changed: 5 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: 59.4.0
10+
The version of the OpenAPI document: 59.5.0
1111
1212
Generated by OpenAPI Generator (https://openapi-generator.tech)
1313
1414
Do not edit the class manually.
1515
""" # noqa: E501
1616

1717

18-
__version__ = "59.4.0"
18+
__version__ = "59.5.0"
1919

2020
# import apis into sdk package
2121
from segment_public_api.api.api_calls_api import APICallsApi
@@ -632,6 +632,9 @@
632632
from segment_public_api.models.update_audience_for_space200_response import UpdateAudienceForSpace200Response
633633
from segment_public_api.models.update_audience_for_space_alpha_input import UpdateAudienceForSpaceAlphaInput
634634
from segment_public_api.models.update_audience_for_space_alpha_output import UpdateAudienceForSpaceAlphaOutput
635+
from segment_public_api.models.update_audience_schedule_for_audience200_response import UpdateAudienceScheduleForAudience200Response
636+
from segment_public_api.models.update_audience_schedule_for_audience_alpha_input import UpdateAudienceScheduleForAudienceAlphaInput
637+
from segment_public_api.models.update_audience_schedule_for_audience_alpha_output import UpdateAudienceScheduleForAudienceAlphaOutput
635638
from segment_public_api.models.update_computed_trait_for_space200_response import UpdateComputedTraitForSpace200Response
636639
from segment_public_api.models.update_computed_trait_for_space_alpha_input import UpdateComputedTraitForSpaceAlphaInput
637640
from segment_public_api.models.update_computed_trait_for_space_alpha_output import UpdateComputedTraitForSpaceAlphaOutput

segment_public_api/api/activations_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: 59.4.0
8+
The version of the OpenAPI document: 59.5.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

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: 59.4.0
8+
The version of the OpenAPI document: 59.5.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

segment_public_api/api/audiences_api.py

Lines changed: 177 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: 59.4.0
8+
The version of the OpenAPI document: 59.5.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
@@ -43,6 +43,8 @@
4343
from segment_public_api.models.remove_audience_from_space200_response import RemoveAudienceFromSpace200Response
4444
from segment_public_api.models.update_audience_for_space200_response import UpdateAudienceForSpace200Response
4545
from segment_public_api.models.update_audience_for_space_alpha_input import UpdateAudienceForSpaceAlphaInput
46+
from segment_public_api.models.update_audience_schedule_for_audience200_response import UpdateAudienceScheduleForAudience200Response
47+
from segment_public_api.models.update_audience_schedule_for_audience_alpha_input import UpdateAudienceScheduleForAudienceAlphaInput
4648

4749
from segment_public_api.api_client import ApiClient
4850
from segment_public_api.api_response import ApiResponse
@@ -1824,3 +1826,177 @@ def update_audience_for_space_with_http_info(self, space_id : constr(strict=True
18241826
_request_timeout=_params.get('_request_timeout'),
18251827
collection_formats=_collection_formats,
18261828
_request_auth=_params.get('_request_auth'))
1829+
1830+
@validate_arguments
1831+
def update_audience_schedule_for_audience(self, space_id : constr(strict=True), id : constr(strict=True), schedule_id : constr(strict=True), update_audience_schedule_for_audience_alpha_input : UpdateAudienceScheduleForAudienceAlphaInput, **kwargs) -> UpdateAudienceScheduleForAudience200Response: # noqa: E501
1832+
"""Update Audience Schedule for Audience # noqa: E501
1833+
1834+
Updates an audience schedule for a Linked Audience (audienceType = 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. # noqa: E501
1835+
This method makes a synchronous HTTP request by default. To make an
1836+
asynchronous HTTP request, please pass async_req=True
1837+
1838+
>>> thread = api.update_audience_schedule_for_audience(space_id, id, schedule_id, update_audience_schedule_for_audience_alpha_input, async_req=True)
1839+
>>> result = thread.get()
1840+
1841+
:param space_id: (required)
1842+
:type space_id: str
1843+
:param id: (required)
1844+
:type id: str
1845+
:param schedule_id: (required)
1846+
:type schedule_id: str
1847+
:param update_audience_schedule_for_audience_alpha_input: (required)
1848+
:type update_audience_schedule_for_audience_alpha_input: UpdateAudienceScheduleForAudienceAlphaInput
1849+
:param async_req: Whether to execute the request asynchronously.
1850+
:type async_req: bool, optional
1851+
:param _request_timeout: timeout setting for this request.
1852+
If one number provided, it will be total request
1853+
timeout. It can also be a pair (tuple) of
1854+
(connection, read) timeouts.
1855+
:return: Returns the result object.
1856+
If the method is called asynchronously,
1857+
returns the request thread.
1858+
:rtype: UpdateAudienceScheduleForAudience200Response
1859+
"""
1860+
kwargs['_return_http_data_only'] = True
1861+
if '_preload_content' in kwargs:
1862+
message = "Error! Please call the update_audience_schedule_for_audience_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
1863+
raise ValueError(message)
1864+
return self.update_audience_schedule_for_audience_with_http_info(space_id, id, schedule_id, update_audience_schedule_for_audience_alpha_input, **kwargs) # noqa: E501
1865+
1866+
@validate_arguments
1867+
def update_audience_schedule_for_audience_with_http_info(self, space_id : constr(strict=True), id : constr(strict=True), schedule_id : constr(strict=True), update_audience_schedule_for_audience_alpha_input : UpdateAudienceScheduleForAudienceAlphaInput, **kwargs) -> ApiResponse: # noqa: E501
1868+
"""Update Audience Schedule for Audience # noqa: E501
1869+
1870+
Updates an audience schedule for a Linked Audience (audienceType = 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. # noqa: E501
1871+
This method makes a synchronous HTTP request by default. To make an
1872+
asynchronous HTTP request, please pass async_req=True
1873+
1874+
>>> thread = api.update_audience_schedule_for_audience_with_http_info(space_id, id, schedule_id, update_audience_schedule_for_audience_alpha_input, async_req=True)
1875+
>>> result = thread.get()
1876+
1877+
:param space_id: (required)
1878+
:type space_id: str
1879+
:param id: (required)
1880+
:type id: str
1881+
:param schedule_id: (required)
1882+
:type schedule_id: str
1883+
:param update_audience_schedule_for_audience_alpha_input: (required)
1884+
:type update_audience_schedule_for_audience_alpha_input: UpdateAudienceScheduleForAudienceAlphaInput
1885+
:param async_req: Whether to execute the request asynchronously.
1886+
:type async_req: bool, optional
1887+
:param _preload_content: if False, the ApiResponse.data will
1888+
be set to none and raw_data will store the
1889+
HTTP response body without reading/decoding.
1890+
Default is True.
1891+
:type _preload_content: bool, optional
1892+
:param _return_http_data_only: response data instead of ApiResponse
1893+
object with status code, headers, etc
1894+
:type _return_http_data_only: bool, optional
1895+
:param _request_timeout: timeout setting for this request. If one
1896+
number provided, it will be total request
1897+
timeout. It can also be a pair (tuple) of
1898+
(connection, read) timeouts.
1899+
:param _request_auth: set to override the auth_settings for an a single
1900+
request; this effectively ignores the authentication
1901+
in the spec for a single request.
1902+
:type _request_auth: dict, optional
1903+
:type _content_type: string, optional: force content-type for the request
1904+
:return: Returns the result object.
1905+
If the method is called asynchronously,
1906+
returns the request thread.
1907+
:rtype: tuple(UpdateAudienceScheduleForAudience200Response, status_code(int), headers(HTTPHeaderDict))
1908+
"""
1909+
1910+
_params = locals()
1911+
1912+
_all_params = [
1913+
'space_id',
1914+
'id',
1915+
'schedule_id',
1916+
'update_audience_schedule_for_audience_alpha_input'
1917+
]
1918+
_all_params.extend(
1919+
[
1920+
'async_req',
1921+
'_return_http_data_only',
1922+
'_preload_content',
1923+
'_request_timeout',
1924+
'_request_auth',
1925+
'_content_type',
1926+
'_headers'
1927+
]
1928+
)
1929+
1930+
# validate the arguments
1931+
for _key, _val in _params['kwargs'].items():
1932+
if _key not in _all_params:
1933+
raise ApiTypeError(
1934+
"Got an unexpected keyword argument '%s'"
1935+
" to method update_audience_schedule_for_audience" % _key
1936+
)
1937+
_params[_key] = _val
1938+
del _params['kwargs']
1939+
1940+
_collection_formats = {}
1941+
1942+
# process the path parameters
1943+
_path_params = {}
1944+
if _params['space_id']:
1945+
_path_params['spaceId'] = _params['space_id']
1946+
1947+
if _params['id']:
1948+
_path_params['id'] = _params['id']
1949+
1950+
if _params['schedule_id']:
1951+
_path_params['scheduleId'] = _params['schedule_id']
1952+
1953+
1954+
# process the query parameters
1955+
_query_params = []
1956+
# process the header parameters
1957+
_header_params = dict(_params.get('_headers', {}))
1958+
# process the form parameters
1959+
_form_params = []
1960+
_files = {}
1961+
# process the body parameter
1962+
_body_params = None
1963+
if _params['update_audience_schedule_for_audience_alpha_input'] is not None:
1964+
_body_params = _params['update_audience_schedule_for_audience_alpha_input']
1965+
1966+
# set the HTTP header `Accept`
1967+
_header_params['Accept'] = self.api_client.select_header_accept(
1968+
['application/vnd.segment.v1alpha+json', 'application/json']) # noqa: E501
1969+
1970+
# set the HTTP header `Content-Type`
1971+
_content_types_list = _params.get('_content_type',
1972+
self.api_client.select_header_content_type(
1973+
['application/vnd.segment.v1alpha+json']))
1974+
if _content_types_list:
1975+
_header_params['Content-Type'] = _content_types_list
1976+
1977+
# authentication setting
1978+
_auth_settings = ['token'] # noqa: E501
1979+
1980+
_response_types_map = {
1981+
'200': "UpdateAudienceScheduleForAudience200Response",
1982+
'404': "RequestErrorEnvelope",
1983+
'422': "RequestErrorEnvelope",
1984+
'429': "RequestErrorEnvelope",
1985+
}
1986+
1987+
return self.api_client.call_api(
1988+
'/spaces/{spaceId}/audiences/{id}/schedules/{scheduleId}', 'PATCH',
1989+
_path_params,
1990+
_query_params,
1991+
_header_params,
1992+
body=_body_params,
1993+
post_params=_form_params,
1994+
files=_files,
1995+
response_types_map=_response_types_map,
1996+
auth_settings=_auth_settings,
1997+
async_req=_params.get('async_req'),
1998+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
1999+
_preload_content=_params.get('_preload_content', True),
2000+
_request_timeout=_params.get('_request_timeout'),
2001+
collection_formats=_collection_formats,
2002+
_request_auth=_params.get('_request_auth'))

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: 59.4.0
8+
The version of the OpenAPI document: 59.5.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

0 commit comments

Comments
 (0)