Struct google_bigquery2::api::DatasetMethods
source · pub struct DatasetMethods<'a, S>where
S: '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 std::default::Default;
use bigquery2::{Bigquery, oauth2, hyper, hyper_rustls, chrono, FieldMask};
let secret: oauth2::ApplicationSecret = Default::default();
let auth = oauth2::InstalledFlowAuthenticator::builder(
secret,
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let mut hub = Bigquery::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `delete(...)`, `get(...)`, `insert(...)`, `list(...)`, `patch(...)` and `update(...)`
// to build up your call.
let rb = hub.datasets();
Implementations§
source§impl<'a, S> DatasetMethods<'a, S>
impl<'a, S> DatasetMethods<'a, S>
sourcepub fn delete(
&self,
project_id: &str,
dataset_id: &str
) -> DatasetDeleteCall<'a, S>
pub fn delete( &self, project_id: &str, dataset_id: &str ) -> DatasetDeleteCall<'a, S>
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
- Project ID of the dataset being deleteddatasetId
- Dataset ID of dataset being deleted
sourcepub fn get(&self, project_id: &str, dataset_id: &str) -> DatasetGetCall<'a, S>
pub fn get(&self, project_id: &str, dataset_id: &str) -> DatasetGetCall<'a, S>
Create a builder to help you perform the following task:
Returns the dataset specified by datasetID.
Arguments
projectId
- Project ID of the requested datasetdatasetId
- Dataset ID of the requested dataset
sourcepub fn insert(
&self,
request: Dataset,
project_id: &str
) -> DatasetInsertCall<'a, S>
pub fn insert( &self, request: Dataset, project_id: &str ) -> DatasetInsertCall<'a, S>
Create a builder to help you perform the following task:
Creates a new empty dataset.
Arguments
request
- No description provided.projectId
- Project ID of the new dataset
sourcepub fn list(&self, project_id: &str) -> DatasetListCall<'a, S>
pub fn list(&self, project_id: &str) -> DatasetListCall<'a, S>
Create a builder to help you perform the following task:
Lists all datasets in the specified project to which you have been granted the READER dataset role.
Arguments
projectId
- Project ID of the datasets to be listed
sourcepub fn patch(
&self,
request: Dataset,
project_id: &str,
dataset_id: &str
) -> DatasetPatchCall<'a, S>
pub fn patch( &self, request: Dataset, project_id: &str, dataset_id: &str ) -> DatasetPatchCall<'a, S>
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 patch semantics.
Arguments
request
- No description provided.projectId
- Project ID of the dataset being updateddatasetId
- Dataset ID of the dataset being updated
sourcepub fn update(
&self,
request: Dataset,
project_id: &str,
dataset_id: &str
) -> DatasetUpdateCall<'a, S>
pub fn update( &self, request: Dataset, project_id: &str, dataset_id: &str ) -> DatasetUpdateCall<'a, S>
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
- Project ID of the dataset being updateddatasetId
- Dataset ID of the dataset being updated