use serde::{Deserialize, Serialize}; /*
                                      * BigQuery API
                                      *
                                      * A data platform for customers to create, manage, share and query data.
                                      *
                                      * The version of the OpenAPI document: v2
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::bigquery_v2::models;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DatasetAccessEntry {
    #[serde(rename = "dataset", skip_serializing_if = "Option::is_none")]
    pub dataset: Option<Box<models::DatasetReference>>,
    #[serde(rename = "targetTypes", skip_serializing_if = "Option::is_none")]
    pub target_types: Option<Vec<TargetTypes>>,
}

impl DatasetAccessEntry {
    pub fn new() -> DatasetAccessEntry {
        DatasetAccessEntry {
            dataset: None,
            target_types: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TargetTypes {
    #[serde(rename = "TARGET_TYPE_UNSPECIFIED")]
    TargetTypeUnspecified,
    #[serde(rename = "VIEWS")]
    Views,
}

impl Default for TargetTypes {
    fn default() -> TargetTypes {
        Self::TargetTypeUnspecified
    }
}
