Skip to content

Commit

Permalink
feat: support new proto field options (#252)
Browse files Browse the repository at this point in the history
feat: .d.ts for protos
  • Loading branch information
yoshi-automation authored and sofisl committed Oct 13, 2022
1 parent e2daf62 commit 194f2ba
Show file tree
Hide file tree
Showing 8 changed files with 31,854 additions and 154 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ syntax = "proto3";

package google.cloud.bigquery.datatransfer.v1;

import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";
Expand Down Expand Up @@ -96,6 +97,11 @@ message ScheduleOptions {
// `destination_dataset_id` is created when needed and shared with the
// appropriate data source service account.
message TransferConfig {
option (google.api.resource) = {
type: "bigquerydatatransfer.googleapis.com/TransferConfig"
pattern: "projects/{project}/transferConfigs/{transfer_config}"
};

// The resource name of the transfer config.
// Transfer config names have the form of
// `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`.
Expand All @@ -105,8 +111,11 @@ message TransferConfig {
// required, will be generated for config_id.
string name = 1;

// The BigQuery target dataset id.
string destination_dataset_id = 2;
// The desination of the transfer config.
oneof destination {
// The BigQuery target dataset id.
string destination_dataset_id = 2;
}

// User specified display name for the data transfer.
string display_name = 3;
Expand Down Expand Up @@ -147,23 +156,28 @@ message TransferConfig {
bool disabled = 13;

// Output only. Data transfer modification time. Ignored by server on input.
google.protobuf.Timestamp update_time = 4;
google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Next time when data transfer will run.
google.protobuf.Timestamp next_run_time = 8;
google.protobuf.Timestamp next_run_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. State of the most recently updated transfer run.
TransferState state = 10;
TransferState state = 10 [(google.api.field_behavior) = OUTPUT_ONLY];

// Deprecated. Unique ID of the user on whose behalf transfer is done.
int64 user_id = 11;

// Output only. Region in which BigQuery dataset is located.
string dataset_region = 14;
string dataset_region = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Represents a data transfer run.
message TransferRun {
option (google.api.resource) = {
type: "bigquerydatatransfer.googleapis.com/TransferRun"
pattern: "projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}"
};

// The resource name of the transfer run.
// Transfer run names have the form
// `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`.
Expand All @@ -182,23 +196,26 @@ message TransferRun {

// Output only. Time when transfer run was started.
// Parameter ignored by server for input requests.
google.protobuf.Timestamp start_time = 4;
google.protobuf.Timestamp start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Time when transfer run ended.
// Parameter ignored by server for input requests.
google.protobuf.Timestamp end_time = 5;
google.protobuf.Timestamp end_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Last time the data transfer run state was updated.
google.protobuf.Timestamp update_time = 6;
google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Data transfer specific parameters.
google.protobuf.Struct params = 9;
google.protobuf.Struct params = 9 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The BigQuery target dataset id.
string destination_dataset_id = 2;
// Data transfer destination.
oneof destination {
// Output only. The BigQuery target dataset id.
string destination_dataset_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Output only. Data source id.
string data_source_id = 7;
string data_source_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY];

// Data transfer run state. Ignored for input requests.
TransferState state = 8;
Expand All @@ -211,7 +228,7 @@ message TransferRun {
// 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.
string schedule = 12;
string schedule = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Represents a user facing message for a particular data transfer run.
Expand Down
8,840 changes: 8,840 additions & 0 deletions packages/google-cloud-bigquery-datatransfer/protos/protos.d.ts

Large diffs are not rendered by default.

22,531 changes: 22,531 additions & 0 deletions packages/google-cloud-bigquery-datatransfer/protos/protos.js

Large diffs are not rendered by default.

Loading

0 comments on commit 194f2ba

Please sign in to comment.