/*
* Tapis Pods Service
*
* The Pods Service is a web service and distributed computing platform providing pods-as-a-service (PaaS). The service implements a message broker and processor model that requests pods, alongside a health module to poll for pod data, including logs, status, and health. The primary use of this service is to have quick to deploy long-lived services based on Docker images that are exposed via HTTP or TCP endpoints listed by the API. **The Pods service provides functionality for two types of pod solutions:** * **Templated Pods** for run-as-is popular images. Neo4J is one example, the template manages TCP ports, user creation, and permissions. * **Custom Pods** for arbitrary docker images with less functionality. In this case we will expose port 5000 and do nothing else. The live-docs act as the most up-to-date API reference. Visit the [documentation for more information](https://tapis.readthedocs.io/en/latest/technical/pods.html).
*
* The version of the OpenAPI document: 26Q1.1
* Contact: cicsupport@tacc.utexas.edu
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Networking {
/// Which network protocol to use. `http`, `tcp`, `postgres`, or `local_only`. `local_only` is only accessible from within the cluster.
#[serde(rename = "protocol", skip_serializing_if = "Option::is_none")]
pub protocol: Option<String>,
/// Pod port to expose via networking.url in this networking object.
#[serde(rename = "port", skip_serializing_if = "Option::is_none")]
pub port: Option<i32>,
/// URL used to access the port of the pod defined in this networking object. Generated by service.
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
/// List of IPs that are allowed to access this specific pod port. If empty, all IPs are allowed. ex. ['127.0.0.1/32', '192.168.1.7']
#[serde(rename = "ip_allow_list", skip_serializing_if = "Option::is_none")]
pub ip_allow_list: Option<Vec<String>>,
/// If true, will require Tapis auth to access the pod.
#[serde(rename = "tapis_auth", skip_serializing_if = "Option::is_none")]
pub tapis_auth: Option<bool>,
/// Specification of headers to forward to the pod when using Tapis auth.
#[serde(
rename = "tapis_auth_response_headers",
skip_serializing_if = "Option::is_none"
)]
pub tapis_auth_response_headers: Option<std::collections::HashMap<String, String>>,
/// List of users allowed to access the pod when using Tapis auth. Supports literal usernames, '*' (all users), and permission-based groups: 'AUTHORIZED_READS' (READ+), 'AUTHORIZED_USERS' (USER+), 'AUTHORIZED_ADMINS' (ADMIN+, includes APPROVEDADMIN). Groups resolve against the pod's permissions list.
#[serde(
rename = "tapis_auth_allowed_users",
skip_serializing_if = "Option::is_none"
)]
pub tapis_auth_allowed_users: Option<Vec<String>>,
/// Path to redirect to when accessing the pod via Tapis auth.
#[serde(
rename = "tapis_auth_return_path",
skip_serializing_if = "Option::is_none"
)]
pub tapis_auth_return_path: Option<String>,
/// List of PathPrefix patterns to exclude from Tapis auth (no forwardAuth). Useful for static assets that don't need auth. ex. ['/assets', '/static', '/_app']
#[serde(
rename = "tapis_auth_excluded_paths",
skip_serializing_if = "Option::is_none"
)]
pub tapis_auth_excluded_paths: Option<Vec<String>>,
/// List of PathRegexp patterns to exclude from Tapis auth. ex. ['\\\\.(js|css|ico|png|jpg|jpeg|webp|gif|svg|woff2?|ttf|map)$']
#[serde(
rename = "tapis_auth_excluded_path_regex",
skip_serializing_if = "Option::is_none"
)]
pub tapis_auth_excluded_path_regex: Option<Vec<String>>,
/// List of CORS allowed origins. ex. ['https://tacc.develop.tapis.io', 'https://tacc.tapis.io']
#[serde(rename = "cors_allow_origins", skip_serializing_if = "Option::is_none")]
pub cors_allow_origins: Option<Vec<String>>,
/// List of CORS allowed methods. ex. ['GET', 'POST', 'PUT', 'DELETE']
#[serde(rename = "cors_allow_methods", skip_serializing_if = "Option::is_none")]
pub cors_allow_methods: Option<Vec<String>>,
/// List of CORS allowed headers. ex. ['Content-Type', 'X-Tapis-Token']
#[serde(rename = "cors_allow_headers", skip_serializing_if = "Option::is_none")]
pub cors_allow_headers: Option<Vec<String>>,
/// Boolean to allow credentials to be sent with CORS requests.
#[serde(
rename = "cors_allow_credentials",
skip_serializing_if = "Option::is_none"
)]
pub cors_allow_credentials: Option<bool>,
/// Max age of CORS preflight requests in seconds.
#[serde(rename = "cors_max_age", skip_serializing_if = "Option::is_none")]
pub cors_max_age: Option<i32>,
/// Path to redirect to when accessing the pod via Tapis UI.
#[serde(rename = "tapis_ui_uri", skip_serializing_if = "Option::is_none")]
pub tapis_ui_uri: Option<String>,
/// If true, will redirect to the tapis_ui_uri when accessing the pod via Tapis UI. Otherwise, just read-only uri.
#[serde(
rename = "tapis_ui_uri_redirect",
skip_serializing_if = "Option::is_none"
)]
pub tapis_ui_uri_redirect: Option<bool>,
/// Describing where the tapis_ui_uri will redirect to.
#[serde(
rename = "tapis_ui_uri_description",
skip_serializing_if = "Option::is_none"
)]
pub tapis_ui_uri_description: Option<String>,
/// Enable Traefik compress middleware for this HTTP endpoint. Enabled by default for all HTTP protocol endpoints.
#[serde(rename = "proxy_compression", skip_serializing_if = "Option::is_none")]
pub proxy_compression: Option<bool>,
/// Ordered list of compression encodings by priority. Valid values: 'zstd', 'br', 'gzip'.
#[serde(
rename = "proxy_compression_encodings",
skip_serializing_if = "Option::is_none"
)]
pub proxy_compression_encodings: Option<Vec<String>>,
/// Content types to exclude from compression. Already-compressed formats (images, video, archives) are excluded automatically. Set explicit types here to add additional exclusions.
#[serde(
rename = "proxy_compression_excluded_content_types",
skip_serializing_if = "Option::is_none"
)]
pub proxy_compression_excluded_content_types: Option<Vec<String>>,
/// Minimum response body size in bytes before compression is applied. Responses smaller than this are not compressed.
#[serde(
rename = "proxy_compression_min_response_body_bytes",
skip_serializing_if = "Option::is_none"
)]
pub proxy_compression_min_response_body_bytes: Option<i32>,
}
impl Networking {
pub fn new() -> Networking {
Networking {
protocol: None,
port: None,
url: None,
ip_allow_list: None,
tapis_auth: None,
tapis_auth_response_headers: None,
tapis_auth_allowed_users: None,
tapis_auth_return_path: None,
tapis_auth_excluded_paths: None,
tapis_auth_excluded_path_regex: None,
cors_allow_origins: None,
cors_allow_methods: None,
cors_allow_headers: None,
cors_allow_credentials: None,
cors_max_age: None,
tapis_ui_uri: None,
tapis_ui_uri_redirect: None,
tapis_ui_uri_description: None,
proxy_compression: None,
proxy_compression_encodings: None,
proxy_compression_excluded_content_types: None,
proxy_compression_min_response_body_bytes: None,
}
}
}