package forms

import (
	"time"

	"github.com/shopspring/decimal"
)

type BillsExplorerQuery struct {
	BilledMonth string `json:"billedMonth"`
}
type BillsCosts struct {
	RunningTotalTruncatedLoss decimal.Decimal `json:"-" example:"0.00"`
	CreditsTruncatedLoss      decimal.Decimal `json:"-" example:"0.00"`
	TotalCostTruncatedLoss    decimal.Decimal `json:"-" example:"0.00"`
	//The sum of services that the specified organization has consumed during this bill period. The value of this field is expressed in cents (100ths of one US Dollar).
	RunningTotal decimal.Decimal `json:"runningTotal" example:"0.00"`
	//The total amount of discounts applied to this bill. The value of this field is expressed in cents (100ths of one US Dollar).
	Discounts decimal.Decimal `json:"discounts" example:"0.00"`
	//The total credits held by the organization in this bill. The value of this field is expressed in cents (100ths of one US Dollar).
	Credits decimal.Decimal `json:"credits" example:"0.00"`
	//The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
	//`total_cost` = `running_total` - `discounts` - `credits`.
	TotalCost decimal.Decimal `json:"totalCost" example:"0.00"`
}

type BillsOverview struct {
	//The month in which this bill is generated for the specified organization.
	BilledMonth string `json:"billedMonth" example:"2023-09"`
	BillsCosts
}

type BillsProjects struct {
	//The name of a project in the specified organization.
	ProjectName string `json:"projectName" example:"prod-project"`
	BillsCosts
}

type BillsOtherName struct {
	ChargeName string `json:"chargeName" example:"Support Plan"`
	BillsCosts
}

type SummaryByProject struct {
	//The projects in the specified organization.
	Projects []BillsProjects `json:"projects"`
	//These charges occur not only within a project but also across the entire organization.
	OtherCharges []BillsOtherName `json:"otherCharges"`
}

type BillsServiceCosts struct {
	//The name of services provided by TiDB Cloud.
	ServiceName string `json:"serviceName" example:"TiDB Dedicated"`
	BillsCosts
	ServiceCosts []BillsServiceCosts
}

type PartnerBillsServiceCosts struct {
	// The name of services provided by TiDB Cloud.
	ServiceName string `json:"serviceName" example:"TiDB Dedicated"`
	BillsCosts
	// A breakdown of the bill by service.
	ServiceCosts []PartnerBillsServiceCosts `json:"serviceCosts"`
}

type BillsExplorer struct {
	//The overall information for a bill in the specified organization.
	BillsOverView BillsOverview `json:"overview"`
	//A breakdown of the bill by project.
	SummaryByProject SummaryByProject `json:"summaryByProject"`
	//A breakdown of the bill by service.
	BillsServiceCosts []BillsServiceCosts `json:"summaryByService"`
}

type CostExplorerOpenCostsMeta struct {
	SourceMode              string           `json:"source_mode"`
	TenantID                uint             `json:"tenant_id,string"`
	BillingConfigID         uint             `json:"billing_config_id,string"`
	SourceRunID             uint             `json:"source_run_id,omitempty,string"`
	InputBundleID           uint             `json:"input_bundle_id,omitempty,string"`
	PeriodMonth             string           `json:"period_month,omitempty"`
	WindowStart             string           `json:"window_start,omitempty"`
	WindowEnd               string           `json:"window_end,omitempty"`
	FactCount               int64            `json:"fact_count,omitempty"`
	InvoiceFactCount        int64            `json:"invoice_fact_count,omitempty"`
	LegacyRowCount          int64            `json:"legacy_row_count,omitempty"`
	MatchedCredits          decimal.Decimal  `json:"matched_credits"`
	MatchedDiscounts        decimal.Decimal  `json:"matched_discounts"`
	MatchedCreditPackageIDs string           `json:"matched_credit_package_ids,omitempty"`
	MatchedDiscountIDs      string           `json:"matched_discount_ids,omitempty"`
	MatchedCreditItems      []CreditsPackage `json:"matched_credit_items,omitempty"`
	MatchedDiscountItems    []*Discount      `json:"matched_discount_items,omitempty"`
}

