# generated by datamodel-codegen:
#   filename:  openapi_spec.json
#   timestamp: 2025-11-20T00:15:30+00:00

from __future__ import annotations

from datetime import date, datetime
from enum import Enum
from typing import Annotated, Any, Mapping, Sequence

from pydantic import BaseModel, Field, RootModel


class CreateWorkspaceExchangeRateDate(str, Enum):
    """
    The date to use for currency conversion.
    """

    daily_rate = 'daily_rate'
    end_of_billing_period_rate = 'end_of_billing_period_rate'


class CreateWorkspace(BaseModel):
    """
    Create a workspace
    """

    name: Annotated[str, Field(description='Name of the workspace.')]
    enable_currency_conversion: Annotated[
        bool, Field(description='Enable currency conversion for the workspace.')
    ] = True
    currency: Annotated[
        str | None, Field(description='Currency code for the workspace.')
    ] = None
    exchange_rate_date: Annotated[
        CreateWorkspaceExchangeRateDate,
        Field(description='The date to use for currency conversion.'),
    ] = 'daily_rate'


class Workspace(BaseModel):
    """
    Workspace model
    """

    token: str | None = None
    name: Annotated[
        str | None,
        Field(description='The name of the Workspace.', examples=['Acme Corp.']),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the Workspace was created. ISO 8601 Formatted.',
            examples=['2023-08-04T00:00:00Z'],
        ),
    ] = None
    enable_currency_conversion: Annotated[
        bool | None,
        Field(
            description='Whether or not currency conversion is enabled for the Workspace.'
        ),
    ] = None
    currency: Annotated[
        str | None,
        Field(
            description='The currency code for the Workspace that will be used for currency conversion.',
            examples=['USD'],
        ),
    ] = None
    exchange_rate_date: Annotated[
        str | None,
        Field(
            description='The exchange rate date that will be used to convert currency for your cost data.'
        ),
    ] = None


class Errors(BaseModel):
    """
    Errors model
    """

    links: Mapping[str, Any] | None = None
    errors: Sequence[str] | None = None


class Workspaces(BaseModel):
    """
    Workspaces model
    """

    links: Mapping[str, Any] | None = None
    workspaces: Sequence[Workspace] | None = None


class CreateFolder(BaseModel):
    """
    Create a Folder for CostReports.
    """

    title: Annotated[str, Field(description='The title of the Folder.')]
    parent_folder_token: Annotated[
        str | None, Field(description='The token of the parent Folder.')
    ] = None
    saved_filter_tokens: Annotated[
        Sequence[str] | None,
        Field(
            description='The tokens of the SavedFilters to apply to any Cost Report contained within the Folder.'
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(
            description="The token of the Workspace to add the Folder to. Ignored if 'parent_folder_token' is set. Required if the API token is associated with multiple Workspaces."
        ),
    ] = None


class Folder(BaseModel):
    """
    Folder model
    """

    token: str | None = None
    title: Annotated[
        str | None,
        Field(
            description='The title of the Folder.', examples=['Platform Team Reports']
        ),
    ] = None
    parent_folder_token: Annotated[
        str | None, Field(description='The token for the parent Folder, if any.')
    ] = None
    saved_filter_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens for the SavedFilters assigned to the Folder.'),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the Folder was created. ISO 8601 Formatted.',
            examples=['2023-08-04T00:00:00Z'],
        ),
    ] = None
    updated_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the Folder was last updated at. ISO 8601 Formatted.',
            examples=['2023-08-04T00:00:00Z'],
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(description='The token for the Workspace the Folder is a part of.'),
    ] = None


class Folders(BaseModel):
    """
    Folders model
    """

    links: Mapping[str, Any] | None = None
    folders: Sequence[Folder] | None = None


class UpdateFolder(BaseModel):
    """
    Update a Folder for CostReports.
    """

    title: Annotated[str | None, Field(description='The title of the Folder.')] = None
    parent_folder_token: Annotated[
        str | None, Field(description='The token of the parent Folder.')
    ] = None
    saved_filter_tokens: Annotated[
        Sequence[str] | None,
        Field(
            description='The tokens of the SavedFilters to apply to any Cost Report contained within the Folder.'
        ),
    ] = None


class CreateSavedFilter(BaseModel):
    """
    Create a SavedFilter for CostReports.
    """

    title: Annotated[str, Field(description='The title of the SavedFilter.')]
    workspace_token: Annotated[
        str | None,
        Field(
            description='The Workspace to associate the SavedFilter with. Required if the API token is associated with multiple Workspaces.'
        ),
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter query language to apply to the SavedFilter, which subsequently gets applied to a CostReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None


class SavedFilter(BaseModel):
    """
    SavedFilter model
    """

    token: str | None = None
    title: Annotated[
        str | None,
        Field(
            description='The title of the SavedFilter.',
            examples=['Platform Team Reports'],
        ),
    ] = None
    cost_report_tokens: Annotated[
        Sequence[str] | None,
        Field(
            description='The tokens for any CostReports the SavedFilter is applied to.'
        ),
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description="The SavedFilter's filter, applied to any relevant CostReports. Additional documentation available at https://docs.vantage.sh/vql.",
            examples=["costs.provider = 'azure'"],
        ),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the report was created. ISO 8601 Formatted.',
            examples=['2023-08-04T00:00:00Z'],
        ),
    ] = None
    created_by: Annotated[
        str | None, Field(description='The token for the Creator of this SavedFilter.')
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(description='The token for the Workspace the SavedFilter is a part of.'),
    ] = None


class SavedFilters(BaseModel):
    """
    SavedFilters model
    """

    links: Mapping[str, Any] | None = None
    saved_filters: Sequence[SavedFilter] | None = None


