ProjectMethods

Struct ProjectMethods 

Source
pub struct ProjectMethods<'a, C>
where C: 'a,
{ /* private fields */ }
Expand description

A builder providing access to all methods supported on project resources. It is not used directly, but through the BigQueryDataTransfer hub.

§Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate google_bigquerydatatransfer1 as bigquerydatatransfer1;

use bigquerydatatransfer1::{BigQueryDataTransfer, 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 = BigQueryDataTransfer::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `data_sources_check_valid_creds(...)`, `data_sources_get(...)`, `data_sources_list(...)`, `enroll_data_sources(...)`, `locations_data_sources_check_valid_creds(...)`, `locations_data_sources_get(...)`, `locations_data_sources_list(...)`, `locations_enroll_data_sources(...)`, `locations_get(...)`, `locations_list(...)`, `locations_transfer_configs_create(...)`, `locations_transfer_configs_delete(...)`, `locations_transfer_configs_get(...)`, `locations_transfer_configs_list(...)`, `locations_transfer_configs_patch(...)`, `locations_transfer_configs_runs_delete(...)`, `locations_transfer_configs_runs_get(...)`, `locations_transfer_configs_runs_list(...)`, `locations_transfer_configs_runs_transfer_logs_list(...)`, `locations_transfer_configs_schedule_runs(...)`, `locations_transfer_configs_start_manual_runs(...)`, `locations_unenroll_data_sources(...)`, `transfer_configs_create(...)`, `transfer_configs_delete(...)`, `transfer_configs_get(...)`, `transfer_configs_list(...)`, `transfer_configs_patch(...)`, `transfer_configs_runs_delete(...)`, `transfer_configs_runs_get(...)`, `transfer_configs_runs_list(...)`, `transfer_configs_runs_transfer_logs_list(...)`, `transfer_configs_schedule_runs(...)` and `transfer_configs_start_manual_runs(...)`
// to build up your call.
let rb = hub.projects();

Implementations§

Source§

impl<'a, C> ProjectMethods<'a, C>

Source

pub fn data_sources_check_valid_creds( &self, request: CheckValidCredsRequest, name: &str, ) -> ProjectDataSourceCheckValidCredCall<'a, C>

Create a builder to help you perform the following task:

Returns true if valid credentials exist for the given data source and requesting user.

§Arguments
  • request - No description provided.
  • name - Required. The name of the data source. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/dataSources/{data_source_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}
Source

pub fn data_sources_get(&self, name: &str) -> ProjectDataSourceGetCall<'a, C>

Create a builder to help you perform the following task:

Retrieves a supported data source and returns its settings.

§Arguments
  • name - Required. The name of the resource requested. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/dataSources/{data_source_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}
Source

pub fn data_sources_list( &self, parent: &str, ) -> ProjectDataSourceListCall<'a, C>

Create a builder to help you perform the following task:

Lists supported data sources and returns their settings.

§Arguments
  • parent - Required. The BigQuery project id for which data sources should be returned. Must be in the form: projects/{project_id} or projects/{project_id}/locations/{location_id}
Source

pub fn locations_data_sources_check_valid_creds( &self, request: CheckValidCredsRequest, name: &str, ) -> ProjectLocationDataSourceCheckValidCredCall<'a, C>

Create a builder to help you perform the following task:

Returns true if valid credentials exist for the given data source and requesting user.

§Arguments
  • request - No description provided.
  • name - Required. The name of the data source. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/dataSources/{data_source_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}
Source

pub fn locations_data_sources_get( &self, name: &str, ) -> ProjectLocationDataSourceGetCall<'a, C>

Create a builder to help you perform the following task:

Retrieves a supported data source and returns its settings.

§Arguments
  • name - Required. The name of the resource requested. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/dataSources/{data_source_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}
Source

pub fn locations_data_sources_list( &self, parent: &str, ) -> ProjectLocationDataSourceListCall<'a, C>

Create a builder to help you perform the following task:

Lists supported data sources and returns their settings.

§Arguments
  • parent - Required. The BigQuery project id for which data sources should be returned. Must be in the form: projects/{project_id} or projects/{project_id}/locations/{location_id}
Source

pub fn locations_transfer_configs_runs_transfer_logs_list( &self, parent: &str, ) -> ProjectLocationTransferConfigRunTransferLogListCall<'a, C>

Create a builder to help you perform the following task:

Returns log messages for the transfer run.

§Arguments
  • parent - Required. Transfer run name. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id}/runs/{run_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}
