1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
* OpenAI API
*
* The OpenAI REST API. Please see pub https:///platform.openai.com/docs/api-reference for more details.
*
* OpenAPI spec pub version: 2.3.0
*
* Generated pub by: https:///github.com/swagger-api/swagger-codegen.git
*/
/// pub CostsResult : The aggregated costs details of the specific time bucket.
#[allow(unused_imports)]
use serde_json::Value;
/// # on openapi.yaml
///
/// ```yaml
/// CostsResult:
/// type: object
/// description: The aggregated costs details of the specific time bucket.
/// properties:
/// object:
/// type: string
/// enum:
/// - organization.costs.result
/// x-stainless-const: true
/// amount:
/// type: object
/// description: The monetary value in its associated currency.
/// properties:
/// value:
/// type: number
/// description: The numeric value of the cost.
/// currency:
/// type: string
/// description: Lowercase ISO-4217 currency e.g. "usd"
/// line_item:
/// type: string
/// nullable: true
/// description:
/// When `group_by=line_item`, this field provides the line item of the
/// grouped costs result.
/// project_id:
/// type: string
/// nullable: true
/// description:
/// When `group_by=project_id`, this field provides the project ID of
/// the grouped costs result.
/// required:
/// - object
/// x-oaiMeta:
/// name: Costs object
/// example: |
/// {
/// "object": "organization.costs.result",
/// "amount": {
/// "value": 0.06,
/// "currency": "usd"
/// },
/// "line_item": "Image models",
/// "project_id": "proj_abc"
/// }
/// ```
#[derive(Debug, Serialize, Deserialize)]
pub struct CostsResult {
#[serde(rename = "amount")]
pub amount: Option<crate::models::CostsResultAmount>,
/// When `group_by=line_item`, this field provides the line item of the grouped costs result.
#[serde(rename = "line_item")]
pub line_item: Option<String>,
#[serde(rename = "object")]
pub object: String,
/// When `group_by=project_id`, this field provides the project ID of the grouped costs result.
#[serde(rename = "project_id")]
pub project_id: Option<String>,
}