-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate client from commit 3b4747f4 of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Oct 2, 2024
1 parent
a3039dc
commit 07e1ec6
Showing
16 changed files
with
504 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
""" | ||
Fetch uptime for multiple tests returns "OK." response | ||
""" | ||
|
||
from datadog_api_client import ApiClient, Configuration | ||
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi | ||
from datadog_api_client.v1.model.synthetics_fetch_uptimes_payload import SyntheticsFetchUptimesPayload | ||
|
||
body = SyntheticsFetchUptimesPayload( | ||
from_ts=1726041488, | ||
public_ids=[ | ||
"p8m-9gw-nte", | ||
], | ||
to_ts=1726055954, | ||
) | ||
|
||
configuration = Configuration() | ||
with ApiClient(configuration) as api_client: | ||
api_instance = SyntheticsApi(api_client) | ||
response = api_instance.fetch_uptimes(body=body) | ||
|
||
print(response) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/datadog_api_client/v1/model/synthetics_fetch_uptimes_payload.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. | ||
# This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
# Copyright 2019-Present Datadog, Inc. | ||
from __future__ import annotations | ||
|
||
from typing import List | ||
|
||
from datadog_api_client.model_utils import ( | ||
ModelNormal, | ||
cached_property, | ||
) | ||
|
||
|
||
class SyntheticsFetchUptimesPayload(ModelNormal): | ||
@cached_property | ||
def openapi_types(_): | ||
return { | ||
"from_ts": (int,), | ||
"public_ids": ([str],), | ||
"to_ts": (int,), | ||
} | ||
|
||
attribute_map = { | ||
"from_ts": "from_ts", | ||
"public_ids": "public_ids", | ||
"to_ts": "to_ts", | ||
} | ||
|
||
def __init__(self_, from_ts: int, public_ids: List[str], to_ts: int, **kwargs): | ||
""" | ||
Object containing IDs of Synthetic tests and a timeframe. | ||
:param from_ts: Timestamp in seconds (Unix epoch) for the start of uptime. | ||
:type from_ts: int | ||
:param public_ids: An array of Synthetic test IDs you want to delete. | ||
:type public_ids: [str] | ||
:param to_ts: Timestamp in seconds (Unix epoch) for the end of uptime. | ||
:type to_ts: int | ||
""" | ||
super().__init__(kwargs) | ||
|
||
self_.from_ts = from_ts | ||
self_.public_ids = public_ids | ||
self_.to_ts = to_ts |
Oops, something went wrong.