class UpdateSavedFilter(BaseModel):
    """
    Update a SavedFilter for CostReports.
    """

    title: Annotated[str | None, Field(description='The title of the SavedFilter.')] = (
        None
    )
    filter: Annotated[
        str | None,
        Field(
            description='The filter query language to apply to the SavedFilter, which subsequently gets applied to a CostReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None


class CreateCostReportBusinessMetricTokensWithMetadatumUnitScale(str, Enum):
    """
    Determines the scale of the BusinessMetric's values within the CostReport.
    """

    per_unit = 'per_unit'
    per_hundred = 'per_hundred'
    per_thousand = 'per_thousand'
    per_million = 'per_million'
    per_billion = 'per_billion'


class CreateCostReportBusinessMetricTokensWithMetadatum(BaseModel):
    business_metric_token: Annotated[
        str,
        Field(
            description='The token of the BusinessMetric to attach to the CostReport.'
        ),
    ]
    unit_scale: Annotated[
        CreateCostReportBusinessMetricTokensWithMetadatumUnitScale,
        Field(
            description="Determines the scale of the BusinessMetric's values within the CostReport."
        ),
    ] = 'per_unit'
    label_filter: Annotated[
        Sequence[str] | None,
        Field(description='Include only values with these labels in the CostReport.'),
    ] = None


class CreateCostReportSettings(BaseModel):
    """
    Report settings.
    """

    include_credits: Annotated[
        bool, Field(description='Report will include credits.')
    ] = False
    include_refunds: Annotated[
        bool, Field(description='Report will include refunds.')
    ] = False
    include_discounts: Annotated[
        bool, Field(description='Report will include discounts.')
    ] = True
    include_tax: Annotated[bool, Field(description='Report will include tax.')] = True
    amortize: Annotated[bool, Field(description='Report will amortize.')] = True
    unallocated: Annotated[
        bool, Field(description='Report will show unallocated costs.')
    ] = False
    aggregate_by: Annotated[
        str, Field(description='Report will aggregate by cost or usage.')
    ] = 'cost'
    show_previous_period: Annotated[
        bool,
        Field(
            description='Report will show previous period costs or usage comparison.'
        ),
    ] = True


class CreateCostReportDateInterval(str, Enum):
    """
    The date interval of the CostReport. Incompatible with 'start_date' and 'end_date' parameters. Defaults to 'this_month' if start_date and end_date are not provided.
    """

    this_month = 'this_month'
    last_7_days = 'last_7_days'
    last_30_days = 'last_30_days'
    last_month = 'last_month'
    last_3_months = 'last_3_months'
    last_6_months = 'last_6_months'
    custom = 'custom'
    last_12_months = 'last_12_months'
    last_24_months = 'last_24_months'
    last_36_months = 'last_36_months'
    next_month = 'next_month'
    next_3_months = 'next_3_months'
    next_6_months = 'next_6_months'
    next_12_months = 'next_12_months'
    year_to_date = 'year_to_date'
    last_3_days = 'last_3_days'
    last_14_days = 'last_14_days'


class CreateCostReportChartType(str, Enum):
    """
    The chart type of the CostReport.
    """

    area = 'area'
    line = 'line'
    pie = 'pie'
    bar = 'bar'
    multi_bar = 'multi_bar'


class CreateCostReportDateBin(str, Enum):
    """
    The date bin of the CostReport.
    """

    cumulative = 'cumulative'
    day = 'day'
    week = 'week'
    month = 'month'
    quarter = 'quarter'


class CreateCostReportChartSettings(BaseModel):
    """
    Report chart settings.
    """

    x_axis_dimension: Annotated[
        Sequence[str] | None,
        Field(
            description="The dimension used to group or label data along the x-axis (e.g., by date, region, or service). NOTE: Only one value is allowed at this time. Defaults to ['date']."
        ),
    ] = None
    y_axis_dimension: Annotated[
        str | None,
        Field(
            description="The metric or measure displayed on the chart’s y-axis. Possible values: 'cost', 'usage'. Defaults to 'cost'."
        ),
    ] = None


class CreateCostReport(BaseModel):
    """
    Create a CostReport.
    """

    title: Annotated[str, Field(description='The title of the CostReport.')]
    workspace_token: Annotated[
        str | None,
        Field(
            description="The token of the Workspace to add the Cost Report to. Ignored if 'folder_token' is set. Required if the API token is associated with multiple Workspaces."
        ),
    ] = None
    groupings: Annotated[
        str | None,
        Field(
            description='Grouping values for aggregating costs on the report. Valid groupings: account_id, billing_account_id, charge_type, cost_category, cost_subcategory, provider, region, resource_id, service, tagged, tag:<tag_value>. If providing multiple groupings, join as comma separated values: groupings=provider,service,region'
        ),
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter query language to apply to the CostReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None
    saved_filter_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens of the SavedFilters to apply to the CostReport.'),
    ] = None
    business_metric_tokens_with_metadata: Annotated[
        Sequence[CreateCostReportBusinessMetricTokensWithMetadatum] | None,
        Field(
            description='The tokens for any BusinessMetrics to attach to the CostReport, and the unit scale.'
        ),
    ] = None
    folder_token: Annotated[
        str | None,
        Field(
            description='The token of the Folder to add the CostReport to. Determines the Workspace the report is assigned to.'
        ),
    ] = None
    settings: Annotated[
        CreateCostReportSettings | None, Field(description='Report settings.')
    ] = None
    previous_period_start_date: Annotated[
        str | None,
        Field(
            description='The previous period start date of the CostReport. ISO 8601 Formatted.'
        ),
    ] = None
    previous_period_end_date: Annotated[
        str,
        Field(
            description='The previous period end date of the CostReport. ISO 8601 Formatted.'
        ),
    ]
    start_date: Annotated[
        str | None,
        Field(
            description="The start date of the CostReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter."
        ),
    ] = None
    end_date: Annotated[
        str,
        Field(
            description="The end date of the CostReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter."
        ),
    ]
    date_interval: Annotated[
        CreateCostReportDateInterval | None,
        Field(
            description="The date interval of the CostReport. Incompatible with 'start_date' and 'end_date' parameters. Defaults to 'this_month' if start_date and end_date are not provided."
        ),
    ] = None
    chart_type: Annotated[
        CreateCostReportChartType,
        Field(description='The chart type of the CostReport.'),
    ] = 'line'
    date_bin: Annotated[
        CreateCostReportDateBin, Field(description='The date bin of the CostReport.')
    ] = 'cumulative'
    chart_settings: Annotated[
        CreateCostReportChartSettings | None,
        Field(description='Report chart settings.'),
    ] = None


CostReportSettings = CreateCostReportSettings


class AttachedBusinessMetricForCostReportUnitScale(str, Enum):
    """
    Determines the scale of the BusinessMetric's values within a particular CostReport.
    """

    per_unit = 'per_unit'
    per_hundred = 'per_hundred'
    per_thousand = 'per_thousand'
    per_million = 'per_million'
    per_billion = 'per_billion'


class AttachedBusinessMetricForCostReport(BaseModel):
    business_metric_token: Annotated[
        str | None,
        Field(
            description="The token of the BusinessMetric that's attached to the CostReport.",
            examples=['bsnss_mtrc_1234'],
        ),
    ] = None
    unit_scale: Annotated[
        AttachedBusinessMetricForCostReportUnitScale | None,
        Field(
            description="Determines the scale of the BusinessMetric's values within a particular CostReport.",
            examples=['per_hundred'],
        ),
    ] = None
    label_filter: Annotated[
        Sequence[str] | None,
        Field(
            description='The labels that the BusinessMetric is filtered by within a particular CostReport.'
        ),
    ] = None


class ChartSettings(BaseModel):
    y_axis_dimension: Annotated[
        str | None,
        Field(
            description="The metric or measure displayed on the chart’s y-axis. Possible values: 'cost', 'usage'. Defaults to 'cost'."
        ),
    ] = None
    x_axis_dimension: Annotated[
        str | None,
        Field(
            description="The dimension used to group or label data along the x-axis (e.g., by date, region, or service). NOTE: Only one value is allowed at this time. Defaults to ['date']."
        ),
    ] = None


UpdateCostReportBusinessMetricTokensWithMetadatum = (
    CreateCostReportBusinessMetricTokensWithMetadatum
)


class UpdateCostReportSettings(BaseModel):
    """
    Report settings.
    """

    include_credits: Annotated[
        bool | None, Field(description='Report will include credits.')
    ] = None
    include_refunds: Annotated[
        bool | None, Field(description='Report will include refunds.')
    ] = None
    include_discounts: Annotated[
        bool | None, Field(description='Report will include discounts.')
    ] = None
    include_tax: Annotated[
        bool | None, Field(description='Report will include tax.')
    ] = None
    amortize: Annotated[bool | None, Field(description='Report will amortize.')] = None
    unallocated: Annotated[
        bool | None, Field(description='Report will show unallocated costs.')
    ] = None
    aggregate_by: Annotated[
        str | None, Field(description='Report will aggregate by cost or usage.')
    ] = None
    show_previous_period: Annotated[
        bool | None,
        Field(
            description='Report will show previous period costs or usage comparison.'
        ),
    ] = None


UpdateCostReportChartSettings = CreateCostReportChartSettings


class UpdateCostReport(BaseModel):
    """
    Update a CostReport.
    """

    title: Annotated[str | None, Field(description='The title of the CostReport.')] = (
        None
    )
    groupings: Annotated[
        str | None,
        Field(
            description='Grouping values for aggregating costs on the report. Valid groupings: account_id, billing_account_id, charge_type, cost_category, cost_subcategory, provider, region, resource_id, service, tagged, tag:<tag_value>. If providing multiple groupings, join as comma separated values: groupings=provider,service,region'
        ),
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter query language to apply to the CostReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None
    saved_filter_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens of the SavedFilters to apply to the CostReport.'),
    ] = None
    business_metric_tokens_with_metadata: Annotated[
        Sequence[UpdateCostReportBusinessMetricTokensWithMetadatum] | None,
        Field(
            description='The tokens for any BusinessMetrics to attach to the CostReport, and the unit scale.'
        ),
    ] = None
    folder_token: Annotated[
        str | None,
        Field(
            description='The token of the Folder to add the CostReport to. Determines the Workspace the report is assigned to.'
        ),
    ] = None
    settings: Annotated[
        UpdateCostReportSettings | None, Field(description='Report settings.')
    ] = None
    chart_settings: Annotated[
        UpdateCostReportChartSettings | None,
        Field(description='Report chart settings.'),
    ] = None
    previous_period_start_date: Annotated[
        str | None,
        Field(
            description='The previous period start date of the CostReport. ISO 8601 Formatted.'
        ),
    ] = None
    previous_period_end_date: Annotated[
        str | None,
        Field(
            description='The previous period end date of the CostReport. ISO 8601 Formatted.'
        ),
    ] = None
    start_date: Annotated[
        str | None,
        Field(
            description="The start date of the CostReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter."
        ),
    ] = None
    end_date: Annotated[
        str | None,
        Field(
            description="The end date of the CostReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter."
        ),
    ] = None
    date_interval: Annotated[
        CreateCostReportDateInterval | None,
        Field(
            description="The date interval of the CostReport. Incompatible with 'start_date' and 'end_date' parameters. Defaults to 'this_month' if start_date and end_date are not provided."
        ),
    ] = None
    chart_type: Annotated[
        CreateCostReportChartType,
        Field(description='The chart type of the CostReport.'),
    ] = 'line'
    date_bin: Annotated[
        CreateCostReportDateBin, Field(description='The date bin of the CostReport.')
    ] = 'cumulative'


class ForecastedCostProvider(str, Enum):
    """
    The cost provider which incurred the cost. Will be 'all' for all combined providers.
    """

    aws = 'aws'
    azure = 'azure'
    gcp = 'gcp'
    snowflake = 'snowflake'
    databricks = 'databricks'
    mongo = 'mongo'
    datadog = 'datadog'
    fastly = 'fastly'
    new_relic = 'new_relic'
    opencost = 'opencost'
    open_ai = 'open_ai'
    oracle = 'oracle'
    confluent = 'confluent'
    planetscale = 'planetscale'
    coralogix = 'coralogix'
    kubernetes = 'kubernetes'
    custom_provider = 'custom_provider'
    github = 'github'
    linode = 'linode'
    grafana = 'grafana'
    clickhouse = 'clickhouse'
    temporal = 'temporal'
    twilio = 'twilio'
    azure_csp = 'azure_csp'
    kubernetes_agent = 'kubernetes_agent'
    anthropic = 'anthropic'
    anyscale = 'anyscale'


class ForecastedCost(BaseModel):
    links: Mapping[str, Any] | None = None
    date: Annotated[
        str | None,
        Field(
            description='The date the forecasted cost is projected to accrue. ISO 8601 Formatted.',
            examples=['2035-09-05+00:00'],
        ),
    ] = None
    amount: Annotated[
        str | None,
        Field(description='The amount of the forecasted cost.', examples=['4.25']),
    ] = None
    provider: Annotated[
        ForecastedCostProvider | None,
        Field(
            description="The cost provider which incurred the cost. Will be 'all' for all combined providers.",
            examples=['aws'],
        ),
    ] = None
    service: Annotated[
        str | None,
        Field(
            description="The service for the forecasted cost. Will be 'all' for all combined services",
            examples=['Amazon Elastic Compute Cloud - Compute'],
        ),
    ] = None


class CreateSegmentReportSettings(BaseModel):
    """
    Report settings configurable on top-level Segments.
    """

    include_credits: Annotated[
        bool | None,
        Field(description='Reports created under this Segment will include credits.'),
    ] = None
    include_refunds: Annotated[
        bool | None,
        Field(description='Reports created under this Segment will include refunds.'),
    ] = None
    include_discounts: Annotated[
        bool | None,
        Field(description='Reports created under this Segment will include discounts.'),
    ] = None
    include_tax: Annotated[
        bool | None,
        Field(description='Reports created under this Segment will include tax.'),
    ] = None
    amortize: Annotated[
        bool | None,
        Field(description='Reports created under this Segment will amortize.'),
    ] = None


class CreateSegment(BaseModel):
    """
    Create a Segment.
    """

    title: Annotated[str, Field(description='The title of the Segment.')]
    description: Annotated[
        str | None, Field(description='The description of the Segment.')
    ] = None
    priority: Annotated[
        int | None, Field(description='The priority of the Segment.')
    ] = None
    track_unallocated: Annotated[
        bool,
        Field(
            description='Track Unallocated Costs which are not assigned to any of the created Segments.'
        ),
    ] = False
    report_settings: Annotated[
        CreateSegmentReportSettings | None,
        Field(description='Report settings configurable on top-level Segments.'),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(
            description="The token of the Workspace to add the Segment to. Ignored if 'segment_token' is set. Required if the API token is associated with multiple Workspaces."
        ),
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None
    parent_segment_token: Annotated[
        str | None,
        Field(
            description='The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.'
        ),
    ] = None


class SegmentReportSettings(BaseModel):
    """
    Report settings configurable on top-level Segments.
    """

    include_credits: bool | None = None
    include_refunds: bool | None = None
    include_discounts: bool | None = None
    include_tax: bool | None = None
    amortize: bool | None = None


class Segment(BaseModel):
    """
    Segment model
    """

    token: str | None = None
    title: Annotated[
        str | None, Field(description='The title of the Segment.', examples=['OPEX'])
    ] = None
    parent_segment_token: Annotated[
        str | None,
        Field(description='The token of the parent Segment of this Segment.'),
    ] = None
    description: Annotated[
        str | None,
        Field(
            description='The description of the Segment.',
            examples=['Operating expenses'],
        ),
    ] = None
    track_unallocated: Annotated[
        bool | None,
        Field(
            description='Track Unallocated Costs which are not assigned to any of the created Segments.',
            examples=[False],
        ),
    ] = None
    report_settings: Annotated[
        SegmentReportSettings | None,
        Field(description='Report settings configurable on top-level Segments.'),
    ] = None
    priority: Annotated[
        int | None,
        Field(
            description='Costs are assigned in priority order across all Segments with assigned filters.',
            examples=[100],
        ),
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter applied to the Segment. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the Segment was created. ISO 8601 Formatted.',
            examples=['2021-07-09T00:00:00Z'],
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(description='The token for the Workspace the Segment is a part of.'),
    ] = None
    report_token: Annotated[
        str | None,
        Field(description='The token for the Report the Segment has generated.'),
    ] = None


class Segments(BaseModel):
    """
    Segments model
    """

    links: Mapping[str, Any] | None = None
    segments: Sequence[Segment] | None = None


UpdateSegmentReportSettings = CreateSegmentReportSettings


class UpdateSegment(BaseModel):
    """
    Update a Segment.
    """

    title: Annotated[str | None, Field(description='The title of the Segment.')] = None
    description: Annotated[
        str | None, Field(description='The description of the Segment.')
    ] = None
    priority: Annotated[
        int | None, Field(description='The priority of the Segment.')
    ] = None
    track_unallocated: Annotated[
        bool,
        Field(
            description='Track Unallocated Costs which are not assigned to any of the created Segments.'
        ),
    ] = False
    report_settings: Annotated[
        UpdateSegmentReportSettings | None,
        Field(description='Report settings configurable on top-level Segments.'),
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None
    parent_segment_token: Annotated[
        str | None,
        Field(
            description='The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.'
        ),
    ] = None


class CreateDashboardWidgetSettingsDisplayType(str, Enum):
    table = 'table'
    chart = 'chart'


class CreateDashboardWidgetSettings(BaseModel):
    """
    The settings for the DashboardWidget.
    """

    display_type: CreateDashboardWidgetSettingsDisplayType


class CreateDashboardWidget(BaseModel):
    widgetable_token: Annotated[
        str, Field(description='The token of the represented Resource.')
    ]
    title: Annotated[
        str | None,
        Field(
            description='The title of the Widget (defaults to the title of the Resource).'
        ),
    ] = None
    settings: Annotated[
        CreateDashboardWidgetSettings | None,
        Field(description='The settings for the DashboardWidget.'),
    ] = None


class CreateDashboardDateBin(str, Enum):
    """
    Determines how to group costs in the Dashboard.
    """

    cumulative = 'cumulative'
    day = 'day'
    week = 'week'
    month = 'month'


class CreateDashboardDateInterval(str, Enum):
    """
    Determines the date range in the Dashboard. Incompatible with 'start_date' and 'end_date' parameters.
    """

    this_month = 'this_month'
    last_7_days = 'last_7_days'
    last_30_days = 'last_30_days'
    last_month = 'last_month'
    last_3_months = 'last_3_months'
    last_6_months = 'last_6_months'
    custom = 'custom'
    last_12_months = 'last_12_months'
    last_24_months = 'last_24_months'
    last_36_months = 'last_36_months'
    next_month = 'next_month'
    next_3_months = 'next_3_months'
    next_6_months = 'next_6_months'
    next_12_months = 'next_12_months'
    year_to_date = 'year_to_date'
    last_3_days = 'last_3_days'
    last_14_days = 'last_14_days'


class CreateDashboard(BaseModel):
    """
    Create a Dashboard.
    """

    title: Annotated[str, Field(description='The title of the Dashboard.')]
    widgets: Annotated[
        Sequence[CreateDashboardWidget] | None,
        Field(
            description='The widgets to add to the Dashboard. Currently supports CostReport, ResourceReport, KubernetesEfficiencyReport, and FinancialCommitmentReport.'
        ),
    ] = None
    saved_filter_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens of the Saved Filters used in the Dashboard.'),
    ] = None
    date_bin: Annotated[
        CreateDashboardDateBin | None,
        Field(description='Determines how to group costs in the Dashboard.'),
    ] = None
    date_interval: Annotated[
        CreateDashboardDateInterval | None,
        Field(
            description="Determines the date range in the Dashboard. Incompatible with 'start_date' and 'end_date' parameters."
        ),
    ] = None
    start_date: Annotated[
        str | None,
        Field(
            description="The start date for the date range for costs in the Dashboard. ISO 8601 Formatted. Incompatible with 'date_interval' parameter."
        ),
    ] = None
    end_date: Annotated[
        str | None,
        Field(
            description="The end date for the date range for costs in the Dashboard. ISO 8601 Formatted. Incompatible with 'date_interval' parameter."
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(
            description='The token of the Workspace to add the Dashboard to. Required if the API token is associated with multiple Workspaces.'
        ),
    ] = None


class DashboardDateInterval(str, Enum):
    """
    Determines the date range for Reports in the Dashboard. Guaranteed to be set to 'custom' if 'start_date' and 'end_date' are set.
    """

    this_month = 'this_month'
    last_7_days = 'last_7_days'
    last_30_days = 'last_30_days'
    last_month = 'last_month'
    last_3_months = 'last_3_months'
    last_6_months = 'last_6_months'
    custom = 'custom'
    last_12_months = 'last_12_months'
    last_24_months = 'last_24_months'
    last_36_months = 'last_36_months'
    next_month = 'next_month'
    next_3_months = 'next_3_months'
    next_6_months = 'next_6_months'
    next_12_months = 'next_12_months'
    year_to_date = 'year_to_date'
    last_3_days = 'last_3_days'
    last_14_days = 'last_14_days'


class DashboardWidgetSettings(BaseModel):
    display_type: CreateDashboardWidgetSettingsDisplayType | None = None


UpdateDashboardWidgetSettings = CreateDashboardWidgetSettings


class UpdateDashboardWidget(BaseModel):
    widgetable_token: Annotated[
        str, Field(description='The token of the represented Resource.')
    ]
    title: Annotated[
        str | None,
        Field(
            description='The title of the Widget (defaults to the title of the Resource).'
        ),
    ] = None
    settings: Annotated[
        UpdateDashboardWidgetSettings | None,
        Field(description='The settings for the DashboardWidget.'),
    ] = None


class UpdateDashboardDateInterval(str, Enum):
    """
    Determines the date range in the Dashboard. Incompatible with 'start_date' and 'end_date' parameters.
    """

    this_month = 'this_month'
    last_7_days = 'last_7_days'
    last_30_days = 'last_30_days'
    last_month = 'last_month'
    last_3_months = 'last_3_months'
    last_6_months = 'last_6_months'
    custom = 'custom'
    last_12_months = 'last_12_months'
    last_24_months = 'last_24_months'
    last_36_months = 'last_36_months'
    next_month = 'next_month'
    next_3_months = 'next_3_months'
    next_6_months = 'next_6_months'
    next_12_months = 'next_12_months'
    year_to_date = 'year_to_date'
    last_3_days = 'last_3_days'
    last_14_days = 'last_14_days'
    field_ = ''


class UpdateDashboard(BaseModel):
    """
    Update a Dashboard.
    """

    title: Annotated[str | None, Field(description='The title of the Dashboard.')] = (
        None
    )
    widgets: Annotated[
        Sequence[UpdateDashboardWidget] | None,
        Field(
            description='The widgets to add to the Dashboard. Currently supports CostReport, ResourceReport, KubernetesEfficiencyReport, and FinancialCommitmentReport.'
        ),
    ] = None
    saved_filter_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens of the Saved Filters used in the Dashboard.'),
    ] = None
    date_bin: Annotated[
        CreateDashboardDateBin | None,
        Field(description='Determines how to group costs in the Dashboard.'),
    ] = None
    date_interval: Annotated[
        UpdateDashboardDateInterval | None,
        Field(
            description="Determines the date range in the Dashboard. Incompatible with 'start_date' and 'end_date' parameters."
        ),
    ] = None
    start_date: Annotated[
        str | None,
        Field(
            description="The start date for the date range for costs in the Dashboard. ISO 8601 Formatted. Incompatible with 'date_interval' parameter."
        ),
    ] = None
    end_date: Annotated[
        str | None,
        Field(
            description="The end date for the date range for costs in the Dashboard. ISO 8601 Formatted. Incompatible with 'date_interval' parameter."
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(
            description='The token of the Workspace the Dashboard belongs to. Required if the API token is associated with multiple Workspaces.'
        ),
    ] = None


class CostProvider(str, Enum):
    """
    The cost provider which incurred the cost.
    """

    aws = 'aws'
    azure = 'azure'
    gcp = 'gcp'
    snowflake = 'snowflake'
    databricks = 'databricks'
    mongo = 'mongo'
    datadog = 'datadog'
    fastly = 'fastly'
    new_relic = 'new_relic'
    opencost = 'opencost'
    open_ai = 'open_ai'
    oracle = 'oracle'
    confluent = 'confluent'
    planetscale = 'planetscale'
    coralogix = 'coralogix'
    kubernetes = 'kubernetes'
    custom_provider = 'custom_provider'
    github = 'github'
    linode = 'linode'
    grafana = 'grafana'
    clickhouse = 'clickhouse'
    temporal = 'temporal'
    twilio = 'twilio'
    azure_csp = 'azure_csp'
    kubernetes_agent = 'kubernetes_agent'
    anthropic = 'anthropic'
    anyscale = 'anyscale'


class Cost(BaseModel):
    """
    Cost model
    """

    links: Mapping[str, Any] | None = None
    accrued_at: Annotated[
        str | None,
        Field(
            description='The date the cost was accrued. ISO 8601 Formatted.',
            examples=['2023-09-05+00:00'],
        ),
    ] = None
    amount: Annotated[
        str | None, Field(description='The amount of the cost.', examples=['4.25'])
    ] = None
    currency: Annotated[
        str | None, Field(description='The currency of the cost.', examples=['USD'])
    ] = None
    usage: Annotated[
        Mapping[str, Any] | None,
        Field(description='The usage amount and unit incurred by the cost.'),
    ] = None
    provider: Annotated[
        CostProvider | None,
        Field(
            description='The cost provider which incurred the cost.', examples=['aws']
        ),
    ] = None
    billing_account_id: Annotated[
        str | None,
        Field(
            description="The cost provider's billing account id that incurred the cost.",
            examples=['9109237192'],
        ),
    ] = None
    account_id: Annotated[
        str | None,
        Field(
            description="The cost provider's account id that incurred the cost.",
            examples=['9109237192'],
        ),
    ] = None
    service: Annotated[
        str | None,
        Field(
            description='The service which incurred the cost.',
            examples=['Amazon Elastic Compute Cloud - Compute'],
        ),
    ] = None
    region: Annotated[
        str | None,
        Field(
            description='The region which incurred the cost.', examples=['us-east-1']
        ),
    ] = None
    resource_id: Annotated[
        str | None,
        Field(
            description='The resource id which incurred the cost.',
            examples=[
                'arn:aws:ec2:us-east-1:123456789012:instance/i-1234567890abcdef0'
            ],
        ),
    ] = None
    tag: Annotated[
        str | None,
        Field(
            description='The tag attached to the cost that was incurred.\nDEPRECATED: does not support multiple tags.',
            examples=['production'],
        ),
    ] = None
    tags: Annotated[
        Sequence[str] | None,
        Field(description='The tag pairs attached to the cost that was incurred.'),
    ] = None
    cost_category: Annotated[
        str | None,
        Field(description='The category for the cost.', examples=['Data Transfer']),
    ] = None
    cost_subcategory: Annotated[
        str | None,
        Field(
            description='The subcategory for the cost.',
            examples=['DataTransfer-Regional-Bytes'],
        ),
    ] = None


class ResourceCost(BaseModel):
    category: Annotated[str | None, Field(description='The category of the cost.')] = (
        None
    )
    amount: str | None = None


class CreateResourceReport(BaseModel):
    """
    Create a ResourceReport.
    """

    workspace_token: Annotated[
        str,
        Field(description='The token of the Workspace to add the ResourceReport to.'),
    ]
    title: Annotated[
        str | None, Field(description='The title of the ResourceReport.')
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter query language to apply to the ResourceReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None
    columns: Annotated[
        Sequence[str] | None,
        Field(
            description='Array of column names to display in the table. Column names should match those returned by the /resource_reports/columns endpoint. The order determines the display order. Only available for reports with a single resource type filter.'
        ),
    ] = None


class ResourceReport(BaseModel):
    """
    ResourceReport model
    """

    token: str | None = None
    title: Annotated[
        str | None,
        Field(
            description='The title of the ResourceReport.',
            examples=['Acme123 Active Resources'],
        ),
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter applied to the ResourceReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the report was created. ISO 8601 Formatted.',
            examples=['2024-03-19T00:00:00Z'],
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(
            description='The token for the Workspace the ResourceReport is a part of.'
        ),
    ] = None
    user_token: Annotated[
        str | None,
        Field(description='The token for the User who created this ResourceReport.'),
    ] = None
    created_by_token: Annotated[
        str | None,
        Field(
            description='The token for the User or Team who created this ResourceReport.'
        ),
    ] = None
    columns: Annotated[
        Sequence[str] | None,
        Field(
            description='Array of column names configured for the ResourceReport table display.'
        ),
    ] = None


class ResourceReports(BaseModel):
    """
    ResourceReports model
    """

    links: Mapping[str, Any] | None = None
    resource_reports: Sequence[ResourceReport] | None = None


class ResourceReportColumns(BaseModel):
    """
    ResourceReportColumns model
    """

    columns: Annotated[
        Sequence[str] | None,
        Field(
            description='Array of available column names for the specified resource type.'
        ),
    ] = None


class UpdateResourceReport(BaseModel):
    """
    Update a ResourceReport.
    """

    title: Annotated[
        str | None, Field(description='The title of the ResourceReport.')
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter query language to apply to the ResourceReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None
    columns: Annotated[
        Sequence[str] | None,
        Field(
            description='Array of column names to display in the table. Column names should match those returned by the /resource_reports/columns endpoint. The order determines the display order. Only available for reports with a single resource type filter.'
        ),
    ] = None


class CreateTeamRole(str, Enum):
    """
    The role to assign to the provided Users. Defaults to 'editor' which has editor permissions.
    """

    owner = 'owner'
    editor = 'editor'
    viewer = 'viewer'


class CreateTeam(BaseModel):
    """
    Create a new Team.
    """

    name: Annotated[str, Field(description='The name of the Team.')]
    description: Annotated[
        str | None, Field(description='The description of the Team.')
    ] = None
    workspace_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The Workspace tokens to associate to the Team.'),
    ] = None
    user_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The User tokens to associate to the Team.'),
    ] = None
    user_emails: Annotated[
        Sequence[str] | None,
        Field(description='The User emails to associate to the Team.'),
    ] = None
    role: Annotated[
        CreateTeamRole | None,
        Field(
            description="The role to assign to the provided Users. Defaults to 'editor' which has editor permissions."
        ),
    ] = None


class Team(BaseModel):
    """
    Team model
    """

    token: str | None = None
    name: Annotated[
        str | None, Field(description='The name of the Team.', examples=['Cost Savers'])
    ] = None
    description: Annotated[
        str | None,
        Field(
            description='The description of the Team.',
            examples=['The Team that saves costs'],
        ),
    ] = None
    workspace_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens for any Workspaces that the Team belongs to'),
    ] = None
    user_emails: Annotated[
        Sequence[str] | None,
        Field(description='The email addresses for Users that belong to the Team'),
    ] = None
    user_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens for Users that belong to the Team'),
    ] = None


class Teams(BaseModel):
    """
    Teams model
    """

    links: Mapping[str, Any] | None = None
    teams: Sequence[Team] | None = None


class UpdateTeam(BaseModel):
    """
    Update a Team.
    """

    name: Annotated[str | None, Field(description='The name of the Team.')] = None
    description: Annotated[
        str | None, Field(description='The description of the Team.')
    ] = None
    workspace_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The Workspace tokens to associate to the Team.'),
    ] = None
    user_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The User tokens to associate to the Team.'),
    ] = None
    user_emails: Annotated[
        Sequence[str] | None,
        Field(description='The User emails to associate to the Team.'),
    ] = None
    role: Annotated[
        CreateTeamRole | None,
        Field(
            description="The role to assign to the provided Users. Defaults to 'editor' which has editor permissions."
        ),
    ] = None


class CreateAccessGrantAccess(str, Enum):
    """
    The access level you want to grant. Defaults to 'allowed'.
    """

    denied = 'denied'
    allowed = 'allowed'


class CreateAccessGrant(BaseModel):
    """
    Create an Access Grant.
    """

    resource_token: Annotated[
        str,
        Field(
            description='The token of the resource for which you are granting access.'
        ),
    ]
    team_token: Annotated[
        str, Field(description='The token of the Team you want to grant access to.')
    ]
    access: Annotated[
        CreateAccessGrantAccess | None,
        Field(description="The access level you want to grant. Defaults to 'allowed'."),
    ] = None


class AccessGrant(BaseModel):
    """
    AccessGrant model
    """

    token: str | None = None
    resource_token: Annotated[
        str | None,
        Field(
            description='The token for any resource the AccessGrant is applied to.',
            examples=['rprt_abcd1234'],
        ),
    ] = None
    access: Annotated[
        str | None, Field(description='The access status of the AccessGrant.')
    ] = None
    team_token: Annotated[
        str | None,
        Field(description='The Team token for which an AccessGrant is applied to.'),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the AccessGrant was created. ISO 8601 Formatted.',
            examples=['2023-08-04T00:00:00Z'],
        ),
    ] = None
    created_by: Annotated[
        str | None,
        Field(description='The token for the User who created the AccessGrant.'),
    ] = None


class AccessGrants(BaseModel):
    """
    AccessGrants model
    """

    links: Mapping[str, Any] | None = None
    access_grants: Sequence[AccessGrant] | None = None


class UpdateAccessGrantAccess(str, Enum):
    """
    Allowed or denied access to resource.
    """

    denied = 'denied'
    allowed = 'allowed'


class UpdateAccessGrant(BaseModel):
    """
    Update an AccessGrant.
    """

    access: Annotated[
        UpdateAccessGrantAccess,
        Field(description='Allowed or denied access to resource.'),
    ]


class CreateReportNotification(BaseModel):
    """
    Create a ReportNotification.
    """

    title: Annotated[str, Field(description='The title of the ReportNotification.')]
    cost_report_token: Annotated[str, Field(description='The CostReport token.')]
    workspace_token: Annotated[
        str | None,
        Field(
            description='The token of the Workspace to add the ReportNotification to. Required if the API token is associated with multiple Workspaces.'
        ),
    ] = None
    user_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The Users that receive the notification.'),
    ] = None
    recipient_channels: Annotated[
        Sequence[str] | None,
        Field(
            description='The Slack or Microsoft Teams channels that receive the notification.'
        ),
    ] = None
    frequency: Annotated[
        str,
        Field(
            description='The frequency the ReportNotification is sent. Possible values: daily, weekly, monthly.'
        ),
    ]
    change: Annotated[
        str,
        Field(
            description='The type of change the ReportNotification is tracking. Possible values: percentage, dollars.'
        ),
    ]


class ReportNotificationFrequency(str, Enum):
    """
    The frequency the ReportNotification is sent.
    """

    daily = 'daily'
    weekly = 'weekly'
    monthly = 'monthly'


class ReportNotificationChange(str, Enum):
    """
    The type of change the ReportNotification is tracking.
    """

    percentage = 'percentage'
    dollars = 'dollars'


class ReportNotification(BaseModel):
    """
    ReportNotification model
    """

    token: str | None = None
    title: Annotated[
        str | None,
        Field(
            description='The title of the ReportNotification.',
            examples=['Acme Report Notification'],
        ),
    ] = None
    cost_report_token: Annotated[
        str | None,
        Field(
            description='The token for a CostReport the ReportNotification is applied to.',
            examples=['rprt_abcd1234'],
        ),
    ] = None
    user_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The Users that receive the notification.'),
    ] = None
    recipient_channels: Annotated[
        Sequence[str] | None,
        Field(
            description='The Slack or Microsoft Teams channels that receive the notification.'
        ),
    ] = None
    frequency: Annotated[
        ReportNotificationFrequency | None,
        Field(
            description='The frequency the ReportNotification is sent.',
            examples=['weekly'],
        ),
    ] = None
    change: Annotated[
        ReportNotificationChange | None,
        Field(
            description='The type of change the ReportNotification is tracking.',
            examples=['percentage'],
        ),
    ] = None


class ReportNotifications(BaseModel):
    """
    ReportNotifications model
    """

    links: Mapping[str, Any] | None = None
    report_notifications: Sequence[ReportNotification] | None = None


class UpdateReportNotification(BaseModel):
    """
    Update a ReportNotification.
    """

    title: Annotated[
        str | None, Field(description='The title of the ReportNotification.')
    ] = None
    cost_report_token: Annotated[
        str | None, Field(description='The CostReport token.')
    ] = None
    user_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The Users that receive the notification.'),
    ] = None
    recipient_channels: Annotated[
        Sequence[str] | None,
        Field(
            description='The Slack or Microsoft Teams channels that receive the notification.'
        ),
    ] = None
    frequency: Annotated[
        str | None,
        Field(
            description='The frequency the ReportNotification is sent. Possible values: daily, weekly, monthly.'
        ),
    ] = None
    change: Annotated[
        str | None,
        Field(
            description='The type of change the ReportNotification is tracking. Possible values: percentage, dollars.'
        ),
    ] = None