Source

pub fn locations_transfer_configs_runs_delete( &self, name: &str, ) -> ProjectLocationTransferConfigRunDeleteCall<'a, C>

Create a builder to help you perform the following task:

Deletes the specified transfer run.

§Arguments
  • name - Required. The name of the resource requested. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id}/runs/{run_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}
Source

pub fn locations_transfer_configs_runs_get( &self, name: &str, ) -> ProjectLocationTransferConfigRunGetCall<'a, C>

Create a builder to help you perform the following task:

Returns information about the particular transfer run.

§Arguments
  • name - Required. The name of the resource requested. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id}/runs/{run_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}
Source

pub fn locations_transfer_configs_runs_list( &self, parent: &str, ) -> ProjectLocationTransferConfigRunListCall<'a, C>

Create a builder to help you perform the following task:

Returns information about running and completed transfer runs.

§Arguments
  • parent - Required. Name of transfer configuration for which transfer runs should be retrieved. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}
Source

pub fn locations_transfer_configs_create( &self, request: TransferConfig, parent: &str, ) -> ProjectLocationTransferConfigCreateCall<'a, C>

Create a builder to help you perform the following task:

Creates a new data transfer configuration.

§Arguments
  • request - No description provided.
  • parent - Required. The BigQuery project id where the transfer configuration should be created. Must be in the format projects/{project_id}/locations/{location_id} or projects/{project_id}. If specified location and location of the destination bigquery dataset do not match - the request will fail.
Source

pub fn locations_transfer_configs_delete( &self, name: &str, ) -> ProjectLocationTransferConfigDeleteCall<'a, C>

Create a builder to help you perform the following task:

Deletes a data transfer configuration, including any associated transfer runs and logs.

§Arguments
  • name - Required. The name of the resource to delete. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}
Source

pub fn locations_transfer_configs_get( &self, name: &str, ) -> ProjectLocationTransferConfigGetCall<'a, C>

Create a builder to help you perform the following task:

Returns information about a data transfer config.

§Arguments
  • name - Required. The name of the resource requested. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}
Source

pub fn locations_transfer_configs_list( &self, parent: &str, ) -> ProjectLocationTransferConfigListCall<'a, C>

Create a builder to help you perform the following task:

Returns information about all transfer configs owned by a project in the specified location.