type CostExplorerOpenCostsResponse struct {
	//The overall information for a bill in the specified organization.
	BillsOverView OpenCostsBillsOverview `json:"overview"`
	//A breakdown of the bill by project.
	SummaryByProject OpenCostsSummaryByProject `json:"summaryByProject"`
	//A breakdown of the bill by service.
	BillsServiceCosts []OpenCostsBillsServiceCosts `json:"summaryByService"`
	BillsDetails      CostExplorerDetailsResult    `json:"billsDetails"`
	Meta              CostExplorerOpenCostsMeta    `json:"meta"`
}

type OpenCostsBillsCosts struct {
	//The sum of services that the specified organization has consumed during this bill period. The value of this field is expressed in cents (100ths of one US Dollar).
	RunningTotal decimal.Decimal `json:"runningTotal" example:"0.00"`
	//The total amount of discounts applied to this bill. The value of this field is expressed in cents (100ths of one US Dollar).
	Discounts decimal.Decimal `json:"discounts" example:"0.00"`
	//The total credits held by the organization in this bill. The value of this field is expressed in cents (100ths of one US Dollar).
	Credits decimal.Decimal `json:"credits" example:"0.00"`
	//The display adjustment caused by splitting and merging credits/discounts at different rounding boundaries.
	RoundingAdjustment decimal.Decimal `json:"roundingAdjustment" example:"0.00"`
	//The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
	//`total_cost` = `running_total` - `discounts` - `credits` - `roundingAdjustment`.
	TotalCost decimal.Decimal `json:"totalCost" example:"0.00"`
}

type OpenCostsBillsOverview struct {
	//The month or date range covered by this open cost result.
	BilledMonth string `json:"billedMonth" example:"2023-09"`
	OpenCostsBillsCosts
}

type OpenCostsBillsProjects struct {
	//The name of a project in the specified organization.
	ProjectName string `json:"projectName" example:"prod-project"`
	OpenCostsBillsCosts
}

type OpenCostsBillsOtherName struct {
	ChargeName string `json:"chargeName" example:"Support Plan"`
	OpenCostsBillsCosts
}

type OpenCostsSummaryByProject struct {
	//The projects in the specified organization.
	Projects []OpenCostsBillsProjects `json:"projects"`
	//These charges occur not only within a project but also across the entire organization.
	OtherCharges []OpenCostsBillsOtherName `json:"otherCharges"`
}

type OpenCostsBillsServiceCosts struct {
	//The name of services provided by TiDB Cloud.
	ServiceName string `json:"serviceName" example:"TiDB Dedicated"`
	OpenCostsBillsCosts
	ServiceCosts []OpenCostsBillsServiceCosts
}

type BillsExplorerV1 struct {
	//The overall information for a bill in the specified organization.
	BillsOverView BillsOverview `json:"overview"`
	//A breakdown of the bill by service.
	BillsServiceCosts []BillsServiceCosts `json:"summaryByService"`
}
type BillsDetail struct {
	//The date when this bill happens.
	BilledDate string `json:"billedDate"`

	ProjectID string `json:"-"`
	//Name of the project.
	ProjectName string `json:"projectName"`

	ClusterID string `json:"-"`

	//Name of the cluster.
	ClusterName string `json:"clusterName"`
	//Name of the service.
	ServicePathName string `json:"servicePathName"`

	BillsCosts
}

type BillsDetails struct {
	BillsDetails []BillsDetail `json:"details"`
}

type ClusterOpenAPI struct {
	ID         uint   `json:"id,omitempty,string"`
	ProjectID  uint   `json:"ProjectID,omitempty,string"`
	RegionName string `json:"regionName,omitempty"`
	Name       string `json:"name,omitempty"`
	Status     string `json:"status"`
}

type ProjectOpenAPI struct {
	ID     uint   `json:"id,omitempty,string"`
	Name   string `json:"name,omitempty"`
	Status string `json:"status,omitempty"`
}

type TrendsArgs struct {
	//The Identifier of TiDB Cloud services consists of 3 levels. For example, "service": "TiDB Dedicated - Node Compute - TiFlash" consists of the following 3 levels.
	Services []*CostExplorerService `json:"services"`

	Providers []*Provider       `json:"providers"`
	Clusters  []*ClusterOpenAPI `json:"clusters"`
	Projects  []*ProjectOpenAPI `json:"projects"`
}

