Skip to content

Generator: Update SDK /services/observability #2217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ class CreateAlertConfigReceiverPayloadWebHookConfigsInner(BaseModel):
CreateAlertConfigReceiverPayloadWebHookConfigsInner
""" # noqa: E501

google_chat: Optional[StrictBool] = Field(
default=False,
description="Google Chat webhooks require special handling. If you set this property to true, it is treated as such. `Additional Validators:` * When set to true, msTeams must be false.",
alias="googleChat",
)
ms_teams: Optional[StrictBool] = Field(
default=False,
description="Microsoft Teams webhooks require special handling. If you set this property to true, it is treated as such",
description="Microsoft Teams webhooks require special handling. If you set this property to true, it is treated as such. `Additional Validators:` * When set to true, googleChat must be false.",
alias="msTeams",
)
send_resolved: Optional[StrictBool] = Field(
Expand All @@ -39,7 +44,7 @@ class CreateAlertConfigReceiverPayloadWebHookConfigsInner(BaseModel):
default=None,
description="The endpoint to send HTTP POST requests to. `Additional Validators:` * must be a syntactically valid url address",
)
__properties: ClassVar[List[str]] = ["msTeams", "sendResolved", "url"]
__properties: ClassVar[List[str]] = ["googleChat", "msTeams", "sendResolved", "url"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -91,6 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate(
{
"googleChat": obj.get("googleChat") if obj.get("googleChat") is not None else False,
"msTeams": obj.get("msTeams") if obj.get("msTeams") is not None else False,
"sendResolved": obj.get("sendResolved") if obj.get("sendResolved") is not None else True,
"url": obj.get("url"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ class WebHook(BaseModel):
WebHook
""" # noqa: E501

google_chat: Optional[StrictBool] = Field(default=False, alias="googleChat")
ms_teams: Optional[StrictBool] = Field(default=False, alias="msTeams")
send_resolved: Optional[StrictBool] = Field(default=True, alias="sendResolved")
url: Annotated[str, Field(min_length=1, strict=True, max_length=500)]
__properties: ClassVar[List[str]] = ["msTeams", "sendResolved", "url"]
__properties: ClassVar[List[str]] = ["googleChat", "msTeams", "sendResolved", "url"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -82,6 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate(
{
"googleChat": obj.get("googleChat") if obj.get("googleChat") is not None else False,
"msTeams": obj.get("msTeams") if obj.get("msTeams") is not None else False,
"sendResolved": obj.get("sendResolved") if obj.get("sendResolved") is not None else True,
"url": obj.get("url"),
Expand Down
Loading