class User(BaseModel):
    """
    User model
    """

    token: str | None = None
    name: Annotated[
        str | None, Field(description='The name of the User.', examples=['John Doe'])
    ] = None
    email: Annotated[
        str | None,
        Field(description='The email of the User.', examples=['john_doe@acme.com']),
    ] = None
    role: Annotated[
        str | None, Field(description='The role of the User.', examples=['Admin'])
    ] = None
    last_seen_at: Annotated[
        str | None,
        Field(
            description='The last time the User logged in.',
            examples=['2024-01-01T00:00:00Z'],
        ),
    ] = None


class CreateBusinessMetricCostReportTokensWithMetadatum(BaseModel):
    cost_report_token: Annotated[
        str,
        Field(
            description='The token of the CostReport the BusinessMetric is attached to.'
        ),
    ]
    unit_scale: Annotated[
        CreateCostReportBusinessMetricTokensWithMetadatumUnitScale,
        Field(
            description="Determines the scale of the BusinessMetric's values within the CostReport."
        ),
    ] = 'per_unit'
    label_filter: Annotated[
        Sequence[str] | None,
        Field(description='Include only values with these labels in the CostReport.'),
    ] = None


class CreateBusinessMetricValue(BaseModel):
    date: datetime
    amount: float
    label: str | None = None


class CreateBusinessMetricDatadogMetricFields(BaseModel):
    """
    Datadog metric configuration fields
    """

    integration_token: Annotated[
        str | None,
        Field(
            description='Integration token for the account from which you would like to fetch metrics.'
        ),
    ] = None
    query: Annotated[
        str | None,
        Field(
            description='Datadog metrics query string. e.g. sum:aws.applicationelb.request_count{region:us-east-1}.rollup(avg,daily)'
        ),
    ] = None


class CreateBusinessMetricCloudwatchFieldsDimension(BaseModel):
    name: str | None = None
    value: str | None = None


class CreateBusinessMetricCloudwatchFields(BaseModel):
    """
    Cloudwatch configuration fields.
    """

    integration_token: Annotated[
        str | None,
        Field(
            description='Integration token for the account from which you would like to fetch metrics.'
        ),
    ] = None
    stat: str | None = None
    region: str | None = None
    namespace: str | None = None
    metric_name: str | None = None
    label_dimension: str | None = None
    dimensions: Sequence[CreateBusinessMetricCloudwatchFieldsDimension] | None = None


class CreateBusinessMetric(BaseModel):
    """
    Create a new BusinessMetric.
    """

    title: Annotated[str, Field(description='The title of the BusinessMetrics.')]
    cost_report_tokens_with_metadata: Annotated[
        Sequence[CreateBusinessMetricCostReportTokensWithMetadatum] | None,
        Field(
            description='The tokens for any CostReports that use the BusinessMetric, the unit scale, and label filter.'
        ),
    ] = None
    values: Annotated[
        Sequence[CreateBusinessMetricValue] | None,
        Field(
            description='The dates, amounts, and (optional) labels for the BusinessMetric.'
        ),
    ] = None
    datadog_metric_fields: Annotated[
        CreateBusinessMetricDatadogMetricFields | None,
        Field(description='Datadog metric configuration fields'),
    ] = None
    cloudwatch_fields: Annotated[
        CreateBusinessMetricCloudwatchFields | None,
        Field(description='Cloudwatch configuration fields.'),
    ] = None


class BusinessMetricImportType(str, Enum):
    """
    The type of import for the BusinessMetric.
    """

    datadog_metrics = 'datadog_metrics'
    cloudwatch = 'cloudwatch'
    csv = 'csv'


class AttachedCostReportForBusinessMetric(BaseModel):
    cost_report_token: Annotated[
        str | None,
        Field(
            description='The token of the CostReport the BusinessMetric is attached to.',
            examples=['rprt_1234'],
        ),
    ] = None
    unit_scale: Annotated[
        AttachedBusinessMetricForCostReportUnitScale | None,
        Field(
            description="Determines the scale of the BusinessMetric's values within a particular CostReport.",
            examples=['per_hundred'],
        ),
    ] = None
    label_filter: Annotated[
        Sequence[str] | None,
        Field(
            description='The labels that the BusinessMetric is filtered by within a particular CostReport.'
        ),
    ] = None


class CloudwatchFieldsStat(str, Enum):
    """
    The time aggregation function used to import Cloudwatch metrics.
    """

    Sum = 'Sum'
    Average = 'Average'
    Minimum = 'Minimum'
    Maximum = 'Maximum'


CloudwatchDimension = CreateBusinessMetricCloudwatchFieldsDimension


class DatadogMetricFields(BaseModel):
    query: Annotated[
        str | None,
        Field(
            description='The query used to import Datadog metrics.',
            examples=[
                'sum:aws.applicationelb.request_count{region:us-east-1}.rollup(avg,daily)'
            ],
        ),
    ] = None


UpdateBusinessMetricCostReportTokensWithMetadatum = (
    CreateBusinessMetricCostReportTokensWithMetadatum
)


UpdateBusinessMetricValue = CreateBusinessMetricValue


UpdateBusinessMetricDatadogMetricFields = CreateBusinessMetricDatadogMetricFields


UpdateBusinessMetricCloudwatchFieldsDimension = (
    CreateBusinessMetricCloudwatchFieldsDimension
)


class UpdateBusinessMetricCloudwatchFields(BaseModel):
    """
    Cloudwatch configuration fields.
    """

    integration_token: Annotated[
        str | None,
        Field(
            description='Integration token for the account from which you would like to fetch metrics.'
        ),
    ] = None
    stat: str | None = None
    region: str | None = None
    namespace: str | None = None
    metric_name: str | None = None
    label_dimension: str | None = None
    dimensions: Sequence[UpdateBusinessMetricCloudwatchFieldsDimension] | None = None


class UpdateBusinessMetric(BaseModel):
    """
    Updates an existing BusinessMetric.
    """

    title: Annotated[
        str | None, Field(description='The title of the BusinessMetric.')
    ] = None
    cost_report_tokens_with_metadata: Annotated[
        Sequence[UpdateBusinessMetricCostReportTokensWithMetadatum] | None,
        Field(
            description='The tokens for any CostReports that use the BusinessMetric, and the unit scale.'
        ),
    ] = None
    values: Annotated[
        Sequence[UpdateBusinessMetricValue] | None,
        Field(
            description='The dates, amounts, and (optional) labels for the BusinessMetric.'
        ),
    ] = None
    datadog_metric_fields: Annotated[
        UpdateBusinessMetricDatadogMetricFields | None,
        Field(description='Datadog metric configuration fields'),
    ] = None
    cloudwatch_fields: Annotated[
        UpdateBusinessMetricCloudwatchFields | None,
        Field(description='Cloudwatch configuration fields.'),
    ] = None


class BusinessMetricValue(BaseModel):
    date: Annotated[
        str | None,
        Field(
            description='The date of the Business Metric Value. ISO 8601 formatted.',
            examples=['2024-03-01+00:00'],
        ),
    ] = None
    amount: Annotated[
        str | None,
        Field(
            description='The amount of the Business Metric Value as a string to ensure precision.',
            examples=['100.00'],
        ),
    ] = None
    label: Annotated[
        str | None,
        Field(
            description='The label of the Business Metric Value.',
            examples=['Cost Center A'],
        ),
    ] = None


class Product(BaseModel):
    """
    Product model
    """

    id: str | None = None
    category: Annotated[
        str | None,
        Field(description='The category of the cloud product', examples=['compute']),
    ] = None
    name: Annotated[
        str | None,
        Field(description='The common name of the product.', examples=['EC2']),
    ] = None
    service_id: Annotated[
        str | None,
        Field(
            description='A unique slug for the service the product belongs to.',
            examples=['aws-ec2'],
        ),
    ] = None
    provider_id: Annotated[
        str | None,
        Field(
            description='A unique slug for the provider the product belongs to.',
            examples=['aws'],
        ),
    ] = None
    details: Annotated[
        Mapping[str, Any] | None,
        Field(
            description='An object of metadata about the product.',
            examples=[
                {
                    'gpu': 0,
                    'name': 'M5 General Purpose 16xlarge',
                    'vcpu': 64,
                    'memory': 256,
                    'clock_speed_ghz': 3.1,
                    'physical_processor_description': 'Intel Xeon Platinum 8175 (Skylake)',
                    'network_performance_description': '20 Gigabit',
                }
            ],
        ),
    ] = None


class Price(BaseModel):
    """
    Price model
    """

    id: str | None = None
    unit: Annotated[
        str | None,
        Field(description='The unit in which the amount is billed.', examples=['hour']),
    ] = None
    region: Annotated[
        str | None,
        Field(
            description='The region the price is specific to.', examples=['us-east-1']
        ),
    ] = None
    rate_type: Annotated[
        str | None,
        Field(
            description='The part of the product the price applies to. (compute, transfer, etc..)',
            examples=['compute'],
        ),
    ] = None
    currency: Annotated[
        str | None, Field(description='The currency of the amount.', examples=['USD'])
    ] = None
    amount: Annotated[
        float | None,
        Field(
            description='The amount of money this specific product price costs.',
            examples=[1.324],
        ),
    ] = None
    details: Annotated[
        Mapping[str, Any] | None,
        Field(
            description='Service specific metadata.',
            examples=[{'platform': 'linux-enterprise', 'lifecycle': 'on-demand'}],
        ),
    ] = None


class CreateFinancialCommitmentReportDateInterval(str, Enum):
    """
    The date interval of the FinancialCommitmentReport. Unless 'custom' is used, this is incompatible with 'start_date' and 'end_date' parameters. Defaults to 'last_3_months'.
    """

    this_month = 'this_month'
    last_7_days = 'last_7_days'
    last_30_days = 'last_30_days'
    last_month = 'last_month'
    last_3_months = 'last_3_months'
    last_6_months = 'last_6_months'
    custom = 'custom'
    last_12_months = 'last_12_months'
    last_24_months = 'last_24_months'
    last_36_months = 'last_36_months'
    year_to_date = 'year_to_date'
    last_3_days = 'last_3_days'
    last_14_days = 'last_14_days'


class CreateFinancialCommitmentReportDateBucket(str, Enum):
    """
    The date bucket of the FinancialCommitmentReport.
    """

    hour = 'hour'
    day = 'day'
    week = 'week'
    month = 'month'


class CreateFinancialCommitmentReportOnDemandCostsScope(str, Enum):
    """
    The scope for the costs. Possible values: discountable, all.
    """

    discountable = 'discountable'
    all = 'all'


