Skip to content

Commit a27c7df

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@2ad1420b.
1 parent 2140dde commit a27c7df

3 files changed

Lines changed: 27 additions & 11 deletions

File tree

segment_public_api/models/activation_output.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ class ActivationOutput(BaseModel):
3636
space_id: StrictStr = Field(description="The space id.", alias="spaceId")
3737
audience_id: StrictStr = Field(description="The audience id.", alias="audienceId")
3838
connection_id: StrictStr = Field(description="The connection id.", alias="connectionId")
39-
activation_type: StrictStr = Field(description="Determines when an event is sent to the Destination. Possible values: Audience Entered: Sends an event when a profile or entity enters the audience. Audience Exited: Sends an event when a profile or entity exits the audience. Audience Membership Changed: Sends an event for both entries and exits. This does not apply to entities. Note that events are sent for the profile, unless the audience is a Linked Audience. In that case, events are sent for the target entity defined for that audience.", alias="activationType")
40-
activation_name: StrictStr = Field(description="Name of the activation.", alias="activationName")
41-
personalization: PersonalizationInput = Field(description="The data points used to enrich the event. Defines which profile traits and/or entity properties are included in the event sent to the Destination. For Action Destinations, any traits or properties specified here must also be included in the destinationMapping to define which Destination fields should be populated.")
39+
activation_type: StrictStr = Field(description="Determines when an event is sent to the Destination. Possible values: Audience Entered: Sends an event when a profile or entity enters the audience. Audience Exited: Sends an event when a profile or entity exits the audience. Audience Membership Changed: Sends an event for both entries and exits. This does not apply to entities. Note that events are sent for the profile, unless the audience is a Linked Audience. In that case, events are sent for the target entity defined for that audience.", alias="activationType")
40+
activation_name: StrictStr = Field(description="Activation name. For Warehouse Destinations, this is the table name.", alias="activationName")
41+
display_name: Optional[StrictStr] = Field(default=None, description="Human-readable label for the activation. Only present for Warehouse Destinations that have a display name configured. When null, the activationName serves as the label.", alias="displayName")
42+
personalization: PersonalizationInput = Field(description="The data points used to enrich the event. Defines which profile traits and/or entity properties are included in the event sent to the Destination. For Action Destinations, any traits or properties specified here must also be included in the destinationMapping to define which Destination fields should be populated.")
4243
destination_mapping: Optional[DestinationSubscriptionConfiguration] = Field(default=None, description="Configuration settings for the mappings.", alias="destinationMapping")
4344
perform_resync: Optional[StrictBool] = Field(default=None, description="Indicates if a full resync is currently pending or in progress.", alias="performResync")
44-
__properties: ClassVar[List[str]] = ["id", "enabled", "workspaceId", "spaceId", "audienceId", "connectionId", "activationType", "activationName", "personalization", "destinationMapping", "performResync"]
45+
__properties: ClassVar[List[str]] = ["id", "enabled", "workspaceId", "spaceId", "audienceId", "connectionId", "activationType", "activationName", "displayName", "personalization", "destinationMapping", "performResync"]
4546

