Skip to content

Commit 055f911

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@e02d1311.
1 parent 55de13e commit 055f911

File tree

7 files changed

+167
-8
lines changed

7 files changed

+167
-8
lines changed

docs/AudiencesApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ Name | Type | Description | Notes
644644
645645
Remove Audience from Space
646646

647-
Deletes an Audience by id and spaceId. • 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. • When called, this endpoint may generate the `Audience Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 20 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.
647+
Deletes an Audience by id and spaceId. • This endpoint is in **Beta** 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. • When called, this endpoint may generate the `Audience Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 20 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.
648648

649649
### Example
650650

@@ -700,7 +700,7 @@ Name | Type | Description | Notes
700700
### HTTP request headers
701701

702702
- **Content-Type**: Not defined
703-
- **Accept**: application/vnd.segment.v1alpha+json, application/json
703+
- **Accept**: application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json, application/json
704704

705705
### HTTP response details
706706
| Status code | Description | Response headers |

segment_public_api/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,9 @@
528528
from segment_public_api.models.remove_activation_from_audience200_response import RemoveActivationFromAudience200Response
529529
from segment_public_api.models.remove_activation_from_audience_output import RemoveActivationFromAudienceOutput
530530
from segment_public_api.models.remove_audience_from_space200_response import RemoveAudienceFromSpace200Response
531+
from segment_public_api.models.remove_audience_from_space200_response1 import RemoveAudienceFromSpace200Response1
531532
from segment_public_api.models.remove_audience_from_space_alpha_output import RemoveAudienceFromSpaceAlphaOutput
533+
from segment_public_api.models.remove_audience_from_space_beta_output import RemoveAudienceFromSpaceBetaOutput
532534
from segment_public_api.models.remove_computed_trait_from_space200_response import RemoveComputedTraitFromSpace200Response
533535
from segment_public_api.models.remove_computed_trait_from_space_alpha_output import RemoveComputedTraitFromSpaceAlphaOutput
534536
from segment_public_api.models.remove_filter_from_destination200_response import RemoveFilterFromDestination200Response

