openai_struct/models/certificate.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 Certificate : Represents an individual `certificate` uploaded to the organization.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16/// # on openapi.yaml
17///
18/// ```yaml
19/// Certificate:
20/// type: object
21/// description: Represents an individual `certificate` uploaded to the organization.
22/// properties:
23/// object:
24/// type: string
25/// enum:
26/// - certificate
27/// - organization.certificate
28/// - organization.project.certificate
29/// description: >
30/// The object type.
31///
32///
33/// - If creating, updating, or getting a specific certificate, the
34/// object type is `certificate`.
35///
36/// - If listing, activating, or deactivating certificates for the
37/// organization, the object type is `organization.certificate`.
38///
39/// - If listing, activating, or deactivating certificates for a
40/// project, the object type is `organization.project.certificate`.
41/// x-stainless-const: true
42/// id:
43/// type: string
44/// description: The identifier, which can be referenced in API endpoints
45/// name:
46/// type: string
47/// description: The name of the certificate.
48/// created_at:
49/// type: integer
50/// description: The Unix timestamp (in seconds) of when the certificate was uploaded.
51/// certificate_details:
52/// type: object
53/// properties:
54/// valid_at:
55/// type: integer
56/// description:
57/// The Unix timestamp (in seconds) of when the certificate becomes
58/// valid.
59/// expires_at:
60/// type: integer
61/// description: The Unix timestamp (in seconds) of when the certificate expires.
62/// content:
63/// type: string
64/// description: The content of the certificate in PEM format.
65/// active:
66/// type: boolean
67/// description:
68/// Whether the certificate is currently active at the specified scope.
69/// Not returned when getting details for a specific certificate.
70/// required:
71/// - object
72/// - id
73/// - name
74/// - created_at
75/// - certificate_details
76/// x-oaiMeta:
77/// name: The certificate object
78/// example: >
79/// {
80/// "object": "certificate",
81/// "id": "cert_abc",
82/// "name": "My Certificate",
83/// "created_at": 1234567,
84/// "certificate_details": {
85/// "valid_at": 1234567,
86/// "expires_at": 12345678,
87/// "content": "-----BEGIN CERTIFICATE----- MIIGAjCCA...6znFlOW+ -----END CERTIFICATE-----"
88/// }
89/// }
90/// ```
91#[derive(Debug, Serialize, Deserialize)]
92pub struct Certificate {
93 /// Whether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate.
94 #[serde(rename = "active")]
95 pub active: Option<bool>,
96 #[serde(rename = "certificate_details")]
97 pub certificate_details: crate::models::CertificateCertificateDetails,
98 /// The Unix timestamp (in seconds) of when the certificate was uploaded.
99 #[serde(rename = "created_at")]
100 pub created_at: i32,
101 /// The identifier, which can be referenced in API endpoints
102 #[serde(rename = "id")]
103 pub id: String,
104 /// The name of the certificate.
105 #[serde(rename = "name")]
106 pub name: String,
107 /// The object type. - If creating, updating, or getting a specific certificate, the object type is `certificate`. - If listing, activating, or deactivating certificates for the organization, the object type is `organization.certificate`. - If listing, activating, or deactivating certificates for a project, the object type is `organization.project.certificate`.
108 #[serde(rename = "object")]
109 pub object: String,
110}