gcp_bigquery_client/model/
table_reference.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Default, Clone, Serialize, Deserialize)]
4#[serde(rename_all = "camelCase")]
5pub struct TableReference {
6    /// [Required] The ID of the dataset containing this table.
7    pub dataset_id: String,
8    /// [Required] The ID of the project containing this table.
9    pub project_id: String,
10    /// [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
11    pub table_id: String,
12}
13
14impl TableReference {
15    pub fn new(project_id: &str, dataset_id: &str, table_id: &str) -> Self {
16        Self {
17            dataset_id: dataset_id.into(),
18            project_id: project_id.into(),
19            table_id: table_id.into(),
20        }
21    }
22}