Skip to content

Commit 083578c

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@62c5da31.
1 parent cad6837 commit 083578c

File tree

10 files changed

+434
-8
lines changed

10 files changed

+434
-8
lines changed

docs/AudiencesApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Name | Type | Description | Notes
9494
9595
Get Audience
9696

97-
Returns the Audience by id and spaceId. • 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. The rate limit for this endpoint is 100 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.
97+
Returns the Audience by id and spaceId. • This endpoint is in **Beta** 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. The rate limit for this endpoint is 100 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.
9898

9999
### Example
100100

@@ -150,7 +150,7 @@ Name | Type | Description | Notes
150150
### HTTP request headers
151151

152152
- **Content-Type**: Not defined
153-
- **Accept**: application/vnd.segment.v1alpha+json, application/json
153+
- **Accept**: application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json, application/json
154154

155155
### HTTP response details
156156
| Status code | Description | Response headers |

segment_public_api/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,11 @@
8787
from segment_public_api.models.allowed_label_beta import AllowedLabelBeta
8888
from segment_public_api.models.audience_computation_definition import AudienceComputationDefinition
8989
from segment_public_api.models.audience_definition import AudienceDefinition
90+
from segment_public_api.models.audience_definition_beta import AudienceDefinitionBeta
9091
from segment_public_api.models.audience_options import AudienceOptions
92+
from segment_public_api.models.audience_options_beta import AudienceOptionsBeta
9193
from segment_public_api.models.audience_summary import AudienceSummary
94+
from segment_public_api.models.audience_summary_beta import AudienceSummaryBeta
9295
from segment_public_api.models.audit_event_v1 import AuditEventV1
9396
from segment_public_api.models.batch_query_messaging_subscriptions_for_space200_response import BatchQueryMessagingSubscriptionsForSpace200Response
9497
from segment_public_api.models.batch_query_messaging_subscriptions_for_space_alpha_input import BatchQueryMessagingSubscriptionsForSpaceAlphaInput
@@ -256,7 +259,9 @@
256259
from segment_public_api.models.get_advanced_sync_schedule_from_warehouse200_response import GetAdvancedSyncScheduleFromWarehouse200Response
257260
from segment_public_api.models.get_advanced_sync_schedule_from_warehouse_v1_output import GetAdvancedSyncScheduleFromWarehouseV1Output
258261
from segment_public_api.models.get_audience200_response import GetAudience200Response
262+
from segment_public_api.models.get_audience200_response1 import GetAudience200Response1
259263
from segment_public_api.models.get_audience_alpha_output import GetAudienceAlphaOutput
264+
from segment_public_api.models.get_audience_beta_output import GetAudienceBetaOutput
260265
from segment_public_api.models.get_computed_trait200_response import GetComputedTrait200Response
261266
from segment_public_api.models.get_computed_trait_alpha_output import GetComputedTraitAlphaOutput
262267
from segment_public_api.models.get_connection_state_from_warehouse200_response import GetConnectionStateFromWarehouse200Response

