Skip to content

Commit

Permalink
Automated SDK update
Browse files Browse the repository at this point in the history
This updates the SDK from internal repo commit segmentio/public-api@0d041630.
  • Loading branch information
APIs and Common Services team committed Oct 23, 2023
1 parent 492c2ff commit 162b2f0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions segment_public_api/models/get_source_alpha_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@
import json



from pydantic import BaseModel, Field
from typing import Optional
from pydantic import BaseModel, Field, StrictStr
from segment_public_api.models.source_alpha import SourceAlpha

class GetSourceAlphaOutput(BaseModel):
"""
Returns a Source. # noqa: E501
"""
source: SourceAlpha = Field(...)
__properties = ["source"]
tracking_plan_id: Optional[StrictStr] = Field(..., alias="trackingPlanId", description="The id of the Tracking Plan connected to the Source.")
__properties = ["source", "trackingPlanId"]

class Config:
"""Pydantic configuration"""
Expand Down Expand Up @@ -57,6 +58,11 @@ def to_dict(self):
# override the default output from pydantic by calling `to_dict()` of source
if self.source:
_dict['source'] = self.source.to_dict()
# set to None if tracking_plan_id (nullable) is None
# and __fields_set__ contains the field
if self.tracking_plan_id is None and "tracking_plan_id" in self.__fields_set__:
_dict['trackingPlanId'] = None

return _dict

@classmethod
Expand All @@ -69,7 +75,8 @@ def from_dict(cls, obj: dict) -> GetSourceAlphaOutput:
return GetSourceAlphaOutput.parse_obj(obj)

_obj = GetSourceAlphaOutput.parse_obj({
"source": SourceAlpha.from_dict(obj.get("source")) if obj.get("source") is not None else None
"source": SourceAlpha.from_dict(obj.get("source")) if obj.get("source") is not None else None,
"tracking_plan_id": obj.get("trackingPlanId")
})
return _obj

Expand Down

0 comments on commit 162b2f0

Please sign in to comment.