§Arguments
  • parent - Required. The BigQuery project id for which transfer configs should be returned. If you are using the regionless method, the location must be US and parent should be in the following form: * projects/{project_id} If you are using the regionalized method, parentshould be in the following form: *projects/{project_id}/locations/{location_id}`
Source

pub fn locations_transfer_configs_patch( &self, request: TransferConfig, name: &str, ) -> ProjectLocationTransferConfigPatchCall<'a, C>

Create a builder to help you perform the following task:

Updates a data transfer configuration. All fields must be set, even if they are not updated.

§Arguments
  • request - No description provided.
  • name - Identifier. The resource name of the transfer config. Transfer config names have the form either projects/{project_id}/locations/{region}/transferConfigs/{config_id} or projects/{project_id}/transferConfigs/{config_id}, where config_id is usually a UUID, even though it is not guaranteed or required. The name is ignored when creating a transfer config.
Source

pub fn locations_transfer_configs_schedule_runs( &self, request: ScheduleTransferRunsRequest, parent: &str, ) -> ProjectLocationTransferConfigScheduleRunCall<'a, C>

Create a builder to help you perform the following task:

Creates transfer runs for a time range [start_time, end_time]. For each date - or whatever granularity the data source supports - in the range, one transfer run is created. Note that runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns instead.

§Arguments
  • request - No description provided.
  • parent - Required. Transfer configuration name. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}
Source

pub fn locations_transfer_configs_start_manual_runs( &self, request: StartManualTransferRunsRequest, parent: &str, ) -> ProjectLocationTransferConfigStartManualRunCall<'a, C>

Create a builder to help you perform the following task:

Manually initiates transfer runs. You can schedule these runs in two ways: 1. For a specific point in time using the ‘requested_run_time’ parameter. 2. For a period between ‘start_time’ (inclusive) and ‘end_time’ (exclusive). If scheduling a single run, it is set to execute immediately (schedule_time equals the current time). When scheduling multiple runs within a time range, the first run starts now, and subsequent runs are delayed by 15 seconds each.

§Arguments
  • request - No description provided.
  • parent - Required. Transfer configuration name. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}
Source

pub fn locations_enroll_data_sources( &self, request: EnrollDataSourcesRequest, name: &str, ) -> ProjectLocationEnrollDataSourceCall<'a, C>

Create a builder to help you perform the following task:

Enroll data sources in a user project. This allows users to create transfer configurations for these data sources. They will also appear in the ListDataSources RPC and as such, will appear in the BigQuery UI, and the documents can be found in the public guide for BigQuery Web UI and Data Transfer Service.

§Arguments
  • request - No description provided.
  • name - Required. The name of the project resource in the form: projects/{project_id}
Source

pub fn locations_get(&self, name: &str) -> ProjectLocationGetCall<'a, C>

Create a builder to help you perform the following task:

Gets information about a location.

§Arguments
  • name - Resource name for the location.
Source

pub fn locations_list(&self, name: &str) -> ProjectLocationListCall<'a, C>

Create a builder to help you perform the following task:

Lists information about the supported locations for this service.

§Arguments
  • name - The resource that owns the locations collection, if applicable.
Source

pub fn locations_unenroll_data_sources( &self, request: UnenrollDataSourcesRequest, name: &str, ) -> ProjectLocationUnenrollDataSourceCall<'a, C>

Create a builder to help you perform the following task:

Unenroll data sources in a user project. This allows users to remove transfer configurations for these data sources. They will no longer appear in the ListDataSources RPC and will also no longer appear in the BigQuery UI. Data transfers configurations of unenrolled data sources will not be scheduled.

§Arguments
  • request - No description provided.
  • name - Required. The name of the project resource in the form: projects/{project_id}
Source

pub fn transfer_configs_runs_transfer_logs_list( &self, parent: &str, ) -> ProjectTransferConfigRunTransferLogListCall<'a, C>

Create a builder to help you perform the following task:

Returns log messages for the transfer run.

§Arguments
  • parent - Required. Transfer run name. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id}/runs/{run_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}
Source

pub fn transfer_configs_runs_delete( &self, name: &str, ) -> ProjectTransferConfigRunDeleteCall<'a, C>

Create a builder to help you perform the following task:

Deletes the specified transfer run.

§Arguments
  • name - Required. The name of the resource requested. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id}/runs/{run_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}
Source

pub fn transfer_configs_runs_get( &self, name: &str, ) -> ProjectTransferConfigRunGetCall<'a, C>

Create a builder to help you perform the following task:

Returns information about the particular transfer run.

§Arguments
  • name - Required. The name of the resource requested. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id}/runs/{run_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}
Source

pub fn transfer_configs_runs_list( &self, parent: &str, ) -> ProjectTransferConfigRunListCall<'a, C>

Create a builder to help you perform the following task:

Returns information about running and completed transfer runs.

§Arguments
  • parent - Required. Name of transfer configuration for which transfer runs should be retrieved. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}
Source

pub fn transfer_configs_create( &self, request: TransferConfig, parent: &str, ) -> ProjectTransferConfigCreateCall<'a, C>

Create a builder to help you perform the following task:

Creates a new data transfer configuration.

§Arguments
  • request - No description provided.
  • parent - Required. The BigQuery project id where the transfer configuration should be created. Must be in the format projects/{project_id}/locations/{location_id} or projects/{project_id}. If specified location and location of the destination bigquery dataset do not match - the request will fail.
Source

pub fn transfer_configs_delete( &self, name: &str, ) -> ProjectTransferConfigDeleteCall<'a, C>

Create a builder to help you perform the following task:

Deletes a data transfer configuration, including any associated transfer runs and logs.

§Arguments
  • name - Required. The name of the resource to delete. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}
Source

pub fn transfer_configs_get( &self, name: &str, ) -> ProjectTransferConfigGetCall<'a, C>

Create a builder to help you perform the following task:

Returns information about a data transfer config.

§Arguments
  • name - Required. The name of the resource requested. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}
Source

pub fn transfer_configs_list( &self, parent: &str, ) -> ProjectTransferConfigListCall<'a, C>

Create a builder to help you perform the following task:

Returns information about all transfer configs owned by a project in the specified location.

§Arguments
  • parent - Required. The BigQuery project id for which transfer configs should be returned. If you are using the regionless method, the location must be US and parent should be in the following form: * projects/{project_id} If you are using the regionalized method, parentshould be in the following form: *projects/{project_id}/locations/{location_id}`