class CreateFinancialCommitmentReport(BaseModel):
    """
    Create a FinancialCommitmentReport.
    """

    workspace_token: Annotated[
        str,
        Field(
            description='The Workspace in which the FinancialCommitmentReport will be created.'
        ),
    ]
    title: Annotated[
        str, Field(description='The title of the FinancialCommitmentReport.')
    ]
    filter: Annotated[
        str | None,
        Field(
            description='The filter query language to apply to the FinancialCommitmentReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None
    start_date: Annotated[
        date | None,
        Field(
            description="The start date of the FinancialCommitmentReport. YYYY-MM-DD formatted. Incompatible with 'date_interval' parameter.",
            examples=['2024-03-01'],
        ),
    ] = None
    end_date: Annotated[
        date | None,
        Field(
            description="The end date of the FinancialCommitmentReport. YYYY-MM-DD formatted. Incompatible with 'date_interval' parameter.",
            examples=['2024-03-01'],
        ),
    ] = None
    date_interval: Annotated[
        CreateFinancialCommitmentReportDateInterval | None,
        Field(
            description="The date interval of the FinancialCommitmentReport. Unless 'custom' is used, this is incompatible with 'start_date' and 'end_date' parameters. Defaults to 'last_3_months'."
        ),
    ] = None
    date_bucket: Annotated[
        CreateFinancialCommitmentReportDateBucket | None,
        Field(description='The date bucket of the FinancialCommitmentReport.'),
    ] = None
    on_demand_costs_scope: Annotated[
        CreateFinancialCommitmentReportOnDemandCostsScope | None,
        Field(
            description='The scope for the costs. Possible values: discountable, all.'
        ),
    ] = None
    groupings: Annotated[
        Sequence[str] | None,
        Field(
            description='Grouping values for aggregating costs on the FinancialCommitmentReport. Valid groupings: cost_type, commitment_type, service, resource_account_id, provider_account_id, region, cost_category, cost_sub_category, instance_type, tag, tag:<label_name>.'
        ),
    ] = None


class FinancialCommitmentReport(BaseModel):
    """
    FinancialCommitmentReport model
    """

    token: str | None = None
    title: Annotated[
        str | None,
        Field(
            description='The title of the FinancialCommitmentReport.',
            examples=['Acme123 Financial Commitment Report'],
        ),
    ] = None
    default: Annotated[
        bool | None,
        Field(
            description='Indicates whether the FinancialCommitmentReport is the default report.'
        ),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the report was created. ISO 8601 Formatted.',
            examples=['2024-03-19T00:00:00Z'],
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(
            description='The token for the Workspace the FinancialCommitmentReport is a part of.'
        ),
    ] = None
    user_token: Annotated[
        str | None,
        Field(
            description='The token for the User who created this FinancialCommitmentReport.'
        ),
    ] = None
    start_date: Annotated[
        str | None,
        Field(
            description='The start date for the FinancialCommitmentReport. Only set for custom date ranges. ISO 8601 Formatted.',
            examples=['2024-03-01'],
        ),
    ] = None
    end_date: Annotated[
        str | None,
        Field(
            description='The end date for the FinancialCommitmentReport. Only set for custom date ranges. ISO 8601 Formatted.',
            examples=['2024-03-20'],
        ),
    ] = None
    date_interval: Annotated[
        str | None,
        Field(
            description='The date range for the FinancialCommitmentReport. Only present if a custom date range is not specified.',
            examples=['last_month'],
        ),
    ] = None
    date_bucket: Annotated[
        str | None,
        Field(
            description='How costs are grouped and displayed in the FinancialCommitmentReport. Possible values: day, week, month.',
            examples=['month'],
        ),
    ] = None
    groupings: Annotated[
        str | None,
        Field(
            description='The grouping aggregations applied to the filtered data.',
            examples=['cost_type, tag:account'],
        ),
    ] = None
    on_demand_costs_scope: Annotated[
        str | None,
        Field(
            description='The scope for the costs. Possible values: discountable, all.',
            examples=['discountable'],
        ),
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter applied to the FinancialCommitmentReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None


class FinancialCommitmentReports(BaseModel):
    """
    FinancialCommitmentReports model
    """

    links: Mapping[str, Any] | None = None
    financial_commitment_reports: Sequence[FinancialCommitmentReport] | None = None


class UpdateFinancialCommitmentReport(BaseModel):
    """
    Update a FinancialCommitmentReport.
    """

    title: Annotated[
        str | None, Field(description='The title of the FinancialCommitmentReport.')
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter query language to apply to the FinancialCommitmentReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None
    start_date: Annotated[
        date | None,
        Field(
            description="The start date of the FinancialCommitmentReport. YYYY-MM-DD formatted. Incompatible with 'date_interval' parameter.",
            examples=['2024-03-01'],
        ),
    ] = None
    end_date: Annotated[
        date | None,
        Field(
            description="The end date of the FinancialCommitmentReport. YYYY-MM-DD formatted. Incompatible with 'date_interval' parameter.",
            examples=['2024-03-01'],
        ),
    ] = None
    date_interval: Annotated[
        CreateFinancialCommitmentReportDateInterval | None,
        Field(
            description="The date interval of the FinancialCommitmentReport. Unless 'custom' is used, this is incompatible with 'start_date' and 'end_date' parameters. Defaults to 'last_3_months'."
        ),
    ] = None
    date_bucket: Annotated[
        CreateFinancialCommitmentReportDateBucket | None,
        Field(description='The date bucket of the FinancialCommitmentReport.'),
    ] = None
    on_demand_costs_scope: Annotated[
        CreateFinancialCommitmentReportOnDemandCostsScope | None,
        Field(
            description='The scope for the costs. Possible values: discountable, all.'
        ),
    ] = None
    groupings: Annotated[
        Sequence[str] | None,
        Field(
            description='Grouping values for aggregating costs on the FinancialCommitmentReport. Valid groupings: cost_type, commitment_type, service, resource_account_id, provider_account_id, region, cost_category, cost_sub_category, instance_type, tag, tag:<label_name>.'
        ),
    ] = None


class FinancialCommitment(BaseModel):
    commitment_type: Annotated[
        str | None,
        Field(
            description='The commitment type (eg Savings Plan or Reserved Instance).',
            examples=['Savings Plan'],
        ),
    ] = None
    service: Annotated[
        str | None,
        Field(
            description='The service this commitment applies towards.',
            examples=['Compute'],
        ),
    ] = None
    account: Annotated[
        str | None,
        Field(
            description='The account for this financial commitment.',
            examples=['113074892135'],
        ),
    ] = None
    type: Annotated[
        str | None,
        Field(description='The type of financial commitment.', examples=['m5.large']),
    ] = None
    amount: Annotated[
        str | None,
        Field(
            description='The number of instances for the financial commitment.',
            examples=['4'],
        ),
    ] = None
    term: Annotated[
        str | None,
        Field(
            description='The duration in years of the financial commitment.',
            examples=['3 Year'],
        ),
    ] = None
    payment_type: Annotated[
        str | None,
        Field(
            description='The type of payment for the financial commitment.',
            examples=['No upfront'],
        ),
    ] = None
    region: Annotated[
        str | None,
        Field(
            description='The region for the financial commitment.',
            examples=['us-east-1'],
        ),
    ] = None
    purchase_date: Annotated[
        str | None,
        Field(
            description='The purchase date of the financial commitment. ISO 8601 Formatted.',
            examples=['2023-08-30'],
        ),
    ] = None
    expiration_date: Annotated[
        str | None,
        Field(
            description='The expiration date of the financial commitment. ISO 8601 Formatted.',
            examples=['2026-08-30'],
        ),
    ] = None
    commitment: Annotated[
        str | None,
        Field(
            description='The amount of the financial commitment.', examples=['$2.18']
        ),
    ] = None
    status: Annotated[
        str | None,
        Field(
            description='The status of the financial commitment (e.g. active vs expired).',
            examples=['active'],
        ),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the Financial Commitment was created. ISO 8601 Formatted.',
            examples=['2024-03-19T00:00:00Z'],
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(
            description='The token for the Workspace the FinancialCommitment is a part of.'
        ),
    ] = None


class CreateKubernetesEfficiencyReportDateInterval(str, Enum):
    """
    The date interval of the KubernetesEfficiencyReport. Incompatible with 'start_date' and 'end_date' parameters. Defaults to 'this_month' if start_date and end_date are not provided.
    """

    this_month = 'this_month'
    last_7_days = 'last_7_days'
    last_30_days = 'last_30_days'
    last_month = 'last_month'
    last_3_months = 'last_3_months'
    last_6_months = 'last_6_months'
    custom = 'custom'
    last_12_months = 'last_12_months'
    last_24_months = 'last_24_months'
    last_36_months = 'last_36_months'
    next_month = 'next_month'
    next_3_months = 'next_3_months'
    next_6_months = 'next_6_months'
    next_12_months = 'next_12_months'
    year_to_date = 'year_to_date'
    last_3_days = 'last_3_days'
    last_14_days = 'last_14_days'


class CreateKubernetesEfficiencyReportAggregatedBy(str, Enum):
    """
    The column by which the costs are aggregated.
    """

    idle_cost = 'idle_cost'
    amount = 'amount'
    cost_efficiency = 'cost_efficiency'


class CreateKubernetesEfficiencyReportDateBucket(str, Enum):
    """
    The date bucket of the KubernetesEfficiencyReport.
    """

    day = 'day'
    week = 'week'
    month = 'month'


class CreateKubernetesEfficiencyReport(BaseModel):
    """
    Create a KubernetesEfficiencyReport.
    """

    workspace_token: Annotated[
        str,
        Field(
            description='The Workspace in which the KubernetesEfficiencyReport will be created.'
        ),
    ]
    title: Annotated[
        str, Field(description='The title of the KubernetesEfficiencyReport.')
    ]
    filter: Annotated[
        str | None,
        Field(
            description='The filter query language to apply to the KubernetesEfficiencyReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None
    start_date: Annotated[
        date | None,
        Field(
            description="The start date of the KubernetesEfficiencyReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter."
        ),
    ] = None
    end_date: Annotated[
        date | None,
        Field(
            description="The end date of the KubernetesEfficiencyReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter."
        ),
    ] = None
    date_interval: Annotated[
        CreateKubernetesEfficiencyReportDateInterval | None,
        Field(
            description="The date interval of the KubernetesEfficiencyReport. Incompatible with 'start_date' and 'end_date' parameters. Defaults to 'this_month' if start_date and end_date are not provided."
        ),
    ] = None
    aggregated_by: Annotated[
        CreateKubernetesEfficiencyReportAggregatedBy | None,
        Field(description='The column by which the costs are aggregated.'),
    ] = None
    date_bucket: Annotated[
        CreateKubernetesEfficiencyReportDateBucket | None,
        Field(description='The date bucket of the KubernetesEfficiencyReport.'),
    ] = None
    groupings: Annotated[
        Sequence[str] | None,
        Field(
            description='Grouping values for aggregating costs on the KubernetesEfficiencyReport. Valid groupings: cluster_id, namespace, labeled, category, pod, label, label:<label_name>.'
        ),
    ] = None


class KubernetesEfficiencyReport(BaseModel):
    """
    KubernetesEfficiencyReport model
    """

    token: str | None = None
    title: Annotated[
        str | None,
        Field(
            description='The title of the KubernetesEfficiencyReport.',
            examples=['Acme123 Kubernetes Efficiency Metrics'],
        ),
    ] = None
    default: Annotated[
        bool | None,
        Field(
            description='Indicates whether the KubernetesEfficiencyReport is the default report.'
        ),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the report was created. ISO 8601 Formatted.',
            examples=['2024-03-19T00:00:00Z'],
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(
            description='The token for the Workspace the KubernetesEfficiencyReport is a part of.'
        ),
    ] = None
    user_token: Annotated[
        str | None,
        Field(
            description='The token for the User who created this KubernetesEfficiencyReport.'
        ),
    ] = None
    start_date: Annotated[
        str | None,
        Field(
            description='The start date for the KubernetesEfficiencyReport. Only set for custom date ranges. ISO 8601 Formatted.',
            examples=['2024-03-01'],
        ),
    ] = None
    end_date: Annotated[
        str | None,
        Field(
            description='The end date for the KubernetesEfficiencyReport. Only set for custom date ranges. ISO 8601 Formatted.',
            examples=['2024-03-20'],
        ),
    ] = None
    date_interval: Annotated[
        str | None,
        Field(
            description='The date range for the KubernetesEfficiencyReport. Only present if a custom date range is not specified.',
            examples=['last_month'],
        ),
    ] = None
    date_bucket: Annotated[
        str | None,
        Field(
            description='How costs are grouped and displayed in the KubernetesEfficiencyReport. Possible values: day, week, month.',
            examples=['month'],
        ),
    ] = None
    aggregated_by: Annotated[
        str | None,
        Field(
            description='How costs are aggregated by. Possible values: idle_cost, amount, cost_efficiency.'
        ),
    ] = None
    groupings: Annotated[
        str | None,
        Field(
            description='Grouping values for aggregating costs on the KubernetesEfficiencyReport. Valid groupings: cluster_id, namespace, labeled, category, pod, label, label:<label_name>.',
            examples=['cluster_id, namespace'],
        ),
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter applied to the KubernetesEfficiencyReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None


class KubernetesEfficiencyReports(BaseModel):
    """
    KubernetesEfficiencyReports model
    """

    links: Mapping[str, Any] | None = None
    kubernetes_efficiency_reports: Sequence[KubernetesEfficiencyReport] | None = None


class UpdateKubernetesEfficiencyReport(BaseModel):
    """
    Update a KubernetesEfficiencyReport.
    """

    title: Annotated[
        str | None, Field(description='The title of the KubernetesEfficiencyReport.')
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter query language to apply to the KubernetesEfficiencyReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None
    start_date: Annotated[
        date | None,
        Field(
            description="The start date of the KubernetesEfficiencyReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter."
        ),
    ] = None
    end_date: Annotated[
        date | None,
        Field(
            description="The end date of the KubernetesEfficiencyReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter."
        ),
    ] = None
    date_interval: Annotated[
        CreateKubernetesEfficiencyReportDateInterval | None,
        Field(
            description="The date interval of the KubernetesEfficiencyReport. Incompatible with 'start_date' and 'end_date' parameters. Defaults to 'this_month' if start_date and end_date are not provided."
        ),
    ] = None
    aggregated_by: Annotated[
        CreateKubernetesEfficiencyReportAggregatedBy | None,
        Field(description='The column by which the costs are aggregated.'),
    ] = None
    date_bucket: Annotated[
        CreateKubernetesEfficiencyReportDateBucket | None,
        Field(description='The date bucket of the KubernetesEfficiencyReport.'),
    ] = None
    groupings: Annotated[
        Sequence[str] | None,
        Field(
            description='Grouping values for aggregating costs on the KubernetesEfficiencyReport. Valid groupings: cluster_id, namespace, labeled, category, pod, label, label:<label_name>.'
        ),
    ] = None


class CreateNetworkFlowReportDateInterval(str, Enum):
    """
    The date interval of the NetworkFlowReport. Unless 'custom' is used, this is incompatible with 'start_date' and 'end_date' parameters. Defaults to 'last_7_days'.
    """

    last_3_days = 'last_3_days'
    last_7_days = 'last_7_days'
    custom = 'custom'


class CreateNetworkFlowReportGrouping(str, Enum):
    account_id = 'account_id'
    az_id = 'az_id'
    dstaddr = 'dstaddr'
    dsthostname = 'dsthostname'
    flow_direction = 'flow_direction'
    interface_id = 'interface_id'
    instance_id = 'instance_id'
    peer_resource_uuid = 'peer_resource_uuid'
    peer_account_id = 'peer_account_id'
    peer_vpc_id = 'peer_vpc_id'
    peer_region = 'peer_region'
    peer_az_id = 'peer_az_id'
    peer_subnet_id = 'peer_subnet_id'
    peer_interface_id = 'peer_interface_id'
    peer_instance_id = 'peer_instance_id'
    region = 'region'
    resource_uuid = 'resource_uuid'
    srcaddr = 'srcaddr'
    srchostname = 'srchostname'
    subnet_id = 'subnet_id'
    traffic_category = 'traffic_category'
    traffic_path = 'traffic_path'
    vpc_id = 'vpc_id'


class CreateNetworkFlowReportFlowDirection(str, Enum):
    """
    The flow direction of the NetworkFlowReport.
    """

    ingress = 'ingress'
    egress = 'egress'


class CreateNetworkFlowReportFlowWeight(str, Enum):
    """
    The dimension by which the logs in the report are sorted. Defaults to costs.
    """

    costs = 'costs'
    bytes = 'bytes'


class CreateNetworkFlowReport(BaseModel):
    """
    Create a NetworkFlowReport.
    """

    workspace_token: Annotated[
        str,
        Field(
            description='The Workspace in which the NetworkFlowReport will be created.'
        ),
    ]
    title: Annotated[str, Field(description='The title of the NetworkFlowReport.')]
    filter: Annotated[
        str | None,
        Field(
            description='The filter query language to apply to the NetworkFlowReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None
    start_date: Annotated[
        date | None,
        Field(
            description="The start date of the NetworkFlowReport. YYYY-MM-DD formatted. Incompatible with 'date_interval' parameter."
        ),
    ] = None
    end_date: Annotated[
        date | None,
        Field(
            description="The end date of the NetworkFlowReport. YYYY-MM-DD formatted. Incompatible with 'date_interval' parameter."
        ),
    ] = None
    date_interval: Annotated[
        CreateNetworkFlowReportDateInterval | None,
        Field(
            description="The date interval of the NetworkFlowReport. Unless 'custom' is used, this is incompatible with 'start_date' and 'end_date' parameters. Defaults to 'last_7_days'."
        ),
    ] = None
    groupings: Annotated[
        Sequence[CreateNetworkFlowReportGrouping] | None,
        Field(
            description='Grouping values for aggregating data on the NetworkFlowReport. Valid groupings: account_id, az_id, dstaddr, dsthostname, flow_direction, interface_id, instance_id, peer_resource_uuid, peer_account_id, peer_vpc_id, peer_region, peer_az_id, peer_subnet_id, peer_interface_id, peer_instance_id, region, resource_uuid, srcaddr, srchostname, subnet_id, traffic_category, traffic_path, vpc_id.'
        ),
    ] = None
    flow_direction: Annotated[
        CreateNetworkFlowReportFlowDirection | None,
        Field(description='The flow direction of the NetworkFlowReport.'),
    ] = None
    flow_weight: Annotated[
        CreateNetworkFlowReportFlowWeight | None,
        Field(
            description='The dimension by which the logs in the report are sorted. Defaults to costs.'
        ),
    ] = None


class NetworkFlowReport(BaseModel):
    """
    NetworkFlowReport model
    """

    token: str | None = None
    title: Annotated[
        str | None,
        Field(
            description='The title of the NetworkFlowReport.',
            examples=['Public Traffic Destinations'],
        ),
    ] = None
    default: Annotated[
        bool | None,
        Field(
            description='Indicates whether the NetworkFlowReport is the default report.'
        ),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the report was created. ISO 8601 Formatted.',
            examples=['2024-03-19T00:00:00Z'],
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(
            description='The token for the Workspace the NetworkFlowReport is a part of.'
        ),
    ] = None
    created_by_token: Annotated[
        str | None,
        Field(
            description='The token for the User or Team that created this NetworkFlowReport.'
        ),
    ] = None
    start_date: Annotated[
        str | None,
        Field(
            description='The start date for the NetworkFlowReport. Only set for custom date ranges. ISO 8601 Formatted.',
            examples=['2024-03-01'],
        ),
    ] = None
    end_date: Annotated[
        str | None,
        Field(
            description='The end date for the NetworkFlowReport. Only set for custom date ranges. ISO 8601 Formatted.',
            examples=['2024-03-20'],
        ),
    ] = None
    date_interval: Annotated[
        str | None,
        Field(
            description='The date range for the NetworkFlowReport. Only present if a custom date range is not specified.',
            examples=['last_month'],
        ),
    ] = None
    groupings: Annotated[
        str | None,
        Field(
            description='The grouping aggregations applied to the filtered data.',
            examples=['cost_type, tag:account'],
        ),
    ] = None
    flow_direction: Annotated[
        str | None,
        Field(
            description='The flow weight of the NetworkFlowReport. Possible values: costs, bytes.',
            examples=['ingress'],
        ),
    ] = None
    flow_weight: Annotated[
        str | None,
        Field(
            description='The flow weight of the NetworkFlowReport. Possible values: costs, bytes.',
            examples=['costs'],
        ),
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter applied to the NetworkFlowReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None


class NetworkFlowReports(BaseModel):
    """
    NetworkFlowReports model
    """

    links: Mapping[str, Any] | None = None
    network_flow_reports: Sequence[NetworkFlowReport] | None = None


class UpdateNetworkFlowReport(BaseModel):
    """
    Update a NetworkFlowReport.
    """

    title: Annotated[
        str | None, Field(description='The title of the NetworkFlowReport.')
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter query language to apply to the NetworkFlowReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None
    start_date: Annotated[
        date | None,
        Field(
            description="The start date of the NetworkFlowReport. YYYY-MM-DD formatted. Incompatible with 'date_interval' parameter."
        ),
    ] = None
    end_date: Annotated[
        date | None,
        Field(
            description="The end date of the NetworkFlowReport. YYYY-MM-DD formatted. Incompatible with 'date_interval' parameter."
        ),
    ] = None
    date_interval: Annotated[
        CreateNetworkFlowReportDateInterval | None,
        Field(
            description="The date interval of the NetworkFlowReport. Unless 'custom' is used, this is incompatible with 'start_date' and 'end_date' parameters. Defaults to 'last_7_days'."
        ),
    ] = None
    groupings: Annotated[
        Sequence[CreateNetworkFlowReportGrouping] | None,
        Field(
            description='Grouping values for aggregating data on the NetworkFlowReport. Valid groupings: account_id, az_id, dstaddr, dsthostname, flow_direction, interface_id, instance_id, peer_resource_uuid, peer_account_id, peer_vpc_id, peer_region, peer_az_id, peer_subnet_id, peer_interface_id, peer_instance_id, region, resource_uuid, srcaddr, srchostname, subnet_id, traffic_category, traffic_path, vpc_id.'
        ),
    ] = None
    flow_direction: Annotated[
        CreateNetworkFlowReportFlowDirection | None,
        Field(description='The flow direction of the NetworkFlowReport.'),
    ] = None
    flow_weight: Annotated[
        CreateNetworkFlowReportFlowWeight | None,
        Field(
            description='The dimension by which the logs in the report are sorted. Defaults to costs.'
        ),
    ] = None


class AnomalyAlert(BaseModel):
    """
    AnomalyAlert model
    """

    token: str | None = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the AnomalyAlert was created. ISO 8601 Formatted.',
            examples=['2021-07-09T00:00:00Z'],
        ),
    ] = None
    alerted_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the AnomalyAlert is sent. ISO 8601 Formatted.',
            examples=['2021-07-09T00:00:00Z'],
        ),
    ] = None
    category: Annotated[
        str | None, Field(description='The category of the AnomalyAlert.')
    ] = None
    service: Annotated[
        str | None, Field(description='The provider service causing the AnomalyAlert.')
    ] = None
    provider: Annotated[
        str | None,
        Field(description='The provider of the service causing the AnomalyAlert.'),
    ] = None
    amount: Annotated[str | None, Field(description='The amount observed.')] = None
    previous_amount: Annotated[
        str | None, Field(description='The previous amount observed.')
    ] = None
    seven_day_average: Annotated[
        str | None, Field(description='The seven day average of the amount observed.')
    ] = None
    status: Annotated[
        str | None, Field(description='The status of the AnomalyAlert.')
    ] = None
    feedback: Annotated[
        str | None,
        Field(
            description='The user-provided feedback of why alert was ignored/archived.'
        ),
    ] = None
    resources: Annotated[
        Sequence[str] | None,
        Field(
            description='The names of the resources the AnomalyAlert was attributed to.'
        ),
    ] = None
    cost_report_token: Annotated[
        str | None,
        Field(description='The token of the Report associated with the AnomalyAlert.'),
    ] = None


class UpdateAnomalyAlert(BaseModel):
    """
    Update an AnomalyAlert.
    """

    status: Annotated[str, Field(description='The status of the Anomaly Alert.')]
    feedback: Annotated[
        str | None,
        Field(
            description='Optional additional comments for why this alert is ignored.'
        ),
    ] = None


class AuditLog(BaseModel):
    """
    AuditLog model
    """

    token: Annotated[
        str | None,
        Field(
            description='The unique token identifying the audit log.',
            examples=['adt_lg_1234567890abcdef'],
        ),
    ] = None
    object_token: Annotated[
        str | None,
        Field(
            description='The token of the audited object.',
            examples=['rpt_1234567890abcdef'],
        ),
    ] = None
    object_type: Annotated[
        str | None,
        Field(description='The type of the audited object.', examples=['Report']),
    ] = None
    object_title: Annotated[
        str | None,
        Field(
            description='The title of the audited object.',
            examples=['Production Cost Report'],
        ),
    ] = None
    event: Annotated[
        str | None,
        Field(
            description='The event type of the audit log.', examples=['record_created']
        ),
    ] = None
    source: Annotated[
        str | None,
        Field(
            description='The source of the action (console, api, developer).',
            examples=['console'],
        ),
    ] = None
    user: Annotated[
        str | None, Field(description='The name of the user who performed the action.')
    ] = None
    workspace_title: Annotated[
        str | None,
        Field(description='The name of the workspace associated with the audit log.'),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(
            description='The token of the workspace associated with the audit log.',
            examples=['wrkspc_1234567890abcdef'],
        ),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the audit log was created. ISO 8601 Formatted.',
            examples=['2021-07-09T00:00:00Z'],
        ),
    ] = None
    changed_values: Annotated[
        Mapping[str, Any] | None, Field(description='The changed values of the object.')
    ] = None
    unchanged_values: Annotated[
        Mapping[str, Any] | None,
        Field(description='The unchanged values of the object.'),
    ] = None


class CreateVirtualTagConfigValueCostMetricAggregation(BaseModel):
    tag: str


class CreateVirtualTagConfigValueCostMetric(BaseModel):
    filter: str
    aggregation: CreateVirtualTagConfigValueCostMetricAggregation


class CreateVirtualTagConfigValue(BaseModel):
    filter: Annotated[
        str,
        Field(
            description='The filter query language to apply to the value. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ]
    name: Annotated[str | None, Field(description='The name of the value.')] = None
    business_metric_token: Annotated[
        str | None, Field(description='The token of an associated business metric.')
    ] = None
    cost_metric: CreateVirtualTagConfigValueCostMetric | None = None


class CreateVirtualTagConfig(BaseModel):
    """
    Create a new VirtualTagConfig.
    """

    key: Annotated[str, Field(description='The key of the VirtualTagConfig.')]
    overridable: Annotated[
        bool,
        Field(
            description='Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.'
        ),
    ]
    backfill_until: Annotated[
        date | None,
        Field(
            description='The earliest month the VirtualTagConfig should be backfilled to.'
        ),
    ] = None
    values: Annotated[
        Sequence[CreateVirtualTagConfigValue] | None,
        Field(
            description='Values for the VirtualTagConfig, with match precedence determined by order in the list.'
        ),
    ] = None


class VirtualTagConfigValueCostMetricAggregation(BaseModel):
    tag: Annotated[str | None, Field(description='The tag to aggregate on.')] = None


UpdateVirtualTagConfigValueCostMetricAggregation = (
    CreateVirtualTagConfigValueCostMetricAggregation
)


class UpdateVirtualTagConfigValueCostMetric(BaseModel):
    filter: str
    aggregation: UpdateVirtualTagConfigValueCostMetricAggregation


class UpdateVirtualTagConfigValue(BaseModel):
    filter: Annotated[
        str,
        Field(
            description='The filter query language to apply to the value. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ]
    name: Annotated[str | None, Field(description='The name of the value.')] = None
    business_metric_token: Annotated[
        str | None, Field(description='The token of an associated business metric.')
    ] = None
    cost_metric: UpdateVirtualTagConfigValueCostMetric | None = None


class UpdateVirtualTagConfig(BaseModel):
    """
    Updates an existing VirtualTagConfig.
    """

    key: Annotated[
        str | None, Field(description='The key of the VirtualTagConfig.')
    ] = None
    overridable: Annotated[
        bool | None,
        Field(
            description='Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.'
        ),
    ] = None
    backfill_until: Annotated[
        date | None,
        Field(
            description='The earliest month the VirtualTagConfig should be backfilled to.'
        ),
    ] = None
    values: Annotated[
        Sequence[UpdateVirtualTagConfigValue] | None,
        Field(
            description='Values for the VirtualTagConfig, with match precedence determined by order in the list.'
        ),
    ] = None


class UpdateTag(BaseModel):
    """
    Updates an existing Tag.
    """

    tag_key: str | None = None
    tag_keys: Sequence[str] | None = None
    hidden: Annotated[
        bool, Field(description='Whether the Tag is hidden from the Vantage UI.')
    ]


class Tag(BaseModel):
    """
    Tag model
    """

    tag_key: Annotated[
        str | None, Field(description='The Tag key.', examples=['aws:createdBy'])
    ] = None
    hidden: Annotated[
        bool | None,
        Field(description='Whether the Tag has been hidden from the Vantage UI.'),
    ] = None
    providers: Annotated[
        Sequence[str] | None,
        Field(description='The unique providers that are covered by the Tag key.'),
    ] = None


class TagValue(BaseModel):
    tag_value: Annotated[
        str | None, Field(description='The TagValue.', examples=['vantage'])
    ] = None
    providers: Annotated[
        Sequence[str] | None,
        Field(description='The unique providers that are covered by the TagValue.'),
    ] = None


class Tags(BaseModel):
    """
    Tags model
    """

    links: Mapping[str, Any] | None = None
    tags: Sequence[Tag] | None = None


class CreateAnomalyNotification(BaseModel):
    """
    Create an Anomaly Notification for a Cost Report.
    """

    cost_report_token: Annotated[
        str,
        Field(description='The token of the Cost Report that has the notification.'),
    ]
    threshold: Annotated[
        int | None,
        Field(
            description='The threshold amount that must be met for the notification to fire.'
        ),
    ] = None
    user_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens of the Users that receive the notification.'),
    ] = None
    recipient_channels: Annotated[
        Sequence[str] | None,
        Field(description='The Slack/MS Teams channels that receive the notification.'),
    ] = None


class AnomalyNotification(BaseModel):
    """
    AnomalyNotification model
    """

    token: str | None = None
    cost_report_token: Annotated[
        str | None,
        Field(
            description='The token for the CostReport the AnomalyNotification is associated with.'
        ),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the AnomalyNotification was created. ISO 8601 Formatted.',
            examples=['2023-08-04T00:00:00Z'],
        ),
    ] = None
    updated_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the AnomalyNotification was last updated at. ISO 8601 Formatted.',
            examples=['2023-08-04T00:00:00Z'],
        ),
    ] = None
    threshold: Annotated[
        int | None,
        Field(
            description='The threshold amount that must be met for the notification to fire.'
        ),
    ] = None
    user_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens of the users that receive the notification.'),
    ] = None
    recipient_channels: Annotated[
        Sequence[str] | None,
        Field(description='The channels that the notification is sent to.'),
    ] = None


class AnomalyNotifications(BaseModel):
    """
    AnomalyNotifications model
    """

    links: Mapping[str, Any] | None = None
    anomaly_notifications: Sequence[AnomalyNotification] | None = None


class UpdateAnomalyNotification(BaseModel):
    """
    Update an Anomaly Notification.
    """

    threshold: Annotated[
        int | None,
        Field(
            description='The threshold amount that must be met for the notification to fire.'
        ),
    ] = None
    user_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens of the users that receive the notification.'),
    ] = None
    recipient_channels: Annotated[
        Sequence[str] | None,
        Field(description='The Slack/MS Teams channels that receive the notification.'),
    ] = None


class CreateBudgetPeriod(BaseModel):
    start_at: Annotated[date, Field(description='The start date of the period.')]
    end_at: Annotated[date | None, Field(description='The end date of the period.')] = (
        None
    )
    amount: Annotated[float, Field(description='The amount of the period.')]


class CreateBudget(BaseModel):
    """
    Create a Budget.
    """

    name: Annotated[str, Field(description='The name of the Budget.')]
    workspace_token: Annotated[
        str | None,
        Field(description='The token of the Workspace to add the Budget to.'),
    ] = None
    cost_report_token: Annotated[
        str | None,
        Field(description='The CostReport token. Ignored for hierarchical Budgets.'),
    ] = None
    child_budget_tokens: Annotated[
        Sequence[str] | None,
        Field(
            description='The tokens of any child Budgets when creating a hierarchical Budget.'
        ),
    ] = None
    periods: Annotated[
        Sequence[CreateBudgetPeriod] | None,
        Field(
            description='The periods for the Budget. The start_at and end_at must be iso8601 formatted e.g. YYYY-MM-DD. Ignored for hierarchical Budgets.'
        ),
    ] = None


class BudgetPeriod(BaseModel):
    start_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the Budget was created. ISO 8601 Formatted.',
            examples=['2024-03-19T00:00:00Z'],
        ),
    ] = None
    end_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the Budget was created. ISO 8601 Formatted.',
            examples=['2024-03-19T00:00:00Z'],
        ),
    ] = None
    amount: Annotated[
        str | None,
        Field(
            description='The amount of the Budget Period as a string to ensure precision.',
            examples=['100.00'],
        ),
    ] = None


class BudgetPerformance(BaseModel):
    date: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the Budget was created. ISO 8601 Formatted.',
            examples=['2024-03-19T00:00:00Z'],
        ),
    ] = None
    actual: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the Budget was created. ISO 8601 Formatted.',
            examples=['2024-03-19T00:00:00Z'],
        ),
    ] = None
    amount: Annotated[
        str | None,
        Field(
            description='The amount of the Budget Period as a string to ensure precision.',
            examples=['100.00'],
        ),
    ] = None


