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
                                      */

/// Bucket : A bucket.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Bucket {
    /// Access controls on the bucket.
    #[serde(rename = "acl", skip_serializing_if = "Option::is_none")]
    pub acl: Option<Vec<crate::google_rest_apis::storage_v1::models::BucketAccessControl>>,
    #[serde(rename = "autoclass", skip_serializing_if = "Option::is_none")]
    pub autoclass: Option<Box<crate::google_rest_apis::storage_v1::models::BucketAutoclass>>,
    #[serde(rename = "billing", skip_serializing_if = "Option::is_none")]
    pub billing: Option<Box<crate::google_rest_apis::storage_v1::models::BucketBilling>>,
    /// The bucket's Cross-Origin Resource Sharing (CORS) configuration.
    #[serde(rename = "cors", skip_serializing_if = "Option::is_none")]
    pub cors: Option<Vec<crate::google_rest_apis::storage_v1::models::BucketCorsInner>>,
    #[serde(
        rename = "customPlacementConfig",
        skip_serializing_if = "Option::is_none"
    )]
    pub custom_placement_config:
        Option<Box<crate::google_rest_apis::storage_v1::models::BucketCustomPlacementConfig>>,
    /// The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed.
    #[serde(
        rename = "defaultEventBasedHold",
        skip_serializing_if = "Option::is_none"
    )]
    pub default_event_based_hold: Option<bool>,
    /// Default access controls to apply to new objects when no ACL is provided.
    #[serde(rename = "defaultObjectAcl", skip_serializing_if = "Option::is_none")]
    pub default_object_acl:
        Option<Vec<crate::google_rest_apis::storage_v1::models::ObjectAccessControl>>,
    #[serde(rename = "encryption", skip_serializing_if = "Option::is_none")]
    pub encryption: Option<Box<crate::google_rest_apis::storage_v1::models::BucketEncryption>>,
    /// HTTP 1.1 Entity tag for the bucket.
    #[serde(rename = "etag", skip_serializing_if = "Option::is_none")]
    pub etag: Option<String>,
    #[serde(rename = "iamConfiguration", skip_serializing_if = "Option::is_none")]
    pub iam_configuration:
        Option<Box<crate::google_rest_apis::storage_v1::models::BucketIamConfiguration>>,
    /// The ID of the bucket. For buckets, the id and name properties are the same.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// The kind of item this is. For buckets, this is always storage#bucket.
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// User-provided labels, in key/value pairs.
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
    pub labels: Option<::std::collections::HashMap<String, String>>,
    #[serde(rename = "lifecycle", skip_serializing_if = "Option::is_none")]
    pub lifecycle: Option<Box<crate::google_rest_apis::storage_v1::models::BucketLifecycle>>,
    /// The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list.
    #[serde(rename = "location", skip_serializing_if = "Option::is_none")]
    pub location: Option<String>,
    /// The type of the bucket location.
    #[serde(rename = "locationType", skip_serializing_if = "Option::is_none")]
    pub location_type: Option<String>,
    #[serde(rename = "logging", skip_serializing_if = "Option::is_none")]
    pub logging: Option<Box<crate::google_rest_apis::storage_v1::models::BucketLogging>>,
    /// The metadata generation of this bucket.
    #[serde(rename = "metageneration", skip_serializing_if = "Option::is_none")]
    pub metageneration: Option<String>,
    /// The name of the bucket.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "owner", skip_serializing_if = "Option::is_none")]
    pub owner: Option<Box<crate::google_rest_apis::storage_v1::models::BucketOwner>>,
    /// The project number of the project the bucket belongs to.
    #[serde(rename = "projectNumber", skip_serializing_if = "Option::is_none")]
    pub project_number: Option<String>,
    #[serde(rename = "retentionPolicy", skip_serializing_if = "Option::is_none")]
    pub retention_policy:
        Option<Box<crate::google_rest_apis::storage_v1::models::BucketRetentionPolicy>>,
    /// The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket.
    #[serde(rename = "rpo", skip_serializing_if = "Option::is_none")]
    pub rpo: Option<String>,
    /// Reserved for future use.
    #[serde(rename = "satisfiesPZS", skip_serializing_if = "Option::is_none")]
    pub satisfies_pzs: Option<bool>,
    /// The URI of this bucket.
    #[serde(rename = "selfLink", skip_serializing_if = "Option::is_none")]
    pub self_link: Option<String>,
    /// The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes.
    #[serde(rename = "storageClass", skip_serializing_if = "Option::is_none")]
    pub storage_class: Option<String>,
    /// The creation time of the bucket in RFC 3339 format.
    #[serde(rename = "timeCreated", skip_serializing_if = "Option::is_none")]
    pub time_created: Option<String>,
    /// The modification time of the bucket in RFC 3339 format.
    #[serde(rename = "updated", skip_serializing_if = "Option::is_none")]
    pub updated: Option<String>,
    #[serde(rename = "versioning", skip_serializing_if = "Option::is_none")]
    pub versioning: Option<Box<crate::google_rest_apis::storage_v1::models::BucketVersioning>>,
    #[serde(rename = "website", skip_serializing_if = "Option::is_none")]
    pub website: Option<Box<crate::google_rest_apis::storage_v1::models::BucketWebsite>>,
}

impl Bucket {
    /// A bucket.
    pub fn new() -> Bucket {
        Bucket {
            acl: None,
            autoclass: None,
            billing: None,
            cors: None,
            custom_placement_config: None,
            default_event_based_hold: None,
            default_object_acl: None,
            encryption: None,
            etag: None,
            iam_configuration: None,
            id: None,
            kind: None,
            labels: None,
            lifecycle: None,
            location: None,
            location_type: None,
            logging: None,
            metageneration: None,
            name: None,
            owner: None,
            project_number: None,
            retention_policy: None,
            rpo: None,
            satisfies_pzs: None,
            self_link: None,
            storage_class: None,
            time_created: None,
            updated: None,
            versioning: None,
            website: None,
        }
    }
}