Source

pub fn transfer_configs_patch( &self, request: TransferConfig, name: &str, ) -> ProjectTransferConfigPatchCall<'a, C>

Create a builder to help you perform the following task:

Updates a data transfer configuration. All fields must be set, even if they are not updated.

§Arguments
  • request - No description provided.
  • name - Identifier. The resource name of the transfer config. Transfer config names have the form either projects/{project_id}/locations/{region}/transferConfigs/{config_id} or projects/{project_id}/transferConfigs/{config_id}, where config_id is usually a UUID, even though it is not guaranteed or required. The name is ignored when creating a transfer config.
Source

pub fn transfer_configs_schedule_runs( &self, request: ScheduleTransferRunsRequest, parent: &str, ) -> ProjectTransferConfigScheduleRunCall<'a, C>

Create a builder to help you perform the following task:

Creates transfer runs for a time range [start_time, end_time]. For each date - or whatever granularity the data source supports - in the range, one transfer run is created. Note that runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns instead.

§Arguments
  • request - No description provided.
  • parent - Required. Transfer configuration name. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}
Source

pub fn transfer_configs_start_manual_runs( &self, request: StartManualTransferRunsRequest, parent: &str, ) -> ProjectTransferConfigStartManualRunCall<'a, C>

Create a builder to help you perform the following task:

Manually initiates transfer runs. You can schedule these runs in two ways: 1. For a specific point in time using the ‘requested_run_time’ parameter. 2. For a period between ‘start_time’ (inclusive) and ‘end_time’ (exclusive). If scheduling a single run, it is set to execute immediately (schedule_time equals the current time). When scheduling multiple runs within a time range, the first run starts now, and subsequent runs are delayed by 15 seconds each.

§Arguments
  • request - No description provided.
  • parent - Required. Transfer configuration name. If you are using the regionless method, the location must be US and the name should be in the following form: * projects/{project_id}/transferConfigs/{config_id} If you are using the regionalized method, the name should be in the following form: * projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}
Source

pub fn enroll_data_sources( &self, request: EnrollDataSourcesRequest, name: &str, ) -> ProjectEnrollDataSourceCall<'a, C>

Create a builder to help you perform the following task:

Enroll data sources in a user project. This allows users to create transfer configurations for these data sources. They will also appear in the ListDataSources RPC and as such, will appear in the BigQuery UI, and the documents can be found in the public guide for BigQuery Web UI and Data Transfer Service.

§Arguments
  • request - No description provided.
  • name - Required. The name of the project resource in the form: projects/{project_id}

Trait Implementations§

Source§

impl<'a, C> MethodsBuilder for ProjectMethods<'a, C>

Auto Trait Implementations§

§

impl<'a, C> Freeze for ProjectMethods<'a, C>

§

impl<'a, C> !RefUnwindSafe for ProjectMethods<'a, C>

§

impl<'a, C> Send for ProjectMethods<'a, C>
where C: Sync,

§

impl<'a, C> Sync for ProjectMethods<'a, C>
where C: Sync,

§

impl<'a, C> Unpin for ProjectMethods<'a, C>

§

impl<'a, C> !UnwindSafe for ProjectMethods<'a, C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more