Skip to content

Commit

Permalink
feat: Add request_source field and update formatting (#39)
Browse files Browse the repository at this point in the history
* feat: Add request_source field and update formatting

PiperOrigin-RevId: 518330942

Source-Link: googleapis/googleapis@184334d

Source-Link: googleapis/googleapis-gen@1e999b9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWU5OTliOWU1NTY4ODRjOTRlZTJmYjQxMTBhYTMwODdkMGRjOTZiNSJ9

* 🦉 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 Mar 21, 2023
1 parent 8b97120 commit 5615d56
Show file tree
Hide file tree
Showing 10 changed files with 175 additions and 108 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -135,7 +135,8 @@ message MigrationTask {
// Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ,
// Translation_Snowflake2BQ, Translation_Netezza2BQ,
// Translation_AzureSynapse2BQ, Translation_Vertica2BQ,
// Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ.
// Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ,
// Translation_Postgresql2BQ.
string type = 2;

// Output only. The current state of the task.
Expand Down Expand Up @@ -182,6 +183,10 @@ message MigrationSubtask {
// The subtask is paused, i.e., it will not be scheduled. If it was already
// assigned,it might still finish but no new lease renewals will be granted.
PAUSED = 5;

// The subtask is pending a dependency. It will be scheduled once its
// dependencies are done.
PENDING_DEPENDENCY = 6;
}

// Output only. Immutable. The resource name for the migration subtask. The ID
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,13 +29,15 @@ option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2";
// Provides details for errors and the corresponding resources.
message ResourceErrorDetail {
// Required. Information about the resource where the error is located.
google.rpc.ResourceInfo resource_info = 1 [(google.api.field_behavior) = REQUIRED];
google.rpc.ResourceInfo resource_info = 1
[(google.api.field_behavior) = REQUIRED];

// Required. The error details for the resource.
repeated ErrorDetail error_details = 2 [(google.api.field_behavior) = REQUIRED];
repeated ErrorDetail error_details = 2
[(google.api.field_behavior) = REQUIRED];

// Required. How many errors there are in total for the resource. Truncation can be
// indicated by having an `error_count` that is higher than the size of
// Required. How many errors there are in total for the resource. Truncation
// can be indicated by having an `error_count` that is higher than the size of
// `error_details`.
int32 error_count = 3 [(google.api.field_behavior) = REQUIRED];
}
Expand All @@ -52,11 +54,11 @@ message ErrorDetail {

// Holds information about where the error is located.
message ErrorLocation {
// Optional. If applicable, denotes the line where the error occurred. A zero value
// means that there is no line information.
// Optional. If applicable, denotes the line where the error occurred. A zero
// value means that there is no line information.
int32 line = 1 [(google.api.field_behavior) = OPTIONAL];

// Optional. If applicable, denotes the column where the error occurred. A zero value
// means that there is no columns information.
// Optional. If applicable, denotes the column where the error occurred. A
// zero value means that there is no columns information.
int32 column = 2 [(google.api.field_behavior) = OPTIONAL];
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,18 +36,20 @@ message TimeSeries {
string metric = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The value type of the time series.
google.api.MetricDescriptor.ValueType value_type = 2 [(google.api.field_behavior) = REQUIRED];
google.api.MetricDescriptor.ValueType value_type = 2
[(google.api.field_behavior) = REQUIRED];

// Optional. The metric kind of the time series.
//
// If present, it must be the same as the metric kind of the associated
// metric. If the associated metric's descriptor must be auto-created, then
// this field specifies the metric kind of the new descriptor and must be
// either `GAUGE` (the default) or `CUMULATIVE`.
google.api.MetricDescriptor.MetricKind metric_kind = 3 [(google.api.field_behavior) = OPTIONAL];
google.api.MetricDescriptor.MetricKind metric_kind = 3
[(google.api.field_behavior) = OPTIONAL];

// Required. The data points of this time series. When listing time series, points are
// returned in reverse time order.
// Required. The data points of this time series. When listing time series,
// points are returned in reverse time order.
//
// When creating a time series, this field must contain exactly one point and
// the point's type must be the same as the value type of the associated
Expand Down Expand Up @@ -81,10 +83,12 @@ message TimeInterval {
// Optional. The beginning of the time interval. The default value
// for the start time is the end time. The start time must not be
// later than the end time.
google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OPTIONAL];
google.protobuf.Timestamp start_time = 1
[(google.api.field_behavior) = OPTIONAL];

// Required. The end of the time interval.
google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = REQUIRED];
google.protobuf.Timestamp end_time = 2
[(google.api.field_behavior) = REQUIRED];
}

// A single strongly-typed value.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,10 +34,12 @@ option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2";
// Service to handle EDW migrations.
service MigrationService {
option (google.api.default_host) = "bigquerymigration.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";

// Creates a migration workflow.
rpc CreateMigrationWorkflow(CreateMigrationWorkflowRequest) returns (MigrationWorkflow) {
rpc CreateMigrationWorkflow(CreateMigrationWorkflowRequest)
returns (MigrationWorkflow) {
option (google.api.http) = {
post: "/v2/{parent=projects/*/locations/*}/workflows"
body: "migration_workflow"
Expand All @@ -46,23 +48,26 @@ service MigrationService {
}

// Gets a previously created migration workflow.
rpc GetMigrationWorkflow(GetMigrationWorkflowRequest) returns (MigrationWorkflow) {
rpc GetMigrationWorkflow(GetMigrationWorkflowRequest)
returns (MigrationWorkflow) {
option (google.api.http) = {
get: "/v2/{name=projects/*/locations/*/workflows/*}"
};
option (google.api.method_signature) = "name";
}

// Lists previously created migration workflow.
rpc ListMigrationWorkflows(ListMigrationWorkflowsRequest) returns (ListMigrationWorkflowsResponse) {
rpc ListMigrationWorkflows(ListMigrationWorkflowsRequest)
returns (ListMigrationWorkflowsResponse) {
option (google.api.http) = {
get: "/v2/{parent=projects/*/locations/*}/workflows"
};
option (google.api.method_signature) = "parent";
}

// Deletes a migration workflow by name.
rpc DeleteMigrationWorkflow(DeleteMigrationWorkflowRequest) returns (google.protobuf.Empty) {
rpc DeleteMigrationWorkflow(DeleteMigrationWorkflowRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v2/{name=projects/*/locations/*/workflows/*}"
};
Expand All @@ -73,7 +78,8 @@ service MigrationService {
// from DRAFT to RUNNING. This is a no-op if the state is already RUNNING.
// An error will be signaled if the state is anything other than DRAFT or
// RUNNING.
rpc StartMigrationWorkflow(StartMigrationWorkflowRequest) returns (google.protobuf.Empty) {
rpc StartMigrationWorkflow(StartMigrationWorkflowRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v2/{name=projects/*/locations/*/workflows/*}:start"
body: "*"
Expand All @@ -82,15 +88,17 @@ service MigrationService {
}

// Gets a previously created migration subtask.
rpc GetMigrationSubtask(GetMigrationSubtaskRequest) returns (MigrationSubtask) {
rpc GetMigrationSubtask(GetMigrationSubtaskRequest)
returns (MigrationSubtask) {
option (google.api.http) = {
get: "/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}"
};
option (google.api.method_signature) = "name";
}

// Lists previously created migration subtasks.
rpc ListMigrationSubtasks(ListMigrationSubtasksRequest) returns (ListMigrationSubtasksResponse) {
rpc ListMigrationSubtasks(ListMigrationSubtasksRequest)
returns (ListMigrationSubtasksResponse) {
option (google.api.http) = {
get: "/v2/{parent=projects/*/locations/*/workflows/*}/subtasks"
};
Expand All @@ -110,7 +118,8 @@ message CreateMigrationWorkflowRequest {
];

// Required. The migration workflow to create.
MigrationWorkflow migration_workflow = 2 [(google.api.field_behavior) = REQUIRED];
MigrationWorkflow migration_workflow = 2
[(google.api.field_behavior) = REQUIRED];
}

// A request to get a previously created migration workflow.
Expand Down Expand Up @@ -200,7 +209,8 @@ message GetMigrationSubtaskRequest {
];

// Optional. The list of fields to be retrieved.
google.protobuf.FieldMask read_mask = 2 [(google.api.field_behavior) = OPTIONAL];
google.protobuf.FieldMask read_mask = 2
[(google.api.field_behavior) = OPTIONAL];
}

// A request to list previously created migration subtasks.
Expand All @@ -215,22 +225,23 @@ message ListMigrationSubtasksRequest {
];

// Optional. The list of fields to be retrieved.
google.protobuf.FieldMask read_mask = 2 [(google.api.field_behavior) = OPTIONAL];
google.protobuf.FieldMask read_mask = 2
[(google.api.field_behavior) = OPTIONAL];

// Optional. The maximum number of migration tasks to return. The service may return
// fewer than this number.
// Optional. The maximum number of migration tasks to return. The service may
// return fewer than this number.
int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];

// Optional. A page token, received from previous `ListMigrationSubtasks` call.
// Provide this to retrieve the subsequent page.
// Optional. A page token, received from previous `ListMigrationSubtasks`
// call. Provide this to retrieve the subsequent page.
//
// When paginating, all other parameters provided to `ListMigrationSubtasks`
// must match the call that provided the page token.
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];

// Optional. The filter to apply. This can be used to get the subtasks of a specific
// tasks in a workflow, e.g. `migration_task = "ab012"` where `"ab012"` is the
// task ID (not the name in the named map).
// Optional. The filter to apply. This can be used to get the subtasks of a
// specific tasks in a workflow, e.g. `migration_task = "ab012"` where
// `"ab012"` is the task ID (not the name in the named map).
string filter = 5 [(google.api.field_behavior) = OPTIONAL];
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -38,21 +38,24 @@ message TranslationConfigDetails {
string gcs_target_path = 2;
}

// The dialect of the input files.
Dialect source_dialect = 3;

// The target dialect for the engine to translate the input to.
Dialect target_dialect = 4;

// The mapping of full SQL object names from their current state to the
// desired output.
oneof output_name_mapping {
// The mapping of objects to their desired output names in list form.
ObjectNameMappingList name_mapping_list = 5;
}

// The dialect of the input files.
Dialect source_dialect = 3;

// The target dialect for the engine to translate the input to.
Dialect target_dialect = 4;

// The default source environment values for the translation.
SourceEnv source_env = 6;

// The indicator to show translation request initiator.
string request_source = 8;
}

// The possible dialect options for translation.
Expand Down
21 changes: 14 additions & 7 deletions packages/google-cloud-bigquery-migration/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5615d56

Please sign in to comment.