| // Copyright 2017 Google LLC |
| // |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file or at |
| // https://developers.google.com/open-source/licenses/bsd |
| |
| // This is a generated file (see the discoveryapis_generator project). |
| |
| // ignore_for_file: camel_case_types |
| // ignore_for_file: comment_references |
| // ignore_for_file: deprecated_member_use_from_same_package |
| // ignore_for_file: doc_directive_unknown |
| // ignore_for_file: lines_longer_than_80_chars |
| // ignore_for_file: non_constant_identifier_names |
| // ignore_for_file: prefer_interpolation_to_compose_strings |
| // ignore_for_file: unintended_html_in_doc_comment |
| // ignore_for_file: unnecessary_brace_in_string_interps |
| // ignore_for_file: unnecessary_lambdas |
| // ignore_for_file: unnecessary_string_interpolations |
| |
| /// BigQuery Data Transfer API - v1 |
| /// |
| /// Schedule queries or transfer external data from SaaS applications to Google |
| /// BigQuery on a regular basis. |
| /// |
| /// For more information, see <https://cloud.google.com/bigquery-transfer/> |
| /// |
| /// Create an instance of [BigQueryDataTransferApi] to access these resources: |
| /// |
| /// - [ProjectsResource] |
| /// - [ProjectsDataSourcesResource] |
| /// - [ProjectsLocationsResource] |
| /// - [ProjectsLocationsDataSourcesResource] |
| /// - [ProjectsLocationsTransferConfigsResource] |
| /// - [ProjectsLocationsTransferConfigsRunsResource] |
| /// - [ProjectsLocationsTransferConfigsRunsTransferLogsResource] |
| /// - [ProjectsLocationsTransferConfigsTransferResourcesResource] |
| /// - [ProjectsTransferConfigsResource] |
| /// - [ProjectsTransferConfigsRunsResource] |
| /// - [ProjectsTransferConfigsRunsTransferLogsResource] |
| /// - [ProjectsTransferConfigsTransferResourcesResource] |
| library; |
| |
| import 'dart:async' as async; |
| import 'dart:convert' as convert; |
| import 'dart:core' as core; |
| |
| import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| import 'package:http/http.dart' as http; |
| |
| import '../shared.dart'; |
| import '../src/user_agent.dart'; |
| |
| export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
| show ApiRequestError, DetailedApiRequestError; |
| |
| /// Schedule queries or transfer external data from SaaS applications to Google |
| /// BigQuery on a regular basis. |
| class BigQueryDataTransferApi { |
| /// View and manage your data in Google BigQuery and see the email address for |
| /// your Google Account |
| static const bigqueryScope = 'https://www.googleapis.com/auth/bigquery'; |
| |
| /// See, edit, configure, and delete your Google Cloud data and see the email |
| /// address for your Google Account. |
| static const cloudPlatformScope = |
| 'https://www.googleapis.com/auth/cloud-platform'; |
| |
| /// View your data across Google Cloud services and see the email address of |
| /// your Google Account |
| static const cloudPlatformReadOnlyScope = |
| 'https://www.googleapis.com/auth/cloud-platform.read-only'; |
| |
| final commons.ApiRequester _requester; |
| |
| ProjectsResource get projects => ProjectsResource(_requester); |
| |
| BigQueryDataTransferApi( |
| http.Client client, { |
| core.String rootUrl = 'https://bigquerydatatransfer.googleapis.com/', |
| core.String servicePath = '', |
| }) : _requester = commons.ApiRequester( |
| client, |
| rootUrl, |
| servicePath, |
| requestHeaders, |
| ); |
| } |
| |
| class ProjectsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsDataSourcesResource get dataSources => |
| ProjectsDataSourcesResource(_requester); |
| ProjectsLocationsResource get locations => |
| ProjectsLocationsResource(_requester); |
| ProjectsTransferConfigsResource get transferConfigs => |
| ProjectsTransferConfigsResource(_requester); |
| |
| ProjectsResource(commons.ApiRequester client) : _requester = client; |
| |
| /// 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](https://console.cloud.google.com/bigquery), and the |
| /// documents can be found in the public guide for |
| /// [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and |
| /// [Data Transfer Service](https://cloud.google.com/bigquery/docs/working-with-transfers). |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. The name of the project resource in the form: |
| /// `projects/{project_id}` |
| /// Value must have pattern `^projects/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Empty]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Empty> enrollDataSources( |
| EnrollDataSourcesRequest request, |
| core.String name, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':enrollDataSources'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class ProjectsDataSourcesResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsDataSourcesResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Returns true if valid credentials exist for the given data source and |
| /// requesting user. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern `^projects/\[^/\]+/dataSources/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [CheckValidCredsResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<CheckValidCredsResponse> checkValidCreds( |
| CheckValidCredsRequest request, |
| core.String name, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':checkValidCreds'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return CheckValidCredsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Retrieves a supported data source and returns its settings. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern `^projects/\[^/\]+/dataSources/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [DataSource]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<DataSource> get(core.String name, {core.String? $fields}) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return DataSource.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Lists supported data sources and returns their settings. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern `^projects/\[^/\]+$`. |
| /// |
| /// [pageSize] - Page size. The default page size is the maximum value of 1000 |
| /// results. |
| /// |
| /// [pageToken] - Pagination token, which can be used to request a specific |
| /// page of `ListDataSourcesRequest` list results. For multiple-page results, |
| /// `ListDataSourcesResponse` outputs a `next_page` token, which can be used |
| /// as the `page_token` value to request the next page of list results. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListDataSourcesResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ListDataSourcesResponse> list( |
| core.String parent, { |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'pageSize': ?pageSize == null ? null : ['${pageSize}'], |
| 'pageToken': ?pageToken == null ? null : [pageToken], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/dataSources'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListDataSourcesResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ProjectsLocationsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsDataSourcesResource get dataSources => |
| ProjectsLocationsDataSourcesResource(_requester); |
| ProjectsLocationsTransferConfigsResource get transferConfigs => |
| ProjectsLocationsTransferConfigsResource(_requester); |
| |
| ProjectsLocationsResource(commons.ApiRequester client) : _requester = client; |
| |
| /// 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](https://console.cloud.google.com/bigquery), and the |
| /// documents can be found in the public guide for |
| /// [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and |
| /// [Data Transfer Service](https://cloud.google.com/bigquery/docs/working-with-transfers). |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. The name of the project resource in the form: |
| /// `projects/{project_id}` |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Empty]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Empty> enrollDataSources( |
| EnrollDataSourcesRequest request, |
| core.String name, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':enrollDataSources'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Gets information about a location. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Resource name for the location. |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Location]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Location> get(core.String name, {core.String? $fields}) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return Location.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Lists information about the supported locations for this service. |
| /// |
| /// This method lists locations based on the resource scope provided in the |
| /// \[ListLocationsRequest.name\] field: * **Global locations**: If `name` is |
| /// empty, the method lists the public locations available to all projects. * |
| /// **Project-specific locations**: If `name` follows the format |
| /// `projects/{project}`, the method lists locations visible to that specific |
| /// project. This includes public, private, or other project-specific |
| /// locations enabled for the project. For gRPC and client library |
| /// implementations, the resource name is passed as the `name` field. For |
| /// direct service calls, the resource name is incorporated into the request |
| /// path based on the specific service implementation and version. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - The resource that owns the locations collection, if applicable. |
| /// Value must have pattern `^projects/\[^/\]+$`. |
| /// |
| /// [extraLocationTypes] - Optional. Do not use this field. It is unsupported |
| /// and is ignored unless explicitly documented otherwise. This is primarily |
| /// for internal usage. |
| /// |
| /// [filter] - A filter to narrow down results to a preferred subset. The |
| /// filtering language accepts strings like `"displayName=tokyo"`, and is |
| /// documented in more detail in \[AIP-160\](https://google.aip.dev/160). |
| /// |
| /// [pageSize] - The maximum number of results to return. If not set, the |
| /// service selects a default. |
| /// |
| /// [pageToken] - A page token received from the `next_page_token` field in |
| /// the response. Send that page token to receive the subsequent page. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListLocationsResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ListLocationsResponse> list( |
| core.String name, { |
| core.List<core.String>? extraLocationTypes, |
| core.String? filter, |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'extraLocationTypes': ?extraLocationTypes, |
| 'filter': ?filter == null ? null : [filter], |
| 'pageSize': ?pageSize == null ? null : ['${pageSize}'], |
| 'pageToken': ?pageToken == null ? null : [pageToken], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name') + '/locations'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListLocationsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// 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](https://console.cloud.google.com/bigquery). Data transfers |
| /// configurations of unenrolled data sources will not be scheduled. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. The name of the project resource in the form: |
| /// `projects/{project_id}` |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Empty]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Empty> unenrollDataSources( |
| UnenrollDataSourcesRequest request, |
| core.String name, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':unenrollDataSources'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class ProjectsLocationsDataSourcesResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsDataSourcesResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Returns true if valid credentials exist for the given data source and |
| /// requesting user. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/dataSources/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [CheckValidCredsResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<CheckValidCredsResponse> checkValidCreds( |
| CheckValidCredsRequest request, |
| core.String name, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':checkValidCreds'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return CheckValidCredsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Retrieves a supported data source and returns its settings. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/dataSources/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [DataSource]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<DataSource> get(core.String name, {core.String? $fields}) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return DataSource.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Lists supported data sources and returns their settings. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [pageSize] - Page size. The default page size is the maximum value of 1000 |
| /// results. |
| /// |
| /// [pageToken] - Pagination token, which can be used to request a specific |
| /// page of `ListDataSourcesRequest` list results. For multiple-page results, |
| /// `ListDataSourcesResponse` outputs a `next_page` token, which can be used |
| /// as the `page_token` value to request the next page of list results. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListDataSourcesResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ListDataSourcesResponse> list( |
| core.String parent, { |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'pageSize': ?pageSize == null ? null : ['${pageSize}'], |
| 'pageToken': ?pageToken == null ? null : [pageToken], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/dataSources'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListDataSourcesResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ProjectsLocationsTransferConfigsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsTransferConfigsRunsResource get runs => |
| ProjectsLocationsTransferConfigsRunsResource(_requester); |
| ProjectsLocationsTransferConfigsTransferResourcesResource |
| get transferResources => |
| ProjectsLocationsTransferConfigsTransferResourcesResource(_requester); |
| |
| ProjectsLocationsTransferConfigsResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Creates a new data transfer configuration. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [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. |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [authorizationCode] - Deprecated: Authorization code was required when |
| /// `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer |
| /// used in any data sources. Use `version_info` instead. Optional OAuth2 |
| /// authorization code to use with this transfer configuration. This is |
| /// required only if `transferConfig.dataSourceId` is 'youtube_channel' and |
| /// new credentials are needed, as indicated by `CheckValidCreds`. In order to |
| /// obtain authorization_code, make a request to the following URL: |
| /// https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes |
| /// * The client_id is the OAuth client_id of the data source as returned by |
| /// ListDataSources method. * data_source_scopes are the scopes returned by |
| /// ListDataSources method. Note that this should not be set when |
| /// `service_account_name` is used to create the transfer config. |
| /// |
| /// [serviceAccountName] - Optional service account email. If this field is |
| /// set, the transfer config will be created with this service account's |
| /// credentials. It requires that the requesting user calling this API has |
| /// permissions to act as this service account. Note that not all data sources |
| /// support service account credentials when creating a transfer config. For |
| /// the latest list of data sources, read about |
| /// [using service accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). |
| /// |
| /// [versionInfo] - Optional version info. This parameter replaces |
| /// `authorization_code` which is no longer used in any data sources. This is |
| /// required only if `transferConfig.dataSourceId` is 'youtube_channel' *or* |
| /// new credentials are needed, as indicated by `CheckValidCreds`. In order to |
| /// obtain version info, make a request to the following URL: |
| /// https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes |
| /// * The client_id is the OAuth client_id of the data source as returned by |
| /// ListDataSources method. * data_source_scopes are the scopes returned by |
| /// ListDataSources method. Note that this should not be set when |
| /// `service_account_name` is used to create the transfer config. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [TransferConfig]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<TransferConfig> create( |
| TransferConfig request, |
| core.String parent, { |
| core.String? authorizationCode, |
| core.String? serviceAccountName, |
| core.String? versionInfo, |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'authorizationCode': ?authorizationCode == null |
| ? null |
| : [authorizationCode], |
| 'serviceAccountName': ?serviceAccountName == null |
| ? null |
| : [serviceAccountName], |
| 'versionInfo': ?versionInfo == null ? null : [versionInfo], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/transferConfigs'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return TransferConfig.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Deletes a data transfer configuration, including any associated transfer |
| /// runs and logs. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/transferConfigs/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Empty]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Empty> delete(core.String name, {core.String? $fields}) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'DELETE', |
| queryParams: queryParams_, |
| ); |
| return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Returns information about a data transfer config. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/transferConfigs/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [TransferConfig]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<TransferConfig> get( |
| core.String name, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return TransferConfig.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Returns information about all transfer configs owned by a project in the |
| /// specified location. |
| /// |
| /// Request parameters: |
| /// |
| /// [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, |
| /// \`parent\` should be in the following form: * |
| /// \`projects/{project_id}/locations/{location_id}\` |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [dataSourceIds] - When specified, only configurations of requested data |
| /// sources are returned. |
| /// |
| /// [pageSize] - Page size. The default page size is the maximum value of 1000 |
| /// results. |
| /// |
| /// [pageToken] - Pagination token, which can be used to request a specific |
| /// page of `ListTransfersRequest` list results. For multiple-page results, |
| /// `ListTransfersResponse` outputs a `next_page` token, which can be used as |
| /// the `page_token` value to request the next page of list results. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListTransferConfigsResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ListTransferConfigsResponse> list( |
| core.String parent, { |
| core.List<core.String>? dataSourceIds, |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'dataSourceIds': ?dataSourceIds, |
| 'pageSize': ?pageSize == null ? null : ['${pageSize}'], |
| 'pageToken': ?pageToken == null ? null : [pageToken], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/transferConfigs'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListTransferConfigsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Updates a data transfer configuration. |
| /// |
| /// All fields must be set, even if they are not updated. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [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. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/transferConfigs/\[^/\]+$`. |
| /// |
| /// [authorizationCode] - Deprecated: Authorization code was required when |
| /// `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer |
| /// used in any data sources. Use `version_info` instead. Optional OAuth2 |
| /// authorization code to use with this transfer configuration. This is |
| /// required only if `transferConfig.dataSourceId` is 'youtube_channel' and |
| /// new credentials are needed, as indicated by `CheckValidCreds`. In order to |
| /// obtain authorization_code, make a request to the following URL: |
| /// https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes |
| /// * The client_id is the OAuth client_id of the data source as returned by |
| /// ListDataSources method. * data_source_scopes are the scopes returned by |
| /// ListDataSources method. Note that this should not be set when |
| /// `service_account_name` is used to update the transfer config. |
| /// |
| /// [serviceAccountName] - Optional service account email. If this field is |
| /// set, the transfer config will be created with this service account's |
| /// credentials. It requires that the requesting user calling this API has |
| /// permissions to act as this service account. Note that not all data sources |
| /// support service account credentials when creating a transfer config. For |
| /// the latest list of data sources, read about |
| /// [using service accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). |
| /// |
| /// [updateMask] - Required. Required list of fields to be updated in this |
| /// request. |
| /// |
| /// [versionInfo] - Optional version info. This parameter replaces |
| /// `authorization_code` which is no longer used in any data sources. This is |
| /// required only if `transferConfig.dataSourceId` is 'youtube_channel' *or* |
| /// new credentials are needed, as indicated by `CheckValidCreds`. In order to |
| /// obtain version info, make a request to the following URL: |
| /// https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes |
| /// * The client_id is the OAuth client_id of the data source as returned by |
| /// ListDataSources method. * data_source_scopes are the scopes returned by |
| /// ListDataSources method. Note that this should not be set when |
| /// `service_account_name` is used to update the transfer config. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [TransferConfig]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<TransferConfig> patch( |
| TransferConfig request, |
| core.String name, { |
| core.String? authorizationCode, |
| core.String? serviceAccountName, |
| core.String? updateMask, |
| core.String? versionInfo, |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'authorizationCode': ?authorizationCode == null |
| ? null |
| : [authorizationCode], |
| 'serviceAccountName': ?serviceAccountName == null |
| ? null |
| : [serviceAccountName], |
| 'updateMask': ?updateMask == null ? null : [updateMask], |
| 'versionInfo': ?versionInfo == null ? null : [versionInfo], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PATCH', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return TransferConfig.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// 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. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/transferConfigs/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ScheduleTransferRunsResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| @core.Deprecated( |
| 'Not supported. Member documentation may have more information.', |
| ) |
| async.Future<ScheduleTransferRunsResponse> scheduleRuns( |
| ScheduleTransferRunsRequest request, |
| core.String parent, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + ':scheduleRuns'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return ScheduleTransferRunsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// 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. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/transferConfigs/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [StartManualTransferRunsResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<StartManualTransferRunsResponse> startManualRuns( |
| StartManualTransferRunsRequest request, |
| core.String parent, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + ':startManualRuns'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return StartManualTransferRunsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ProjectsLocationsTransferConfigsRunsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsTransferConfigsRunsTransferLogsResource get transferLogs => |
| ProjectsLocationsTransferConfigsRunsTransferLogsResource(_requester); |
| |
| ProjectsLocationsTransferConfigsRunsResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Deletes the specified transfer run. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/transferConfigs/\[^/\]+/runs/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Empty]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Empty> delete(core.String name, {core.String? $fields}) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'DELETE', |
| queryParams: queryParams_, |
| ); |
| return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Returns information about the particular transfer run. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/transferConfigs/\[^/\]+/runs/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [TransferRun]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<TransferRun> get( |
| core.String name, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return TransferRun.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Returns information about running and completed transfer runs. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/transferConfigs/\[^/\]+$`. |
| /// |
| /// [pageSize] - Page size. The default page size is the maximum value of 1000 |
| /// results. |
| /// |
| /// [pageToken] - Pagination token, which can be used to request a specific |
| /// page of `ListTransferRunsRequest` list results. For multiple-page results, |
| /// `ListTransferRunsResponse` outputs a `next_page` token, which can be used |
| /// as the `page_token` value to request the next page of list results. |
| /// |
| /// [runAttempt] - Indicates how run attempts are to be pulled. |
| /// Possible string values are: |
| /// - "RUN_ATTEMPT_UNSPECIFIED" : All runs should be returned. |
| /// - "LATEST" : Only latest run per day should be returned. |
| /// |
| /// [states] - When specified, only transfer runs with requested states are |
| /// returned. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListTransferRunsResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ListTransferRunsResponse> list( |
| core.String parent, { |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? runAttempt, |
| core.List<core.String>? states, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'pageSize': ?pageSize == null ? null : ['${pageSize}'], |
| 'pageToken': ?pageToken == null ? null : [pageToken], |
| 'runAttempt': ?runAttempt == null ? null : [runAttempt], |
| 'states': ?states, |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/runs'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListTransferRunsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ProjectsLocationsTransferConfigsRunsTransferLogsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsTransferConfigsRunsTransferLogsResource( |
| commons.ApiRequester client, |
| ) : _requester = client; |
| |
| /// Returns log messages for the transfer run. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/transferConfigs/\[^/\]+/runs/\[^/\]+$`. |
| /// |
| /// [messageTypes] - Message types to return. If not populated - INFO, WARNING |
| /// and ERROR messages are returned. |
| /// |
| /// [pageSize] - Page size. The default page size is the maximum value of 1000 |
| /// results. |
| /// |
| /// [pageToken] - Pagination token, which can be used to request a specific |
| /// page of `ListTransferLogsRequest` list results. For multiple-page results, |
| /// `ListTransferLogsResponse` outputs a `next_page` token, which can be used |
| /// as the `page_token` value to request the next page of list results. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListTransferLogsResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ListTransferLogsResponse> list( |
| core.String parent, { |
| core.List<core.String>? messageTypes, |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'messageTypes': ?messageTypes, |
| 'pageSize': ?pageSize == null ? null : ['${pageSize}'], |
| 'pageToken': ?pageToken == null ? null : [pageToken], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/transferLogs'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListTransferLogsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ProjectsLocationsTransferConfigsTransferResourcesResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsTransferConfigsTransferResourcesResource( |
| commons.ApiRequester client, |
| ) : _requester = client; |
| |
| /// Returns a transfer resource. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. The name of the transfer resource in the form of: * |
| /// `projects/{project}/transferConfigs/{transfer_config}/transferResources/{transfer_resource}` |
| /// * |
| /// `projects/{project}/locations/{location}/transferConfigs/{transfer_config}/transferResources/{transfer_resource}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/transferConfigs/\[^/\]+/transferResources/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [TransferResource]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<TransferResource> get( |
| core.String name, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return TransferResource.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Returns information about transfer resources. |
| /// |
| /// Request parameters: |
| /// |
| /// [parent] - Required. Name of transfer configuration for which transfer |
| /// resources should be retrieved. The name should be in one of the following |
| /// forms: * `projects/{project}/transferConfigs/{transfer_config}` * |
| /// `projects/{project}/locations/{location_id}/transferConfigs/{transfer_config}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/transferConfigs/\[^/\]+$`. |
| /// |
| /// [filter] - Optional. Filter for the transfer resources. Currently |
| /// supported filters include: * Resource name: `name` - Wildcard supported * |
| /// Resource type: `type` * Resource destination: `destination` * Latest |
| /// resource state: `latest_status_detail.state` * Last update time: |
| /// `update_time` - RFC-3339 format * Parent table name: |
| /// `hierarchy_detail.partition_detail.table` Multiple filters can be applied |
| /// using the `AND/OR` operator. Examples: * `name="*123" AND (type="TABLE" OR |
| /// latest_status_detail.state="SUCCEEDED")` * `update_time >= |
| /// "2012-04-21T11:30:00-04:00"` * `hierarchy_detail.partition_detail.table = |
| /// "table1"` |
| /// |
| /// [pageSize] - Optional. The maximum number of transfer resources to return. |
| /// The maximum value is 1000; values above 1000 will be coerced to 1000. The |
| /// default page size is the maximum value of 1000 results. |
| /// |
| /// [pageToken] - Optional. A page token, received from a previous |
| /// `ListTransferResources` call. Provide this to retrieve the subsequent |
| /// page. When paginating, all other parameters provided to |
| /// `ListTransferResources` must match the call that provided the page token. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListTransferResourcesResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ListTransferResourcesResponse> list( |
| core.String parent, { |
| core.String? filter, |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'filter': ?filter == null ? null : [filter], |
| 'pageSize': ?pageSize == null ? null : ['${pageSize}'], |
| 'pageToken': ?pageToken == null ? null : [pageToken], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/transferResources'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListTransferResourcesResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ProjectsTransferConfigsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsTransferConfigsRunsResource get runs => |
| ProjectsTransferConfigsRunsResource(_requester); |
| ProjectsTransferConfigsTransferResourcesResource get transferResources => |
| ProjectsTransferConfigsTransferResourcesResource(_requester); |
| |
| ProjectsTransferConfigsResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Creates a new data transfer configuration. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [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. |
| /// Value must have pattern `^projects/\[^/\]+$`. |
| /// |
| /// [authorizationCode] - Deprecated: Authorization code was required when |
| /// `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer |
| /// used in any data sources. Use `version_info` instead. Optional OAuth2 |
| /// authorization code to use with this transfer configuration. This is |
| /// required only if `transferConfig.dataSourceId` is 'youtube_channel' and |
| /// new credentials are needed, as indicated by `CheckValidCreds`. In order to |
| /// obtain authorization_code, make a request to the following URL: |
| /// https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes |
| /// * The client_id is the OAuth client_id of the data source as returned by |
| /// ListDataSources method. * data_source_scopes are the scopes returned by |
| /// ListDataSources method. Note that this should not be set when |
| /// `service_account_name` is used to create the transfer config. |
| /// |
| /// [serviceAccountName] - Optional service account email. If this field is |
| /// set, the transfer config will be created with this service account's |
| /// credentials. It requires that the requesting user calling this API has |
| /// permissions to act as this service account. Note that not all data sources |
| /// support service account credentials when creating a transfer config. For |
| /// the latest list of data sources, read about |
| /// [using service accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). |
| /// |
| /// [versionInfo] - Optional version info. This parameter replaces |
| /// `authorization_code` which is no longer used in any data sources. This is |
| /// required only if `transferConfig.dataSourceId` is 'youtube_channel' *or* |
| /// new credentials are needed, as indicated by `CheckValidCreds`. In order to |
| /// obtain version info, make a request to the following URL: |
| /// https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes |
| /// * The client_id is the OAuth client_id of the data source as returned by |
| /// ListDataSources method. * data_source_scopes are the scopes returned by |
| /// ListDataSources method. Note that this should not be set when |
| /// `service_account_name` is used to create the transfer config. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [TransferConfig]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<TransferConfig> create( |
| TransferConfig request, |
| core.String parent, { |
| core.String? authorizationCode, |
| core.String? serviceAccountName, |
| core.String? versionInfo, |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'authorizationCode': ?authorizationCode == null |
| ? null |
| : [authorizationCode], |
| 'serviceAccountName': ?serviceAccountName == null |
| ? null |
| : [serviceAccountName], |
| 'versionInfo': ?versionInfo == null ? null : [versionInfo], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/transferConfigs'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return TransferConfig.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Deletes a data transfer configuration, including any associated transfer |
| /// runs and logs. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern `^projects/\[^/\]+/transferConfigs/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Empty]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Empty> delete(core.String name, {core.String? $fields}) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'DELETE', |
| queryParams: queryParams_, |
| ); |
| return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Returns information about a data transfer config. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern `^projects/\[^/\]+/transferConfigs/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [TransferConfig]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<TransferConfig> get( |
| core.String name, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return TransferConfig.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Returns information about all transfer configs owned by a project in the |
| /// specified location. |
| /// |
| /// Request parameters: |
| /// |
| /// [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, |
| /// \`parent\` should be in the following form: * |
| /// \`projects/{project_id}/locations/{location_id}\` |
| /// Value must have pattern `^projects/\[^/\]+$`. |
| /// |
| /// [dataSourceIds] - When specified, only configurations of requested data |
| /// sources are returned. |
| /// |
| /// [pageSize] - Page size. The default page size is the maximum value of 1000 |
| /// results. |
| /// |
| /// [pageToken] - Pagination token, which can be used to request a specific |
| /// page of `ListTransfersRequest` list results. For multiple-page results, |
| /// `ListTransfersResponse` outputs a `next_page` token, which can be used as |
| /// the `page_token` value to request the next page of list results. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListTransferConfigsResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ListTransferConfigsResponse> list( |
| core.String parent, { |
| core.List<core.String>? dataSourceIds, |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'dataSourceIds': ?dataSourceIds, |
| 'pageSize': ?pageSize == null ? null : ['${pageSize}'], |
| 'pageToken': ?pageToken == null ? null : [pageToken], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/transferConfigs'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListTransferConfigsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Updates a data transfer configuration. |
| /// |
| /// All fields must be set, even if they are not updated. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [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. |
| /// Value must have pattern `^projects/\[^/\]+/transferConfigs/\[^/\]+$`. |
| /// |
| /// [authorizationCode] - Deprecated: Authorization code was required when |
| /// `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer |
| /// used in any data sources. Use `version_info` instead. Optional OAuth2 |
| /// authorization code to use with this transfer configuration. This is |
| /// required only if `transferConfig.dataSourceId` is 'youtube_channel' and |
| /// new credentials are needed, as indicated by `CheckValidCreds`. In order to |
| /// obtain authorization_code, make a request to the following URL: |
| /// https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes |
| /// * The client_id is the OAuth client_id of the data source as returned by |
| /// ListDataSources method. * data_source_scopes are the scopes returned by |
| /// ListDataSources method. Note that this should not be set when |
| /// `service_account_name` is used to update the transfer config. |
| /// |
| /// [serviceAccountName] - Optional service account email. If this field is |
| /// set, the transfer config will be created with this service account's |
| /// credentials. It requires that the requesting user calling this API has |
| /// permissions to act as this service account. Note that not all data sources |
| /// support service account credentials when creating a transfer config. For |
| /// the latest list of data sources, read about |
| /// [using service accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). |
| /// |
| /// [updateMask] - Required. Required list of fields to be updated in this |
| /// request. |
| /// |
| /// [versionInfo] - Optional version info. This parameter replaces |
| /// `authorization_code` which is no longer used in any data sources. This is |
| /// required only if `transferConfig.dataSourceId` is 'youtube_channel' *or* |
| /// new credentials are needed, as indicated by `CheckValidCreds`. In order to |
| /// obtain version info, make a request to the following URL: |
| /// https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes |
| /// * The client_id is the OAuth client_id of the data source as returned by |
| /// ListDataSources method. * data_source_scopes are the scopes returned by |
| /// ListDataSources method. Note that this should not be set when |
| /// `service_account_name` is used to update the transfer config. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [TransferConfig]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<TransferConfig> patch( |
| TransferConfig request, |
| core.String name, { |
| core.String? authorizationCode, |
| core.String? serviceAccountName, |
| core.String? updateMask, |
| core.String? versionInfo, |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'authorizationCode': ?authorizationCode == null |
| ? null |
| : [authorizationCode], |
| 'serviceAccountName': ?serviceAccountName == null |
| ? null |
| : [serviceAccountName], |
| 'updateMask': ?updateMask == null ? null : [updateMask], |
| 'versionInfo': ?versionInfo == null ? null : [versionInfo], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'PATCH', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return TransferConfig.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// 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. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern `^projects/\[^/\]+/transferConfigs/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ScheduleTransferRunsResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| @core.Deprecated( |
| 'Not supported. Member documentation may have more information.', |
| ) |
| async.Future<ScheduleTransferRunsResponse> scheduleRuns( |
| ScheduleTransferRunsRequest request, |
| core.String parent, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + ':scheduleRuns'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return ScheduleTransferRunsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// 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. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern `^projects/\[^/\]+/transferConfigs/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [StartManualTransferRunsResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<StartManualTransferRunsResponse> startManualRuns( |
| StartManualTransferRunsRequest request, |
| core.String parent, { |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + ':startManualRuns'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return StartManualTransferRunsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ProjectsTransferConfigsRunsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsTransferConfigsRunsTransferLogsResource get transferLogs => |
| ProjectsTransferConfigsRunsTransferLogsResource(_requester); |
| |
| ProjectsTransferConfigsRunsResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Deletes the specified transfer run. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/transferConfigs/\[^/\]+/runs/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Empty]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Empty> delete(core.String name, {core.String? $fields}) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'DELETE', |
| queryParams: queryParams_, |
| ); |
| return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Returns information about the particular transfer run. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/transferConfigs/\[^/\]+/runs/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [TransferRun]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<TransferRun> get( |
| core.String name, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return TransferRun.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Returns information about running and completed transfer runs. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern `^projects/\[^/\]+/transferConfigs/\[^/\]+$`. |
| /// |
| /// [pageSize] - Page size. The default page size is the maximum value of 1000 |
| /// results. |
| /// |
| /// [pageToken] - Pagination token, which can be used to request a specific |
| /// page of `ListTransferRunsRequest` list results. For multiple-page results, |
| /// `ListTransferRunsResponse` outputs a `next_page` token, which can be used |
| /// as the `page_token` value to request the next page of list results. |
| /// |
| /// [runAttempt] - Indicates how run attempts are to be pulled. |
| /// Possible string values are: |
| /// - "RUN_ATTEMPT_UNSPECIFIED" : All runs should be returned. |
| /// - "LATEST" : Only latest run per day should be returned. |
| /// |
| /// [states] - When specified, only transfer runs with requested states are |
| /// returned. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListTransferRunsResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ListTransferRunsResponse> list( |
| core.String parent, { |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? runAttempt, |
| core.List<core.String>? states, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'pageSize': ?pageSize == null ? null : ['${pageSize}'], |
| 'pageToken': ?pageToken == null ? null : [pageToken], |
| 'runAttempt': ?runAttempt == null ? null : [runAttempt], |
| 'states': ?states, |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/runs'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListTransferRunsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ProjectsTransferConfigsRunsTransferLogsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsTransferConfigsRunsTransferLogsResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Returns log messages for the transfer run. |
| /// |
| /// Request parameters: |
| /// |
| /// [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}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/transferConfigs/\[^/\]+/runs/\[^/\]+$`. |
| /// |
| /// [messageTypes] - Message types to return. If not populated - INFO, WARNING |
| /// and ERROR messages are returned. |
| /// |
| /// [pageSize] - Page size. The default page size is the maximum value of 1000 |
| /// results. |
| /// |
| /// [pageToken] - Pagination token, which can be used to request a specific |
| /// page of `ListTransferLogsRequest` list results. For multiple-page results, |
| /// `ListTransferLogsResponse` outputs a `next_page` token, which can be used |
| /// as the `page_token` value to request the next page of list results. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListTransferLogsResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ListTransferLogsResponse> list( |
| core.String parent, { |
| core.List<core.String>? messageTypes, |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'messageTypes': ?messageTypes, |
| 'pageSize': ?pageSize == null ? null : ['${pageSize}'], |
| 'pageToken': ?pageToken == null ? null : [pageToken], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/transferLogs'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListTransferLogsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| class ProjectsTransferConfigsTransferResourcesResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsTransferConfigsTransferResourcesResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Returns a transfer resource. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. The name of the transfer resource in the form of: * |
| /// `projects/{project}/transferConfigs/{transfer_config}/transferResources/{transfer_resource}` |
| /// * |
| /// `projects/{project}/locations/{location}/transferConfigs/{transfer_config}/transferResources/{transfer_resource}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/transferConfigs/\[^/\]+/transferResources/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [TransferResource]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<TransferResource> get( |
| core.String name, { |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$name'); |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return TransferResource.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| |
| /// Returns information about transfer resources. |
| /// |
| /// Request parameters: |
| /// |
| /// [parent] - Required. Name of transfer configuration for which transfer |
| /// resources should be retrieved. The name should be in one of the following |
| /// forms: * `projects/{project}/transferConfigs/{transfer_config}` * |
| /// `projects/{project}/locations/{location_id}/transferConfigs/{transfer_config}` |
| /// Value must have pattern `^projects/\[^/\]+/transferConfigs/\[^/\]+$`. |
| /// |
| /// [filter] - Optional. Filter for the transfer resources. Currently |
| /// supported filters include: * Resource name: `name` - Wildcard supported * |
| /// Resource type: `type` * Resource destination: `destination` * Latest |
| /// resource state: `latest_status_detail.state` * Last update time: |
| /// `update_time` - RFC-3339 format * Parent table name: |
| /// `hierarchy_detail.partition_detail.table` Multiple filters can be applied |
| /// using the `AND/OR` operator. Examples: * `name="*123" AND (type="TABLE" OR |
| /// latest_status_detail.state="SUCCEEDED")` * `update_time >= |
| /// "2012-04-21T11:30:00-04:00"` * `hierarchy_detail.partition_detail.table = |
| /// "table1"` |
| /// |
| /// [pageSize] - Optional. The maximum number of transfer resources to return. |
| /// The maximum value is 1000; values above 1000 will be coerced to 1000. The |
| /// default page size is the maximum value of 1000 results. |
| /// |
| /// [pageToken] - Optional. A page token, received from a previous |
| /// `ListTransferResources` call. Provide this to retrieve the subsequent |
| /// page. When paginating, all other parameters provided to |
| /// `ListTransferResources` must match the call that provided the page token. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListTransferResourcesResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ListTransferResourcesResponse> list( |
| core.String parent, { |
| core.String? filter, |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| 'filter': ?filter == null ? null : [filter], |
| 'pageSize': ?pageSize == null ? null : ['${pageSize}'], |
| 'pageToken': ?pageToken == null ? null : [pageToken], |
| 'fields': ?$fields == null ? null : [$fields], |
| }; |
| |
| final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/transferResources'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListTransferResourcesResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>, |
| ); |
| } |
| } |
| |
| /// A request to determine whether the user has valid credentials. |
| /// |
| /// This method is used to limit the number of OAuth popups in the user |
| /// interface. The user id is inferred from the API call context. If the data |
| /// source has the Google+ authorization type, this method returns false, as it |
| /// cannot be determined whether the credentials are already valid merely based |
| /// on the user id. |
| typedef CheckValidCredsRequest = $Empty; |
| |
| /// A response indicating whether the credentials exist and are valid. |
| class CheckValidCredsResponse { |
| /// If set to `true`, the credentials exist and are valid. |
| core.bool? hasValidCreds; |
| |
| CheckValidCredsResponse({this.hasValidCreds}); |
| |
| CheckValidCredsResponse.fromJson(core.Map json_) |
| : this(hasValidCreds: json_['hasValidCreds'] as core.bool?); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final hasValidCreds = this.hasValidCreds; |
| return {'hasValidCreds': ?hasValidCreds}; |
| } |
| } |
| |
| /// Defines the properties and custom parameters for a data source. |
| class DataSource { |
| /// Indicates the type of authorization. |
| /// Possible string values are: |
| /// - "AUTHORIZATION_TYPE_UNSPECIFIED" : Type unspecified. |
| /// - "AUTHORIZATION_CODE" : Use OAuth 2 authorization codes that can be |
| /// exchanged for a refresh token on the backend. |
| /// - "GOOGLE_PLUS_AUTHORIZATION_CODE" : Return an authorization code for a |
| /// given Google+ page that can then be exchanged for a refresh token on the |
| /// backend. |
| /// - "FIRST_PARTY_OAUTH" : Use First Party OAuth. |
| core.String? authorizationType; |
| |
| /// Data source client id which should be used to receive refresh token. |
| core.String? clientId; |
| |
| /// Specifies whether the data source supports automatic data refresh for the |
| /// past few days, and how it's supported. |
| /// |
| /// For some data sources, data might not be complete until a few days later, |
| /// so it's useful to refresh data automatically. |
| /// Possible string values are: |
| /// - "DATA_REFRESH_TYPE_UNSPECIFIED" : The data source won't support data |
| /// auto refresh, which is default value. |
| /// - "SLIDING_WINDOW" : The data source supports data auto refresh, and runs |
| /// will be scheduled for the past few days. Does not allow custom values to |
| /// be set for each transfer config. |
| /// - "CUSTOM_SLIDING_WINDOW" : The data source supports data auto refresh, |
| /// and runs will be scheduled for the past few days. Allows custom values to |
| /// be set for each transfer config. |
| core.String? dataRefreshType; |
| |
| /// Data source id. |
| core.String? dataSourceId; |
| |
| /// Default data refresh window on days. |
| /// |
| /// Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`. |
| core.int? defaultDataRefreshWindowDays; |
| |
| /// Default data transfer schedule. |
| /// |
| /// Examples of valid schedules include: `1st,3rd monday of month 15:30`, |
| /// `every wed,fri of jan,jun 13:15`, and `first sunday of quarter 00:00`. |
| core.String? defaultSchedule; |
| |
| /// User friendly data source description string. |
| core.String? description; |
| |
| /// User friendly data source name. |
| core.String? displayName; |
| |
| /// Url for the help document for this data source. |
| core.String? helpUrl; |
| |
| /// Disables backfilling and manual run scheduling for the data source. |
| core.bool? manualRunsDisabled; |
| |
| /// The minimum interval for scheduler to schedule runs. |
| core.String? minimumScheduleInterval; |
| |
| /// Data source resource name. |
| /// |
| /// Output only. |
| core.String? name; |
| |
| /// Data source parameters. |
| core.List<DataSourceParameter>? parameters; |
| |
| /// Api auth scopes for which refresh token needs to be obtained. |
| /// |
| /// These are scopes needed by a data source to prepare data and ingest them |
| /// into BigQuery, e.g., https://www.googleapis.com/auth/bigquery |
| core.List<core.String>? scopes; |
| |
| /// Specifies whether the data source supports a user defined schedule, or |
| /// operates on the default schedule. |
| /// |
| /// When set to `true`, user can override default schedule. |
| core.bool? supportsCustomSchedule; |
| |
| /// This field has no effect. |
| /// |
| /// Deprecated. |
| @core.Deprecated( |
| 'Not supported. Member documentation may have more information.', |
| ) |
| core.bool? supportsMultipleTransfers; |
| |
| /// This field has no effect. |
| /// |
| /// Deprecated. |
| /// Possible string values are: |
| /// - "TRANSFER_TYPE_UNSPECIFIED" : Invalid or Unknown transfer type |
| /// placeholder. |
| /// - "BATCH" : Batch data transfer. |
| /// - "STREAMING" : Streaming data transfer. Streaming data source currently |
| /// doesn't support multiple transfer configs per project. |
| @core.Deprecated( |
| 'Not supported. Member documentation may have more information.', |
| ) |
| core.String? transferType; |
| |
| /// The number of seconds to wait for an update from the data source before |
| /// the Data Transfer Service marks the transfer as FAILED. |
| core.int? updateDeadlineSeconds; |
| |
| DataSource({ |
| this.authorizationType, |
| this.clientId, |
| this.dataRefreshType, |
| this.dataSourceId, |
| this.defaultDataRefreshWindowDays, |
| this.defaultSchedule, |
| this.description, |
| this.displayName, |
| this.helpUrl, |
| this.manualRunsDisabled, |
| this.minimumScheduleInterval, |
| this.name, |
| this.parameters, |
| this.scopes, |
| this.supportsCustomSchedule, |
| this.supportsMultipleTransfers, |
| this.transferType, |
| this.updateDeadlineSeconds, |
| }); |
| |
| DataSource.fromJson(core.Map json_) |
| : this( |
| authorizationType: json_['authorizationType'] as core.String?, |
| clientId: json_['clientId'] as core.String?, |
| dataRefreshType: json_['dataRefreshType'] as core.String?, |
| dataSourceId: json_['dataSourceId'] as core.String?, |
| defaultDataRefreshWindowDays: |
| json_['defaultDataRefreshWindowDays'] as core.int?, |
| defaultSchedule: json_['defaultSchedule'] as core.String?, |
| description: json_['description'] as core.String?, |
| displayName: json_['displayName'] as core.String?, |
| helpUrl: json_['helpUrl'] as core.String?, |
| manualRunsDisabled: json_['manualRunsDisabled'] as core.bool?, |
| minimumScheduleInterval: |
| json_['minimumScheduleInterval'] as core.String?, |
| name: json_['name'] as core.String?, |
| parameters: (json_['parameters'] as core.List?) |
| ?.map( |
| (value) => DataSourceParameter.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| scopes: (json_['scopes'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| supportsCustomSchedule: json_['supportsCustomSchedule'] as core.bool?, |
| supportsMultipleTransfers: |
| json_['supportsMultipleTransfers'] as core.bool?, |
| transferType: json_['transferType'] as core.String?, |
| updateDeadlineSeconds: json_['updateDeadlineSeconds'] as core.int?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final authorizationType = this.authorizationType; |
| final clientId = this.clientId; |
| final dataRefreshType = this.dataRefreshType; |
| final dataSourceId = this.dataSourceId; |
| final defaultDataRefreshWindowDays = this.defaultDataRefreshWindowDays; |
| final defaultSchedule = this.defaultSchedule; |
| final description = this.description; |
| final displayName = this.displayName; |
| final helpUrl = this.helpUrl; |
| final manualRunsDisabled = this.manualRunsDisabled; |
| final minimumScheduleInterval = this.minimumScheduleInterval; |
| final name = this.name; |
| final parameters = this.parameters; |
| final scopes = this.scopes; |
| final supportsCustomSchedule = this.supportsCustomSchedule; |
| final supportsMultipleTransfers = this.supportsMultipleTransfers; |
| final transferType = this.transferType; |
| final updateDeadlineSeconds = this.updateDeadlineSeconds; |
| return { |
| 'authorizationType': ?authorizationType, |
| 'clientId': ?clientId, |
| 'dataRefreshType': ?dataRefreshType, |
| 'dataSourceId': ?dataSourceId, |
| 'defaultDataRefreshWindowDays': ?defaultDataRefreshWindowDays, |
| 'defaultSchedule': ?defaultSchedule, |
| 'description': ?description, |
| 'displayName': ?displayName, |
| 'helpUrl': ?helpUrl, |
| 'manualRunsDisabled': ?manualRunsDisabled, |
| 'minimumScheduleInterval': ?minimumScheduleInterval, |
| 'name': ?name, |
| 'parameters': ?parameters, |
| 'scopes': ?scopes, |
| 'supportsCustomSchedule': ?supportsCustomSchedule, |
| 'supportsMultipleTransfers': ?supportsMultipleTransfers, |
| 'transferType': ?transferType, |
| 'updateDeadlineSeconds': ?updateDeadlineSeconds, |
| }; |
| } |
| } |
| |
| /// A parameter used to define custom fields in a data source definition. |
| class DataSourceParameter { |
| /// All possible values for the parameter. |
| core.List<core.String>? allowedValues; |
| |
| /// If true, it should not be used in new transfers, and it should not be |
| /// visible to users. |
| core.bool? deprecated; |
| |
| /// Parameter description. |
| core.String? description; |
| |
| /// Parameter display name in the user interface. |
| core.String? displayName; |
| |
| /// This field has no effect. |
| /// |
| /// Deprecated. |
| core.List<DataSourceParameter>? fields; |
| |
| /// Cannot be changed after initial creation. |
| core.bool? immutable; |
| |
| /// For list parameters, the max size of the list. |
| core.String? maxListSize; |
| |
| /// For integer and double values specifies maximum allowed value. |
| core.double? maxValue; |
| |
| /// For integer and double values specifies minimum allowed value. |
| core.double? minValue; |
| |
| /// Parameter identifier. |
| core.String? paramId; |
| |
| /// This field has no effect. |
| /// |
| /// Deprecated. |
| core.bool? recurse; |
| |
| /// This field has no effect. |
| /// |
| /// Deprecated. |
| core.bool? repeated; |
| |
| /// Is parameter required. |
| core.bool? required; |
| |
| /// Parameter type. |
| /// Possible string values are: |
| /// - "TYPE_UNSPECIFIED" : Type unspecified. |
| /// - "STRING" : String parameter. |
| /// - "INTEGER" : Integer parameter (64-bits). Will be serialized to json as |
| /// string. |
| /// - "DOUBLE" : Double precision floating point parameter. |
| /// - "BOOLEAN" : Boolean parameter. |
| /// - "RECORD" : Deprecated. This field has no effect. |
| /// - "PLUS_PAGE" : Page ID for a Google+ Page. |
| /// - "LIST" : List of strings parameter. |
| core.String? type; |
| |
| /// Description of the requirements for this field, in case the user input |
| /// does not fulfill the regex pattern or min/max values. |
| core.String? validationDescription; |
| |
| /// URL to a help document to further explain the naming requirements. |
| core.String? validationHelpUrl; |
| |
| /// Regular expression which can be used for parameter validation. |
| core.String? validationRegex; |
| |
| DataSourceParameter({ |
| this.allowedValues, |
| this.deprecated, |
| this.description, |
| this.displayName, |
| this.fields, |
| this.immutable, |
| this.maxListSize, |
| this.maxValue, |
| this.minValue, |
| this.paramId, |
| this.recurse, |
| this.repeated, |
| this.required, |
| this.type, |
| this.validationDescription, |
| this.validationHelpUrl, |
| this.validationRegex, |
| }); |
| |
| DataSourceParameter.fromJson(core.Map json_) |
| : this( |
| allowedValues: (json_['allowedValues'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| deprecated: json_['deprecated'] as core.bool?, |
| description: json_['description'] as core.String?, |
| displayName: json_['displayName'] as core.String?, |
| fields: (json_['fields'] as core.List?) |
| ?.map( |
| (value) => DataSourceParameter.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| immutable: json_['immutable'] as core.bool?, |
| maxListSize: json_['maxListSize'] as core.String?, |
| maxValue: (json_['maxValue'] as core.num?)?.toDouble(), |
| minValue: (json_['minValue'] as core.num?)?.toDouble(), |
| paramId: json_['paramId'] as core.String?, |
| recurse: json_['recurse'] as core.bool?, |
| repeated: json_['repeated'] as core.bool?, |
| required: json_['required'] as core.bool?, |
| type: json_['type'] as core.String?, |
| validationDescription: json_['validationDescription'] as core.String?, |
| validationHelpUrl: json_['validationHelpUrl'] as core.String?, |
| validationRegex: json_['validationRegex'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final allowedValues = this.allowedValues; |
| final deprecated = this.deprecated; |
| final description = this.description; |
| final displayName = this.displayName; |
| final fields = this.fields; |
| final immutable = this.immutable; |
| final maxListSize = this.maxListSize; |
| final maxValue = this.maxValue; |
| final minValue = this.minValue; |
| final paramId = this.paramId; |
| final recurse = this.recurse; |
| final repeated = this.repeated; |
| final required = this.required; |
| final type = this.type; |
| final validationDescription = this.validationDescription; |
| final validationHelpUrl = this.validationHelpUrl; |
| final validationRegex = this.validationRegex; |
| return { |
| 'allowedValues': ?allowedValues, |
| 'deprecated': ?deprecated, |
| 'description': ?description, |
| 'displayName': ?displayName, |
| 'fields': ?fields, |
| 'immutable': ?immutable, |
| 'maxListSize': ?maxListSize, |
| 'maxValue': ?maxValue, |
| 'minValue': ?minValue, |
| 'paramId': ?paramId, |
| 'recurse': ?recurse, |
| 'repeated': ?repeated, |
| 'required': ?required, |
| 'type': ?type, |
| 'validationDescription': ?validationDescription, |
| 'validationHelpUrl': ?validationHelpUrl, |
| 'validationRegex': ?validationRegex, |
| }; |
| } |
| } |
| |
| /// Represents preferences for sending email notifications for transfer run |
| /// events. |
| class EmailPreferences { |
| /// If true, email notifications will be sent on transfer run failures. |
| core.bool? enableFailureEmail; |
| |
| EmailPreferences({this.enableFailureEmail}); |
| |
| EmailPreferences.fromJson(core.Map json_) |
| : this(enableFailureEmail: json_['enableFailureEmail'] as core.bool?); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final enableFailureEmail = this.enableFailureEmail; |
| return {'enableFailureEmail': ?enableFailureEmail}; |
| } |
| } |
| |
| /// A generic empty message that you can re-use to avoid defining duplicated |
| /// empty messages in your APIs. |
| /// |
| /// A typical example is to use it as the request or the response type of an API |
| /// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns |
| /// (google.protobuf.Empty); } |
| typedef Empty = $Empty; |
| |
| /// Represents the encryption configuration for a transfer. |
| class EncryptionConfiguration { |
| /// The name of the KMS key used for encrypting BigQuery data. |
| core.String? kmsKeyName; |
| |
| EncryptionConfiguration({this.kmsKeyName}); |
| |
| EncryptionConfiguration.fromJson(core.Map json_) |
| : this(kmsKeyName: json_['kmsKeyName'] as core.String?); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final kmsKeyName = this.kmsKeyName; |
| return {'kmsKeyName': ?kmsKeyName}; |
| } |
| } |
| |
| /// A request to enroll a set of data sources so they are visible in the |
| /// BigQuery UI's `Transfer` tab. |
| class EnrollDataSourcesRequest { |
| /// Data sources that are enrolled. |
| /// |
| /// It is required to provide at least one data source id. |
| core.List<core.String>? dataSourceIds; |
| |
| EnrollDataSourcesRequest({this.dataSourceIds}); |
| |
| EnrollDataSourcesRequest.fromJson(core.Map json_) |
| : this( |
| dataSourceIds: (json_['dataSourceIds'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final dataSourceIds = this.dataSourceIds; |
| return {'dataSourceIds': ?dataSourceIds}; |
| } |
| } |
| |
| /// Options customizing EventDriven transfers schedule. |
| class EventDrivenSchedule { |
| /// Pub/Sub subscription name used to receive events. |
| /// |
| /// Only Google Cloud Storage data source support this option. Format: |
| /// projects/{project}/subscriptions/{subscription} |
| core.String? pubsubSubscription; |
| |
| EventDrivenSchedule({this.pubsubSubscription}); |
| |
| EventDrivenSchedule.fromJson(core.Map json_) |
| : this(pubsubSubscription: json_['pubsubSubscription'] as core.String?); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final pubsubSubscription = this.pubsubSubscription; |
| return {'pubsubSubscription': ?pubsubSubscription}; |
| } |
| } |
| |
| /// Details about the hierarchy. |
| class HierarchyDetail { |
| /// Partition details related to hierarchy. |
| /// |
| /// Optional. |
| PartitionDetail? partitionDetail; |
| |
| /// Table details related to hierarchy. |
| /// |
| /// Optional. |
| TableDetail? tableDetail; |
| |
| HierarchyDetail({this.partitionDetail, this.tableDetail}); |
| |
| HierarchyDetail.fromJson(core.Map json_) |
| : this( |
| partitionDetail: json_.containsKey('partitionDetail') |
| ? PartitionDetail.fromJson( |
| json_['partitionDetail'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| tableDetail: json_.containsKey('tableDetail') |
| ? TableDetail.fromJson( |
| json_['tableDetail'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final partitionDetail = this.partitionDetail; |
| final tableDetail = this.tableDetail; |
| return {'partitionDetail': ?partitionDetail, 'tableDetail': ?tableDetail}; |
| } |
| } |
| |
| /// Returns list of supported data sources and their metadata. |
| class ListDataSourcesResponse { |
| /// List of supported data sources and their transfer settings. |
| core.List<DataSource>? dataSources; |
| |
| /// The next-pagination token. |
| /// |
| /// For multiple-page list results, this token can be used as the |
| /// `ListDataSourcesRequest.page_token` to request the next page of list |
| /// results. |
| /// |
| /// Output only. |
| core.String? nextPageToken; |
| |
| ListDataSourcesResponse({this.dataSources, this.nextPageToken}); |
| |
| ListDataSourcesResponse.fromJson(core.Map json_) |
| : this( |
| dataSources: (json_['dataSources'] as core.List?) |
| ?.map( |
| (value) => DataSource.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| nextPageToken: json_['nextPageToken'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final dataSources = this.dataSources; |
| final nextPageToken = this.nextPageToken; |
| return {'dataSources': ?dataSources, 'nextPageToken': ?nextPageToken}; |
| } |
| } |
| |
| /// The response message for Locations.ListLocations. |
| class ListLocationsResponse { |
| /// A list of locations that matches the specified filter in the request. |
| core.List<Location>? locations; |
| |
| /// The standard List next-page token. |
| core.String? nextPageToken; |
| |
| ListLocationsResponse({this.locations, this.nextPageToken}); |
| |
| ListLocationsResponse.fromJson(core.Map json_) |
| : this( |
| locations: (json_['locations'] as core.List?) |
| ?.map( |
| (value) => Location.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| nextPageToken: json_['nextPageToken'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final locations = this.locations; |
| final nextPageToken = this.nextPageToken; |
| return {'locations': ?locations, 'nextPageToken': ?nextPageToken}; |
| } |
| } |
| |
| /// The returned list of pipelines in the project. |
| class ListTransferConfigsResponse { |
| /// The next-pagination token. |
| /// |
| /// For multiple-page list results, this token can be used as the |
| /// `ListTransferConfigsRequest.page_token` to request the next page of list |
| /// results. |
| /// |
| /// Output only. |
| core.String? nextPageToken; |
| |
| /// The stored pipeline transfer configurations. |
| /// |
| /// Output only. |
| core.List<TransferConfig>? transferConfigs; |
| |
| ListTransferConfigsResponse({this.nextPageToken, this.transferConfigs}); |
| |
| ListTransferConfigsResponse.fromJson(core.Map json_) |
| : this( |
| nextPageToken: json_['nextPageToken'] as core.String?, |
| transferConfigs: (json_['transferConfigs'] as core.List?) |
| ?.map( |
| (value) => TransferConfig.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final nextPageToken = this.nextPageToken; |
| final transferConfigs = this.transferConfigs; |
| return { |
| 'nextPageToken': ?nextPageToken, |
| 'transferConfigs': ?transferConfigs, |
| }; |
| } |
| } |
| |
| /// The returned list transfer run messages. |
| class ListTransferLogsResponse { |
| /// The next-pagination token. |
| /// |
| /// For multiple-page list results, this token can be used as the |
| /// `GetTransferRunLogRequest.page_token` to request the next page of list |
| /// results. |
| /// |
| /// Output only. |
| core.String? nextPageToken; |
| |
| /// The stored pipeline transfer messages. |
| /// |
| /// Output only. |
| core.List<TransferMessage>? transferMessages; |
| |
| ListTransferLogsResponse({this.nextPageToken, this.transferMessages}); |
| |
| ListTransferLogsResponse.fromJson(core.Map json_) |
| : this( |
| nextPageToken: json_['nextPageToken'] as core.String?, |
| transferMessages: (json_['transferMessages'] as core.List?) |
| ?.map( |
| (value) => TransferMessage.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final nextPageToken = this.nextPageToken; |
| final transferMessages = this.transferMessages; |
| return { |
| 'nextPageToken': ?nextPageToken, |
| 'transferMessages': ?transferMessages, |
| }; |
| } |
| } |
| |
| /// Response for the `ListTransferResources` RPC. |
| class ListTransferResourcesResponse { |
| /// A token, which can be sent as `page_token` to retrieve the next page. |
| /// |
| /// If this field is omitted, there are no subsequent pages. |
| /// |
| /// Output only. |
| core.String? nextPageToken; |
| |
| /// The transfer resources. |
| /// |
| /// Output only. |
| core.List<TransferResource>? transferResources; |
| |
| ListTransferResourcesResponse({this.nextPageToken, this.transferResources}); |
| |
| ListTransferResourcesResponse.fromJson(core.Map json_) |
| : this( |
| nextPageToken: json_['nextPageToken'] as core.String?, |
| transferResources: (json_['transferResources'] as core.List?) |
| ?.map( |
| (value) => TransferResource.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final nextPageToken = this.nextPageToken; |
| final transferResources = this.transferResources; |
| return { |
| 'nextPageToken': ?nextPageToken, |
| 'transferResources': ?transferResources, |
| }; |
| } |
| } |
| |
| /// The returned list of pipelines in the project. |
| class ListTransferRunsResponse { |
| /// The next-pagination token. |
| /// |
| /// For multiple-page list results, this token can be used as the |
| /// `ListTransferRunsRequest.page_token` to request the next page of list |
| /// results. |
| /// |
| /// Output only. |
| core.String? nextPageToken; |
| |
| /// The stored pipeline transfer runs. |
| /// |
| /// Output only. |
| core.List<TransferRun>? transferRuns; |
| |
| ListTransferRunsResponse({this.nextPageToken, this.transferRuns}); |
| |
| ListTransferRunsResponse.fromJson(core.Map json_) |
| : this( |
| nextPageToken: json_['nextPageToken'] as core.String?, |
| transferRuns: (json_['transferRuns'] as core.List?) |
| ?.map( |
| (value) => TransferRun.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final nextPageToken = this.nextPageToken; |
| final transferRuns = this.transferRuns; |
| return {'nextPageToken': ?nextPageToken, 'transferRuns': ?transferRuns}; |
| } |
| } |
| |
| /// A resource that represents a Google Cloud location. |
| typedef Location = $Location00; |
| |
| /// Options customizing manual transfers schedule. |
| typedef ManualSchedule = $Empty; |
| |
| /// Partition details related to hierarchy. |
| class PartitionDetail { |
| /// Name of the table which has the partitions. |
| /// |
| /// Optional. |
| core.String? table; |
| |
| PartitionDetail({this.table}); |
| |
| PartitionDetail.fromJson(core.Map json_) |
| : this(table: json_['table'] as core.String?); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final table = this.table; |
| return {'table': ?table}; |
| } |
| } |
| |
| /// Options customizing the data transfer schedule. |
| class ScheduleOptions { |
| /// If true, automatic scheduling of data transfer runs for this configuration |
| /// will be disabled. |
| /// |
| /// The runs can be started on ad-hoc basis using StartManualTransferRuns API. |
| /// When automatic scheduling is disabled, the TransferConfig.schedule field |
| /// will be ignored. |
| core.bool? disableAutoScheduling; |
| |
| /// Defines time to stop scheduling transfer runs. |
| /// |
| /// A transfer run cannot be scheduled at or after the end time. The end time |
| /// can be changed at any moment. The time when a data transfer can be |
| /// triggered manually is not limited by this option. |
| core.String? endTime; |
| |
| /// Specifies time to start scheduling transfer runs. |
| /// |
| /// The first run will be scheduled at or after the start time according to a |
| /// recurrence pattern defined in the schedule string. The start time can be |
| /// changed at any moment. The time when a data transfer can be triggered |
| /// manually is not limited by this option. |
| core.String? startTime; |
| |
| ScheduleOptions({this.disableAutoScheduling, this.endTime, this.startTime}); |
| |
| ScheduleOptions.fromJson(core.Map json_) |
| : this( |
| disableAutoScheduling: json_['disableAutoScheduling'] as core.bool?, |
| endTime: json_['endTime'] as core.String?, |
| startTime: json_['startTime'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final disableAutoScheduling = this.disableAutoScheduling; |
| final endTime = this.endTime; |
| final startTime = this.startTime; |
| return { |
| 'disableAutoScheduling': ?disableAutoScheduling, |
| 'endTime': ?endTime, |
| 'startTime': ?startTime, |
| }; |
| } |
| } |
| |
| /// V2 options customizing different types of data transfer schedule. |
| /// |
| /// This field supports existing time-based and manual transfer schedule. Also |
| /// supports Event-Driven transfer schedule. ScheduleOptionsV2 cannot be used |
| /// together with ScheduleOptions/Schedule. |
| class ScheduleOptionsV2 { |
| /// Event driven transfer schedule options. |
| /// |
| /// If set, the transfer will be scheduled upon events arrial. |
| EventDrivenSchedule? eventDrivenSchedule; |
| |
| /// Manual transfer schedule. |
| /// |
| /// If set, the transfer run will not be auto-scheduled by the system, unless |
| /// the client invokes StartManualTransferRuns. This is equivalent to |
| /// disable_auto_scheduling = true. |
| ManualSchedule? manualSchedule; |
| |
| /// Time based transfer schedule options. |
| /// |
| /// This is the default schedule option. |
| TimeBasedSchedule? timeBasedSchedule; |
| |
| ScheduleOptionsV2({ |
| this.eventDrivenSchedule, |
| this.manualSchedule, |
| this.timeBasedSchedule, |
| }); |
| |
| ScheduleOptionsV2.fromJson(core.Map json_) |
| : this( |
| eventDrivenSchedule: json_.containsKey('eventDrivenSchedule') |
| ? EventDrivenSchedule.fromJson( |
| json_['eventDrivenSchedule'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| manualSchedule: json_.containsKey('manualSchedule') |
| ? ManualSchedule.fromJson( |
| json_['manualSchedule'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| timeBasedSchedule: json_.containsKey('timeBasedSchedule') |
| ? TimeBasedSchedule.fromJson( |
| json_['timeBasedSchedule'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final eventDrivenSchedule = this.eventDrivenSchedule; |
| final manualSchedule = this.manualSchedule; |
| final timeBasedSchedule = this.timeBasedSchedule; |
| return { |
| 'eventDrivenSchedule': ?eventDrivenSchedule, |
| 'manualSchedule': ?manualSchedule, |
| 'timeBasedSchedule': ?timeBasedSchedule, |
| }; |
| } |
| } |
| |
| /// A request to schedule transfer runs for a time range. |
| class ScheduleTransferRunsRequest { |
| /// End time of the range of transfer runs. |
| /// |
| /// For example, `"2017-05-30T00:00:00+00:00"`. |
| /// |
| /// Required. |
| core.String? endTime; |
| |
| /// Start time of the range of transfer runs. |
| /// |
| /// For example, `"2017-05-25T00:00:00+00:00"`. |
| /// |
| /// Required. |
| core.String? startTime; |
| |
| ScheduleTransferRunsRequest({this.endTime, this.startTime}); |
| |
| ScheduleTransferRunsRequest.fromJson(core.Map json_) |
| : this( |
| endTime: json_['endTime'] as core.String?, |
| startTime: json_['startTime'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final endTime = this.endTime; |
| final startTime = this.startTime; |
| return {'endTime': ?endTime, 'startTime': ?startTime}; |
| } |
| } |
| |
| /// A response to schedule transfer runs for a time range. |
| class ScheduleTransferRunsResponse { |
| /// The transfer runs that were scheduled. |
| core.List<TransferRun>? runs; |
| |
| ScheduleTransferRunsResponse({this.runs}); |
| |
| ScheduleTransferRunsResponse.fromJson(core.Map json_) |
| : this( |
| runs: (json_['runs'] as core.List?) |
| ?.map( |
| (value) => TransferRun.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final runs = this.runs; |
| return {'runs': ?runs}; |
| } |
| } |
| |
| /// A request to start manual transfer runs. |
| class StartManualTransferRunsRequest { |
| /// A run_time timestamp for historical data files or reports that are |
| /// scheduled to be transferred by the scheduled transfer run. |
| /// |
| /// requested_run_time must be a past time and cannot include future time |
| /// values. |
| core.String? requestedRunTime; |
| |
| /// A time_range start and end timestamp for historical data files or reports |
| /// that are scheduled to be transferred by the scheduled transfer run. |
| /// |
| /// requested_time_range must be a past time and cannot include future time |
| /// values. |
| TimeRange? requestedTimeRange; |
| |
| StartManualTransferRunsRequest({ |
| this.requestedRunTime, |
| this.requestedTimeRange, |
| }); |
| |
| StartManualTransferRunsRequest.fromJson(core.Map json_) |
| : this( |
| requestedRunTime: json_['requestedRunTime'] as core.String?, |
| requestedTimeRange: json_.containsKey('requestedTimeRange') |
| ? TimeRange.fromJson( |
| json_['requestedTimeRange'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final requestedRunTime = this.requestedRunTime; |
| final requestedTimeRange = this.requestedTimeRange; |
| return { |
| 'requestedRunTime': ?requestedRunTime, |
| 'requestedTimeRange': ?requestedTimeRange, |
| }; |
| } |
| } |
| |
| /// A response to start manual transfer runs. |
| class StartManualTransferRunsResponse { |
| /// The transfer runs that were created. |
| core.List<TransferRun>? runs; |
| |
| StartManualTransferRunsResponse({this.runs}); |
| |
| StartManualTransferRunsResponse.fromJson(core.Map json_) |
| : this( |
| runs: (json_['runs'] as core.List?) |
| ?.map( |
| (value) => TransferRun.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final runs = this.runs; |
| return {'runs': ?runs}; |
| } |
| } |
| |
| /// The `Status` type defines a logical error model that is suitable for |
| /// different programming environments, including REST APIs and RPC APIs. |
| /// |
| /// It is used by [gRPC](https://github.com/grpc). Each `Status` message |
| /// contains three pieces of data: error code, error message, and error details. |
| /// You can find out more about this error model and how to work with it in the |
| /// [API Design Guide](https://cloud.google.com/apis/design/errors). |
| typedef Status = $Status00; |
| |
| /// Table details related to hierarchy. |
| class TableDetail { |
| /// Total number of partitions being tracked within the table. |
| /// |
| /// Optional. |
| core.String? partitionCount; |
| |
| TableDetail({this.partitionCount}); |
| |
| TableDetail.fromJson(core.Map json_) |
| : this(partitionCount: json_['partitionCount'] as core.String?); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final partitionCount = this.partitionCount; |
| return {'partitionCount': ?partitionCount}; |
| } |
| } |
| |
| /// Options customizing the time based transfer schedule. |
| /// |
| /// Options are migrated from the original ScheduleOptions message. |
| class TimeBasedSchedule { |
| /// Defines time to stop scheduling transfer runs. |
| /// |
| /// A transfer run cannot be scheduled at or after the end time. The end time |
| /// can be changed at any moment. |
| core.String? endTime; |
| |
| /// Data transfer schedule. |
| /// |
| /// If the data source does not support a custom schedule, this should be |
| /// empty. If it is empty, the default value for the data source will be used. |
| /// The specified times are in UTC. Examples of valid format: `1st,3rd monday |
| /// of month 15:30`, `every wed,fri of jan,jun 13:15`, and `first sunday of |
| /// quarter 00:00`. See more explanation about the format here: |
| /// https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format |
| /// NOTE: The minimum interval time between recurring transfers depends on the |
| /// data source; refer to the documentation for your data source. |
| core.String? schedule; |
| |
| /// Specifies time to start scheduling transfer runs. |
| /// |
| /// The first run will be scheduled at or after the start time according to a |
| /// recurrence pattern defined in the schedule string. The start time can be |
| /// changed at any moment. |
| core.String? startTime; |
| |
| TimeBasedSchedule({this.endTime, this.schedule, this.startTime}); |
| |
| TimeBasedSchedule.fromJson(core.Map json_) |
| : this( |
| endTime: json_['endTime'] as core.String?, |
| schedule: json_['schedule'] as core.String?, |
| startTime: json_['startTime'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final endTime = this.endTime; |
| final schedule = this.schedule; |
| final startTime = this.startTime; |
| return { |
| 'endTime': ?endTime, |
| 'schedule': ?schedule, |
| 'startTime': ?startTime, |
| }; |
| } |
| } |
| |
| /// A specification for a time range, this will request transfer runs with |
| /// run_time between start_time (inclusive) and end_time (exclusive). |
| class TimeRange { |
| /// End time of the range of transfer runs. |
| /// |
| /// For example, `"2017-05-30T00:00:00+00:00"`. The end_time must not be in |
| /// the future. Creates transfer runs where run_time is in the range between |
| /// start_time (inclusive) and end_time (exclusive). |
| core.String? endTime; |
| |
| /// Start time of the range of transfer runs. |
| /// |
| /// For example, `"2017-05-25T00:00:00+00:00"`. The start_time must be |
| /// strictly less than the end_time. Creates transfer runs where run_time is |
| /// in the range between start_time (inclusive) and end_time (exclusive). |
| core.String? startTime; |
| |
| TimeRange({this.endTime, this.startTime}); |
| |
| TimeRange.fromJson(core.Map json_) |
| : this( |
| endTime: json_['endTime'] as core.String?, |
| startTime: json_['startTime'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final endTime = this.endTime; |
| final startTime = this.startTime; |
| return {'endTime': ?endTime, 'startTime': ?startTime}; |
| } |
| } |
| |
| /// Represents a data transfer configuration. |
| /// |
| /// A transfer configuration contains all metadata needed to perform a data |
| /// transfer. For example, `destination_dataset_id` specifies where data should |
| /// be stored. When a new transfer configuration is created, the specified |
| /// `destination_dataset_id` is created when needed and shared with the |
| /// appropriate data source service account. |
| class TransferConfig { |
| /// The number of days to look back to automatically refresh the data. |
| /// |
| /// For example, if `data_refresh_window_days = 10`, then every day BigQuery |
| /// reingests data for \[today-10, today-1\], rather than ingesting data for |
| /// just \[today-1\]. Only valid if the data source supports the feature. Set |
| /// the value to 0 to use the default value. |
| core.int? dataRefreshWindowDays; |
| |
| /// Data source ID. |
| /// |
| /// This cannot be changed once data transfer is created. The full list of |
| /// available data source IDs can be returned through an API call: |
| /// https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list |
| core.String? dataSourceId; |
| |
| /// Region in which BigQuery dataset is located. |
| /// |
| /// Output only. |
| core.String? datasetRegion; |
| |
| /// The BigQuery target dataset id. |
| core.String? destinationDatasetId; |
| |
| /// Is this config disabled. |
| /// |
| /// When set to true, no runs will be scheduled for this transfer config. |
| core.bool? disabled; |
| |
| /// User specified display name for the data transfer. |
| core.String? displayName; |
| |
| /// Email notifications will be sent according to these preferences to the |
| /// email address of the user who owns this transfer config. |
| EmailPreferences? emailPreferences; |
| |
| /// The encryption configuration part. |
| /// |
| /// Currently, it is only used for the optional KMS key name. The BigQuery |
| /// service account of your project must be granted permissions to use the |
| /// key. Read methods will return the key name applied in effect. Write |
| /// methods will apply the key if it is present, or otherwise try to apply |
| /// project default keys if it is absent. |
| EncryptionConfiguration? encryptionConfiguration; |
| |
| /// Error code with detailed information about reason of the latest config |
| /// failure. |
| /// |
| /// Output only. |
| Status? error; |
| |
| /// The classification of the destination table. |
| /// Possible string values are: |
| /// - "MANAGED_TABLE_TYPE_UNSPECIFIED" : Type unspecified. This defaults to |
| /// `NATIVE` table. |
| /// - "NATIVE" : The managed table is a native BigQuery table. This is the |
| /// default value. |
| /// - "BIGLAKE" : The managed table is a BigQuery table for Apache Iceberg |
| /// (formerly BigLake managed tables), with a BigLake configuration. |
| core.String? managedTableType; |
| |
| /// 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. |
| core.String? name; |
| |
| /// Next time when data transfer will run. |
| /// |
| /// Output only. |
| core.String? nextRunTime; |
| |
| /// Pub/Sub topic where notifications will be sent after transfer runs |
| /// associated with this transfer config finish. |
| /// |
| /// The format for specifying a pubsub topic is: |
| /// `projects/{project_id}/topics/{topic_id}` |
| core.String? notificationPubsubTopic; |
| |
| /// Information about the user whose credentials are used to transfer data. |
| /// |
| /// Populated only for `transferConfigs.get` requests. In case the user |
| /// information is not available, this field will not be populated. |
| /// |
| /// Output only. |
| UserInfo? ownerInfo; |
| |
| /// Parameters specific to each data source. |
| /// |
| /// For more information see the bq tab in the 'Setting up a data transfer' |
| /// section for each data source. For example the parameters for Cloud Storage |
| /// transfers are listed here: |
| /// https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq |
| /// |
| /// The values for Object must be JSON objects. It can consist of `num`, |
| /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| core.Map<core.String, core.Object?>? params; |
| |
| /// Data transfer schedule. |
| /// |
| /// If the data source does not support a custom schedule, this should be |
| /// empty. If it is empty, the default value for the data source will be used. |
| /// The specified times are in UTC. Examples of valid format: `1st,3rd monday |
| /// of month 15:30`, `every wed,fri of jan,jun 13:15`, and `first sunday of |
| /// quarter 00:00`. See more explanation about the format here: |
| /// https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format |
| /// NOTE: The minimum interval time between recurring transfers depends on the |
| /// data source; refer to the documentation for your data source. |
| core.String? schedule; |
| |
| /// Options customizing the data transfer schedule. |
| ScheduleOptions? scheduleOptions; |
| |
| /// Options customizing different types of data transfer schedule. |
| /// |
| /// This field replaces "schedule" and "schedule_options" fields. |
| /// ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule. |
| ScheduleOptionsV2? scheduleOptionsV2; |
| |
| /// State of the most recently updated transfer run. |
| /// |
| /// Output only. |
| /// Possible string values are: |
| /// - "TRANSFER_STATE_UNSPECIFIED" : State placeholder (0). |
| /// - "PENDING" : Data transfer is scheduled and is waiting to be picked up by |
| /// data transfer backend (2). |
| /// - "RUNNING" : Data transfer is in progress (3). |
| /// - "SUCCEEDED" : Data transfer completed successfully (4). |
| /// - "FAILED" : Data transfer failed (5). |
| /// - "CANCELLED" : Data transfer is cancelled (6). |
| core.String? state; |
| |
| /// Data transfer modification time. |
| /// |
| /// Ignored by server on input. |
| /// |
| /// Output only. |
| core.String? updateTime; |
| |
| /// Unique ID of the user on whose behalf transfer is done. |
| /// |
| /// Deprecated. |
| core.String? userId; |
| |
| TransferConfig({ |
| this.dataRefreshWindowDays, |
| this.dataSourceId, |
| this.datasetRegion, |
| this.destinationDatasetId, |
| this.disabled, |
| this.displayName, |
| this.emailPreferences, |
| this.encryptionConfiguration, |
| this.error, |
| this.managedTableType, |
| this.name, |
| this.nextRunTime, |
| this.notificationPubsubTopic, |
| this.ownerInfo, |
| this.params, |
| this.schedule, |
| this.scheduleOptions, |
| this.scheduleOptionsV2, |
| this.state, |
| this.updateTime, |
| this.userId, |
| }); |
| |
| TransferConfig.fromJson(core.Map json_) |
| : this( |
| dataRefreshWindowDays: json_['dataRefreshWindowDays'] as core.int?, |
| dataSourceId: json_['dataSourceId'] as core.String?, |
| datasetRegion: json_['datasetRegion'] as core.String?, |
| destinationDatasetId: json_['destinationDatasetId'] as core.String?, |
| disabled: json_['disabled'] as core.bool?, |
| displayName: json_['displayName'] as core.String?, |
| emailPreferences: json_.containsKey('emailPreferences') |
| ? EmailPreferences.fromJson( |
| json_['emailPreferences'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| encryptionConfiguration: json_.containsKey('encryptionConfiguration') |
| ? EncryptionConfiguration.fromJson( |
| json_['encryptionConfiguration'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| error: json_.containsKey('error') |
| ? Status.fromJson( |
| json_['error'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| managedTableType: json_['managedTableType'] as core.String?, |
| name: json_['name'] as core.String?, |
| nextRunTime: json_['nextRunTime'] as core.String?, |
| notificationPubsubTopic: |
| json_['notificationPubsubTopic'] as core.String?, |
| ownerInfo: json_.containsKey('ownerInfo') |
| ? UserInfo.fromJson( |
| json_['ownerInfo'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| params: json_.containsKey('params') |
| ? json_['params'] as core.Map<core.String, core.dynamic> |
| : null, |
| schedule: json_['schedule'] as core.String?, |
| scheduleOptions: json_.containsKey('scheduleOptions') |
| ? ScheduleOptions.fromJson( |
| json_['scheduleOptions'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| scheduleOptionsV2: json_.containsKey('scheduleOptionsV2') |
| ? ScheduleOptionsV2.fromJson( |
| json_['scheduleOptionsV2'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| state: json_['state'] as core.String?, |
| updateTime: json_['updateTime'] as core.String?, |
| userId: json_['userId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final dataRefreshWindowDays = this.dataRefreshWindowDays; |
| final dataSourceId = this.dataSourceId; |
| final datasetRegion = this.datasetRegion; |
| final destinationDatasetId = this.destinationDatasetId; |
| final disabled = this.disabled; |
| final displayName = this.displayName; |
| final emailPreferences = this.emailPreferences; |
| final encryptionConfiguration = this.encryptionConfiguration; |
| final error = this.error; |
| final managedTableType = this.managedTableType; |
| final name = this.name; |
| final nextRunTime = this.nextRunTime; |
| final notificationPubsubTopic = this.notificationPubsubTopic; |
| final ownerInfo = this.ownerInfo; |
| final params = this.params; |
| final schedule = this.schedule; |
| final scheduleOptions = this.scheduleOptions; |
| final scheduleOptionsV2 = this.scheduleOptionsV2; |
| final state = this.state; |
| final updateTime = this.updateTime; |
| final userId = this.userId; |
| return { |
| 'dataRefreshWindowDays': ?dataRefreshWindowDays, |
| 'dataSourceId': ?dataSourceId, |
| 'datasetRegion': ?datasetRegion, |
| 'destinationDatasetId': ?destinationDatasetId, |
| 'disabled': ?disabled, |
| 'displayName': ?displayName, |
| 'emailPreferences': ?emailPreferences, |
| 'encryptionConfiguration': ?encryptionConfiguration, |
| 'error': ?error, |
| 'managedTableType': ?managedTableType, |
| 'name': ?name, |
| 'nextRunTime': ?nextRunTime, |
| 'notificationPubsubTopic': ?notificationPubsubTopic, |
| 'ownerInfo': ?ownerInfo, |
| 'params': ?params, |
| 'schedule': ?schedule, |
| 'scheduleOptions': ?scheduleOptions, |
| 'scheduleOptionsV2': ?scheduleOptionsV2, |
| 'state': ?state, |
| 'updateTime': ?updateTime, |
| 'userId': ?userId, |
| }; |
| } |
| } |
| |
| /// Represents a user facing message for a particular data transfer run. |
| class TransferMessage { |
| /// Message text. |
| core.String? messageText; |
| |
| /// Time when message was logged. |
| core.String? messageTime; |
| |
| /// Message severity. |
| /// Possible string values are: |
| /// - "MESSAGE_SEVERITY_UNSPECIFIED" : No severity specified. |
| /// - "INFO" : Informational message. |
| /// - "WARNING" : Warning message. |
| /// - "ERROR" : Error message. |
| core.String? severity; |
| |
| TransferMessage({this.messageText, this.messageTime, this.severity}); |
| |
| TransferMessage.fromJson(core.Map json_) |
| : this( |
| messageText: json_['messageText'] as core.String?, |
| messageTime: json_['messageTime'] as core.String?, |
| severity: json_['severity'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final messageText = this.messageText; |
| final messageTime = this.messageTime; |
| final severity = this.severity; |
| return { |
| 'messageText': ?messageText, |
| 'messageTime': ?messageTime, |
| 'severity': ?severity, |
| }; |
| } |
| } |
| |
| /// Resource (table/partition) that is being transferred. |
| class TransferResource { |
| /// Resource destination. |
| /// |
| /// Optional. |
| /// Possible string values are: |
| /// - "RESOURCE_DESTINATION_UNSPECIFIED" : Default value. |
| /// - "RESOURCE_DESTINATION_BIGQUERY" : BigQuery. |
| /// - "RESOURCE_DESTINATION_DATAPROC_METASTORE" : Dataproc Metastore. |
| /// - "RESOURCE_DESTINATION_BIGLAKE_METASTORE" : BigLake Metastore. |
| /// - "RESOURCE_DESTINATION_BIGLAKE_REST_CATALOG" : BigLake REST Catalog. |
| /// - "RESOURCE_DESTINATION_BIGLAKE_HIVE_CATALOG" : BigLake Hive Catalog. |
| core.String? destination; |
| |
| /// Details about the hierarchy. |
| /// |
| /// Optional. |
| HierarchyDetail? hierarchyDetail; |
| |
| /// Run details for the last successful run. |
| /// |
| /// Output only. |
| TransferRunBrief? lastSuccessfulRun; |
| |
| /// Run details for the latest run. |
| /// |
| /// Optional. |
| TransferRunBrief? latestRun; |
| |
| /// Status details for the latest run. |
| /// |
| /// Optional. |
| TransferResourceStatusDetail? latestStatusDetail; |
| |
| /// Identifier. |
| /// |
| /// Resource name. |
| core.String? name; |
| |
| /// Resource type. |
| /// |
| /// Optional. |
| /// Possible string values are: |
| /// - "RESOURCE_TYPE_UNSPECIFIED" : Default value. |
| /// - "RESOURCE_TYPE_TABLE" : Table resource type. |
| /// - "RESOURCE_TYPE_PARTITION" : Partition resource type. |
| core.String? type; |
| |
| /// Time when the resource was last updated. |
| /// |
| /// Output only. |
| core.String? updateTime; |
| |
| TransferResource({ |
| this.destination, |
| this.hierarchyDetail, |
| this.lastSuccessfulRun, |
| this.latestRun, |
| this.latestStatusDetail, |
| this.name, |
| this.type, |
| this.updateTime, |
| }); |
| |
| TransferResource.fromJson(core.Map json_) |
| : this( |
| destination: json_['destination'] as core.String?, |
| hierarchyDetail: json_.containsKey('hierarchyDetail') |
| ? HierarchyDetail.fromJson( |
| json_['hierarchyDetail'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| lastSuccessfulRun: json_.containsKey('lastSuccessfulRun') |
| ? TransferRunBrief.fromJson( |
| json_['lastSuccessfulRun'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| latestRun: json_.containsKey('latestRun') |
| ? TransferRunBrief.fromJson( |
| json_['latestRun'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| latestStatusDetail: json_.containsKey('latestStatusDetail') |
| ? TransferResourceStatusDetail.fromJson( |
| json_['latestStatusDetail'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| name: json_['name'] as core.String?, |
| type: json_['type'] as core.String?, |
| updateTime: json_['updateTime'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final destination = this.destination; |
| final hierarchyDetail = this.hierarchyDetail; |
| final lastSuccessfulRun = this.lastSuccessfulRun; |
| final latestRun = this.latestRun; |
| final latestStatusDetail = this.latestStatusDetail; |
| final name = this.name; |
| final type = this.type; |
| final updateTime = this.updateTime; |
| return { |
| 'destination': ?destination, |
| 'hierarchyDetail': ?hierarchyDetail, |
| 'lastSuccessfulRun': ?lastSuccessfulRun, |
| 'latestRun': ?latestRun, |
| 'latestStatusDetail': ?latestStatusDetail, |
| 'name': ?name, |
| 'type': ?type, |
| 'updateTime': ?updateTime, |
| }; |
| } |
| } |
| |
| /// Status details of the resource being transferred. |
| class TransferResourceStatusDetail { |
| /// Percentage of the transfer completed. |
| /// |
| /// Valid values: 0-100. |
| /// |
| /// Output only. |
| core.double? completedPercentage; |
| |
| /// Transfer error details for the resource. |
| /// |
| /// Optional. |
| Status? error; |
| |
| /// Transfer state of the resource. |
| /// |
| /// Optional. |
| /// Possible string values are: |
| /// - "RESOURCE_TRANSFER_STATE_UNSPECIFIED" : Default value. |
| /// - "RESOURCE_TRANSFER_PENDING" : Resource is waiting to be transferred. |
| /// - "RESOURCE_TRANSFER_RUNNING" : Resource transfer is running. |
| /// - "RESOURCE_TRANSFER_SUCCEEDED" : Resource transfer is a success. |
| /// - "RESOURCE_TRANSFER_FAILED" : Resource transfer failed. |
| /// - "RESOURCE_TRANSFER_CANCELLED" : Resource transfer was cancelled. |
| core.String? state; |
| |
| /// Transfer status summary of the resource. |
| /// |
| /// Optional. |
| TransferStatusSummary? summary; |
| |
| TransferResourceStatusDetail({ |
| this.completedPercentage, |
| this.error, |
| this.state, |
| this.summary, |
| }); |
| |
| TransferResourceStatusDetail.fromJson(core.Map json_) |
| : this( |
| completedPercentage: (json_['completedPercentage'] as core.num?) |
| ?.toDouble(), |
| error: json_.containsKey('error') |
| ? Status.fromJson( |
| json_['error'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| state: json_['state'] as core.String?, |
| summary: json_.containsKey('summary') |
| ? TransferStatusSummary.fromJson( |
| json_['summary'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final completedPercentage = this.completedPercentage; |
| final error = this.error; |
| final state = this.state; |
| final summary = this.summary; |
| return { |
| 'completedPercentage': ?completedPercentage, |
| 'error': ?error, |
| 'state': ?state, |
| 'summary': ?summary, |
| }; |
| } |
| } |
| |
| /// Represents a data transfer run. |
| class TransferRun { |
| /// Data source id. |
| /// |
| /// Output only. |
| core.String? dataSourceId; |
| |
| /// The BigQuery target dataset id. |
| /// |
| /// Output only. |
| core.String? destinationDatasetId; |
| |
| /// Email notifications will be sent according to these preferences to the |
| /// email address of the user who owns the transfer config this run was |
| /// derived from. |
| /// |
| /// Output only. |
| EmailPreferences? emailPreferences; |
| |
| /// Time when transfer run ended. |
| /// |
| /// Parameter ignored by server for input requests. |
| /// |
| /// Output only. |
| core.String? endTime; |
| |
| /// Status of the transfer run. |
| Status? errorStatus; |
| |
| /// Identifier. |
| /// |
| /// The resource name of the transfer run. Transfer run names have the form |
| /// `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. |
| /// The name is ignored when creating a transfer run. |
| core.String? name; |
| |
| /// Pub/Sub topic where a notification will be sent after this transfer run |
| /// finishes. |
| /// |
| /// The format for specifying a pubsub topic is: |
| /// `projects/{project_id}/topics/{topic_id}` |
| /// |
| /// Output only. |
| core.String? notificationPubsubTopic; |
| |
| /// Parameters specific to each data source. |
| /// |
| /// For more information see the bq tab in the 'Setting up a data transfer' |
| /// section for each data source. For example the parameters for Cloud Storage |
| /// transfers are listed here: |
| /// https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq |
| /// |
| /// Output only. |
| /// |
| /// The values for Object must be JSON objects. It can consist of `num`, |
| /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| core.Map<core.String, core.Object?>? params; |
| |
| /// For batch transfer runs, specifies the date and time of the data should be |
| /// ingested. |
| core.String? runTime; |
| |
| /// Describes the schedule of this transfer run if it was created as part of a |
| /// regular schedule. |
| /// |
| /// For batch transfer runs that are scheduled manually, this is empty. NOTE: |
| /// the system might choose to delay the schedule depending on the current |
| /// load, so `schedule_time` doesn't always match this. |
| /// |
| /// Output only. |
| core.String? schedule; |
| |
| /// Minimum time after which a transfer run can be started. |
| core.String? scheduleTime; |
| |
| /// Time when transfer run was started. |
| /// |
| /// Parameter ignored by server for input requests. |
| /// |
| /// Output only. |
| core.String? startTime; |
| |
| /// Data transfer run state. |
| /// |
| /// Ignored for input requests. |
| /// Possible string values are: |
| /// - "TRANSFER_STATE_UNSPECIFIED" : State placeholder (0). |
| /// - "PENDING" : Data transfer is scheduled and is waiting to be picked up by |
| /// data transfer backend (2). |
| /// - "RUNNING" : Data transfer is in progress (3). |
| /// - "SUCCEEDED" : Data transfer completed successfully (4). |
| /// - "FAILED" : Data transfer failed (5). |
| /// - "CANCELLED" : Data transfer is cancelled (6). |
| core.String? state; |
| |
| /// Last time the data transfer run state was updated. |
| /// |
| /// Output only. |
| core.String? updateTime; |
| |
| /// Unique ID of the user on whose behalf transfer is done. |
| /// |
| /// Deprecated. |
| core.String? userId; |
| |
| TransferRun({ |
| this.dataSourceId, |
| this.destinationDatasetId, |
| this.emailPreferences, |
| this.endTime, |
| this.errorStatus, |
| this.name, |
| this.notificationPubsubTopic, |
| this.params, |
| this.runTime, |
| this.schedule, |
| this.scheduleTime, |
| this.startTime, |
| this.state, |
| this.updateTime, |
| this.userId, |
| }); |
| |
| TransferRun.fromJson(core.Map json_) |
| : this( |
| dataSourceId: json_['dataSourceId'] as core.String?, |
| destinationDatasetId: json_['destinationDatasetId'] as core.String?, |
| emailPreferences: json_.containsKey('emailPreferences') |
| ? EmailPreferences.fromJson( |
| json_['emailPreferences'] |
| as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| endTime: json_['endTime'] as core.String?, |
| errorStatus: json_.containsKey('errorStatus') |
| ? Status.fromJson( |
| json_['errorStatus'] as core.Map<core.String, core.dynamic>, |
| ) |
| : null, |
| name: json_['name'] as core.String?, |
| notificationPubsubTopic: |
| json_['notificationPubsubTopic'] as core.String?, |
| params: json_.containsKey('params') |
| ? json_['params'] as core.Map<core.String, core.dynamic> |
| : null, |
| runTime: json_['runTime'] as core.String?, |
| schedule: json_['schedule'] as core.String?, |
| scheduleTime: json_['scheduleTime'] as core.String?, |
| startTime: json_['startTime'] as core.String?, |
| state: json_['state'] as core.String?, |
| updateTime: json_['updateTime'] as core.String?, |
| userId: json_['userId'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final dataSourceId = this.dataSourceId; |
| final destinationDatasetId = this.destinationDatasetId; |
| final emailPreferences = this.emailPreferences; |
| final endTime = this.endTime; |
| final errorStatus = this.errorStatus; |
| final name = this.name; |
| final notificationPubsubTopic = this.notificationPubsubTopic; |
| final params = this.params; |
| final runTime = this.runTime; |
| final schedule = this.schedule; |
| final scheduleTime = this.scheduleTime; |
| final startTime = this.startTime; |
| final state = this.state; |
| final updateTime = this.updateTime; |
| final userId = this.userId; |
| return { |
| 'dataSourceId': ?dataSourceId, |
| 'destinationDatasetId': ?destinationDatasetId, |
| 'emailPreferences': ?emailPreferences, |
| 'endTime': ?endTime, |
| 'errorStatus': ?errorStatus, |
| 'name': ?name, |
| 'notificationPubsubTopic': ?notificationPubsubTopic, |
| 'params': ?params, |
| 'runTime': ?runTime, |
| 'schedule': ?schedule, |
| 'scheduleTime': ?scheduleTime, |
| 'startTime': ?startTime, |
| 'state': ?state, |
| 'updateTime': ?updateTime, |
| 'userId': ?userId, |
| }; |
| } |
| } |
| |
| /// Basic information about a transfer run. |
| class TransferRunBrief { |
| /// Run URI. |
| /// |
| /// The format must be: |
| /// `projects/{project}/locations/{location}/transferConfigs/{transfer_config}/run/{run}` |
| /// |
| /// Optional. |
| core.String? run; |
| |
| /// Start time of the transfer run. |
| /// |
| /// Optional. |
| core.String? startTime; |
| |
| TransferRunBrief({this.run, this.startTime}); |
| |
| TransferRunBrief.fromJson(core.Map json_) |
| : this( |
| run: json_['run'] as core.String?, |
| startTime: json_['startTime'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final run = this.run; |
| final startTime = this.startTime; |
| return {'run': ?run, 'startTime': ?startTime}; |
| } |
| } |
| |
| /// Metrics for tracking the transfer status. |
| class TransferStatusMetric { |
| /// Number of units transferred successfully. |
| /// |
| /// Optional. |
| core.String? completed; |
| |
| /// Number of units that failed to transfer. |
| /// |
| /// Optional. |
| core.String? failed; |
| |
| /// Number of units pending transfer. |
| /// |
| /// Optional. |
| core.String? pending; |
| |
| /// Total number of units for the transfer. |
| /// |
| /// Optional. |
| core.String? total; |
| |
| /// Unit for measuring progress (e.g., BYTES). |
| /// |
| /// Optional. |
| /// Possible string values are: |
| /// - "TRANSFER_STATUS_UNIT_UNSPECIFIED" : Default value. |
| /// - "TRANSFER_STATUS_UNIT_BYTES" : Bytes. |
| /// - "TRANSFER_STATUS_UNIT_OBJECTS" : Objects. |
| core.String? unit; |
| |
| TransferStatusMetric({ |
| this.completed, |
| this.failed, |
| this.pending, |
| this.total, |
| this.unit, |
| }); |
| |
| TransferStatusMetric.fromJson(core.Map json_) |
| : this( |
| completed: json_['completed'] as core.String?, |
| failed: json_['failed'] as core.String?, |
| pending: json_['pending'] as core.String?, |
| total: json_['total'] as core.String?, |
| unit: json_['unit'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final completed = this.completed; |
| final failed = this.failed; |
| final pending = this.pending; |
| final total = this.total; |
| final unit = this.unit; |
| return { |
| 'completed': ?completed, |
| 'failed': ?failed, |
| 'pending': ?pending, |
| 'total': ?total, |
| 'unit': ?unit, |
| }; |
| } |
| } |
| |
| /// Status summary of the resource being transferred. |
| class TransferStatusSummary { |
| /// List of transfer status metrics. |
| /// |
| /// Optional. |
| core.List<TransferStatusMetric>? metrics; |
| |
| /// Input only. |
| /// |
| /// Unit based on which transfer status progress should be calculated. |
| /// Possible string values are: |
| /// - "TRANSFER_STATUS_UNIT_UNSPECIFIED" : Default value. |
| /// - "TRANSFER_STATUS_UNIT_BYTES" : Bytes. |
| /// - "TRANSFER_STATUS_UNIT_OBJECTS" : Objects. |
| core.String? progressUnit; |
| |
| TransferStatusSummary({this.metrics, this.progressUnit}); |
| |
| TransferStatusSummary.fromJson(core.Map json_) |
| : this( |
| metrics: (json_['metrics'] as core.List?) |
| ?.map( |
| (value) => TransferStatusMetric.fromJson( |
| value as core.Map<core.String, core.dynamic>, |
| ), |
| ) |
| .toList(), |
| progressUnit: json_['progressUnit'] as core.String?, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final metrics = this.metrics; |
| final progressUnit = this.progressUnit; |
| return {'metrics': ?metrics, 'progressUnit': ?progressUnit}; |
| } |
| } |
| |
| /// A request to unenroll a set of data sources so they are no longer visible in |
| /// the BigQuery UI's `Transfer` tab. |
| class UnenrollDataSourcesRequest { |
| /// Data sources that are unenrolled. |
| /// |
| /// It is required to provide at least one data source id. |
| core.List<core.String>? dataSourceIds; |
| |
| UnenrollDataSourcesRequest({this.dataSourceIds}); |
| |
| UnenrollDataSourcesRequest.fromJson(core.Map json_) |
| : this( |
| dataSourceIds: (json_['dataSourceIds'] as core.List?) |
| ?.map((value) => value as core.String) |
| .toList(), |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final dataSourceIds = this.dataSourceIds; |
| return {'dataSourceIds': ?dataSourceIds}; |
| } |
| } |
| |
| /// Information about a user. |
| class UserInfo { |
| /// E-mail address of the user. |
| core.String? email; |
| |
| UserInfo({this.email}); |
| |
| UserInfo.fromJson(core.Map json_) |
| : this(email: json_['email'] as core.String?); |
| |
| core.Map<core.String, core.dynamic> toJson() { |
| final email = this.email; |
| return {'email': ?email}; |
| } |
| } |