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;

/// BucketSoftDeletePolicy : The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BucketSoftDeletePolicy {
    /// Server-determined value that indicates the time from which the policy, or one with a greater retention, was effective. This value is in RFC 3339 format.
    #[serde(rename = "effectiveTime", skip_serializing_if = "Option::is_none")]
    pub effective_time: Option<String>,
    /// The duration in seconds that soft-deleted objects in the bucket will be retained and cannot be permanently deleted.
    #[serde(
        rename = "retentionDurationSeconds",
        skip_serializing_if = "Option::is_none"
    )]
    pub retention_duration_seconds: Option<String>,
}

impl BucketSoftDeletePolicy {
    /// The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted.
    pub fn new() -> BucketSoftDeletePolicy {
        BucketSoftDeletePolicy {
            effective_time: None,
            retention_duration_seconds: None,
        }
    }
}
