pub struct DatasetMethods<'a, C>where
C: 'a,{ /* private fields */ }Expand description
A builder providing access to all methods supported on dataset resources.
It is not used directly, but through the Bigquery hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_bigquery2 as bigquery2;
use bigquery2::{Bigquery, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let connector = hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_only()
.enable_http2()
.build();
let executor = hyper_util::rt::TokioExecutor::new();
let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
yup_oauth2::client::CustomHyperClientBuilder::from(
hyper_util::client::legacy::Client::builder(executor).build(connector),
),
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http2()
.build()
);
let mut hub = Bigquery::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `delete(...)`, `get(...)`, `insert(...)`, `list(...)`, `patch(...)`, `undelete(...)` and `update(...)`
// to build up your call.
let rb = hub.datasets();Implementations§
Source§impl<'a, C> DatasetMethods<'a, C>
impl<'a, C> DatasetMethods<'a, C>
Sourcepub fn delete(
&self,
project_id: &str,
dataset_id: &str,
) -> DatasetDeleteCall<'a, C>
pub fn delete( &self, project_id: &str, dataset_id: &str, ) -> DatasetDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name.
§Arguments
projectId- Required. Project ID of the dataset being deleteddatasetId- Required. Dataset ID of dataset being deleted
Sourcepub fn get(&self, project_id: &str, dataset_id: &str) -> DatasetGetCall<'a, C>
pub fn get(&self, project_id: &str, dataset_id: &str) -> DatasetGetCall<'a, C>
Create a builder to help you perform the following task:
Returns the dataset specified by datasetID.
§Arguments
projectId- Required. Project ID of the requested datasetdatasetId- Required. Dataset ID of the requested dataset
Sourcepub fn insert(
&self,
request: Dataset,
project_id: &str,
) -> DatasetInsertCall<'a, C>
pub fn insert( &self, request: Dataset, project_id: &str, ) -> DatasetInsertCall<'a, C>
Create a builder to help you perform the following task:
Creates a new empty dataset.
§Arguments
request- No description provided.projectId- Required. Project ID of the new dataset
Sourcepub fn list(&self, project_id: &str) -> DatasetListCall<'a, C>
pub fn list(&self, project_id: &str) -> DatasetListCall<'a, C>
Create a builder to help you perform the following task:
Lists all datasets in the specified project to which the user has been granted the READER dataset role.
§Arguments
projectId- Required. Project ID of the datasets to be listed
Sourcepub fn patch(
&self,
request: Dataset,
project_id: &str,
dataset_id: &str,
) -> DatasetPatchCall<'a, C>
pub fn patch( &self, request: Dataset, project_id: &str, dataset_id: &str, ) -> DatasetPatchCall<'a, C>
Create a builder to help you perform the following task:
Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports RFC5789 patch semantics.
§Arguments
request- No description provided.projectId- Required. Project ID of the dataset being updateddatasetId- Required. Dataset ID of the dataset being updated
Sourcepub fn undelete(
&self,
request: UndeleteDatasetRequest,
project_id: &str,
dataset_id: &str,
) -> DatasetUndeleteCall<'a, C>
pub fn undelete( &self, request: UndeleteDatasetRequest, project_id: &str, dataset_id: &str, ) -> DatasetUndeleteCall<'a, C>
Create a builder to help you perform the following task:
Undeletes a dataset which is within time travel window based on datasetId. If a time is specified, the dataset version deleted at that time is undeleted, else the last live version is undeleted.
§Arguments
request- No description provided.projectId- Required. Project ID of the dataset to be undeleteddatasetId- Required. Dataset ID of dataset being deleted
Sourcepub fn update(
&self,
request: Dataset,
project_id: &str,
dataset_id: &str,
) -> DatasetUpdateCall<'a, C>
pub fn update( &self, request: Dataset, project_id: &str, dataset_id: &str, ) -> DatasetUpdateCall<'a, C>
Create a builder to help you perform the following task:
Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource.
§Arguments
request- No description provided.projectId- Required. Project ID of the dataset being updateddatasetId- Required. Dataset ID of the dataset being updated