segment_public_api/api/audiences_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def create_audience_with_http_info(self, space_id : constr(strict=True), create_
215215
def get_audience(self, space_id : constr(strict=True), id : constr(strict=True), **kwargs) -> GetAudience200Response: # noqa: E501
216216
"""Get Audience # noqa: E501
217217
218-
Returns the Audience by id and spaceId. • 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. The rate limit for this endpoint is 100 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
218+
Returns the Audience by id and spaceId. • This endpoint is in **Beta** 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. The rate limit for this endpoint is 100 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
219219
This method makes a synchronous HTTP request by default. To make an
220220
asynchronous HTTP request, please pass async_req=True
221221
@@ -247,7 +247,7 @@ def get_audience(self, space_id : constr(strict=True), id : constr(strict=True),
247247
def get_audience_with_http_info(self, space_id : constr(strict=True), id : constr(strict=True), **kwargs) -> ApiResponse: # noqa: E501
248248
"""Get Audience # noqa: E501
249249
250-
Returns the Audience by id and spaceId. • 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. The rate limit for this endpoint is 100 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
250+
Returns the Audience by id and spaceId. • This endpoint is in **Beta** 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. The rate limit for this endpoint is 100 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
251251
This method makes a synchronous HTTP request by default. To make an
252252
asynchronous HTTP request, please pass async_req=True
253253
@@ -333,7 +333,7 @@ def get_audience_with_http_info(self, space_id : constr(strict=True), id : const
333333
_body_params = None
334334
# set the HTTP header `Accept`
335335
_header_params['Accept'] = self.api_client.select_header_accept(
336-
['application/vnd.segment.v1alpha+json', 'application/json']) # noqa: E501
336+
['application/vnd.segment.v1beta+json', 'application/vnd.segment.v1alpha+json', 'application/json']) # noqa: E501
337337

338338
# authentication setting
339339
_auth_settings = ['token'] # noqa: E501

segment_public_api/models/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@
4242
from segment_public_api.models.allowed_label_beta import AllowedLabelBeta
4343
from segment_public_api.models.audience_computation_definition import AudienceComputationDefinition
4444
from segment_public_api.models.audience_definition import AudienceDefinition
45+
from segment_public_api.models.audience_definition_beta import AudienceDefinitionBeta
4546
from segment_public_api.models.audience_options import AudienceOptions
47+
from segment_public_api.models.audience_options_beta import AudienceOptionsBeta
4648
from segment_public_api.models.audience_summary import AudienceSummary
49+
from segment_public_api.models.audience_summary_beta import AudienceSummaryBeta
4750
from segment_public_api.models.audit_event_v1 import AuditEventV1
4851
from segment_public_api.models.batch_query_messaging_subscriptions_for_space200_response import BatchQueryMessagingSubscriptionsForSpace200Response
4952
from segment_public_api.models.batch_query_messaging_subscriptions_for_space_alpha_input import BatchQueryMessagingSubscriptionsForSpaceAlphaInput
@@ -211,7 +214,9 @@
211214
from segment_public_api.models.get_advanced_sync_schedule_from_warehouse200_response import GetAdvancedSyncScheduleFromWarehouse200Response
212215
from segment_public_api.models.get_advanced_sync_schedule_from_warehouse_v1_output import GetAdvancedSyncScheduleFromWarehouseV1Output
213216
from segment_public_api.models.get_audience200_response import GetAudience200Response
217+
from segment_public_api.models.get_audience200_response1 import GetAudience200Response1
214218
from segment_public_api.models.get_audience_alpha_output import GetAudienceAlphaOutput
219+
from segment_public_api.models.get_audience_beta_output import GetAudienceBetaOutput
215220
from segment_public_api.models.get_computed_trait200_response import GetComputedTrait200Response
216221
from segment_public_api.models.get_computed_trait_alpha_output import GetComputedTraitAlphaOutput
217222
from segment_public_api.models.get_connection_state_from_warehouse200_response import GetConnectionStateFromWarehouse200Response
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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: 58.0.1
9+
Contact: friends@segment.com
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 AudienceDefinitionBeta(BaseModel):
26+
"""
27+
Defines an audience definition. # noqa: E501
28+
"""
29+
query: StrictStr = Field(..., description="The query language string defining the audience segmentation criteria.")
30+
type: StrictStr = Field(..., description="The underlying data type being segmented for this audience. Possible values: users, accounts.")
31+
__properties = ["query", "type"]
32+
33+
@validator('type')
34+
def type_validate_enum(cls, value):
35+
"""Validates the enum"""
36+
if value not in ('ACCOUNTS', 'USERS'):
37+
raise ValueError("must be one of enum values ('ACCOUNTS', 'USERS')")
38+
return value
39+
40+
class Config:
41+
"""Pydantic configuration"""
42+
allow_population_by_field_name = True
43+
validate_assignment = True
44+
45+
def to_str(self) -> str:
46+
"""Returns the string representation of the model using alias"""
47+
return pprint.pformat(self.dict(by_alias=True))
48+
49+
def to_json(self) -> str:
50+
"""Returns the JSON representation of the model using alias"""
51+
return json.dumps(self.to_dict())
52+
53+
@classmethod
54+
def from_json(cls, json_str: str) -> AudienceDefinitionBeta:
55+
"""Create an instance of AudienceDefinitionBeta from a JSON string"""
56+
return cls.from_dict(json.loads(json_str))
57+
58+
def to_dict(self):
59+
"""Returns the dictionary representation of the model using alias"""
60+
_dict = self.dict(by_alias=True,
61+
exclude={
62+
},
63+
exclude_none=True)
64+
return _dict
65+
66+
@classmethod
67+
def from_dict(cls, obj: dict) -> AudienceDefinitionBeta:
68+
"""Create an instance of AudienceDefinitionBeta from a dict"""
69+
if obj is None:
70+
return None
71+
72+
if not isinstance(obj, dict):
73+
return AudienceDefinitionBeta.parse_obj(obj)
74+
75+
_obj = AudienceDefinitionBeta.parse_obj({
76+
"query": obj.get("query"),
77+
"type": obj.get("type")
78+
})
79+
return _obj
80+
81+
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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: 58.0.1
9+
Contact: friends@segment.com
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, Field, StrictBool
24+
25+
class AudienceOptionsBeta(BaseModel):
26+
"""
27+
AudienceOptionsBeta
28+
"""
29+
include_historical_data: Optional[StrictBool] = Field(None, alias="includeHistoricalData", description="Determines whether data prior to the audience being created is included when determining audience membership. Note that including historical data may be needed in order to properly handle the definition specified. In these cases, Segment will automatically handle including historical data and the response will return the includeHistoricalData parameter as true.")
30+
include_anonymous_users: Optional[StrictBool] = Field(None, alias="includeAnonymousUsers", description="Determines whether anonymous users should be included when determining audience membership.")
31+
__properties = ["includeHistoricalData", "includeAnonymousUsers"]
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) -> AudienceOptionsBeta:
48+
"""Create an instance of AudienceOptionsBeta 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+
return _dict
58+
59+
@classmethod
60+
def from_dict(cls, obj: dict) -> AudienceOptionsBeta:
61+
"""Create an instance of AudienceOptionsBeta from a dict"""
62+
if obj is None:
63+
return None
64+
65+
if not isinstance(obj, dict):
66+
return AudienceOptionsBeta.parse_obj(obj)
67+
68+
_obj = AudienceOptionsBeta.parse_obj({
69+
"include_historical_data": obj.get("includeHistoricalData"),
70+
"include_anonymous_users": obj.get("includeAnonymousUsers")
71+
})
72+
return _obj
73+
74+

0 commit comments

Comments
 (0)