tembo_api_client/models/
trunk_install.rs

1/*
2 * Tembo Cloud
3 *
4 * 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/)
5 *
6 * The version of the OpenAPI document: v1.0.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13/// 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 ```
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct TrunkInstall {
16    /// 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.
17    #[serde(rename = "name")]
18    pub name: String,
19    /// The version of the extension to install. If not specified, the latest version will be used. (Optional)
20    #[serde(
21        rename = "version",
22        default,
23        with = "::serde_with::rust::double_option",
24        skip_serializing_if = "Option::is_none"
25    )]
26    pub version: Option<Option<String>>,
27}
28
29impl TrunkInstall {
30    /// 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 ```
31    pub fn new(name: String) -> TrunkInstall {
32        TrunkInstall {
33            name,
34            version: None,
35        }
36    }
37}