windmill_api/models/
s3_resource.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.505.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct S3Resource {
16    #[serde(rename = "bucket")]
17    pub bucket: String,
18    #[serde(rename = "region")]
19    pub region: String,
20    #[serde(rename = "endPoint")]
21    pub end_point: String,
22    #[serde(rename = "useSSL")]
23    pub use_ssl: bool,
24    #[serde(rename = "accessKey", skip_serializing_if = "Option::is_none")]
25    pub access_key: Option<String>,
26    #[serde(rename = "secretKey", skip_serializing_if = "Option::is_none")]
27    pub secret_key: Option<String>,
28    #[serde(rename = "pathStyle")]
29    pub path_style: bool,
30}
31
32impl S3Resource {
33    pub fn new(bucket: String, region: String, end_point: String, use_ssl: bool, path_style: bool) -> S3Resource {
34        S3Resource {
35            bucket,
36            region,
37            end_point,
38            use_ssl,
39            access_key: None,
40            secret_key: None,
41            path_style,
42        }
43    }
44}
45