type TimeRange struct {
	// The start date of the time range. The time format follows the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. For example: `"2023-12-01T00:00:00Z"`.
	StartDate *time.Time `json:"startDate"`
	// The end date of the time range. The time format follows the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. For example: `"2023-12-01T00:00:00Z"`.
	EndDate *time.Time `json:"endDate"`
}

type TrendsFilter struct {
	// The time period for the query.
	TimeRange TimeRange `json:"timeRange"`
	// A list of TiDB Cloud services to include in the query.
	Services []CostExplorerService `json:"services"`
	// A list of providers to include in the query.
	Providers []CostExplorerProvider `json:"providers"`
	// A list of project IDs to include in the query.
	ProjectIDs []string `json:"projects"`
	// A list of cluster IDs to include in the query.
	ClusterIDs []string `json:"clusters"`
	// "A list of customer IDs to include in the query.
	CustomerIDs []string `json:"customers"`
}

// Grouping options.
type Groups struct {
	// Specifies categories for grouping query results. Value options are:
	//- "service": Group query results by service type
	//- "product": Group query results by product type (TiDB Dedicated, TiDB Serverless, or Support Plan)
	//- "project": Group query results by project IDs
	//- "cluster": Group query results by cluster IDs
	//- "provider": Group query results by cloud provider
	//- "region": Group query results by cloud provider region
	GroupBy []CostExplorerTrendsBreakdownKey `json:"groupBy"`
	// Determines the time-based organization of query results. Value options are:
	// - "day": Query results are organized daily
	// - "month": Query results are organized monthly
	// - "total": Query results are organized as a single total
	TimeGranularity *CostExplorerTrendsTimeGroup `json:"timeGranularity"`
}

type TrendsInput struct {
	Filter TrendsFilter `json:"filter"`
	Groups Groups       `json:"groups"`
}

type BillsCostExplorerBreakdown struct {
	BillsCosts
	BilledDate string
	DetailName string
	DetailKey  string
}

type BillsCostExplorerElements struct {
	BillsCosts
	BilledDate string
	Breakdown  []BillsCostExplorerBreakdown `json:"breakdown"`
}

type BillsCostExplorer struct {
	BillsCosts
	Elements []BillsCostExplorerElements `json:"elements"`
}

type CreditsState string

const (
	CreditsState_Active       CreditsState = "active"
	CreditsState_Inactive     CreditsState = "inactive"
	CreditsState_BeforeActive CreditsState = "before_active"
)

type CreditsForOpenAPI struct {
	// A unique identifier for the credit.
	CreditCode string `json:"creditCode" example:"498c7f44-656f-4944-b455-0695faa5d4f9"`
	// The current status of the credit.
	State CreditsState `json:"status" example:"active"`
	// The service to which the credit is applicable.
	Services string `json:"services" example:"General Product"`
	// The total amount of credit.
	Credit decimal.Decimal `json:"credit" example:"1000.00"`
	// The remaining amount of the credit.
	RemainingCredit decimal.Decimal `json:"remainingCredit" example:"1000.00"`
	// The effective start date of the credit. The time format follows the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. For example: `"2023-11-01T00:00:00Z"`.
	StartDate time.Time `json:"startDate" example:"2023-11-01T00:00:00Z"`
	// The expiration date of the credit. The time format follows the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. For example: `"2023-11-01T00:00:00Z"`.
	ExpiryDate time.Time `json:"expiryDate" example:"2023-12-01T00:00:00Z"`
	// The credits can only apply on the costs from the specific provider, `all` means no restrictions
	Provider ProviderEnum `json:"provider" example:"all"`
	// The credits can only apply on the costs from the specific customers, `empty` means no restrictions
	Customers []string `json:"customers" `
}

type DiscountState string

const (
	DiscountState_Valid     DiscountState = "valid"
	DiscountState_Expired   DiscountState = "expired"
	DiscountState_Reclaimed DiscountState = "reclaimed"
	DiscountState_Invalid   DiscountState = "invalid"
)

