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