tembo-api-client 1.1.1

API client for Tembo Cloud's Platform API (api.tembo.io)
Documentation
/*
 * 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};

/// AppService : AppService significantly extends the functionality of your Tembo Postgres instance by running tools and software built by the Postgres open source community.  **Example**: This will configure and install a Postgrest container along side the Postgres instance, install pg_graphql extension, and configure the ingress routing to expose the Postgrest service.  ```yaml apiVersion: coredb.io/v1alpha1 kind: CoreDB metadata: name: test-db spec: trunk_installs: - name: pg_graphql version: 1.2.0 extensions: - name: pg_graphql locations: - database: postgres enabled: true  appServices: - name: postgrest image: postgrest/postgrest:latest
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AppService {
    /// Defines the arguments to pass into the container if needed. You define this in the same manner as you would for all Kubernetes containers. See the [Kubernetes docs](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container).
    #[serde(
        rename = "args",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub args: Option<Option<Vec<String>>>,
    /// Defines the command into the container if needed. You define this in the same manner as you would for all Kubernetes containers. See the [Kubernetes docs](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container).
    #[serde(
        rename = "command",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub command: Option<Option<Vec<String>>>,
    /// Defines the environment variables to pass into the container if needed. You define this in the same manner as you would for all Kubernetes containers. See the [Kubernetes docs](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container).
    #[serde(
        rename = "env",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub env: Option<Option<Vec<models::EnvVar>>>,
    /// Defines the container image to use for the appService.
    #[serde(rename = "image")]
    pub image: String,
    #[serde(
        rename = "metrics",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub metrics: Option<Option<Box<models::AppMetrics>>>,
    /// Defines the ingress middeware configuration for the appService. This is specifically configured for the ingress controller Traefik.
    #[serde(
        rename = "middlewares",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub middlewares: Option<Option<Vec<models::Middleware>>>,
    /// Defines the name of the appService.
    #[serde(rename = "name")]
    pub name: String,
    #[serde(
        rename = "probes",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub probes: Option<Option<Box<models::Probes>>>,
    #[serde(rename = "resources", skip_serializing_if = "Option::is_none")]
    pub resources: Option<Box<models::ResourceRequirements>>,
    /// Defines the routing configuration for the appService.
    #[serde(
        rename = "routing",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub routing: Option<Option<Vec<models::Routing>>>,
    #[serde(
        rename = "storage",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub storage: Option<Option<Box<models::StorageConfig>>>,
}

impl AppService {
    /// AppService significantly extends the functionality of your Tembo Postgres instance by running tools and software built by the Postgres open source community.  **Example**: This will configure and install a Postgrest container along side the Postgres instance, install pg_graphql extension, and configure the ingress routing to expose the Postgrest service.  ```yaml apiVersion: coredb.io/v1alpha1 kind: CoreDB metadata: name: test-db spec: trunk_installs: - name: pg_graphql version: 1.2.0 extensions: - name: pg_graphql locations: - database: postgres enabled: true  appServices: - name: postgrest image: postgrest/postgrest:latest
    pub fn new(image: String, name: String) -> AppService {
        AppService {
            args: None,
            command: None,
            env: None,
            image,
            metrics: None,
            middlewares: None,
            name,
            probes: None,
            resources: None,
            routing: None,
            storage: None,
        }
    }
}