diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c0368d657d..9c52b0b526 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -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: @@ -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: @@ -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: @@ -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" @@ -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" @@ -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" @@ -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" diff --git a/src/datadog_api_client/v2/model/custom_costs_file_metadata_with_content.py b/src/datadog_api_client/v2/model/custom_costs_file_metadata_with_content.py index 2531df2847..68bcce29c7 100644 --- a/src/datadog_api_client/v2/model/custom_costs_file_metadata_with_content.py +++ b/src/datadog_api_client/v2/model/custom_costs_file_metadata_with_content.py @@ -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 @@ -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 { @@ -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,), @@ -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", @@ -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, @@ -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 @@ -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: diff --git a/src/datadog_api_client/v2/model/custom_costs_file_preview_unavailable_reason.py b/src/datadog_api_client/v2/model/custom_costs_file_preview_unavailable_reason.py new file mode 100644 index 0000000000..3db5257cf0 --- /dev/null +++ b/src/datadog_api_client/v2/model/custom_costs_file_preview_unavailable_reason.py @@ -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") +) diff --git a/src/datadog_api_client/v2/model/custom_costs_user.py b/src/datadog_api_client/v2/model/custom_costs_user.py index b6b127b2e0..c4e3230214 100644 --- a/src/datadog_api_client/v2/model/custom_costs_user.py +++ b/src/datadog_api_client/v2/model/custom_costs_user.py @@ -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. diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 24dc39251c..e18d2b2442 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -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 @@ -15948,6 +15951,7 @@ "CustomCostsFileMetadataHighLevel", "CustomCostsFileMetadataWithContent", "CustomCostsFileMetadataWithContentHighLevel", + "CustomCostsFilePreviewUnavailableReason", "CustomCostsFileUpdateAttributes", "CustomCostsFileUpdateData", "CustomCostsFileUpdateRequest",