Skip to content
Merged
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
32 changes: 22 additions & 10 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35810,6 +35810,8 @@ components:
description: Name of the Custom Costs file.
example: "my_file.json"
type: string
preview_unavailable_reason:
$ref: "#/components/schemas/CustomCostsFilePreviewUnavailableReason"
provider_names:
description: Providers contained in the Custom Costs file.
items:
Expand Down Expand Up @@ -35841,6 +35843,15 @@ components:
description: Type of the Custom Costs file metadata.
type: string
type: object
CustomCostsFilePreviewUnavailableReason:
description: >-
Reason the content of the Custom Costs file is not returned. Only set when `content` is omitted.
enum:
- CHARGE_PERIOD_OUTSIDE_RETENTION_WINDOW
example: CHARGE_PERIOD_OUTSIDE_RETENTION_WINDOW
type: string
x-enum-varnames:
- CHARGE_PERIOD_OUTSIDE_RETENTION_WINDOW
CustomCostsFileUpdateAttributes:
description: Attributes of a Custom Costs file that can be updated.
properties:
Expand Down Expand Up @@ -35915,11 +35926,12 @@ components:
description: Metadata of the user that has uploaded the Custom Costs file.
properties:
email:
description: The name of the Custom Costs file.
description: >-
Handle of the user. This is usually the user's email address, but can be another identifier (for example, a UUID for a service account).
example: "email.test@datadohq.com"
type: string
icon:
description: The name of the Custom Costs file.
description: Icon of the user.
example: "icon.png"
type: string
name:
Expand Down Expand Up @@ -174136,13 +174148,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Bad Request
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Forbidden
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
Expand Down Expand Up @@ -174214,13 +174226,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Bad Request
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Forbidden
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
Expand Down Expand Up @@ -174249,13 +174261,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Forbidden
"404":
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Not Found
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
Expand Down Expand Up @@ -174309,13 +174321,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Forbidden
"404":
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Not Found
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
if TYPE_CHECKING:
from datadog_api_client.v2.model.custom_costs_file_usage_charge_period import CustomCostsFileUsageChargePeriod
from datadog_api_client.v2.model.custom_costs_file_line_item import CustomCostsFileLineItem
from datadog_api_client.v2.model.custom_costs_file_preview_unavailable_reason import (
CustomCostsFilePreviewUnavailableReason,
)
from datadog_api_client.v2.model.custom_costs_user import CustomCostsUser


Expand All @@ -24,6 +27,9 @@ class CustomCostsFileMetadataWithContent(ModelNormal):
def openapi_types(_):
from datadog_api_client.v2.model.custom_costs_file_usage_charge_period import CustomCostsFileUsageChargePeriod
from datadog_api_client.v2.model.custom_costs_file_line_item import CustomCostsFileLineItem
from datadog_api_client.v2.model.custom_costs_file_preview_unavailable_reason import (
CustomCostsFilePreviewUnavailableReason,
)
from datadog_api_client.v2.model.custom_costs_user import CustomCostsUser

return {
Expand All @@ -33,6 +39,7 @@ def openapi_types(_):
"charge_period": (CustomCostsFileUsageChargePeriod,),
"content": ([CustomCostsFileLineItem],),
"name": (str,),
"preview_unavailable_reason": (CustomCostsFilePreviewUnavailableReason,),
"provider_names": ([str],),
"status": (str,),
"uploaded_at": (float,),
Expand All @@ -46,6 +53,7 @@ def openapi_types(_):
"charge_period": "charge_period",
"content": "content",
"name": "name",
"preview_unavailable_reason": "preview_unavailable_reason",
"provider_names": "provider_names",
"status": "status",
"uploaded_at": "uploaded_at",
Expand All @@ -60,6 +68,7 @@ def __init__(
charge_period: Union[CustomCostsFileUsageChargePeriod, UnsetType] = unset,
content: Union[List[CustomCostsFileLineItem], UnsetType] = unset,
name: Union[str, UnsetType] = unset,
preview_unavailable_reason: Union[CustomCostsFilePreviewUnavailableReason, UnsetType] = unset,
provider_names: Union[List[str], UnsetType] = unset,
status: Union[str, UnsetType] = unset,
uploaded_at: Union[float, UnsetType] = unset,
Expand Down Expand Up @@ -87,6 +96,9 @@ def __init__(
:param name: Name of the Custom Costs file.
:type name: str, optional

:param preview_unavailable_reason: Reason the content of the Custom Costs file is not returned. Only set when ``content`` is omitted.
:type preview_unavailable_reason: CustomCostsFilePreviewUnavailableReason, optional

:param provider_names: Providers contained in the Custom Costs file.
:type provider_names: [str], optional

Expand All @@ -111,6 +123,8 @@ def __init__(
kwargs["content"] = content
if name is not unset:
kwargs["name"] = name
if preview_unavailable_reason is not unset:
kwargs["preview_unavailable_reason"] = preview_unavailable_reason
if provider_names is not unset:
kwargs["provider_names"] = provider_names
if status is not unset:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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 datadog_api_client.model_utils import (
ModelSimple,
cached_property,
)

from typing import ClassVar


class CustomCostsFilePreviewUnavailableReason(ModelSimple):
"""
Reason the content of the Custom Costs file is not returned. Only set when `content` is omitted.

:param value: If omitted defaults to "CHARGE_PERIOD_OUTSIDE_RETENTION_WINDOW". Must be one of ["CHARGE_PERIOD_OUTSIDE_RETENTION_WINDOW"].
:type value: str
"""

allowed_values = {
"CHARGE_PERIOD_OUTSIDE_RETENTION_WINDOW",
}
CHARGE_PERIOD_OUTSIDE_RETENTION_WINDOW: ClassVar["CustomCostsFilePreviewUnavailableReason"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


CustomCostsFilePreviewUnavailableReason.CHARGE_PERIOD_OUTSIDE_RETENTION_WINDOW = (
CustomCostsFilePreviewUnavailableReason("CHARGE_PERIOD_OUTSIDE_RETENTION_WINDOW")
)
4 changes: 2 additions & 2 deletions src/datadog_api_client/v2/model/custom_costs_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ def __init__(
"""
Metadata of the user that has uploaded the Custom Costs file.

:param email: The name of the Custom Costs file.
:param email: Handle of the user. This is usually the user's email address, but can be another identifier (for example, a UUID for a service account).
:type email: str, optional

:param icon: The name of the Custom Costs file.
:param icon: Icon of the user.
:type icon: str, optional

:param name: Name of the user.
Expand Down
4 changes: 4 additions & 0 deletions src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2575,6 +2575,9 @@
from datadog_api_client.v2.model.custom_costs_file_metadata_with_content_high_level import (
CustomCostsFileMetadataWithContentHighLevel,
)
from datadog_api_client.v2.model.custom_costs_file_preview_unavailable_reason import (
CustomCostsFilePreviewUnavailableReason,
)
from datadog_api_client.v2.model.custom_costs_file_update_attributes import CustomCostsFileUpdateAttributes
from datadog_api_client.v2.model.custom_costs_file_update_data import CustomCostsFileUpdateData
from datadog_api_client.v2.model.custom_costs_file_update_request import CustomCostsFileUpdateRequest
Expand Down Expand Up @@ -15948,6 +15951,7 @@
"CustomCostsFileMetadataHighLevel",
"CustomCostsFileMetadataWithContent",
"CustomCostsFileMetadataWithContentHighLevel",
"CustomCostsFilePreviewUnavailableReason",
"CustomCostsFileUpdateAttributes",
"CustomCostsFileUpdateData",
"CustomCostsFileUpdateRequest",
Expand Down
Loading