/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.2.0
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct S3Resource {
    #[serde(rename = "bucket")]
    pub bucket: String,
    #[serde(rename = "region")]
    pub region: String,
    #[serde(rename = "endPoint")]
    pub end_point: String,
    #[serde(rename = "useSSL")]
    pub use_ssl: bool,
    #[serde(rename = "accessKey", skip_serializing_if = "Option::is_none")]
    pub access_key: Option<String>,
    #[serde(rename = "secretKey", skip_serializing_if = "Option::is_none")]
    pub secret_key: Option<String>,
    #[serde(rename = "pathStyle")]
    pub path_style: bool,
}

impl S3Resource {
    pub fn new(bucket: String, region: String, end_point: String, use_ssl: bool, path_style: bool) -> S3Resource {
        S3Resource {
            bucket,
            region,
            end_point,
            use_ssl,
            access_key: None,
            secret_key: None,
            path_style,
        }
    }
}