UpdateBudgetPeriod = CreateBudgetPeriod


class UpdateBudget(BaseModel):
    """
    Update a Budget.
    """

    name: Annotated[str | None, Field(description='The name of the Budget.')] = None
    cost_report_token: Annotated[
        str | None,
        Field(description='The CostReport token. Ignored for hierarchical Budgets.'),
    ] = None
    child_budget_tokens: Annotated[
        Sequence[str] | None,
        Field(
            description='The tokens of any child Budgets when creating a hierarchical Budget.'
        ),
    ] = None
    periods: Annotated[
        Sequence[UpdateBudgetPeriod] | None,
        Field(
            description='The periods for the Budget. The start_at and end_at must be iso8601 formatted e.g. YYYY-MM-DD. Ignored for hierarchical Budgets.'
        ),
    ] = None


class BudgetAlert(BaseModel):
    """
    BudgetAlert model
    """

    token: str | None = None
    budget_tokens: Annotated[
        Sequence[str] | None,
        Field(
            description='The tokens for the Budgets that the Budget Alert is monitoring to trigger alerts on.'
        ),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the Budget Alert was created. ISO 8601 Formatted.',
            examples=['2024-03-19T00:00:00Z'],
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(
            description='The token for the Workspace the ResourceReport is a part of.'
        ),
    ] = None
    user_token: Annotated[
        str | None,
        Field(description='The token for the User who created this BudgetAlert.'),
    ] = None
    user_tokens: Annotated[
        Sequence[str] | None, Field(description='The Users that receive the alert.')
    ] = None
    duration_in_days: Annotated[
        str | None,
        Field(
            description='The number of days from the start or end of the month to trigger the alert if the threshold is reached.'
        ),
    ] = None
    threshold: Annotated[
        str | None,
        Field(
            description='Alerts only send if they reach this number (as a percentage). When threshold is 100, that means alerts are triggered once costs reach 100% of the budget.',
            examples=['75'],
        ),
    ] = None
    period_to_track: Annotated[
        str | None,
        Field(
            description='The period tracked on the alert. Used with duration_in_days to determine the time window of the alert. Possible values: start_of_the_month, end_of_the_month.',
            examples=['start_of_the_month'],
        ),
    ] = None
    integration_provider: Annotated[
        str | None,
        Field(
            description='The provider used for sending alerts. This must be configured in the console. Possible values are: slack, microsoft_graph.',
            examples=['slack'],
        ),
    ] = None
    recipient_channels: Annotated[
        str | None,
        Field(
            description='The channels receiving the alerts. Requires an integration provider to be connected.',
            examples=[''],
        ),
    ] = None


class BudgetAlerts(BaseModel):
    """
    BudgetAlerts model
    """

    links: Mapping[str, Any] | None = None
    budget_alerts: Sequence[BudgetAlert] | None = None


class CreateAzureIntegration(BaseModel):
    """
    Create an Azure Integration
    """

    tenant: Annotated[str, Field(description='Azure AD Tenant ID.')]
    app_id: Annotated[str, Field(description='Service Principal Application ID.')]
    password: Annotated[str, Field(description='Service Principal Password.')]


class IntegrationStatus(str, Enum):
    """
    The status of the Integration. Can be 'connected', 'error', 'pending', 'importing', 'imported', or 'disconnected'.
    """

    connected = 'connected'
    error = 'error'
    pending = 'pending'
    importing = 'importing'
    imported = 'imported'
    disconnected = 'disconnected'


class Integration(BaseModel):
    """
    Integration model
    """

    token: str | None = None
    provider: Annotated[
        str | None, Field(description='The name of the Integration.', examples=['AWS'])
    ] = None
    account_identifier: Annotated[
        str | None,
        Field(
            description='The account identifier. For GCP this is the billing Account ID, for Azure this is the account ID',
            examples=['011389-EF4C3E-3ED7AE'],
        ),
    ] = None
    status: Annotated[
        IntegrationStatus | None,
        Field(
            description="The status of the Integration. Can be 'connected', 'error', 'pending', 'importing', 'imported', or 'disconnected'.",
            examples=['imported'],
        ),
    ] = None
    last_updated: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, when the Integration was last updated. ISO 8601 Formatted.',
            examples=['2023-08-04T00:00:00Z'],
        ),
    ] = None
    workspace_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens for any Workspaces that the account belongs to.'),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the Integration was created. ISO 8601 Formatted.',
            examples=['2023-08-04T00:00:00Z'],
        ),
    ] = None


class CreateGCPIntegration(BaseModel):
    """
    Create a GCP Integration
    """

    billing_account_id: Annotated[str, Field(description='GCP billing account ID.')]
    project_id: Annotated[str, Field(description='GCP project ID.')]
    dataset_name: Annotated[str, Field(description='BigQuery dataset name.')]


class CreateCustomProviderIntegration(BaseModel):
    """
    Create a Custom Provider Integration
    """

    name: Annotated[str, Field(description='Name of the Custom Provider Integration.')]
    description: Annotated[
        str | None, Field(description='Description of the Custom Provider Integration.')
    ] = None


class Integrations(BaseModel):
    """
    Integrations model
    """

    links: Mapping[str, Any] | None = None
    integrations: Sequence[Integration] | None = None


class UserCostsUpload(BaseModel):
    """
    UserCostsUpload model
    """

    token: Annotated[
        str | None,
        Field(
            description='The token of the UserCostsUpload.',
            examples=['usr_csts_upld_1234'],
        ),
    ] = None
    filename: Annotated[
        str | None,
        Field(
            description='The filename of the uploaded costs UserCostsUpload.',
            examples=['usr_csts_upld_1234.parquet'],
        ),
    ] = None
    amount: Annotated[
        str | None,
        Field(
            description='The total amount of the costs in the UserCostsUpload.',
            examples=['1234.56'],
        ),
    ] = None
    start_date: Annotated[
        str | None,
        Field(
            description='The start date of the costs in the UserCostsUpload.',
            examples=['2021-01-01'],
        ),
    ] = None
    end_date: Annotated[
        str | None,
        Field(
            description='The end date of the costs in the UserCostsUpload.',
            examples=['2021-01-31'],
        ),
    ] = None
    import_status: Annotated[
        str | None,
        Field(
            description='Import status of the UserCostsUpload.', examples=['processing']
        ),
    ] = None
    created_by_token: Annotated[
        str | None,
        Field(
            description='The token of the Creator of the UserCostsUpload.',
            examples=['usr_1234'],
        ),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='When the UserCostsUpload was uploaded.',
            examples=['2021-01-01T00:00:00Z'],
        ),
    ] = None


class Recommendation(BaseModel):
    """
    Recommendation model
    """

    token: str | None = None
    category: Annotated[
        str | None,
        Field(
            description='The category of the Recommendation.',
            examples=['ec2_compute_optimizer_recommender'],
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(
            description='The token for the Workspace the Recommendation is a part of.'
        ),
    ] = None
    provider: Annotated[
        str | None, Field(description='The provider the Recommendation is for.')
    ] = None
    provider_account_id: Annotated[
        str | None,
        Field(
            description='The account ID of the provider. For Azure, this is the subscription ID.'
        ),
    ] = None
    description: str | None = None
    potential_savings: Annotated[
        str | None,
        Field(
            description='The monthly potential savings of the Recommendation.',
            examples=['100.00'],
        ),
    ] = None
    service: Annotated[
        str | None,
        Field(
            description='The service the Recommendation is for.',
            examples=['Amazon EC2'],
        ),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the Recommendation was created. ISO 8601 Formatted.'
        ),
    ] = None
    resources_affected_count: Annotated[
        str | None,
        Field(
            description='The number of ProviderResources related to the Recommendation. Use the `recommendations/:token/resources` endpoint to get the full list of resources.'
        ),
    ] = None


class RecommendationAction(BaseModel):
    action: str | None = None
    description: str | None = None
    potential_savings: Annotated[
        str | None,
        Field(description='Potential savings in dollars', examples=['100.00']),
    ] = None
    instance_type: str | None = None
    containers: str | None = None
    remediation_cli_command: Annotated[
        str | None,
        Field(
            description='CLI command to remediate this recommendation',
            examples=['aws ec2 stop-instances --instance-ids i-1234567890abcdef0'],
        ),
    ] = None


class CreateManagedAccount(BaseModel):
    """
    Create a Managed Account.
    """

    name: Annotated[str, Field(description='The name of the Managed Account.')]
    contact_email: Annotated[
        str, Field(description='The contact email address for the Managed Account.')
    ]
    access_credential_tokens: Annotated[
        Sequence[str] | None,
        Field(
            description='Access Credential (aka Integrations) tokens to assign to the Managed Account.'
        ),
    ] = None
    billing_rule_tokens: Annotated[
        Sequence[str] | None,
        Field(description='Billing Rule tokens to assign to the Managed Account.'),
    ] = None


class BillingInformation(BaseModel):
    token: str | None = None
    company_name: Annotated[
        str | None, Field(description='Company name for billing')
    ] = None
    country_code: Annotated[str | None, Field(description='ISO country code')] = None
    address_line_1: Annotated[
        str | None, Field(description='First line of billing address')
    ] = None
    address_line_2: Annotated[
        str | None, Field(description='Second line of billing address')
    ] = None
    city: Annotated[str | None, Field(description='City for billing address')] = None
    state: Annotated[
        str | None, Field(description='State or province for billing address')
    ] = None
    postal_code: Annotated[str | None, Field(description='Postal or ZIP code')] = None
    billing_email: Annotated[
        Sequence[str] | None, Field(description='Array of billing email addresses')
    ] = None


class BusinessInformationCustomField(BaseModel):
    name: Annotated[str | None, Field(description='Custom field name')] = None
    value: Annotated[str | None, Field(description='Custom field value')] = None


class UpdateManagedAccountBillingInformationAttributes(BaseModel):
    """
    Billing address and contact information (MSP invoicing accounts only)
    """

    id: int | None = None
    token: str | None = None
    company_name: Annotated[
        str | None, Field(description='Company name for billing')
    ] = None
    country_code: Annotated[str | None, Field(description='ISO country code')] = None
    address_line_1: Annotated[
        str | None, Field(description='First line of billing address')
    ] = None
    address_line_2: Annotated[
        str | None, Field(description='Second line of billing address')
    ] = None
    city: Annotated[str | None, Field(description='City for billing address')] = None
    state: Annotated[
        str | None, Field(description='State or province for billing address')
    ] = None
    postal_code: Annotated[str | None, Field(description='Postal or ZIP code')] = None
    billing_email: Annotated[
        Sequence[str] | None, Field(description='Array of billing email addresses')
    ] = None


UpdateManagedAccountBusinessInformationAttributesMetadataCustomField = (
    BusinessInformationCustomField
)


class UpdateManagedAccountBusinessInformationAttributesMetadata(BaseModel):
    """
    Business metadata including custom fields
    """

    custom_fields: Annotated[
        Sequence[UpdateManagedAccountBusinessInformationAttributesMetadataCustomField]
        | None,
        Field(description='Array of custom field objects'),
    ] = None


class UpdateManagedAccountBusinessInformationAttributes(BaseModel):
    """
    Business information and custom fields (MSP invoicing accounts only)
    """

    id: int | None = None
    token: str | None = None
    metadata: Annotated[
        UpdateManagedAccountBusinessInformationAttributesMetadata | None,
        Field(description='Business metadata including custom fields'),
    ] = None


class UpdateManagedAccount(BaseModel):
    """
    Update a Managed Account.
    """

    name: Annotated[
        str | None, Field(description='The name of the Managed Account.')
    ] = None
    contact_email: Annotated[
        str | None,
        Field(description='The contact email address for the Managed Account.'),
    ] = None
    access_credential_tokens: Annotated[
        Sequence[str] | None,
        Field(
            description='Access Credential (aka Integrations) tokens to assign to the Managed Account.'
        ),
    ] = None
    billing_rule_tokens: Annotated[
        Sequence[str] | None,
        Field(description='Billing Rule tokens to assign to the Managed Account.'),
    ] = None
    msp_billing_profile_token: Annotated[
        str | None,
        Field(
            description='Token of the MSP billing profile to use for this managed account (MSP invoicing accounts only).'
        ),
    ] = None
    billing_information_attributes: Annotated[
        UpdateManagedAccountBillingInformationAttributes | None,
        Field(
            description='Billing address and contact information (MSP invoicing accounts only)'
        ),
    ] = None
    business_information_attributes: Annotated[
        UpdateManagedAccountBusinessInformationAttributes | None,
        Field(
            description='Business information and custom fields (MSP invoicing accounts only)'
        ),
    ] = None


class CreateBillingProfileBillingInformationAttributes(BaseModel):
    """
    Billing address and contact information
    """

    token: str | None = None
    company_name: Annotated[
        str | None, Field(description='Company name for billing')
    ] = None
    country_code: Annotated[str | None, Field(description='ISO country code')] = None
    address_line_1: Annotated[
        str | None, Field(description='First line of billing address')
    ] = None
    address_line_2: Annotated[
        str | None, Field(description='Second line of billing address')
    ] = None
    city: Annotated[str | None, Field(description='City for billing address')] = None
    state: Annotated[
        str | None, Field(description='State or province for billing address')
    ] = None
    postal_code: Annotated[str | None, Field(description='Postal or ZIP code')] = None
    billing_email: Annotated[
        Sequence[str] | None, Field(description='Array of billing email addresses')
    ] = None


CreateBillingProfileBusinessInformationAttributesMetadataCustomField = (
    BusinessInformationCustomField
)


class CreateBillingProfileBusinessInformationAttributesMetadata(BaseModel):
    """
    Business metadata including custom fields
    """

    custom_fields: Annotated[
        Sequence[CreateBillingProfileBusinessInformationAttributesMetadataCustomField]
        | None,
        Field(description='Array of custom field objects'),
    ] = None


class CreateBillingProfileBusinessInformationAttributes(BaseModel):
    """
    Business information and custom fields
    """

    token: str | None = None
    metadata: Annotated[
        CreateBillingProfileBusinessInformationAttributesMetadata | None,
        Field(description='Business metadata including custom fields'),
    ] = None


class CreateBillingProfileBankingInformationAttributesSecureData(BaseModel):
    """
    Encrypted banking details
    """

    account_number: Annotated[
        str | None, Field(description='Bank account number (US)')
    ] = None
    routing_number: Annotated[
        str | None, Field(description='Bank routing number (US)')
    ] = None
    iban: Annotated[
        str | None, Field(description='International Bank Account Number (EU)')
    ] = None
    swift_bic: Annotated[str | None, Field(description='SWIFT/BIC code (EU)')] = None


class CreateBillingProfileBankingInformationAttributes(BaseModel):
    """
    Banking details (MSP accounts only)
    """

    token: str | None = None
    bank_name: Annotated[str | None, Field(description='Name of the bank')] = None
    beneficiary_name: Annotated[
        str | None, Field(description='Name of the account beneficiary')
    ] = None
    tax_id: Annotated[str | None, Field(description='Tax identification number')] = None
    secure_data: Annotated[
        CreateBillingProfileBankingInformationAttributesSecureData | None,
        Field(description='Encrypted banking details'),
    ] = None


class CreateBillingProfileInvoiceAdjustmentAttributesAdjustmentItemAdjustmentType(
    str, Enum
):
    """
    Type of adjustment
    """

    charge = 'charge'
    credit = 'credit'
    discount = 'discount'


class CreateBillingProfileInvoiceAdjustmentAttributesAdjustmentItemCalculationType(
    str, Enum
):
    """
    How the adjustment is calculated
    """

    fixed = 'fixed'
    percentage = 'percentage'


class CreateBillingProfileInvoiceAdjustmentAttributesAdjustmentItem(BaseModel):
    name: Annotated[str, Field(description='Name of the adjustment')]
    adjustment_type: Annotated[
        CreateBillingProfileInvoiceAdjustmentAttributesAdjustmentItemAdjustmentType,
        Field(description='Type of adjustment'),
    ] = 'charge'
    calculation_type: Annotated[
        CreateBillingProfileInvoiceAdjustmentAttributesAdjustmentItemCalculationType,
        Field(description='How the adjustment is calculated'),
    ]
    amount: Annotated[float, Field(description='Amount or percentage value')]


class CreateBillingProfileInvoiceAdjustmentAttributes(BaseModel):
    """
    Invoice adjustments (taxes, fees, etc.)
    """

    token: str | None = None
    adjustment_items: Annotated[
        Sequence[CreateBillingProfileInvoiceAdjustmentAttributesAdjustmentItem] | None,
        Field(description='Array of adjustment items'),
    ] = None


class CreateBillingProfile(BaseModel):
    """
    Create a billing profile (MSP invoicing required).
    """

    nickname: Annotated[str, Field(description='Display name for the billing profile')]
    billing_information_attributes: Annotated[
        CreateBillingProfileBillingInformationAttributes | None,
        Field(description='Billing address and contact information'),
    ] = None
    business_information_attributes: Annotated[
        CreateBillingProfileBusinessInformationAttributes | None,
        Field(description='Business information and custom fields'),
    ] = None
    banking_information_attributes: Annotated[
        CreateBillingProfileBankingInformationAttributes | None,
        Field(description='Banking details (MSP accounts only)'),
    ] = None
    invoice_adjustment_attributes: Annotated[
        CreateBillingProfileInvoiceAdjustmentAttributes | None,
        Field(description='Invoice adjustments (taxes, fees, etc.)'),
    ] = None


class BankingInformationSecureData(BaseModel):
    account_number: Annotated[
        str | None, Field(description='Bank account number (US)')
    ] = None
    routing_number: Annotated[
        str | None, Field(description='Bank routing number (US)')
    ] = None
    iban: Annotated[
        str | None, Field(description='International Bank Account Number (EU)')
    ] = None
    swift_bic: Annotated[str | None, Field(description='SWIFT/BIC code (EU)')] = None


class AdjustmentItem(BaseModel):
    name: Annotated[
        str | None,
        Field(
            description="Name of the adjustment (e.g., 'State Tax', 'Processing Fee')"
        ),
    ] = None
    adjustment_type: Annotated[
        CreateBillingProfileInvoiceAdjustmentAttributesAdjustmentItemAdjustmentType
        | None,
        Field(description='Type of adjustment'),
    ] = None
    calculation_type: Annotated[
        CreateBillingProfileInvoiceAdjustmentAttributesAdjustmentItemCalculationType
        | None,
        Field(description='How the adjustment is calculated'),
    ] = None
    amount: Annotated[
        str | None, Field(description='Amount or percentage value for the adjustment')
    ] = None


UpdateBillingProfileBillingInformationAttributes = (
    CreateBillingProfileBillingInformationAttributes
)


UpdateBillingProfileBusinessInformationAttributesMetadataCustomField = (
    BusinessInformationCustomField
)


class UpdateBillingProfileBusinessInformationAttributesMetadata(BaseModel):
    """
    Business metadata including custom fields
    """

    custom_fields: Annotated[
        Sequence[UpdateBillingProfileBusinessInformationAttributesMetadataCustomField]
        | None,
        Field(description='Array of custom field objects'),
    ] = None


