Skip to content

Commit

Permalink
fix: [bigquery-datatransfer] mark parent/name fields with the REQUIRE…
Browse files Browse the repository at this point in the history
…D field_behavior annotation (#5233)

* fix: mark parent/name fields with the REQUIRED field_behavior annotation
docs: updated comments

PiperOrigin-RevId: 624277410

Source-Link: googleapis/googleapis@2d881be

Source-Link: googleapis/googleapis-gen@1d063f9
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGF0cmFuc2Zlci8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9

* 🦉 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] committed Apr 18, 2024
1 parent 1ffd246 commit 29c939f
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -867,12 +867,15 @@ message StartManualTransferRunsRequest {
google.protobuf.Timestamp end_time = 2;
}

// Transfer configuration name in the form:
// Required. Transfer configuration name in the form:
// `projects/{project_id}/transferConfigs/{config_id}` or
// `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
string parent = 1 [(google.api.resource_reference) = {
type: "bigquerydatatransfer.googleapis.com/TransferConfig"
}];
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "bigquerydatatransfer.googleapis.com/TransferConfig"
}
];

// The requested time specification - this can be a time range or a specific
// run_time.
Expand Down Expand Up @@ -900,8 +903,9 @@ message StartManualTransferRunsResponse {
// A request to enroll a set of data sources so they are visible in the
// BigQuery UI's `Transfer` tab.
message EnrollDataSourcesRequest {
// The name of the project resource in the form: `projects/{project_id}`
string name = 1;
// Required. The name of the project resource in the form:
// `projects/{project_id}`
string name = 1 [(google.api.field_behavior) = REQUIRED];

// Data sources that are enrolled. It is required to provide at least one
// data source id.
Expand All @@ -911,8 +915,9 @@ message EnrollDataSourcesRequest {
// A request to unenroll a set of data sources so they are no longer visible in
// the BigQuery UI's `Transfer` tab.
message UnenrollDataSourcesRequest {
// The name of the project resource in the form: `projects/{project_id}`
string name = 1;
// Required. The name of the project resource in the form:
// `projects/{project_id}`
string name = 1 [(google.api.field_behavior) = REQUIRED];

// Data sources that are unenrolled. It is required to provide at least one
// data source id.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ message TransferConfig {
pattern: "projects/{project}/locations/{location}/transferConfigs/{transfer_config}"
};

// The resource name of the transfer config.
// 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.
string name = 1;
string name = 1 [(google.api.field_behavior) = IDENTIFIER];

// The desination of the transfer config.
oneof destination {
Expand Down Expand Up @@ -231,11 +231,11 @@ message TransferRun {
pattern: "projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}"
};

// The resource name of the transfer run.
// 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.
string name = 1;
string name = 1 [(google.api.field_behavior) = IDENTIFIER];

// Minimum time after which a transfer run can be started.
google.protobuf.Timestamp schedule_time = 3;
Expand Down
21 changes: 17 additions & 4 deletions packages/google-cloud-bigquery-datatransfer/protos/protos.json

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

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

'use strict';

function main() {
function main(name) {
// [START bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
Expand All @@ -29,7 +29,8 @@ function main() {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The name of the project resource in the form: `projects/{project_id}`
* Required. The name of the project resource in the form:
* `projects/{project_id}`
*/
// const name = 'abc123'
/**
Expand All @@ -47,6 +48,7 @@ function main() {
async function callEnrollDataSources() {
// Construct request
const request = {
name,
};

// Run request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

'use strict';

function main() {
function main(parent) {
// [START bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
Expand All @@ -29,7 +29,7 @@ function main() {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Transfer configuration name in the form:
* Required. Transfer configuration name in the form:
* `projects/{project_id}/transferConfigs/{config_id}` or
* `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
*/
Expand Down Expand Up @@ -58,6 +58,7 @@ function main() {
async function callStartManualTransferRuns() {
// Construct request
const request = {
parent,
};

// Run request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

'use strict';

function main() {
function main(name) {
// [START bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
Expand All @@ -29,7 +29,8 @@ function main() {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The name of the project resource in the form: `projects/{project_id}`
* Required. The name of the project resource in the form:
* `projects/{project_id}`
*/
// const name = 'abc123'
/**
Expand All @@ -47,6 +48,7 @@ function main() {
async function callUnenrollDataSources() {
// Construct request
const request = {
name,
};

// Run request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@
"segments": [
{
"start": 25,
"end": 68,
"end": 69,
"type": "FULL"
}
],
Expand Down Expand Up @@ -678,7 +678,7 @@
"segments": [
{
"start": 25,
"end": 57,
"end": 59,
"type": "FULL"
}
],
Expand Down Expand Up @@ -722,7 +722,7 @@
"segments": [
{
"start": 25,
"end": 57,
"end": 59,
"type": "FULL"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ export class DataTransferServiceClient {
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Transfer configuration name in the form:
* Required. Transfer configuration name in the form:
* `projects/{project_id}/transferConfigs/{config_id}` or
* `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
* @param {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange} request.requestedTimeRange
Expand Down Expand Up @@ -1553,7 +1553,8 @@ export class DataTransferServiceClient {
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* The name of the project resource in the form: `projects/{project_id}`
* Required. The name of the project resource in the form:
* `projects/{project_id}`
* @param {string[]} request.dataSourceIds
* Data sources that are enrolled. It is required to provide at least one
* data source id.
Expand Down Expand Up @@ -1656,7 +1657,8 @@ export class DataTransferServiceClient {
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* The name of the project resource in the form: `projects/{project_id}`
* Required. The name of the project resource in the form:
* `projects/{project_id}`
* @param {string[]} request.dataSourceIds
* Data sources that are unenrolled. It is required to provide at least one
* data source id.
Expand Down

0 comments on commit 29c939f

Please sign in to comment.