tembo_api_client/models/
trunk_install.rs

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
/*
 * Tembo Cloud
 *
 * Platform API for Tembo Cloud             </br>             </br>             To find a Tembo Data API, please find it here:             </br>             </br>             [AWS US East 1](https://api.data-1.use1.tembo.io/swagger-ui/)
 *
 * The version of the OpenAPI document: v1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// TrunkInstall : TrunkInstall allows installation of extensions from the [pgtrunk](https://pgt.dev) registry.  This list should be a list of extension names and versions that you wish to install at runtime using the pgtrunk API.  This example will install the pg_stat_statements extension at version 1.10.0.  ```yaml apiVersion: coredb.io/v1alpha1 kind: CoreDB metadata: name: test-db spec: trunk_installs: - name: pg_stat_statements version: 1.10.0 ```
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TrunkInstall {
    /// The name of the extension to install. This must be the name of the extension as it appears in the [pgtrunk](https://pgt.dev) registry.
    #[serde(rename = "name")]
    pub name: String,
    /// The version of the extension to install. If not specified, the latest version will be used. (Optional)
    #[serde(
        rename = "version",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub version: Option<Option<String>>,
}

impl TrunkInstall {
    /// TrunkInstall allows installation of extensions from the [pgtrunk](https://pgt.dev) registry.  This list should be a list of extension names and versions that you wish to install at runtime using the pgtrunk API.  This example will install the pg_stat_statements extension at version 1.10.0.  ```yaml apiVersion: coredb.io/v1alpha1 kind: CoreDB metadata: name: test-db spec: trunk_installs: - name: pg_stat_statements version: 1.10.0 ```
    pub fn new(name: String) -> TrunkInstall {
        TrunkInstall {
            name,
            version: None,
        }
    }
}