class UpdateBillingProfileBusinessInformationAttributes(BaseModel):
    """
    Business information and custom fields
    """

    token: str | None = None
    metadata: Annotated[
        UpdateBillingProfileBusinessInformationAttributesMetadata | None,
        Field(description='Business metadata including custom fields'),
    ] = None


UpdateBillingProfileBankingInformationAttributesSecureData = (
    CreateBillingProfileBankingInformationAttributesSecureData
)


class UpdateBillingProfileBankingInformationAttributes(BaseModel):
    """
    Banking details (MSP accounts only)
    """

    token: str | None = None
    bank_name: Annotated[str | None, Field(description='Name of the bank')] = None
    beneficiary_name: Annotated[
        str | None, Field(description='Name of the account beneficiary')
    ] = None
    tax_id: Annotated[str | None, Field(description='Tax identification number')] = None
    secure_data: Annotated[
        UpdateBillingProfileBankingInformationAttributesSecureData | None,
        Field(description='Encrypted banking details'),
    ] = None


UpdateBillingProfileInvoiceAdjustmentAttributesAdjustmentItem = (
    CreateBillingProfileInvoiceAdjustmentAttributesAdjustmentItem
)


class UpdateBillingProfileInvoiceAdjustmentAttributes(BaseModel):
    """
    Invoice adjustments (taxes, fees, etc.)
    """

    token: str | None = None
    adjustment_items: Annotated[
        Sequence[UpdateBillingProfileInvoiceAdjustmentAttributesAdjustmentItem] | None,
        Field(description='Array of adjustment items'),
    ] = None


class UpdateBillingProfile(BaseModel):
    """
    Update a billing profile (MSP invoicing required).
    """

    nickname: Annotated[
        str | None, Field(description='Display name for the billing profile')
    ] = None
    billing_information_attributes: Annotated[
        UpdateBillingProfileBillingInformationAttributes | None,
        Field(description='Billing address and contact information'),
    ] = None
    business_information_attributes: Annotated[
        UpdateBillingProfileBusinessInformationAttributes | None,
        Field(description='Business information and custom fields'),
    ] = None
    banking_information_attributes: Annotated[
        UpdateBillingProfileBankingInformationAttributes | None,
        Field(description='Banking details (MSP accounts only)'),
    ] = None
    invoice_adjustment_attributes: Annotated[
        UpdateBillingProfileInvoiceAdjustmentAttributes | None,
        Field(description='Invoice adjustments (taxes, fees, etc.)'),
    ] = None


class CreateInvoice(BaseModel):
    """
    Create an invoice (MSP accounts only).
    """

    billing_period_start: Annotated[
        str, Field(description='Start date of billing period (YYYY-MM-DD)')
    ]
    billing_period_end: Annotated[
        str, Field(description='End date of billing period (YYYY-MM-DD)')
    ]
    account_token: Annotated[
        str, Field(description='Token of the managed account to invoice')
    ]


class Invoice(BaseModel):
    """
    Invoice model
    """

    token: str | None = None
    invoice_number: Annotated[
        str | None, Field(description='Sequential invoice number for the MSP account')
    ] = None
    total: Annotated[
        str | None, Field(description='Total amount for the invoice period')
    ] = None
    billing_period_start: Annotated[
        str | None,
        Field(description='Start date of the billing period. ISO 8601 formatted.'),
    ] = None
    billing_period_end: Annotated[
        str | None,
        Field(description='End date of the billing period. ISO 8601 formatted.'),
    ] = None
    status: Annotated[
        str | None, Field(description='Current status of the invoice')
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the invoice was created. ISO 8601 formatted.'
        ),
    ] = None
    updated_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the invoice was last updated. ISO 8601 formatted.'
        ),
    ] = None
    account_token: Annotated[
        str | None,
        Field(description='Token of the managed account this invoice belongs to'),
    ] = None
    account_name: Annotated[
        str | None,
        Field(description='Name of the managed account this invoice belongs to'),
    ] = None
    msp_account_token: Annotated[
        str | None, Field(description='Token of the MSP account that owns this invoice')
    ] = None


class Invoices(BaseModel):
    """
    Invoices model
    """

    links: Mapping[str, Any] | None = None
    invoices: Sequence[Invoice] | None = None


class DownloadInvoiceFileType(str, Enum):
    """
    Type of file to download (pdf or csv)
    """

    pdf = 'pdf'
    csv = 'csv'


class DownloadInvoice(BaseModel):
    """
    Download invoice file (PDF or CSV).
    """

    file_type: Annotated[
        DownloadInvoiceFileType,
        Field(description='Type of file to download (pdf or csv)'),
    ]


class CreateBillingRuleType(str, Enum):
    """
    The type of the BillingRule. Note: the values are case insensitive.
    """

    exclusion = 'exclusion'
    adjustment = 'adjustment'
    credit = 'credit'
    charge = 'charge'
    custom = 'custom'


class CreateBillingRule(BaseModel):
    """
    Create a BillingRule.
    """

    type: Annotated[
        CreateBillingRuleType,
        Field(
            description='The type of the BillingRule. Note: the values are case insensitive.'
        ),
    ]
    title: Annotated[str, Field(description='The title of the BillingRule.')]
    start_period: Annotated[
        str | None,
        Field(
            description='The start period of the BillingRule. DEPRECATED: use start_date instead.'
        ),
    ] = None
    start_date: Annotated[
        str | None,
        Field(description='The start date of the BillingRule. ISO 8601 formatted.'),
    ] = None
    end_date: Annotated[
        str | None,
        Field(description='The end date of the BillingRule. ISO 8601 formatted.'),
    ] = None
    apply_to_all: Annotated[
        bool | None,
        Field(
            description='Determines if the BillingRule applies to all current and future managed accounts.'
        ),
    ] = None
    charge_type: Annotated[
        str | None,
        Field(
            description='The charge type of the BillingRule. Required for Exclusion rules.'
        ),
    ] = None
    percentage: Annotated[
        float | None,
        Field(
            description='The percentage of the cost shown. Required for Adjustment rules. Example value: 75.0'
        ),
    ] = None
    service: Annotated[
        str | None,
        Field(
            description='The service of the BillingRule. Required for Charge and Credit rules.'
        ),
    ] = None
    category: Annotated[
        str | None,
        Field(
            description='The category of the BillingRule. Required for Charge and Credit rules.'
        ),
    ] = None
    sub_category: Annotated[
        str | None,
        Field(
            description='The subcategory of the BillingRule. Required for Charge and Credit rules.'
        ),
    ] = None
    amount: Annotated[
        float | None,
        Field(
            description='The amount for the BillingRule. Required for Charge and Credit rules. Example value: 300'
        ),
    ] = None
    sql_query: Annotated[
        str | None,
        Field(
            description='The SQL query for the BillingRule. Required for Custom rules. Example value: UPDATE costs SET costs.amount = costs.amount * 0.95'
        ),
    ] = None


class BillingRule(BaseModel):
    """
    BillingRule model
    """

    token: str | None = None
    title: Annotated[
        str | None,
        Field(
            description='The title of the BillingRule.',
            examples=['Credit for Unused EC2 Instances'],
        ),
    ] = None
    type: Annotated[
        str | None,
        Field(description='The type of the BillingRule.', examples=['credit']),
    ] = None
    start_date: Annotated[
        str | None,
        Field(
            description='The start date of the BillingRule.',
            examples=['2024-06-28T00:00:00Z'],
        ),
    ] = None
    end_date: Annotated[
        str | None,
        Field(
            description='The end date of the BillingRule.',
            examples=['2024-06-28T00:00:00Z'],
        ),
    ] = None
    apply_to_all: Annotated[
        bool | None,
        Field(
            description='Whether the BillingRule applies to all future managed accounts.',
            examples=[True],
        ),
    ] = None
    created_by_token: Annotated[
        str | None,
        Field(
            description='The token of the Creator of the BillingRule.',
            examples=['usr_1234'],
        ),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the BillingRule was created. ISO 8601 Formatted.',
            examples=['2024-06-28T00:00:00Z'],
        ),
    ] = None
    service: Annotated[
        str | None,
        Field(
            description='The service for the BillingRule (Charge).',
            examples=['AWS Cloudfront'],
        ),
    ] = None
    category: Annotated[
        str | None,
        Field(
            description='The category for the BillingRule (Charge).',
            examples=['MSP Fee'],
        ),
    ] = None
    percentage: Annotated[
        str | None,
        Field(
            description='The percentage of the cost shown for the BillingRule (Adjustment).',
            examples=['75.0'],
        ),
    ] = None
    charge_type: Annotated[
        str | None,
        Field(description='The charge type for the BillingRule.', examples=['RIFee']),
    ] = None
    sub_category: Annotated[
        str | None,
        Field(
            description='The subcategory for the BillingRule (Charge).',
            examples=['One-time'],
        ),
    ] = None
    start_period: Annotated[
        str | None,
        Field(
            description='The start period for the BillingRule (Charge).',
            examples=['2024-05-01'],
        ),
    ] = None
    amount: Annotated[
        str | None,
        Field(
            description='The amount for the BillingRule (Charge).', examples=['5000.25']
        ),
    ] = None
    sql_query: Annotated[
        str | None,
        Field(
            description='The SQL query for the BillingRule (Custom).',
            examples=['UPDATE costs SET costs.amount = costs.amount * 0.95'],
        ),
    ] = None


class BillingRules(BaseModel):
    """
    BillingRules model
    """

    links: Mapping[str, Any] | None = None
    billing_rules: Sequence[BillingRule] | None = None


class UpdateBillingRule(BaseModel):
    """
    Update a BillingRule.
    """

    title: Annotated[str | None, Field(description='The title of the BillingRule.')] = (
        None
    )
    charge_type: Annotated[
        str | None, Field(description='The charge type of the BillingRule.')
    ] = None
    percentage: Annotated[
        float | None,
        Field(description='The percentage of the cost shown. Example value: 75.0'),
    ] = None
    service: Annotated[
        str | None, Field(description='The service of the BillingRule.')
    ] = None
    category: Annotated[
        str | None, Field(description='The category of the BillingRule.')
    ] = None
    sub_category: Annotated[
        str | None, Field(description='The subcategory of the BillingRule.')
    ] = None
    start_period: Annotated[
        str | None, Field(description='The start period of the BillingRule.')
    ] = None
    amount: Annotated[
        float | None,
        Field(description='The credit amount for the BillingRule. Example value: 300'),
    ] = None
    start_date: Annotated[
        str | None,
        Field(description='The start date of the BillingRule. ISO 8601 formatted.'),
    ] = None
    end_date: Annotated[
        str | None,
        Field(description='The end date of the BillingRule. ISO 8601 formatted.'),
    ] = None
    apply_to_all: Annotated[
        bool | None,
        Field(
            description='Determines if the BillingRule applies to all current and future managed accounts.'
        ),
    ] = None
    sql_query: Annotated[
        str | None, Field(description='The SQL query of the BillingRule.')
    ] = None


class DataExportManifest(BaseModel):
    files: Annotated[str | None, Field(examples=[''])] = None
    completed_at: Annotated[str | None, Field(examples=['2025-03-20T12:00:00Z'])] = None
    valid_until: Annotated[str | None, Field(examples=['2025-03-20T12:00:00Z'])] = None


class ExchangeRate(BaseModel):
    base_currency_code: str | None = None
    currency_code: str | None = None
    rate: str | None = None
    effective_date: str | None = None
    updated_at: str | None = None


class BearerToken(BaseModel):
    description: Annotated[
        str | None,
        Field(description='The user supplied description of this BearerToken'),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the BearerToken was created. ISO 8601 Formatted.',
            examples=['2023-08-04T00:00:00Z'],
        ),
    ] = None
    scope: Annotated[
        Sequence[str] | None,
        Field(
            description='The scopes applied to the BearerToken used to authenticate this request.'
        ),
    ] = None


class CostProviderModel(BaseModel):
    name: Annotated[
        str | None, Field(description='The name of the CostProvider.', examples=['AWS'])
    ] = None
    key: Annotated[
        str | None,
        Field(
            description='The key of the CostProvider, useful for filtering Costs.',
            examples=['aws'],
        ),
    ] = None


class CostService(BaseModel):
    name: Annotated[
        str | None,
        Field(
            description='The name of the CostService.',
            examples=['Amazon Simple Storage Service'],
        ),
    ] = None
    provider: Annotated[
        str | None,
        Field(description='The key value of the CostProvider.', examples=['aws']),
    ] = None


class CreateUserFeedback(BaseModel):
    """
    Provide UserFeedback for our product and features.
    """

    message: Annotated[str, Field(description='UserFeedback message')]


class UserFeedback(BaseModel):
    """
    UserFeedback model
    """

    token: Annotated[str | None, Field(description='Token of the feedback')] = None
    message: Annotated[str | None, Field(description='User feedback message')] = None
    created_by_token: Annotated[
        str | None, Field(description='Token of the creator of the feedback')
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='Feedback creation timestamp', examples=['2023-01-01T00:00:00Z']
        ),
    ] = None


class CostAlertEvent(BaseModel):
    """
    CostAlertEvent model
    """

    token: str | None = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the CostAlertEvent was created. ISO 8601 Formatted.',
            examples=['2021-07-09T00:00:00Z'],
        ),
    ] = None
    triggered_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the CostAlertEvent is sent. ISO 8601 Formatted.',
            examples=['2021-07-09T00:00:00Z'],
        ),
    ] = None
    description: Annotated[
        str | None, Field(description='The description of the CostAlertEvent.')
    ] = None
    alert_type: Annotated[
        str | None, Field(description='The type of the CostAlertEvent.')
    ] = None
    metadata: Annotated[
        Mapping[str, Any] | None,
        Field(description='The metadata of the CostAlertEvent.'),
    ] = None
    report_token: Annotated[
        str | None,
        Field(
            description='The token of the report associated with the CostAlertEvent.'
        ),
    ] = None
    alert_token: Annotated[
        str | None,
        Field(description='The token of the alert associated with the CostAlertEvent.'),
    ] = None


class CreateCostAlert(BaseModel):
    """
    Create a new Cost Alert
    """

    title: Annotated[str, Field(description='The title of the Cost Alert.')]
    interval: Annotated[
        str,
        Field(
            description="The period of time used to compare costs. Options are 'day', 'week', 'month', 'quarter'."
        ),
    ]
    threshold: Annotated[
        float, Field(description='The threshold value for the Cost Alert.')
    ]
    unit_type: Annotated[
        str,
        Field(
            description="The unit type used to compare costs. Options are 'currency' or 'percentage'."
        ),
    ]
    workspace_token: Annotated[
        str, Field(description='The token of the Workspace to add the Cost Alert to.')
    ]
    email_recipients: Annotated[
        Sequence[str] | None,
        Field(description='The email recipients for the Cost Alert.'),
    ] = None
    slack_channels: Annotated[
        Sequence[str] | None,
        Field(description='The Slack channels that will receive the alert.'),
    ] = None
    teams_channels: Annotated[
        Sequence[str] | None,
        Field(description='The Microsoft Teams channels that will receive the alert.'),
    ] = None
    report_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens of the reports to alert on.'),
    ] = None


class CostAlert(BaseModel):
    """
    CostAlert model
    """

    token: str | None = None
    title: str | None = None
    email_recipients: Annotated[
        Sequence[str] | None,
        Field(description='The email addresses that will receive the alert.'),
    ] = None
    slack_channels: Annotated[
        Sequence[str] | None,
        Field(
            description='The Slack channels that will receive the alert. Make sure your slack integration is connected at https://console.vantage.sh/settings/slack.'
        ),
    ] = None
    teams_channels: Annotated[
        Sequence[str] | None,
        Field(
            description='The Microsoft Teams channels that will receive the alert. Make sure your teams integration is connected at https://console.vantage.sh/settings/microsoft_teams.'
        ),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, for when the alert was created. ISO 8601 Formatted.',
            examples=['2023-10-01T12:00:00Z'],
        ),
    ] = None
    updated_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, for when the alert was last updated. ISO 8601 Formatted.',
            examples=['2023-10-01T12:00:00Z'],
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(description='The ID of the organization that owns the CostAlert.'),
    ] = None
    interval: Annotated[
        str | None,
        Field(
            description="The period of time used to compare costs. Options are 'day', 'week', 'month', 'quarter'."
        ),
    ] = None
    threshold: Annotated[
        float | None, Field(description='The cost change threshold to alert on.')
    ] = None
    unit_type: Annotated[
        str | None,
        Field(
            description="The unit type used to compare costs. Options are 'currency' or 'percentage'."
        ),
    ] = None
    report_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens of the reports to alert on.'),
    ] = None


class CostAlerts(BaseModel):
    """
    CostAlerts model
    """

    links: Mapping[str, Any] | None = None
    cost_alerts: Sequence[CostAlert] | None = None


class UpdateCostAlert(BaseModel):
    """
    Update a Cost Alert
    """

    title: Annotated[str | None, Field(description='The title of the Cost Alert.')] = (
        None
    )
    email_recipients: Annotated[
        Sequence[str] | None,
        Field(description='The email recipients for the Cost Alert.'),
    ] = None
    interval: Annotated[
        str | None,
        Field(
            description="The period of time used to compare costs. Options are 'day', 'week', 'month', 'quarter'."
        ),
    ] = None
    threshold: Annotated[
        float | None, Field(description='The threshold value for the Cost Alert.')
    ] = None
    slack_channels: Annotated[
        Sequence[str] | None,
        Field(
            description='The Slack channels that will receive the alert. Make sure your slack integration is connected at https://console.vantage.sh/settings/slack.'
        ),
    ] = None
    teams_channels: Annotated[
        Sequence[str] | None,
        Field(
            description='The Microsoft Teams channels that will receive the alert. Make sure your teams integration is connected at https://console.vantage.sh/settings/microsoft_teams.'
        ),
    ] = None
    unit_type: Annotated[
        str | None,
        Field(
            description="The unit type used to compare costs. Options are 'currency' or 'percentage'."
        ),
    ] = None
    report_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens of the reports to alert on.'),
    ] = None


class UnitCost(BaseModel):
    links: Mapping[str, Any] | None = None
    business_metric_token: Annotated[
        str | None,
        Field(
            description='The token of the BusinessMetric for which the unit cost was calculated.',
            examples=['bsnss_mtrc_1234'],
        ),
    ] = None
    business_metric_title: Annotated[
        str | None,
        Field(
            description='The title of the BusinessMetric for which the unit cost was calculated.',
            examples=['Total Revenue'],
        ),
    ] = None
    unit_cost_amount: Annotated[
        str | None, Field(description='The amount of the unit cost.', examples=['4.25'])
    ] = None
    business_metric_amount: Annotated[
        str | None,
        Field(description='The amount of the business metric.', examples=['0.371']),
    ] = None
    scale: Annotated[
        float | None,
        Field(
            description="The scale of the BusinessMetric's values within a particular CostReport.",
            examples=[1.0],
        ),
    ] = None
    date: Annotated[
        str | None,
        Field(
            description='The date for which the unit cost was calculated. ISO 8601 Formatted.',
            examples=['2023-09-05+00:00'],
        ),
    ] = None


class CostProviderAccount(BaseModel):
    title: Annotated[
        str | None,
        Field(
            description='The display name of the provider account.',
            examples=['Production Account'],
        ),
    ] = None
    account_id: Annotated[
        str | None,
        Field(
            description='The provider account identifier (e.g., AWS account ID, Azure subscription ID).',
            examples=['123456789012'],
        ),
    ] = None
    provider_uuid: Annotated[
        str | None,
        Field(
            description='The provider-specific unique identifier.',
            examples=[
                'arn:aws:organizations::123456789012:account/o-example12345/123456789012'
            ],
        ),
    ] = None
    provider: Annotated[
        str | None,
        Field(
            description='The provider type (aws, azure, gcp, etc.).', examples=['aws']
        ),
    ] = None


class WorkspacesGetParametersQuery(BaseModel):
    page: int | None = None
    limit: int | None = None


