openai_struct/models/
admin_api_key_owner.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#[allow(unused_imports)]
12use serde_json::Value;
13
14/// # on openapi.yaml
15///
16/// ```yaml
17///
18/// ```
19#[derive(Debug, Serialize, Deserialize)]
20pub struct AdminApiKeyOwner {
21    /// The Unix timestamp (in seconds) of when the user was created
22    #[serde(rename = "created_at")]
23    pub created_at: Option<i64>,
24    /// The identifier, which can be referenced in API endpoints
25    #[serde(rename = "id")]
26    pub id: Option<String>,
27    /// The name of the user
28    #[serde(rename = "name")]
29    pub name: Option<String>,
30    /// The object type, which is always organization.user
31    #[serde(rename = "object")]
32    #[serde(default = "default_object")]
33    pub object: Option<String>,
34    /// Always `owner`
35    #[serde(rename = "role")]
36    pub role: Option<String>,
37    /// Always `user`
38    #[serde(rename = "type")]
39    pub _type: Option<String>,
40}
41
42fn default_object() -> Option<String> {
43    Some("organization.user".into())
44}