type DiscountForOpenAPI struct {
	// The unique code for the discount.
	DiscountCode string `json:"discountCode" example:"498c7f44-656f-4944-b455-0695faa5d4f9"`
	// The current status of the discount.
	State DiscountState `json:"status" example:"valid"`
	// The services to which the discount is applicable.
	Services string `json:"services" example:"Node Compute, Changefeed,"`
	// The percentage deducted from the original price. For example, a 20% discount on a $100 item would result in a discounted price of $80.
	PercentageDiscount string `json:"percentageDiscount" example:"20%"`
	// The description of the discount.
	Description string `json:"description"`
	// The effective start date of the discount. The time format follows the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. For example: `"2023-12-01T00:00:00Z"`.
	StartDate time.Time `json:"startDate" example:"2023-11-01T00:00:00Z"`
	// The expiration date of the discount. The time format follows the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. For example: `"2023-12-01T00:00:00Z".
	ExpiryDate time.Time `json:"expiryDate" example:"2023-12-01T00:00:00Z"`
	// The discount can only apply on the costs from the specific provider, `all` means no restrictions
	Provider ProviderEnum `json:"provider" example:"all"`
	// The discount can only apply on the costs from the specific customers, `empty` means no restrictions
	Customers []string `json:"customers" `
}

type PaymentType string

const (
	PaymentType_None         PaymentType = "none"
	PaymentType_AWS          PaymentType = "aws"
	PaymentType_AWSCPPO      PaymentType = "aws_cppo"
	PaymentType_GCP          PaymentType = "gcp"
	PaymentType_CreditCard   PaymentType = "credit_card"
	PaymentType_WireTransfer PaymentType = "wire_transfer"
)

type PaymentForOpenAPI struct {
	// The type of payment method currently active.
	Type PaymentType `json:"type"`

	// Indicates whether the account is in a payable state.
	Payable bool `json:"payable"`
}

type SupportPlanType string

const (
	SupportPlanType_FixedPrice      SupportPlanType = "fixed_price"
	SupportPlanType_PercentagePrice SupportPlanType = "percentage_price"
)

type SupportPlanLevel string

const (
	SupportPlanLevel_Basic SupportPlanLevel = "Basic"
	// The Standard level of the Support Plan is no longer in use and will be archived.
	SupportPlanLevel_Standard   SupportPlanLevel = "Standard"
	SupportPlanLevel_Developer  SupportPlanLevel = "Developer"
	SupportPlanLevel_Enterprise SupportPlanLevel = "Enterprise"
	SupportPlanLevel_Premium    SupportPlanLevel = "Premium"
)

type SupportPlanForOpenAPI struct {
	// The fixed fee for the support plan. If the plan is charged on a pro rata basis (`"percentage_price"`), this represents the minimum fee.
	FixedChargePrice decimal.Decimal `json:"fixedChargePrice"`
	// The prorated fee ratio for the support plan.
	SupportPricePercentage decimal.Decimal `json:"supportPricePercentage"`
	// Indicates whether the support plan is charged on a pro rata basis (`"percentage_price"`) or a fixed fee (`"fixed_price"`).
	Type SupportPlanType `json:"type"`
	// Indicates whether the support plan is public. A non-public support plan might be subject to special contract terms and cannot be upgraded or downgraded.
	Public bool `json:"public"`
	// The level of the support plan. By default, the Basic plan is selected.
	Level SupportPlanLevel `json:"level"`
}

type OrgSupportPlanForOpenAPI struct {
	SupportPlanForOpenAPI
	// The effective date of the support plan for the organization. The time format follows the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. For example: `"2023-12-01T00:00:00Z"`.
	ActiveDate time.Time `json:"activeDate"  example:"2023-12-01T00:00:00Z"`
	// The expiration date of the support plan for the organization. The time format follows the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. For example: `"2023-12-01T00:00:00Z"`.
	ExpiredDate *time.Time `json:"expiredDate" example:"2023-12-01T00:00:00Z"`
}

type TaxIDType string

