use serde::{Deserialize, Serialize}; /*
                                      * Cloud Storage JSON API
                                      *
                                      * Stores and retrieves potentially large, immutable data objects.
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::storage_v1::models;

/// Folder : A folder. Only available in buckets with hierarchical namespace enabled.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Folder {
    /// The name of the bucket containing this folder.
    #[serde(rename = "bucket", skip_serializing_if = "Option::is_none")]
    pub bucket: Option<String>,
    /// The creation time of the folder in RFC 3339 format.
    #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")]
    pub create_time: Option<String>,
    /// The ID of the folder, including the bucket name, folder name.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// The kind of item this is. For folders, this is always storage#folder.
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// The version of the metadata for this folder. Used for preconditions and for detecting changes in metadata.
    #[serde(rename = "metageneration", skip_serializing_if = "Option::is_none")]
    pub metageneration: Option<String>,
    /// The name of the folder. Required if not specified by URL parameter.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "pendingRenameInfo", skip_serializing_if = "Option::is_none")]
    pub pending_rename_info: Option<Box<models::FolderPendingRenameInfo>>,
    /// The link to this folder.
    #[serde(rename = "selfLink", skip_serializing_if = "Option::is_none")]
    pub self_link: Option<String>,
    /// The modification time of the folder metadata in RFC 3339 format.
    #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")]
    pub update_time: Option<String>,
}

impl Folder {
    /// A folder. Only available in buckets with hierarchical namespace enabled.
    pub fn new() -> Folder {
        Folder {
            bucket: None,
            create_time: None,
            id: None,
            kind: None,
            metageneration: None,
            name: None,
            pending_rename_info: None,
            self_link: None,
            update_time: None,
        }
    }
}