class WorkspacesWorkspaceTokenPutRequestCurrency(str, Enum):
    """
    Currency code for the workspace.
    """

    AED = 'AED'
    AFN = 'AFN'
    ALL = 'ALL'
    AMD = 'AMD'
    ANG = 'ANG'
    AOA = 'AOA'
    ARS = 'ARS'
    AUD = 'AUD'
    AWG = 'AWG'
    AZN = 'AZN'
    BAM = 'BAM'
    BBD = 'BBD'
    BDT = 'BDT'
    BGN = 'BGN'
    BHD = 'BHD'
    BIF = 'BIF'
    BMD = 'BMD'
    BND = 'BND'
    BOB = 'BOB'
    BRL = 'BRL'
    BSD = 'BSD'
    BTC = 'BTC'
    BTN = 'BTN'
    BWP = 'BWP'
    BYN = 'BYN'
    BYR = 'BYR'
    BZD = 'BZD'
    CAD = 'CAD'
    CDF = 'CDF'
    CHF = 'CHF'
    CLF = 'CLF'
    CLP = 'CLP'
    CNY = 'CNY'
    COP = 'COP'
    CRC = 'CRC'
    CUC = 'CUC'
    CUP = 'CUP'
    CVE = 'CVE'
    CZK = 'CZK'
    DJF = 'DJF'
    DKK = 'DKK'
    DOP = 'DOP'
    DZD = 'DZD'
    EGP = 'EGP'
    ERN = 'ERN'
    ETB = 'ETB'
    EUR = 'EUR'
    FJD = 'FJD'
    FKP = 'FKP'
    GBP = 'GBP'
    GEL = 'GEL'
    GGP = 'GGP'
    GHS = 'GHS'
    GIP = 'GIP'
    GMD = 'GMD'
    GNF = 'GNF'
    GTQ = 'GTQ'
    GYD = 'GYD'
    HKD = 'HKD'
    HNL = 'HNL'
    HRK = 'HRK'
    HTG = 'HTG'
    HUF = 'HUF'
    IDR = 'IDR'
    ILS = 'ILS'
    IMP = 'IMP'
    INR = 'INR'
    IQD = 'IQD'
    IRR = 'IRR'
    ISK = 'ISK'
    JEP = 'JEP'
    JMD = 'JMD'
    JOD = 'JOD'
    JPY = 'JPY'
    KES = 'KES'
    KGS = 'KGS'
    KHR = 'KHR'
    KMF = 'KMF'
    KPW = 'KPW'
    KRW = 'KRW'
    KWD = 'KWD'
    KYD = 'KYD'
    KZT = 'KZT'
    LAK = 'LAK'
    LBP = 'LBP'
    LKR = 'LKR'
    LRD = 'LRD'
    LSL = 'LSL'
    LTL = 'LTL'
    LVL = 'LVL'
    LYD = 'LYD'
    MAD = 'MAD'
    MDL = 'MDL'
    MGA = 'MGA'
    MKD = 'MKD'
    MMK = 'MMK'
    MNT = 'MNT'
    MOP = 'MOP'
    MRO = 'MRO'
    MUR = 'MUR'
    MVR = 'MVR'
    MWK = 'MWK'
    MXN = 'MXN'
    MYR = 'MYR'
    MZN = 'MZN'
    NAD = 'NAD'
    NGN = 'NGN'
    NIO = 'NIO'
    NOK = 'NOK'
    NPR = 'NPR'
    NZD = 'NZD'
    OMR = 'OMR'
    PAB = 'PAB'
    PEN = 'PEN'
    PGK = 'PGK'
    PHP = 'PHP'
    PKR = 'PKR'
    PLN = 'PLN'
    PYG = 'PYG'
    QAR = 'QAR'
    RON = 'RON'
    RSD = 'RSD'
    RUB = 'RUB'
    RWF = 'RWF'
    SAR = 'SAR'
    SBD = 'SBD'
    SCR = 'SCR'
    SDG = 'SDG'
    SEK = 'SEK'
    SGD = 'SGD'
    SHP = 'SHP'
    SLL = 'SLL'
    SOS = 'SOS'
    SRD = 'SRD'
    SSP = 'SSP'
    STD = 'STD'
    STN = 'STN'
    SVC = 'SVC'
    SYP = 'SYP'
    SZL = 'SZL'
    THB = 'THB'
    TJS = 'TJS'
    TMT = 'TMT'
    TND = 'TND'
    TOP = 'TOP'
    TRY = 'TRY'
    TTD = 'TTD'
    TWD = 'TWD'
    TZS = 'TZS'
    UAH = 'UAH'
    UGX = 'UGX'
    USD = 'USD'
    UYU = 'UYU'
    UZS = 'UZS'
    VEF = 'VEF'
    VND = 'VND'
    VUV = 'VUV'
    WST = 'WST'
    XAF = 'XAF'
    XCD = 'XCD'
    XDR = 'XDR'
    XOF = 'XOF'
    XPF = 'XPF'
    YER = 'YER'
    ZAR = 'ZAR'
    ZMW = 'ZMW'
    ZWL = 'ZWL'


class WorkspacesWorkspaceTokenPutRequest(BaseModel):
    name: Annotated[str | None, Field(description='Name of the workspace.')] = None
    enable_currency_conversion: Annotated[
        bool, Field(description='Enable currency conversion for the workspace.')
    ] = True
    currency: Annotated[
        WorkspacesWorkspaceTokenPutRequestCurrency | None,
        Field(description='Currency code for the workspace.'),
    ] = None
    exchange_rate_date: Annotated[
        CreateWorkspaceExchangeRateDate,
        Field(description='The date to use for currency conversion.'),
    ] = 'daily_rate'


FoldersGetParametersQuery = WorkspacesGetParametersQuery


SavedFiltersGetParametersQuery = WorkspacesGetParametersQuery


class CostReportsGetParametersQuery(BaseModel):
    page: int | None = None
    limit: int | None = None
    folder_token: str | None = None


class CostReportsCostReportTokenForecastedCostsGetParametersQueryProvider(str, Enum):
    aws = 'aws'
    azure = 'azure'
    gcp = 'gcp'
    snowflake = 'snowflake'
    databricks = 'databricks'
    mongo = 'mongo'
    datadog = 'datadog'
    fastly = 'fastly'
    new_relic = 'new_relic'
    opencost = 'opencost'
    open_ai = 'open_ai'
    oracle = 'oracle'
    confluent = 'confluent'
    planetscale = 'planetscale'
    coralogix = 'coralogix'
    kubernetes = 'kubernetes'
    custom_provider = 'custom_provider'
    github = 'github'
    linode = 'linode'
    grafana = 'grafana'
    clickhouse = 'clickhouse'
    temporal = 'temporal'
    twilio = 'twilio'
    azure_csp = 'azure_csp'
    kubernetes_agent = 'kubernetes_agent'
    anthropic = 'anthropic'
    anyscale = 'anyscale'
    all = 'all'


class CostReportsCostReportTokenForecastedCostsGetParametersQuery(BaseModel):
    start_date: date | None = None
    end_date: date | None = None
    provider: (
        CostReportsCostReportTokenForecastedCostsGetParametersQueryProvider | None
    ) = None
    service: str | None = None
    page: int | None = None
    limit: int | None = None


SegmentsGetParametersQuery = WorkspacesGetParametersQuery


DashboardsGetParametersQuery = WorkspacesGetParametersQuery


class CostsDataExportsPostParametersQuery(BaseModel):
    groupings: Sequence[str] | None = None


class CostsDataExportsPostRequestDateBin(str, Enum):
    """
    The date bin of the costs. Defaults to the report's default or day.
    """

    day = 'day'
    week = 'week'
    month = 'month'
    quarter = 'quarter'


class CostsDataExportsPostRequestSchema(str, Enum):
    """
    The schema of the data export.
    """

    vntg = 'vntg'
    focus = 'focus'


class CostsDataExportsPostRequest(BaseModel):
    cost_report_token: Annotated[
        str | None, Field(description='The CostReport token.')
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The VQL filter to apply to the costs. If this is supplied you do not need cost_report_token.'
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(
            description="The token of the Workspace to query costs from. Ignored if 'cost_report_token' is set. Required if the API token is associated with multiple Workspaces."
        ),
    ] = None
    start_date: Annotated[
        str | None,
        Field(
            description='First date you would like to filter costs from. ISO 8601 formatted.'
        ),
    ] = None
    end_date: Annotated[
        str | None,
        Field(
            description='Last date you would like to filter costs to. ISO 8601 formatted.'
        ),
    ] = None
    date_bin: Annotated[
        CostsDataExportsPostRequestDateBin | None,
        Field(
            description="The date bin of the costs. Defaults to the report's default or day."
        ),
    ] = None
    schema_: Annotated[
        CostsDataExportsPostRequestSchema,
        Field(alias='schema', description='The schema of the data export.'),
    ] = 'vntg'
    settings_include_credits_: Annotated[
        bool,
        Field(
            alias='settings[include_credits]',
            description='Results will include credits.',
        ),
    ] = False
    settings_include_refunds_: Annotated[
        bool,
        Field(
            alias='settings[include_refunds]',
            description='Results will include refunds.',
        ),
    ] = False
    settings_include_discounts_: Annotated[
        bool,
        Field(
            alias='settings[include_discounts]',
            description='Results will include discounts.',
        ),
    ] = True
    settings_include_tax_: Annotated[
        bool,
        Field(alias='settings[include_tax]', description='Results will include tax.'),
    ] = True
    settings_amortize_: Annotated[
        bool, Field(alias='settings[amortize]', description='Results will amortize.')
    ] = True
    settings_unallocated_: Annotated[
        bool,
        Field(
            alias='settings[unallocated]',
            description='Results will show unallocated costs.',
        ),
    ] = False
    settings_aggregate_by_: Annotated[
        str,
        Field(
            alias='settings[aggregate_by]',
            description='Results will aggregate by cost or usage.',
        ),
    ] = 'cost'
    settings_show_previous_period_: Annotated[
        bool,
        Field(
            alias='settings[show_previous_period]',
            description='Results will show previous period costs or usage comparison.',
        ),
    ] = True


class CostsGetParametersQueryOrder(str, Enum):
    asc = 'asc'
    desc = 'desc'


class CostsGetParametersQueryDateBin(str, Enum):
    day = 'day'
    week = 'week'
    month = 'month'
    quarter = 'quarter'


class CostsGetParametersQuery(BaseModel):
    cost_report_token: str | None = None
    filter: str | None = None
    workspace_token: str | None = None
    start_date: str | None = None
    end_date: str | None = None
    groupings: Sequence[str] | None = None
    order: CostsGetParametersQueryOrder = 'desc'
    limit: int | None = None
    page: int | None = None
    date_bin: CostsGetParametersQueryDateBin | None = None
    settings_include_credits_: Annotated[
        bool, Field(alias='settings[include_credits]')
    ] = False
    settings_include_refunds_: Annotated[
        bool, Field(alias='settings[include_refunds]')
    ] = False
    settings_include_discounts_: Annotated[
        bool, Field(alias='settings[include_discounts]')
    ] = True
    settings_include_tax_: Annotated[bool, Field(alias='settings[include_tax]')] = True
    settings_amortize_: Annotated[bool, Field(alias='settings[amortize]')] = True
    settings_unallocated_: Annotated[bool, Field(alias='settings[unallocated]')] = False
    settings_aggregate_by_: Annotated[str, Field(alias='settings[aggregate_by]')] = (
        'cost'
    )
    settings_show_previous_period_: Annotated[
        bool, Field(alias='settings[show_previous_period]')
    ] = True


class ResourcesGetParametersQuery(BaseModel):
    resource_report_token: str | None = None
    filter: str | None = None
    workspace_token: str | None = None
    include_cost: bool | None = None


class ResourcesResourceTokenGetParametersQuery(BaseModel):
    include_cost: bool | None = None


ResourceReportsGetParametersQuery = WorkspacesGetParametersQuery


class ResourceReportsColumnsGetParametersQuery(BaseModel):
    resource_type: str


TeamsGetParametersQuery = WorkspacesGetParametersQuery


AccessGrantsGetParametersQuery = WorkspacesGetParametersQuery


ReportNotificationsGetParametersQuery = WorkspacesGetParametersQuery


UsersGetParametersQuery = WorkspacesGetParametersQuery


BusinessMetricsGetParametersQuery = WorkspacesGetParametersQuery


class BusinessMetricsBusinessMetricTokenValuesGetParametersQuery(BaseModel):
    page: int | None = None
    limit: int | None = None
    start_date: date | None = None


class ProductsGetParametersQuery(BaseModel):
    provider_id: str | None = None
    service_id: str | None = None
    name: str | None = None
    page: int | None = None
    limit: int | None = None


ProductsProductIdPricesGetParametersQuery = WorkspacesGetParametersQuery


FinancialCommitmentReportsGetParametersQuery = WorkspacesGetParametersQuery


FinancialCommitmentsGetParametersQuery = WorkspacesGetParametersQuery


KubernetesEfficiencyReportsGetParametersQuery = WorkspacesGetParametersQuery


NetworkFlowReportsGetParametersQuery = WorkspacesGetParametersQuery


class AnomalyAlertsGetParametersQuery(BaseModel):
    page: int | None = None
    limit: int | None = None
    start_date: datetime | None = None
    end_date: datetime | None = None
    provider: str | None = None
    service: str | None = None
    cost_category: str | None = None
    cost_report_token: str | None = None


class AuditLogsGetParametersQuery(BaseModel):
    page: int | None = None
    limit: int | None = None
    user: int | None = None
    workspace_token: str | None = None
    action: str | None = None
    object_name: str | None = None
    source: str | None = None
    object_type: str | None = None
    token: str | None = None
    object_token: str | None = None
    start_date: str | None = None
    end_date: str | None = None


class TagsGetParametersQueryProvider(str, Enum):
    aws = 'aws'
    azure = 'azure'
    gcp = 'gcp'
    snowflake = 'snowflake'
    databricks = 'databricks'
    mongo = 'mongo'
    datadog = 'datadog'
    fastly = 'fastly'
    new_relic = 'new_relic'
    opencost = 'opencost'
    open_ai = 'open_ai'
    oracle = 'oracle'
    confluent = 'confluent'
    planetscale = 'planetscale'
    coralogix = 'coralogix'
    kubernetes = 'kubernetes'
    custom_provider = 'custom_provider'
    github = 'github'
    linode = 'linode'
    grafana = 'grafana'
    clickhouse = 'clickhouse'
    temporal = 'temporal'
    twilio = 'twilio'
    azure_csp = 'azure_csp'
    kubernetes_agent = 'kubernetes_agent'
    anthropic = 'anthropic'
    anyscale = 'anyscale'


class TagsGetParametersQuery(BaseModel):
    providers: Sequence[TagsGetParametersQueryProvider] | None = None
    search_query: str | None = None
    sort_direction: CostsGetParametersQueryOrder | None = None
    page: int = 1
    limit: int = 100


class TagsKeyValuesGetParametersQuery(BaseModel):
    providers: Sequence[TagsGetParametersQueryProvider] | None = None
    sort_direction: CostsGetParametersQueryOrder = 'asc'
    search_query: str | None = None
    page: int = 1
    limit: int = 100


AnomalyNotificationsGetParametersQuery = WorkspacesGetParametersQuery


BudgetsGetParametersQuery = WorkspacesGetParametersQuery


class BudgetsBudgetTokenGetParametersQuery(BaseModel):
    include_performance: bool | None = None


BudgetAlertsGetParametersQuery = WorkspacesGetParametersQuery


class BudgetAlertsPostRequest(BaseModel):
    budget_tokens: Annotated[
        Sequence[str], Field(description='The tokens of the Budget that has the alert.')
    ]
    threshold: Annotated[
        int,
        Field(
            description='The threshold amount that must be met for the alert to fire.'
        ),
    ]
    user_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens of the users that receive the alert.'),
    ] = None
    duration_in_days: Annotated[
        str,
        Field(
            description='The number of days from the start or end of the month to trigger the alert if the threshold is reached.  For the full month, pass an empty value.'
        ),
    ]
    period_to_track: Annotated[
        str | None,
        Field(
            description='The period tracked on the alert. Used with duration_in_days to determine the time window of the alert. Defaults to start_of_the_month if not passed. Possible values: start_of_the_month, end_of_the_month.'
        ),
    ] = None
    recipient_channels: Annotated[
        Sequence[str] | None,
        Field(
            description='The channels receiving the alerts. Requires an integration provider to be connected.'
        ),
    ] = None


class BudgetAlertsBudgetAlertTokenPutRequest(BaseModel):
    budget_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens of the Budget that has the alert.'),
    ] = None
    threshold: Annotated[
        int | None,
        Field(
            description='The threshold amount that must be met for the alert to fire.'
        ),
    ] = None
    user_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens of the users that receive the alert.'),
    ] = None
    duration_in_days: Annotated[
        str | None,
        Field(
            description='The number of days from the start or end of the month to trigger the alert if the threshold is reached. For the full month, pass an empty value.'
        ),
    ] = None
    period_to_track: Annotated[
        str | None,
        Field(
            description='The period tracked on the alert. Used with duration_in_days to determine the time window of the alert. Defaults to start_of_the_month if not passed. Possible values: start_of_the_month, end_of_the_month.'
        ),
    ] = None
    recipient_channels: Annotated[
        Sequence[str] | None,
        Field(
            description='The channels receiving the alerts. Requires an integration provider to be connected.'
        ),
    ] = None


class IntegrationsGetParametersQuery(BaseModel):
    provider: TagsGetParametersQueryProvider | None = None
    account_identifier: str | None = None
    page: int | None = None
    limit: int | None = None


class IntegrationsIntegrationTokenPutRequest(RootModel[Sequence[str]]):
    root: Sequence[str]


class RecommendationsGetParametersQueryCategory(str, Enum):
    ebs_gp2_to_gp3 = 'ebs_gp2_to_gp3'
    ebs_unattached_volume = 'ebs_unattached_volume'
    elasticache_reserved_instances = 'elasticache_reserved_instances'
    elastic_search_reserved_instances = 'elastic_search_reserved_instances'
    rds_reserved_instances = 'rds_reserved_instances'
    redshift_reserved_instances = 'redshift_reserved_instances'
    ec2_generational_upgrades = 'ec2_generational_upgrades'
    rds_generational_upgrades = 'rds_generational_upgrades'
    es_generational_upgrades = 'es_generational_upgrades'
    cw_log_retention_policy = 'cw_log_retention_policy'
    workspace_unused = 'workspace_unused'
    workspace_stranded = 'workspace_stranded'
    cloudfront_cloudflare = 'cloudfront_cloudflare'
    s3_cloudflare = 's3_cloudflare'
    ip_unattached = 'ip_unattached'
    s3_bucket_intelligent_tiering = 's3_bucket_intelligent_tiering'
    s3_bucket_glacier_instant_retrieval = 's3_bucket_glacier_instant_retrieval'
    savings_plan = 'savings_plan'
    unused_financial_commitments = 'unused_financial_commitments'
    datadog_financial_commitments = 'datadog_financial_commitments'
    az_compute_reserved_instances = 'az_compute_reserved_instances'
    az_compute_reserved_instances_cosmos = 'az_compute_reserved_instances_cosmos'
    az_compute_reserved_instances_sql = 'az_compute_reserved_instances_sql'
    az_compute_reserved_instances_app_service = (
        'az_compute_reserved_instances_app_service'
    )
    az_disks_unattached = 'az_disks_unattached'
    dynamodb_reserved_capacity_recommender = 'dynamodb_reserved_capacity_recommender'
    kubernetes_recommender = 'kubernetes_recommender'
    gcp_compute_rightsizing_recommender = 'gcp_compute_rightsizing_recommender'
    gcp_compute_commitment_recommender = 'gcp_compute_commitment_recommender'
    ec2_snapshot_recommender = 'ec2_snapshot_recommender'
    ec2_rightsizing_recommender = 'ec2_rightsizing_recommender'
    ebs_compute_optimizer_recommender = 'ebs_compute_optimizer_recommender'
    lambda_compute_optimizer_recommender = 'lambda_compute_optimizer_recommender'
    ecs_compute_optimizer_recommender = 'ecs_compute_optimizer_recommender'
    idle_compute_optimizer_recommender = 'idle_compute_optimizer_recommender'
    rds_compute_optimizer_recommender = 'rds_compute_optimizer_recommender'
    ec2_compute_optimizer_recommender = 'ec2_compute_optimizer_recommender'
    azure_rightsizing_recommender = 'azure_rightsizing_recommender'
    azure_compute_savings_recommender = 'azure_compute_savings_recommender'
    azure_blob_storage_reserved_instances_recommender = (
        'azure_blob_storage_reserved_instances_recommender'
    )
    azure_sql_paas_db_reserved_instances_recommender = (
        'azure_sql_paas_db_reserved_instances_recommender'
    )
    azure_files_reserved_instances_recommender = (
        'azure_files_reserved_instances_recommender'
    )
    eks_in_extended_support_window = 'eks_in_extended_support_window'
    eks_approaching_extended_support_window = 'eks_approaching_extended_support_window'
    rds_in_extended_support_window = 'rds_in_extended_support_window'
    rds_approaching_extended_support_window = 'rds_approaching_extended_support_window'
    datadog_metrics_unqueried = 'datadog_metrics_unqueried'


class RecommendationsGetParametersQuery(BaseModel):
    workspace_token: str | None = None
    provider_account_id: str | None = None
    category: RecommendationsGetParametersQueryCategory | None = None
    provider: str | None = None
    page: int | None = None
    limit: int | None = None


RecommendationsRecommendationTokenResourcesGetParametersQuery = (
    WorkspacesGetParametersQuery
)


ManagedAccountsGetParametersQuery = WorkspacesGetParametersQuery


BillingProfilesGetParametersQuery = WorkspacesGetParametersQuery


class InvoicesGetParametersQuery(BaseModel):
    page: int | None = None
    limit: int | None = None
    managed_account_token: str | None = None


BillingRulesGetParametersQuery = WorkspacesGetParametersQuery


class ExchangeRatesCsvPostRequest(BaseModel):
    csv: Annotated[
        bytes,
        Field(
            description='CSV file containing exchange rates. Format: base_currency_code, currency_code, rate, date (YYYY-MM-DD)'
        ),
    ]


ExchangeRatesGetParametersQuery = WorkspacesGetParametersQuery


class CostProvidersGetParametersQuery(BaseModel):
    workspace_token: str | None = None


CostServicesGetParametersQuery = CostProvidersGetParametersQuery


class CostAlertsCostAlertTokenEventsGetParametersQuery(BaseModel):
    report_token: str | None = None
    page: int | None = None
    limit: int | None = None


