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;

/// ObjectRetention : A collection of object level retention parameters.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ObjectRetention {
    /// The bucket's object retention mode, can only be Unlocked or Locked.
    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
    pub mode: Option<String>,
    /// A time in RFC 3339 format until which object retention protects this object.
    #[serde(rename = "retainUntilTime", skip_serializing_if = "Option::is_none")]
    pub retain_until_time: Option<String>,
}

impl ObjectRetention {
    /// A collection of object level retention parameters.
    pub fn new() -> ObjectRetention {
        ObjectRetention {
            mode: None,
            retain_until_time: None,
        }
    }
}