// Type of the tax ID
const (
	TaxIdType_AdNrt    TaxIDType = "ad_nrt"
	TaxIdType_AeTrn    TaxIDType = "ae_trn"
	TaxIdType_ArCuit   TaxIDType = "ar_cuit"
	TaxIdType_AuAbn    TaxIDType = "au_abn"
	TaxIdType_AuArn    TaxIDType = "au_arn"
	TaxIdType_BgUic    TaxIDType = "bg_uic"
	TaxIdType_BoTin    TaxIDType = "bo_tin"
	TaxIdType_BrCnpj   TaxIDType = "br_cnpj"
	TaxIdType_BrCpf    TaxIDType = "br_cpf"
	TaxIdType_CaBn     TaxIDType = "ca_bn"
	TaxIdType_CaGstHst TaxIDType = "ca_gst_hst"
	TaxIdType_CaPstBc  TaxIDType = "ca_pst_bc"
	TaxIdType_CaPstMb  TaxIDType = "ca_pst_mb"
	TaxIdType_CaPstSk  TaxIDType = "ca_pst_sk"
	TaxIdType_CaQst    TaxIDType = "ca_qst"
	TaxIdType_ChVat    TaxIDType = "ch_vat"
	TaxIdType_ClTin    TaxIDType = "cl_tin"
	TaxIdType_CnTin    TaxIDType = "cn_tin"
	TaxIdType_CoNit    TaxIDType = "co_nit"
	TaxIdType_CrTin    TaxIDType = "cr_tin"
	TaxIdType_DoRcn    TaxIDType = "do_rcn"
	TaxIdType_EcRuc    TaxIDType = "ec_ruc"
	TaxIdType_EgTin    TaxIDType = "eg_tin"
	TaxIdType_EsCif    TaxIDType = "es_cif"
	TaxIdType_EuOssVat TaxIDType = "eu_oss_vat"
	TaxIdType_EuVat    TaxIDType = "eu_vat"
	TaxIdType_GbVat    TaxIDType = "gb_vat"
	TaxIdType_GeVat    TaxIDType = "ge_vat"
	TaxIdType_HkBr     TaxIDType = "hk_br"
	TaxIdType_HuTin    TaxIDType = "hu_tin"
	TaxIdType_IdNpwp   TaxIDType = "id_npwp"
	TaxIdType_IlVat    TaxIDType = "il_vat"
	TaxIdType_InGst    TaxIDType = "in_gst"
	TaxIdType_IsVat    TaxIDType = "is_vat"
	TaxIdType_JpCn     TaxIDType = "jp_cn"
	TaxIdType_JpRn     TaxIDType = "jp_rn"
	TaxIdType_JpTrn    TaxIDType = "jp_trn"
	TaxIdType_KePin    TaxIDType = "ke_pin"
	TaxIdType_KrBrn    TaxIDType = "kr_brn"
	TaxIdType_LiUid    TaxIDType = "li_uid"
	TaxIdType_MxRfc    TaxIDType = "mx_rfc"
	TaxIdType_MyFrp    TaxIDType = "my_frp"
	TaxIdType_MyItn    TaxIDType = "my_itn"
	TaxIdType_MySst    TaxIDType = "my_sst"
	TaxIdType_NoVat    TaxIDType = "no_vat"
	TaxIdType_NzGst    TaxIDType = "nz_gst"
	TaxIdType_PeRuc    TaxIDType = "pe_ruc"
	TaxIdType_PhTin    TaxIDType = "ph_tin"
	TaxIdType_RoTin    TaxIDType = "ro_tin"
	TaxIdType_RsPib    TaxIDType = "rs_pib"
	TaxIdType_RuInn    TaxIDType = "ru_inn"
	TaxIdType_RuKpp    TaxIDType = "ru_kpp"
	TaxIdType_SaVat    TaxIDType = "sa_vat"
	TaxIdType_SgGst    TaxIDType = "sg_gst"
	TaxIdType_SgUen    TaxIDType = "sg_uen"
	TaxIdType_SiTin    TaxIDType = "si_tin"
	TaxIdType_SvNit    TaxIDType = "sv_nit"
	TaxIdType_ThVat    TaxIDType = "th_vat"
	TaxIdType_TrTin    TaxIDType = "tr_tin"
	TaxIdType_TwVat    TaxIDType = "tw_vat"
	TaxIdType_UaVat    TaxIDType = "ua_vat"
	TaxIdType_UsEin    TaxIDType = "us_ein"
	TaxIdType_UyRuc    TaxIDType = "uy_ruc"
	TaxIdType_VeRif    TaxIDType = "ve_rif"
	TaxIdType_VnTin    TaxIDType = "vn_tin"
	TaxIdType_ZaVat    TaxIDType = "za_vat"
)