4647
model_config = ConfigDict(
4748
validate_by_name=True,
@@ -88,6 +89,11 @@ def to_dict(self) -> Dict[str, Any]:
8889
# override the default output from pydantic by calling `to_dict()` of destination_mapping
8990
if self.destination_mapping:
9091
_dict['destinationMapping'] = self.destination_mapping.to_dict()
92+
# set to None if display_name (nullable) is None
93+
# and model_fields_set contains the field
94+
if self.display_name is None and "display_name" in self.model_fields_set:
95+
_dict['displayName'] = None
96+
9197
return _dict
9298

9399
@classmethod
@@ -108,6 +114,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
108114
"connectionId": obj.get("connectionId"),
109115
"activationType": obj.get("activationType"),
110116
"activationName": obj.get("activationName"),
117+
"displayName": obj.get("displayName"),
111118
"personalization": PersonalizationInput.from_dict(obj["personalization"]) if obj.get("personalization") is not None else None,
112119
"destinationMapping": DestinationSubscriptionConfiguration.from_dict(obj["destinationMapping"]) if obj.get("destinationMapping") is not None else None,
113120
"performResync": obj.get("performResync")

segment_public_api/models/add_activation_to_audience_alpha_input.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ class AddActivationToAudienceAlphaInput(BaseModel):
3232
""" # noqa: E501
3333
enabled: Optional[StrictBool] = Field(default=None, description="Determines whether an activation is enabled.")
3434
perform_resync: StrictBool = Field(description="Determines whether to perform a full resync upon creation. If true, the entire audience is resent to the Destination from scratch. If false, only future changes will be synced.", alias="performResync")
35-
activation_type: StrictStr = Field(description="Determines when an event is sent to the Destination. Possible values: Audience Entered: Sends an event when a profile or entity enters the audience. Audience Exited: Sends an event when a profile or entity exits the audience. Audience Membership Changed: Sends an event for both entries and exits. This does not apply to entities. Note that events are sent for the profile, unless the audience is a Linked Audience. In that case, events are sent for the target entity defined for that audience.", alias="activationType")
36-
activation_name: StrictStr = Field(description="Name of the activation.", alias="activationName")
37-
personalization: PersonalizationInput = Field(description="The data points used to enrich the event. Defines which profile traits and/or entity properties are included in the event sent to the Destination. For Action Destinations, any traits or properties specified here must also be included in the destinationMapping to define which Destination fields should be populated.")
35+
activation_type: StrictStr = Field(description="Determines when an event is sent to the Destination. Possible values: Audience Entered: Sends an event when a profile or entity enters the audience. Audience Exited: Sends an event when a profile or entity exits the audience. Audience Membership Changed: Sends an event for both entries and exits. This does not apply to entities. Note that events are sent for the profile, unless the audience is a Linked Audience. In that case, events are sent for the target entity defined for that audience.", alias="activationType")
36+
activation_name: StrictStr = Field(description="Activation name. For Warehouse Destinations, this is used as the table name.", alias="activationName")
37+
display_name: Optional[StrictStr] = Field(default=None, description="Optional human-readable label for the activation. Only supported for Warehouse Destinations. When omitted, the activationName is used as the label.", alias="displayName")
38+
personalization: PersonalizationInput = Field(description="The data points used to enrich the event. Defines which profile traits and/or entity properties are included in the event sent to the Destination. For Action Destinations, any traits or properties specified here must also be included in the destinationMapping to define which Destination fields should be populated.")
3839
destination_mapping: Optional[DestinationSubscriptionConfiguration] = Field(default=None, description="Defines the specific action and data mapping for the Destination. Only applicable for Action Destinations. Action id: Specifies which action to perform on the Destination (for example: add contact, update list). Settings/Mapping: Defines how event data (including personalization traits) populates specific fields in the Destination. Use the List Supported Destinations from Audience endpoint to find available action ids and the specific Destination fields you can map.", alias="destinationMapping")
39-
__properties: ClassVar[List[str]] = ["enabled", "performResync", "activationType", "activationName", "personalization", "destinationMapping"]
40+
__properties: ClassVar[List[str]] = ["enabled", "performResync", "activationType", "activationName", "displayName", "personalization", "destinationMapping"]
4041

4142
model_config = ConfigDict(
4243
validate_by_name=True,
@@ -99,6 +100,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
99100
"performResync": obj.get("performResync"),
100101
"activationType": obj.get("activationType"),
101102
"activationName": obj.get("activationName"),
103+
"displayName": obj.get("displayName"),
102104
"personalization": PersonalizationInput.from_dict(obj["personalization"]) if obj.get("personalization") is not None else None,
103105
"destinationMapping": DestinationSubscriptionConfiguration.from_dict(obj["destinationMapping"]) if obj.get("destinationMapping") is not None else None
104106
})

segment_public_api/models/update_activation_for_audience_alpha_input.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ class UpdateActivationForAudienceAlphaInput(BaseModel):
3131
Input to update an activation.
3232
""" # noqa: E501
3333
enabled: Optional[StrictBool] = Field(default=None, description="Determines whether an activation is enabled.")
34-
activation_name: Optional[StrictStr] = Field(default=None, description="Activation name.", alias="activationName")
35-
personalization: Optional[PersonalizationInput] = Field(default=None, description="The data points used to enrich the event. Defines which profile traits and/or entity properties are included in the event sent to the Destination. For Action Destinations, any traits or properties specified here must also be included in the destinationMapping to define which Destination fields should be populated.")
34+
activation_name: Optional[StrictStr] = Field(default=None, description="Activation name. For Warehouse Destinations, this is used as the table name.", alias="activationName")
35+
display_name: Optional[StrictStr] = Field(default=None, description="Optional human-readable label for the activation. Only supported for Warehouse Destinations. Send null to clear. When omitted, the activationName is used as the label.", alias="displayName")
36+
personalization: Optional[PersonalizationInput] = Field(default=None, description="The data points used to enrich the event. Defines which profile traits and/or entity properties are included in the event sent to the Destination. For Action Destinations, any traits or properties specified here must also be included in the destinationMapping to define which Destination fields should be populated.")
3637
destination_mapping: Optional[DestinationSubscriptionConfiguration] = Field(default=None, description="Defines the specific action and data mapping for the Destination. Only applicable for Action Destinations. Action id: Specifies which action to perform on the Destination (for example: add contact, update list). Settings/Mapping: Defines how event data (including personalization traits) populates specific fields in the Destination. Use the List Supported Destinations from Audience endpoint to find available action ids and the specific Destination fields you can map.", alias="destinationMapping")
3738
perform_resync: Optional[StrictBool] = Field(default=None, description="Determines whether to perform a full resync after the update. If true, the entire audience is resent to the Destination using the updated configuration. If false, the update applies only to future syncs.", alias="performResync")
38-
__properties: ClassVar[List[str]] = ["enabled", "activationName", "personalization", "destinationMapping", "performResync"]
39+
__properties: ClassVar[List[str]] = ["enabled", "activationName", "displayName", "personalization", "destinationMapping", "performResync"]
3940

4041
model_config = ConfigDict(
4142
validate_by_name=True,
@@ -82,6 +83,11 @@ def to_dict(self) -> Dict[str, Any]:
8283
# override the default output from pydantic by calling `to_dict()` of destination_mapping
8384
if self.destination_mapping:
8485
_dict['destinationMapping'] = self.destination_mapping.to_dict()
86+
# set to None if display_name (nullable) is None
87+
# and model_fields_set contains the field
88+
if self.display_name is None and "display_name" in self.model_fields_set:
89+
_dict['displayName'] = None
90+
8591
return _dict
8692

8793
@classmethod
@@ -96,6 +102,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
96102
_obj = cls.model_validate({
97103
"enabled": obj.get("enabled"),
98104
"activationName": obj.get("activationName"),
105+
"displayName": obj.get("displayName"),
99106
"personalization": PersonalizationInput.from_dict(obj["personalization"]) if obj.get("personalization") is not None else None,
100107
"destinationMapping": DestinationSubscriptionConfiguration.from_dict(obj["destinationMapping"]) if obj.get("destinationMapping") is not None else None,
101108
"performResync": obj.get("performResync")

0 commit comments

Comments
 (0)