-
Notifications
You must be signed in to change notification settings - Fork 48
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 a45a8aa9 of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Sep 10, 2024
1 parent
436b666
commit 0414d2d
Showing
14 changed files
with
559 additions
and
4 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,14 @@ | ||
""" | ||
Get billing dimensions mapping for usage endpoints returns "OK" response | ||
""" | ||
|
||
from datadog_api_client import ApiClient, Configuration | ||
from datadog_api_client.v2.api.usage_metering_api import UsageMeteringApi | ||
|
||
configuration = Configuration() | ||
configuration.unstable_operations["get_billing_dimension_mapping"] = True | ||
with ApiClient(configuration) as api_client: | ||
api_instance = UsageMeteringApi(api_client) | ||
response = api_instance.get_billing_dimension_mapping() | ||
|
||
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
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
68 changes: 68 additions & 0 deletions
68
src/datadog_api_client/v2/model/billing_dimensions_mapping_body_item.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,68 @@ | ||
# 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 Union, TYPE_CHECKING | ||
|
||
from datadog_api_client.model_utils import ( | ||
ModelNormal, | ||
cached_property, | ||
unset, | ||
UnsetType, | ||
) | ||
|
||
|
||
if TYPE_CHECKING: | ||
from datadog_api_client.v2.model.billing_dimensions_mapping_body_item_attributes import ( | ||
BillingDimensionsMappingBodyItemAttributes, | ||
) | ||
from datadog_api_client.v2.model.active_billing_dimensions_type import ActiveBillingDimensionsType | ||
|
||
|
||
class BillingDimensionsMappingBodyItem(ModelNormal): | ||
@cached_property | ||
def openapi_types(_): | ||
from datadog_api_client.v2.model.billing_dimensions_mapping_body_item_attributes import ( | ||
BillingDimensionsMappingBodyItemAttributes, | ||
) | ||
from datadog_api_client.v2.model.active_billing_dimensions_type import ActiveBillingDimensionsType | ||
|
||
return { | ||
"attributes": (BillingDimensionsMappingBodyItemAttributes,), | ||
"id": (str,), | ||
"type": (ActiveBillingDimensionsType,), | ||
} | ||
|
||
attribute_map = { | ||
"attributes": "attributes", | ||
"id": "id", | ||
"type": "type", | ||
} | ||
|
||
def __init__( | ||
self_, | ||
attributes: Union[BillingDimensionsMappingBodyItemAttributes, UnsetType] = unset, | ||
id: Union[str, UnsetType] = unset, | ||
type: Union[ActiveBillingDimensionsType, UnsetType] = unset, | ||
**kwargs, | ||
): | ||
""" | ||
The definition of ``BillingDimensionsMappingBodyItem`` object. | ||
:param attributes: Mapping of billing dimensions to endpoint keys. | ||
:type attributes: BillingDimensionsMappingBodyItemAttributes, optional | ||
:param id: ID of the billing dimension. | ||
:type id: str, optional | ||
:param type: Type of active billing dimensions data. | ||
:type type: ActiveBillingDimensionsType, optional | ||
""" | ||
if attributes is not unset: | ||
kwargs["attributes"] = attributes | ||
if id is not unset: | ||
kwargs["id"] = id | ||
if type is not unset: | ||
kwargs["type"] = type | ||
super().__init__(kwargs) |
Oops, something went wrong.