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
/*
* 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
*/
#[allow(unused_imports)]
use serde_json::Value;
/// # on openapi.yaml
///
/// ```yaml
/// ApproximateLocation:
/// properties:
/// type:
/// type: string
/// enum:
/// - approximate
/// description: The type of location approximation. Always `approximate`.
/// default: approximate
/// x-stainless-const: true
/// country:
/// anyOf:
/// - type: string
/// description: The two-letter [ISO country
/// code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,
/// e.g. `US`.
/// - type: "null"
/// region:
/// anyOf:
/// - type: string
/// description: Free text input for the region of the user, e.g. `California`.
/// - type: "null"
/// city:
/// anyOf:
/// - type: string
/// description: Free text input for the city of the user, e.g. `San Francisco`.
/// - type: "null"
/// timezone:
/// anyOf:
/// - type: string
/// description: The [IANA
/// timezone](https://timeapi.io/documentation/iana-timezones) of
/// the user, e.g. `America/Los_Angeles`.
/// - type: "null"
/// type: object
/// required:
/// - type
/// ```
#[derive(Debug, Serialize, Deserialize)]
pub struct ApproximateLocation {
#[serde(rename = "city")]
pub city: Option<String>,
#[serde(rename = "country")]
pub country: Option<String>,
#[serde(rename = "region")]
pub region: Option<String>,
#[serde(rename = "timezone")]
pub timezone: Option<String>,
/// The type of location approximation. Always `approximate`.
#[serde(rename = "type")]
#[serde(default = "default_type")]
pub _type: String,
}
fn default_type() -> String {
"approximate".into()
}