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

/// HmacKeyMetadata : JSON template to produce a JSON-style HMAC Key metadata resource.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct HmacKeyMetadata {
    /// The ID of the HMAC Key.
    #[serde(rename = "accessId", skip_serializing_if = "Option::is_none")]
    pub access_id: Option<String>,
    /// HTTP 1.1 Entity tag for the HMAC key.
    #[serde(rename = "etag", skip_serializing_if = "Option::is_none")]
    pub etag: Option<String>,
    /// The ID of the HMAC key, including the Project ID and the Access ID.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// The kind of item this is. For HMAC Key metadata, this is always storage#hmacKeyMetadata.
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// Project ID owning the service account to which the key authenticates.
    #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")]
    pub project_id: Option<String>,
    /// The link to this resource.
    #[serde(rename = "selfLink", skip_serializing_if = "Option::is_none")]
    pub self_link: Option<String>,
    /// The email address of the key's associated service account.
    #[serde(
        rename = "serviceAccountEmail",
        skip_serializing_if = "Option::is_none"
    )]
    pub service_account_email: Option<String>,
    /// The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED.
    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
    pub state: Option<String>,
    /// The creation time of the HMAC key in RFC 3339 format.
    #[serde(rename = "timeCreated", skip_serializing_if = "Option::is_none")]
    pub time_created: Option<String>,
    /// The last modification time of the HMAC key metadata in RFC 3339 format.
    #[serde(rename = "updated", skip_serializing_if = "Option::is_none")]
    pub updated: Option<String>,
}

impl HmacKeyMetadata {
    /// JSON template to produce a JSON-style HMAC Key metadata resource.
    pub fn new() -> HmacKeyMetadata {
        HmacKeyMetadata {
            access_id: None,
            etag: None,
            id: None,
            kind: None,
            project_id: None,
            self_link: None,
            service_account_email: None,
            state: None,
            time_created: None,
            updated: None,
        }
    }
}