class UnitCostsDataExportsPostRequestDateBin(str, Enum):
    """
    The date bin of the unit costs. Defaults to the report's default or day.
    """

    day = 'day'
    week = 'week'
    month = 'month'
    quarter = 'quarter'


class UnitCostsDataExportsPostRequest(BaseModel):
    cost_report_token: Annotated[str, Field(description='The CostReport token.')]
    workspace_token: Annotated[
        str | None,
        Field(
            description='The token of the Workspace to query costs from. Required if the API token is associated with multiple Workspaces.'
        ),
    ] = None
    start_date: Annotated[
        str | None,
        Field(
            description="First date you would like to filter unit costs from. Defaults to the report's default. ISO 8601 formatted."
        ),
    ] = None
    end_date: Annotated[
        str | None,
        Field(
            description="Last date you would like to filter unit costs to. Defaults to the report's default. ISO 8601 formatted."
        ),
    ] = None
    date_bin: Annotated[
        UnitCostsDataExportsPostRequestDateBin | None,
        Field(
            description="The date bin of the unit costs. Defaults to the report's default or day."
        ),
    ] = None


class UnitCostsGetParametersQuery(BaseModel):
    cost_report_token: str
    start_date: str | None = None
    end_date: str | None = None
    date_bin: CostsGetParametersQueryDateBin | None = None
    order: CostsGetParametersQueryOrder = 'desc'
    limit: int | None = None
    page: int | None = None


class CostProviderAccountsGetParametersQuery(BaseModel):
    workspace_token: str | None = None
    provider: TagsGetParametersQueryProvider | None = None
    account_id: str | None = None
    account_name: str | None = None


class CostReport(BaseModel):
    """
    CostReport model
    """

    token: str | None = None
    title: Annotated[
        str | None,
        Field(
            description='The title of the CostReport.',
            examples=['Production Environment'],
        ),
    ] = None
    folder_token: Annotated[
        str | None,
        Field(description='The token for the Folder the CostReport is a part of.'),
    ] = None
    saved_filter_tokens: Annotated[
        Sequence[str] | None,
        Field(
            description='The tokens for the SavedFilters assigned to the CostReport.'
        ),
    ] = None
    business_metric_tokens_with_metadata: Annotated[
        Sequence[AttachedBusinessMetricForCostReport] | None,
        Field(
            description='The tokens for the BusinessMetrics assigned to the CostReport, the unit scale, and label filter.'
        ),
    ] = None
    filter: Annotated[
        str | None,
        Field(
            description='The filter applied to the CostReport. Additional documentation available at https://docs.vantage.sh/vql.'
        ),
    ] = None
    groupings: Annotated[
        str | None,
        Field(
            description='The grouping aggregations applied to the filtered data.',
            examples=['provider, service'],
        ),
    ] = None
    settings: Annotated[
        CostReportSettings | None, Field(description='Report settings.')
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the report was created. ISO 8601 Formatted.',
            examples=['2021-07-09T00:00:00Z'],
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(description='The token for the Workspace the CostReport is a part of.'),
    ] = None
    previous_period_start_date: Annotated[
        str | None,
        Field(
            description='The previous period start date of the CostReport. ISO 8601 Formatted.',
            examples=['2024-06-01'],
        ),
    ] = None
    previous_period_end_date: Annotated[
        str | None,
        Field(
            description='The previous period end date of the CostReport. ISO 8601 Formatted.',
            examples=['2024-06-15'],
        ),
    ] = None
    start_date: Annotated[
        str | None,
        Field(
            description="The start date of the CostReports. ISO 8601 Formatted. Overwrites 'date_interval' if set.",
            examples=['2024-07-01'],
        ),
    ] = None
    end_date: Annotated[
        str | None,
        Field(
            description="The end date of the CostReports. ISO 8601 Formatted. Overwrites 'date_interval' if set.",
            examples=['2024-07-15'],
        ),
    ] = None
    date_interval: Annotated[
        str | None, Field(description='The date interval of the CostReport.')
    ] = None
    chart_type: Annotated[
        str | None, Field(description='The chart type of the CostReport.')
    ] = None
    date_bin: Annotated[
        str | None, Field(description='The date bin of the CostReport.')
    ] = None
    chart_settings: ChartSettings | None = None


class CostReports(BaseModel):
    """
    CostReports model
    """

    links: Mapping[str, Any] | None = None
    cost_reports: Sequence[CostReport] | None = None


class ForecastedCosts(BaseModel):
    """
    ForecastedCosts model
    """

    links: Mapping[str, Any] | None = None
    forecasted_costs: Sequence[ForecastedCost] | None = None
    currency: Annotated[
        str | None,
        Field(description='The currency of the forecasted costs.', examples=['USD']),
    ] = None


class DashboardWidget(BaseModel):
    widgetable_token: Annotated[str | None, Field(examples=['rprt_a12b3c'])] = None
    title: Annotated[
        str | None,
        Field(description='The title of the Widget.', examples=['My Widget']),
    ] = None
    settings: DashboardWidgetSettings | None = None


class Costs(BaseModel):
    """
    Costs model
    """

    links: Mapping[str, Any] | None = None
    total_cost: Annotated[
        Mapping[str, Any] | None,
        Field(
            description='The sum of all costs for the CostReport for the requested period, rounded to 2 decimal places, alongside the ISO 4217 currency code.'
        ),
    ] = None
    total_usage: Annotated[
        Mapping[str, Any] | None,
        Field(
            description='The sum of all usage for the CostReport for the requested period, rounded to 2 decimal places, grouped by usage unit.'
        ),
    ] = None
    costs: Sequence[Cost] | None = None


class Resource(BaseModel):
    """
    Resource model
    """

    token: str | None = None
    uuid: Annotated[
        str | None,
        Field(
            description='The unique identifier for the resource.',
            examples=['i-0a1b2c3d4e5f6g7h8'],
        ),
    ] = None
    type: Annotated[
        str | None,
        Field(description='The kind of resource.', examples=['aws_instance']),
    ] = None
    label: str | None = None
    metadata: Annotated[
        str | None, Field(description='Type-specific attributes of the resource.')
    ] = None
    account_id: Annotated[
        str | None,
        Field(description='The provider account where the resource is located.'),
    ] = None
    billing_account_id: Annotated[
        str | None,
        Field(description='The provider billing account this resource is charged to.'),
    ] = None
    provider: Annotated[
        str | None, Field(description='The provider of the resource.', examples=['aws'])
    ] = None
    region: Annotated[
        str | None,
        Field(
            description='The region where the resource is located. Region values are specific to each provider.',
            examples=['us-west-2'],
        ),
    ] = None
    costs: Annotated[
        Sequence[ResourceCost] | None,
        Field(description='The cost of the resource broken down by category.'),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time when Vantage first observed the resource.'
        ),
    ] = None


class Users(BaseModel):
    """
    Users model
    """

    links: Mapping[str, Any] | None = None
    users: Sequence[User] | None = None


class CloudwatchFields(BaseModel):
    stat: Annotated[
        CloudwatchFieldsStat | None,
        Field(
            description='The time aggregation function used to import Cloudwatch metrics.',
            examples=['Average'],
        ),
    ] = None
    region: Annotated[
        str | None,
        Field(
            description='The region used to import Cloudwatch metrics.',
            examples=['us-east-1'],
        ),
    ] = None
    namespace: Annotated[
        str | None,
        Field(
            description='The namespace used to import Cloudwatch metrics.',
            examples=['AWS/EC2'],
        ),
    ] = None
    metric_name: Annotated[
        str | None,
        Field(
            description='The metric name used to import Cloudwatch metrics.',
            examples=['CPUUtilization'],
        ),
    ] = None
    dimensions: Annotated[
        Sequence[CloudwatchDimension] | None,
        Field(
            description='The dimensions used to pull specific statistical data for Cloudwatch metrics.'
        ),
    ] = None
    label_dimension: Annotated[
        str | None,
        Field(description='The dimension used to aggregate the Cloudwatch metrics.'),
    ] = None


class BusinessMetricValues(BaseModel):
    """
    BusinessMetricValues model
    """

    values: Sequence[BusinessMetricValue] | None = None


class Products(BaseModel):
    """
    Products model
    """

    links: Mapping[str, Any] | None = None
    products: Sequence[Product] | None = None


class Prices(BaseModel):
    """
    Prices model
    """

    links: Mapping[str, Any] | None = None
    prices: Sequence[Price] | None = None


class FinancialCommitments(BaseModel):
    """
    FinancialCommitments model
    """

    links: Mapping[str, Any] | None = None
    financial_commitments: Sequence[FinancialCommitment] | None = None


class AnomalyAlerts(BaseModel):
    """
    AnomalyAlerts model
    """

    links: Mapping[str, Any] | None = None
    anomaly_alerts: Sequence[AnomalyAlert] | None = None


class AuditLogs(BaseModel):
    """
    AuditLogs model
    """

    links: Mapping[str, Any] | None = None
    audit_logs: Sequence[AuditLog] | None = None


class VirtualTagConfigValueCostMetric(BaseModel):
    filter: Annotated[
        str | None, Field(description='The filter VQL for the cost metric.')
    ] = None
    aggregation: VirtualTagConfigValueCostMetricAggregation | None = None


class TagValues(BaseModel):
    """
    TagValues model
    """

    tag_values: Sequence[TagValue] | None = None


class Budget(BaseModel):
    """
    Budget model
    """

    token: str | None = None
    name: Annotated[
        str | None,
        Field(description='The name of the Budget.', examples=['Acme123 Budget']),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(description='The token for the Workspace the Budget is a part of.'),
    ] = None
    user_token: Annotated[
        str | None, Field(description='The token for the User who created this Budget.')
    ] = None
    created_by_token: Annotated[
        str | None, Field(description='The token of the Creator of the Budget.')
    ] = None
    cost_report_token: Annotated[
        str | None,
        Field(description='The token of the Report associated with the Budget.'),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the Budget was created. ISO 8601 Formatted.',
            examples=['2024-03-19T00:00:00Z'],
        ),
    ] = None
    budget_alert_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens of the BudgetAlerts associated with the Budget.'),
    ] = None
    child_budget_tokens: Annotated[
        Sequence[str] | None,
        Field(
            description='The tokens of the child Budgets associated with the hierarchical Budget.'
        ),
    ] = None
    periods: Annotated[
        Sequence[BudgetPeriod] | None,
        Field(description='The budget periods associated with the Budget.'),
    ] = None
    performance: Annotated[
        Sequence[BudgetPerformance] | None,
        Field(description='The historical performance of the Budget.'),
    ] = None


class Budgets(BaseModel):
    """
    Budgets model
    """

    links: Mapping[str, Any] | None = None
    budgets: Sequence[Budget] | None = None


class UserCostsUploads(BaseModel):
    """
    UserCostsUploads model
    """

    links: Mapping[str, Any] | None = None
    user_costs_uploads: Sequence[UserCostsUpload] | None = None


class Recommendations(BaseModel):
    """
    Recommendations model
    """

    links: Mapping[str, Any] | None = None
    recommendations: Sequence[Recommendation] | None = None


class ProviderResource(BaseModel):
    """
    ProviderResource model
    """

    token: str | None = None
    resource_id: Annotated[
        str | None,
        Field(
            description='The unique identifier of the Active Resource.',
            examples=['i-0a1b2c3d4e5f6g7h8'],
        ),
    ] = None
    recommendation_actions: Annotated[
        Sequence[RecommendationAction] | None,
        Field(description='The actions to take to implement the Recommendation.'),
    ] = None


class BusinessInformationMetadata(BaseModel):
    custom_fields: Annotated[
        Sequence[BusinessInformationCustomField] | None,
        Field(description='Array of custom field objects'),
    ] = None


class BankingInformation(BaseModel):
    token: str | None = None
    bank_name: Annotated[str | None, Field(description='Name of the bank')] = None
    beneficiary_name: Annotated[
        str | None, Field(description='Name of the account beneficiary')
    ] = None
    tax_id: Annotated[str | None, Field(description='Tax identification number')] = None
    secure_data: BankingInformationSecureData | None = None


class InvoiceAdjustment(BaseModel):
    token: str | None = None
    adjustment_items: AdjustmentItem | None = None


class DataExport(BaseModel):
    """
    DataExport model
    """

    token: Annotated[str | None, Field(examples=['dta_xprt_abcd1234567890'])] = None
    status: Annotated[str | None, Field(examples=['pending'])] = None
    created_at: Annotated[str | None, Field(examples=['2025-03-20T12:00:00Z'])] = None
    export_type: Annotated[str | None, Field(examples=['cost_report'])] = None
    manifest: DataExportManifest | None = None
    attributes: str | None = None


class ExchangeRates(BaseModel):
    """
    ExchangeRates model
    """

    links: Mapping[str, Any] | None = None
    exchange_rates: Sequence[ExchangeRate] | None = None


class Me(BaseModel):
    """
    Me model
    """

    default_workspace_token: str | None = None
    workspaces: Sequence[Workspace] | None = None
    bearer_token: BearerToken | None = None


class CostProviders(BaseModel):
    """
    CostProviders model
    """

    links: Mapping[str, Any] | None = None
    cost_providers: Sequence[CostProviderModel] | None = None


class CostServices(BaseModel):
    """
    CostServices model
    """

    links: Mapping[str, Any] | None = None
    cost_services: Sequence[CostService] | None = None


class CostAlertEvents(BaseModel):
    """
    CostAlertEvents model
    """

    links: Mapping[str, Any] | None = None
    cost_alert_events: Sequence[CostAlertEvent] | None = None


class UnitCosts(BaseModel):
    """
    UnitCosts model
    """

    links: Mapping[str, Any] | None = None
    unit_costs: Sequence[UnitCost] | None = None


class CostProviderAccounts(BaseModel):
    """
    CostProviderAccounts model
    """

    links: Mapping[str, Any] | None = None
    cost_provider_accounts: Sequence[CostProviderAccount] | None = None


class Dashboard(BaseModel):
    """
    Dashboard model
    """

    token: Annotated[str | None, Field(examples=['dshbrd_abcd1234567890'])] = None
    title: Annotated[
        str | None,
        Field(description='The title of the Dashboard.', examples=['AWS Dashboard']),
    ] = None
    widgets: Sequence[DashboardWidget] | None = None
    saved_filter_tokens: Annotated[
        Sequence[str] | None,
        Field(description='The tokens of the Saved Filters used in the Dashboard.'),
    ] = None
    date_bin: Annotated[
        CreateDashboardDateBin | None,
        Field(description='Determines how to group costs in the Dashboard.'),
    ] = None
    date_interval: Annotated[
        DashboardDateInterval | None,
        Field(
            description="Determines the date range for Reports in the Dashboard. Guaranteed to be set to 'custom' if 'start_date' and 'end_date' are set."
        ),
    ] = None
    start_date: Annotated[
        str | None,
        Field(
            description="The start date for the date range for Reports in the Dashboard. ISO 8601 Formatted. Overwrites 'date_interval' if set.",
            examples=['2023-08-04'],
        ),
    ] = None
    end_date: Annotated[
        str | None,
        Field(
            description="The end date for the date range for Reports in the Dashboard. ISO 8601 Formatted. Overwrites 'date_interval' if set.",
            examples=['2023-09-04'],
        ),
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the Dashboard was created. ISO 8601 Formatted.',
            examples=['2023-08-04T00:00:00Z'],
        ),
    ] = None
    updated_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the Dashboard was created. ISO 8601 Formatted.',
            examples=['2023-08-04T00:00:00Z'],
        ),
    ] = None
    workspace_token: Annotated[
        str | None,
        Field(
            description='The token for the Workspace the Dashboard is a part of.',
            examples=['wrkspc_abcd1234567890'],
        ),
    ] = None


class Dashboards(BaseModel):
    """
    Dashboards model
    """

    links: Mapping[str, Any] | None = None
    dashboards: Sequence[Dashboard] | None = None


class Resources(BaseModel):
    """
    Resources model
    """

    links: Mapping[str, Any] | None = None
    resources: Sequence[Resource] | None = None


class BusinessMetric(BaseModel):
    """
    BusinessMetric model
    """

    token: Annotated[
        str | None,
        Field(
            description='The token of the BusinessMetric.', examples=['bsnss_mtrc_1234']
        ),
    ] = None
    title: Annotated[
        str | None,
        Field(
            description='The title of the BusinessMetric.', examples=['Total Revenue']
        ),
    ] = None
    created_by_token: Annotated[
        str | None,
        Field(
            description='The token of the Creator of the BusinessMetric.',
            examples=['usr_1234'],
        ),
    ] = None
    cost_report_tokens_with_metadata: Annotated[
        Sequence[AttachedCostReportForBusinessMetric] | None,
        Field(
            description='The tokens for any CostReports that use the BusinessMetric, the unit scale, and label filter.'
        ),
    ] = None
    import_type: Annotated[
        BusinessMetricImportType | None,
        Field(
            description='The type of import for the BusinessMetric.',
            examples=['datadog_metrics'],
        ),
    ] = None
    integration_token: Annotated[
        str | None,
        Field(description='The Integration token used to import the BusinessMetric.'),
    ] = None
    cloudwatch_fields: CloudwatchFields | None = None
    datadog_metric_fields: DatadogMetricFields | None = None


class BusinessMetrics(BaseModel):
    """
    BusinessMetrics model
    """

    business_metrics: Sequence[BusinessMetric] | None = None


class VirtualTagConfigValue(BaseModel):
    filter: Annotated[
        str | None,
        Field(
            description='The filter VQL for the Value.',
            examples=[
                "costs.provider = 'aws' AND costs.service = 'Amazon Simple Storage Service'"
            ],
        ),
    ] = None
    name: Annotated[
        str | None,
        Field(description='The name of the Value.', examples=['Informatics']),
    ] = None
    business_metric_token: Annotated[
        str | None,
        Field(
            description='The token of the associated BusinessMetric.',
            examples=['bsnss_mtrc_abc123'],
        ),
    ] = None
    cost_metric: VirtualTagConfigValueCostMetric | None = None


class BusinessInformation(BaseModel):
    token: str | None = None
    metadata: BusinessInformationMetadata | None = None


class BillingProfile(BaseModel):
    """
    BillingProfile model
    """

    token: str | None = None
    nickname: Annotated[
        str | None, Field(description='Display name for the billing profile')
    ] = None
    created_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the billing profile was created. ISO 8601 formatted.',
            examples=['2023-08-04T00:00:00Z'],
        ),
    ] = None
    updated_at: Annotated[
        str | None,
        Field(
            description='The date and time, in UTC, the billing profile was last updated. ISO 8601 formatted.',
            examples=['2023-08-04T00:00:00Z'],
        ),
    ] = None
    billing_information_attributes: BillingInformation | None = None
    business_information_attributes: BusinessInformation | None = None
    banking_information_attributes: BankingInformation | None = None
    invoice_adjustment_attributes: InvoiceAdjustment | None = None
    managed_accounts_count: Annotated[
        str | None,
        Field(description='Number of managed accounts using this billing profile'),
    ] = None


class BillingProfiles(BaseModel):
    """
    BillingProfiles model
    """

    links: Mapping[str, Any] | None = None
    billing_profiles: Sequence[BillingProfile] | None = None


class VirtualTagConfig(BaseModel):
    """
    VirtualTagConfig model
    """

    token: Annotated[
        str | None,
        Field(description='The token of the VirtualTagConfig.', examples=['vtag_1234']),
    ] = None
    created_by_token: Annotated[
        str | None,
        Field(
            description='The token of the Creator of the VirtualTagConfig.',
            examples=['usr_1234'],
        ),
    ] = None
    key: Annotated[
        str | None,
        Field(description='The key of the VirtualTagConfig.', examples=['Cost Center']),
    ] = None
    overridable: Annotated[
        bool | None,
        Field(
            description='Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.'
        ),
    ] = None
    backfill_until: Annotated[
        str | None,
        Field(
            description='The earliest month VirtualTagConfig should be backfilled to.',
            examples=['2025-05-01'],
        ),
    ] = None
    values: Annotated[
        Sequence[VirtualTagConfigValue] | None,
        Field(
            description='Values for the VirtualTagConfig, with match precedence determined by their relative order in the list.'
        ),
    ] = None


class VirtualTagConfigs(BaseModel):
    """
    VirtualTagConfigs model
    """

    virtual_tag_configs: Sequence[VirtualTagConfig] | None = None


class ManagedAccount(BaseModel):
    """
    ManagedAccount model
    """

    token: str | None = None
    name: str | None = None
    contact_email: str | None = None
    parent_account_token: Annotated[
        str | None, Field(description='The token for the parent Account.')
    ] = None
    access_credential_tokens: Annotated[
        Sequence[str] | None,
        Field(
            description='The tokens for the Access Credentials assigned to the Managed Account.'
        ),
    ] = None
    billing_rule_tokens: Annotated[
        Sequence[str] | None,
        Field(
            description='The tokens for the Billing Rules assigned to the Managed Account.'
        ),
    ] = None
    msp_billing_profile_token: Annotated[
        str | None,
        Field(
            description='Token of the MSP billing profile used for this managed account (MSP invoicing accounts only)'
        ),
    ] = None
    billing_information_attributes: BillingInformation | None = None
    business_information_attributes: BusinessInformation | None = None


class ManagedAccounts(BaseModel):
    """
    ManagedAccounts model
    """

    links: Mapping[str, Any] | None = None
    managed_accounts: Sequence[ManagedAccount] | None = None