type BillingProfileForOpenAPI struct {
	// The name of the company to be displayed on the invoice. This is only applicable for credit card payments.
	CompanyName string `json:"companyName" example:"PingCAP Inc."`
	// The email address where invoices will be sent. This is only applicable for credit card payments.
	BillingEmail string `json:"billingEmail" example:"example@tidbcloud.com"`
	// A two-letter country code following the [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) standard. For example, use "US" for the United States.
	CountryCode string `json:"countryCode" example:"US"`
	// The state or region code following the [ISO 3166-2 subdivision](https://en.wikipedia.org/wiki/ISO_3166-2) standard, without the country prefix. For example, use "CA" for California in the United States, not "US-CA".
	State string `json:"state" example:"CA"`
	// The full name of the city in the billing address.
	City string `json:"city"`
	// The first line of the detailed billing address.
	Line1 string `json:"line1"`
	// The second line of the detailed billing address.
	Line2 string `json:"line2"`
	// The postal code of the billing address.
	PostalCode string `json:"postalCode" example:"000000"`
	// The type of tax ID provided. For more information, see [Supported Tax ID types](https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id).
	TaxIdType TaxIDType `json:"taxIdType"`
	// The tax ID of the billing entity. For more information, see [Supported Tax ID types](https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id).
	TaxId string `json:"taxId"`
}

type BudgetBizType string

const (
	BudgetBizType_ServerlessCluster = "serverless_cluster"
	BudgetBizType_BudgetAlert       = "budget_alert"
)

type BudgetRangeType string

const (
	BudgetRangeType_Tenant   BudgetRangeType = "tenant"
	BudgetRangeType_Project  BudgetRangeType = "project"
	BudgetRangeType_Cluster  BudgetRangeType = "cluster"
	BudgetRangeType_Customer BudgetRangeType = "customer"
)

type BudgetCostType string

const (
	BudgetCostType_Total   BudgetCostType = "total"
	BudgetCostType_Invoice BudgetCostType = "invoice"
)

type BudgetThreshold struct {
	// The budget threshold as a decimal value. For example, `"0.3"` means that when the cost reaches 30% of the limit, the specified action (such as email notification) will be triggered.
	Proportion decimal.Decimal `json:"proportion" example:"0.3"`
}

type BudgetInterval string

const (
	BudgetInterval_Monthly BudgetInterval = "monthly"
)

type BudgetForOpenAPI struct {
	// A unique identifier for the budget.
	BudgetId uint `json:"budgetId,string"`
	// The name of the budget.
	Name string `json:"name"`
	// The business type of the budget. Note: You can only create `"budget_alert"` type budgets using the API.
	BizType BudgetBizType `json:"bizType"`
	// The type of entity to which this budget applies. You can specify an organization (tenant), a project, or a customer (only for partners). You cannot specify a cluster.
	RangeType BudgetRangeType `json:"rangeType"`
	// The ID of the entity to which this budget applies.
	RangeId uint `json:"rangId,string"`
	// The interval for which the budget applies.
	Interval BudgetInterval `json:"budgetInterval"`
	// The type of the budget cost.
	// - `"total"`: the total cost
	// - `"invoice"`: the bills you need pay
	CostType BudgetCostType `json:"costType"`
	// The maximum amount set for this budget.
	Limit decimal.Decimal `json:"limit"`
	// The current cost accrued against this budget.
	Cost decimal.Decimal `json:"cost"`
	// Indicates whether to deduct credits when calculating cost. Only applicable when `costType` is set to `"total"`.
	ApplyCredits bool `json:"applyCredits"`
	// Indicates whether to deduct discounts when calculating cost. Only applicable when `costType` is set to `"total"`.
	ApplyDiscounts bool `json:"applyDiscounts"`
	// Indicates whether email notifications are enabled when the budget threshold is reached.
	EnableEmailNotification bool `json:"enableEmailNotification"`
	// An array of threshold values for this budget. Must contain at least one and up to five thresholds.
	Thresholds []BudgetThreshold `json:"thresholds"`
}