segment_public_api/api/audiences_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ def list_audiences_with_http_info(self, space_id : constr(strict=True), search :
13441344
def remove_audience_from_space(self, space_id : constr(strict=True), id : constr(strict=True), **kwargs) -> RemoveAudienceFromSpace200Response: # noqa: E501
13451345
"""Remove Audience from Space # noqa: E501
13461346
1347-
Deletes an Audience by id and spaceId. • 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. • When called, this endpoint may generate the `Audience Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 20 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. # noqa: E501
1347+
Deletes an Audience by id and spaceId. • This endpoint is in **Beta** 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. • When called, this endpoint may generate the `Audience Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 20 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. # noqa: E501
13481348
This method makes a synchronous HTTP request by default. To make an
13491349
asynchronous HTTP request, please pass async_req=True
13501350
@@ -1376,7 +1376,7 @@ def remove_audience_from_space(self, space_id : constr(strict=True), id : constr
13761376
def remove_audience_from_space_with_http_info(self, space_id : constr(strict=True), id : constr(strict=True), **kwargs) -> ApiResponse: # noqa: E501
13771377
"""Remove Audience from Space # noqa: E501
13781378
1379-
Deletes an Audience by id and spaceId. • 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. • When called, this endpoint may generate the `Audience Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 20 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. # noqa: E501
1379+
Deletes an Audience by id and spaceId. • This endpoint is in **Beta** 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. • When called, this endpoint may generate the `Audience Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 20 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. # noqa: E501
13801380
This method makes a synchronous HTTP request by default. To make an
13811381
asynchronous HTTP request, please pass async_req=True
13821382
@@ -1462,7 +1462,7 @@ def remove_audience_from_space_with_http_info(self, space_id : constr(strict=Tru
14621462
_body_params = None
14631463
# set the HTTP header `Accept`
14641464
_header_params['Accept'] = self.api_client.select_header_accept(
1465-
['application/vnd.segment.v1alpha+json', 'application/json']) # noqa: E501
1465+
['application/vnd.segment.v1beta+json', 'application/vnd.segment.v1alpha+json', 'application/json']) # noqa: E501
14661466

14671467
# authentication setting
14681468
_auth_settings = ['token'] # noqa: E501

segment_public_api/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,9 @@
481481
from segment_public_api.models.remove_activation_from_audience200_response import RemoveActivationFromAudience200Response
482482
from segment_public_api.models.remove_activation_from_audience_output import RemoveActivationFromAudienceOutput
483483
from segment_public_api.models.remove_audience_from_space200_response import RemoveAudienceFromSpace200Response
484+
from segment_public_api.models.remove_audience_from_space200_response1 import RemoveAudienceFromSpace200Response1
484485
from segment_public_api.models.remove_audience_from_space_alpha_output import RemoveAudienceFromSpaceAlphaOutput
486+
from segment_public_api.models.remove_audience_from_space_beta_output import RemoveAudienceFromSpaceBetaOutput
485487
from segment_public_api.models.remove_computed_trait_from_space200_response import RemoveComputedTraitFromSpace200Response
486488
from segment_public_api.models.remove_computed_trait_from_space_alpha_output import RemoveComputedTraitFromSpaceAlphaOutput
487489
from segment_public_api.models.remove_filter_from_destination200_response import RemoveFilterFromDestination200Response

segment_public_api/models/remove_audience_from_space200_response.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121

2222
from typing import Optional
2323
from pydantic import BaseModel
24-
from segment_public_api.models.remove_audience_from_space_alpha_output import RemoveAudienceFromSpaceAlphaOutput
24+
from segment_public_api.models.remove_audience_from_space_beta_output import RemoveAudienceFromSpaceBetaOutput
2525

2626
class RemoveAudienceFromSpace200Response(BaseModel):
2727
"""
2828
RemoveAudienceFromSpace200Response
2929
"""
30-
data: Optional[RemoveAudienceFromSpaceAlphaOutput] = None
30+
data: Optional[RemoveAudienceFromSpaceBetaOutput] = None
3131
__properties = ["data"]
3232

3333
class Config:
@@ -69,7 +69,7 @@ def from_dict(cls, obj: dict) -> RemoveAudienceFromSpace200Response:
6969
return RemoveAudienceFromSpace200Response.parse_obj(obj)
7070

7171
_obj = RemoveAudienceFromSpace200Response.parse_obj({
72-
"data": RemoveAudienceFromSpaceAlphaOutput.from_dict(obj.get("data")) if obj.get("data") is not None else None
72+
"data": RemoveAudienceFromSpaceBetaOutput.from_dict(obj.get("data")) if obj.get("data") is not None else None
7373
})
7474
return _obj
7575

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# coding: utf-8
2+
3+
"""
4+
Segment Public API
5+
6+
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.
7+
8+
The version of the OpenAPI document: 59.1.0
9+
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
11+
12+
Do not edit the class manually.
13+
""" # noqa: E501
14+
15+
16+
from __future__ import annotations
17+
import pprint
18+
import re # noqa: F401
19+
import json
20+
21+
22+
from typing import Optional
23+
from pydantic import BaseModel
24+
from segment_public_api.models.remove_audience_from_space_alpha_output import RemoveAudienceFromSpaceAlphaOutput
25+
26+
class RemoveAudienceFromSpace200Response1(BaseModel):
27+
"""
28+
RemoveAudienceFromSpace200Response1
29+
"""
30+
data: Optional[RemoveAudienceFromSpaceAlphaOutput] = None
31+
__properties = ["data"]
32+
33+
class Config:
34+
"""Pydantic configuration"""
35+
allow_population_by_field_name = True
36+
validate_assignment = True
37+
38+
def to_str(self) -> str:
39+
"""Returns the string representation of the model using alias"""
40+
return pprint.pformat(self.dict(by_alias=True))
41+
42+
def to_json(self) -> str:
43+
"""Returns the JSON representation of the model using alias"""
44+
return json.dumps(self.to_dict())
45+
46+
@classmethod
47+
def from_json(cls, json_str: str) -> RemoveAudienceFromSpace200Response1:
48+
"""Create an instance of RemoveAudienceFromSpace200Response1 from a JSON string"""
49+
return cls.from_dict(json.loads(json_str))
50+
51+
def to_dict(self):
52+
"""Returns the dictionary representation of the model using alias"""
53+
_dict = self.dict(by_alias=True,
54+
exclude={
55+
},
56+
exclude_none=True)
57+
# override the default output from pydantic by calling `to_dict()` of data
58+
if self.data:
59+
_dict['data'] = self.data.to_dict()
60+
return _dict
61+
62+
@classmethod
63+
def from_dict(cls, obj: dict) -> RemoveAudienceFromSpace200Response1:
64+
"""Create an instance of RemoveAudienceFromSpace200Response1 from a dict"""
65+
if obj is None:
66+
return None
67+
68+
if not isinstance(obj, dict):
69+
return RemoveAudienceFromSpace200Response1.parse_obj(obj)
70+
71+
_obj = RemoveAudienceFromSpace200Response1.parse_obj({
72+
"data": RemoveAudienceFromSpaceAlphaOutput.from_dict(obj.get("data")) if obj.get("data") is not None else None
73+
})
74+
return _obj
75+
76+
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# coding: utf-8
2+
3+
"""
4+
Segment Public API
5+
6+
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.
7+
8+
The version of the OpenAPI document: 59.1.0
9+
10+
Generated by OpenAPI Generator (https://openapi-generator.tech)
11+
12+
Do not edit the class manually.
13+
""" # noqa: E501
14+
15+
16+
from __future__ import annotations
17+
import pprint
18+
import re # noqa: F401
19+
import json
20+
21+
22+
23+
from pydantic import BaseModel, Field, StrictStr, validator
24+
25+
class RemoveAudienceFromSpaceBetaOutput(BaseModel):
26+
"""
27+
Delete audience endpoint output. # noqa: E501
28+
"""
29+
status: StrictStr = Field(..., description="The status of the operation.")
30+
__properties = ["status"]
31+
32+
@validator('status')
33+
def status_validate_enum(cls, value):
34+
"""Validates the enum"""
35+
if value not in ('SUCCESS'):
36+
raise ValueError("must be one of enum values ('SUCCESS')")
37+
return value
38+
39+
class Config:
40+
"""Pydantic configuration"""
41+
allow_population_by_field_name = True
42+
validate_assignment = True
43+
44+
def to_str(self) -> str:
45+
"""Returns the string representation of the model using alias"""
46+
return pprint.pformat(self.dict(by_alias=True))
47+
48+
def to_json(self) -> str:
49+
"""Returns the JSON representation of the model using alias"""
50+
return json.dumps(self.to_dict())
51+
52+
@classmethod
53+
def from_json(cls, json_str: str) -> RemoveAudienceFromSpaceBetaOutput:
54+
"""Create an instance of RemoveAudienceFromSpaceBetaOutput from a JSON string"""
55+
return cls.from_dict(json.loads(json_str))
56+
57+
def to_dict(self):
58+
"""Returns the dictionary representation of the model using alias"""
59+
_dict = self.dict(by_alias=True,
60+
exclude={
61+
},
62+
exclude_none=True)
63+
return _dict
64+
65+
@classmethod
66+
def from_dict(cls, obj: dict) -> RemoveAudienceFromSpaceBetaOutput:
67+
"""Create an instance of RemoveAudienceFromSpaceBetaOutput from a dict"""
68+
if obj is None:
69+
return None
70+
71+
if not isinstance(obj, dict):
72+
return RemoveAudienceFromSpaceBetaOutput.parse_obj(obj)
73+
74+
_obj = RemoveAudienceFromSpaceBetaOutput.parse_obj({
75+
"status": obj.get("status")
76+
})
77+
return _obj
78+
79+

0 commit comments

Comments
 (0)