Skip to content

Commit

Permalink
feat: [bigquery-datatransfer]Add scheduleOptionsV2 and Error fields f…
Browse files Browse the repository at this point in the history
…or TransferConfig (#5722)

* feat:Add scheduleOptionsV2 and Error fields for TransferConfig

PiperOrigin-RevId: 680586383

Source-Link: googleapis/googleapis@463b5a6

Source-Link: googleapis/googleapis-gen@68d602f
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGF0cmFuc2Zlci8uT3dsQm90LnlhbWwiLCJoIjoiNjhkNjAyZmNhODZjZmJmNzY1MzYxMmY1MGM1Y2Y5ZTMxMDUwNjVjOSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Oct 3, 2024
1 parent 002d0ba commit 2f97f76
Show file tree
Hide file tree
Showing 5 changed files with 1,553 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/google-cloud-bigquery-datatransfer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
1. [Select or create a Cloud Platform project][projects].
1. [Enable billing for your project][billing].
1. [Enable the Google BigQuery Data Transfer Service API][enable_api].
1. [Set up authentication with a service account][auth] so you can access the
1. [Set up authentication][auth] so you can access the
API from your local workstation.

### Installing the client library
Expand Down Expand Up @@ -189,4 +189,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=bigquerydatatransfer.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/getting-started
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,70 @@ message ScheduleOptions {
google.protobuf.Timestamp end_time = 2;
}

// 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.
message ScheduleOptionsV2 {
// Data transfer schedules.
oneof schedule {
// Time based transfer schedule options. This is the default schedule
// option.
TimeBasedSchedule time_based_schedule = 1;

// 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 manual_schedule = 2;

// Event driven transfer schedule options. If set, the transfer will be
// scheduled upon events arrial.
EventDrivenSchedule event_driven_schedule = 3;
}
}

// Options customizing the time based transfer schedule.
// Options are migrated from the original ScheduleOptions message.
message TimeBasedSchedule {
// 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.
string schedule = 1;

// 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.
google.protobuf.Timestamp start_time = 2;

// 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.
google.protobuf.Timestamp end_time = 3;
}

// Options customizing manual transfers schedule.
message ManualSchedule {}

// Options customizing EventDriven transfers schedule.
message EventDrivenSchedule {
// Pub/Sub subscription name used to receive events.
// Only Google Cloud Storage data source support this option.
// Format: projects/{project}/subscriptions/{subscription}
string pubsub_subscription = 1;
}

// Information about a user.
message UserInfo {
// E-mail address of the user.
Expand Down Expand Up @@ -164,6 +228,11 @@ message TransferConfig {
// Options customizing the data transfer schedule.
ScheduleOptions schedule_options = 24;

// 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 schedule_options_v2 = 31;

// 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
Expand Down Expand Up @@ -215,6 +284,10 @@ message TransferConfig {
// 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 encryption_configuration = 28;

// Output only. Error code with detailed information about reason of the
// latest config failure.
google.rpc.Status error = 32 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Represents the encryption configuration for a transfer.
Expand Down
Loading

0 comments on commit 2f97f76

Please sign in to comment.