Skip to content

Commit 5e5a44d

Browse files
Google APIscopybara-github
authored andcommitted
fix(filestore): add missing operation_metadata.proto import
PiperOrigin-RevId: 399764091
1 parent 2fa1722 commit 5e5a44d

2 files changed

Lines changed: 81 additions & 85 deletions

File tree

google/cloud/filestore/v1/BUILD.bazel

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ proto_library_with_info(
4040
name = "filestore_proto_with_info",
4141
deps = [
4242
":filestore_proto",
43-
"//google/cloud/common:common_proto",
4443
"//google/cloud:common_resources_proto",
4544
],
4645
)
@@ -59,10 +58,7 @@ load(
5958

6059
java_proto_library(
6160
name = "filestore_java_proto",
62-
deps = [
63-
":filestore_proto",
64-
"//google/cloud/common:common_proto",
65-
],
61+
deps = [":filestore_proto"],
6662
)
6763

6864
java_grpc_library(
@@ -74,13 +70,15 @@ java_grpc_library(
7470
java_gapic_library(
7571
name = "filestore_java_gapic",
7672
srcs = [":filestore_proto_with_info"],
73+
gapic_yaml = None,
7774
grpc_service_config = "file_grpc_service_config.json",
75+
service_yaml = "file_v1.yaml",
7876
test_deps = [
7977
":filestore_java_grpc",
8078
],
8179
deps = [
8280
":filestore_java_proto",
83-
"//google/cloud/common:common_proto",
81+
"//google/cloud/common:common_java_proto",
8482
],
8583
)
8684

@@ -163,29 +161,25 @@ go_gapic_assembly_pkg(
163161
##############################################################################
164162
# Python
165163
##############################################################################
166-
#
167-
# Commented out: Python generator cannot accept LRO metadata from a different
168-
# proto namespace.
169-
#
170-
# load(
171-
# "@com_google_googleapis_imports//:imports.bzl",
172-
# "py_gapic_assembly_pkg",
173-
# "py_gapic_library",
174-
# )
175-
176-
# py_gapic_library(
177-
# name = "filestore_py_gapic",
178-
# srcs = [":filestore_proto_with_info"],
179-
# grpc_service_config = "file_grpc_service_config.json",
180-
# )
181-
182-
# # Open Source Packages
183-
# py_gapic_assembly_pkg(
184-
# name = "filestore-v1-py",
185-
# deps = [
186-
# ":filestore_py_gapic",
187-
# ],
188-
# )
164+
load(
165+
"@com_google_googleapis_imports//:imports.bzl",
166+
"py_gapic_assembly_pkg",
167+
"py_gapic_library",
168+
)
169+
170+
py_gapic_library(
171+
name = "filestore_py_gapic",
172+
srcs = [":filestore_proto"],
173+
grpc_service_config = "file_grpc_service_config.json",
174+
)
175+
176+
# Open Source Packages
177+
py_gapic_assembly_pkg(
178+
name = "filestore-v1-py",
179+
deps = [
180+
":filestore_py_gapic",
181+
],
182+
)
189183

190184
##############################################################################
191185
# PHP
@@ -285,9 +279,9 @@ ruby_cloud_gapic_library(
285279
name = "filestore_ruby_gapic",
286280
srcs = [":filestore_proto_with_info"],
287281
extra_protoc_parameters = [
288-
"ruby-cloud-gem-name=google-cloud-filestore-v1",
289-
"ruby-cloud-api-shortname=file",
290282
"ruby-cloud-api-id=file.googleapis.com",
283+
"ruby-cloud-api-shortname=file",
284+
"ruby-cloud-gem-name=google-cloud-filestore-v1",
291285
"ruby-cloud-product-url=https://cloud.google.com/filestore/",
292286
],
293287
grpc_service_config = "file_grpc_service_config.json",

google/cloud/filestore/v1/cloud_filestore_service.proto

Lines changed: 56 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import "google/api/annotations.proto";
2020
import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
23+
import "google/cloud/common/operation_metadata.proto";
2324
import "google/longrunning/operations.proto";
2425
import "google/protobuf/field_mask.proto";
2526
import "google/protobuf/timestamp.proto";
@@ -53,7 +54,8 @@ option php_namespace = "Google\\Cloud\\Filestore\\V1";
5354
// * `projects/12345/locations/us-central1/backups/my-backup`
5455
service CloudFilestoreManager {
5556
option (google.api.default_host) = "file.googleapis.com";
56-
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
57+
option (google.api.oauth_scopes) =
58+
"https://www.googleapis.com/auth/cloud-platform";
5759

5860
// Lists all instances in a project for either a specified location
5961
// or for all locations.
@@ -76,7 +78,8 @@ service CloudFilestoreManager {
7678
// When creating from a backup, the capacity of the new instance needs to be
7779
// equal to or larger than the capacity of the backup (and also equal to or
7880
// larger than the minimum capacity of the tier).
79-
rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) {
81+
rpc CreateInstance(CreateInstanceRequest)
82+
returns (google.longrunning.Operation) {
8083
option (google.api.http) = {
8184
post: "/v1/{parent=projects/*/locations/*}/instances"
8285
body: "instance"
@@ -89,7 +92,8 @@ service CloudFilestoreManager {
8992
}
9093

9194
// Updates the settings of a specific instance.
92-
rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) {
95+
rpc UpdateInstance(UpdateInstanceRequest)
96+
returns (google.longrunning.Operation) {
9397
option (google.api.http) = {
9498
patch: "/v1/{instance.name=projects/*/locations/*/instances/*}"
9599
body: "instance"
@@ -106,7 +110,8 @@ service CloudFilestoreManager {
106110
// The capacity of the instance needs to be equal to or larger than the
107111
// capacity of the backup (and also equal to or larger than the minimum
108112
// capacity of the tier).
109-
rpc RestoreInstance(RestoreInstanceRequest) returns (google.longrunning.Operation) {
113+
rpc RestoreInstance(RestoreInstanceRequest)
114+
returns (google.longrunning.Operation) {
110115
option (google.api.http) = {
111116
post: "/v1/{name=projects/*/locations/*/instances/*}:restore"
112117
body: "*"
@@ -118,7 +123,8 @@ service CloudFilestoreManager {
118123
}
119124

120125
// Deletes an instance.
121-
rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) {
126+
rpc DeleteInstance(DeleteInstanceRequest)
127+
returns (google.longrunning.Operation) {
122128
option (google.api.http) = {
123129
delete: "/v1/{name=projects/*/locations/*/instances/*}"
124130
};
@@ -236,9 +242,9 @@ message FileShareConfig {
236242
// The resource name of the backup, in the format
237243
// `projects/{project_number}/locations/{location_id}/backups/{backup_id}`,
238244
// that this file share has been restored from.
239-
string source_backup = 8 [(google.api.resource_reference) = {
240-
type: "file.googleapis.com/Backup"
241-
}];
245+
string source_backup = 8 [
246+
(google.api.resource_reference) = { type: "file.googleapis.com/Backup" }
247+
];
242248
}
243249

244250
// Nfs Export Options.
@@ -380,7 +386,8 @@ message Instance {
380386
string status_message = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
381387

382388
// Output only. The time when the instance was created.
383-
google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
389+
google.protobuf.Timestamp create_time = 7
390+
[(google.api.field_behavior) = OUTPUT_ONLY];
384391

385392
// The service tier of the instance.
386393
Tier tier = 8;
@@ -401,7 +408,8 @@ message Instance {
401408
string etag = 12;
402409

403410
// Output only. Reserved for future use.
404-
google.protobuf.BoolValue satisfies_pzs = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
411+
google.protobuf.BoolValue satisfies_pzs = 13
412+
[(google.api.field_behavior) = OUTPUT_ONLY];
405413
}
406414

407415
// CreateInstanceRequest creates an instance.
@@ -430,9 +438,7 @@ message GetInstanceRequest {
430438
// `projects/{project_id}/locations/{location}/instances/{instance_id}`.
431439
string name = 1 [
432440
(google.api.field_behavior) = REQUIRED,
433-
(google.api.resource_reference) = {
434-
type: "file.googleapis.com/Instance"
435-
}
441+
(google.api.resource_reference) = { type: "file.googleapis.com/Instance" }
436442
];
437443
}
438444

@@ -458,21 +464,19 @@ message RestoreInstanceRequest {
458464
// `projects/{project_number}/locations/{location_id}/instances/{instance_id}`.
459465
string name = 1 [
460466
(google.api.field_behavior) = REQUIRED,
461-
(google.api.resource_reference) = {
462-
type: "file.googleapis.com/Instance"
463-
}
467+
(google.api.resource_reference) = { type: "file.googleapis.com/Instance" }
464468
];
465469

466-
// Required. Name of the file share in the Cloud Filestore instance that the backup
467-
// is being restored to.
470+
// Required. Name of the file share in the Cloud Filestore instance that the
471+
// backup is being restored to.
468472
string file_share = 2 [(google.api.field_behavior) = REQUIRED];
469473

470474
oneof source {
471475
// The resource name of the backup, in the format
472476
// `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
473-
string source_backup = 3 [(google.api.resource_reference) = {
474-
type: "file.googleapis.com/Backup"
475-
}];
477+
string source_backup = 3 [
478+
(google.api.resource_reference) = { type: "file.googleapis.com/Backup" }
479+
];
476480
}
477481
}
478482

@@ -482,17 +486,15 @@ message DeleteInstanceRequest {
482486
// `projects/{project_id}/locations/{location}/instances/{instance_id}`
483487
string name = 1 [
484488
(google.api.field_behavior) = REQUIRED,
485-
(google.api.resource_reference) = {
486-
type: "file.googleapis.com/Instance"
487-
}
489+
(google.api.resource_reference) = { type: "file.googleapis.com/Instance" }
488490
];
489491
}
490492

491493
// ListInstancesRequest lists instances.
492494
message ListInstancesRequest {
493-
// Required. The project and location for which to retrieve instance information,
494-
// in the format `projects/{project_id}/locations/{location}`. In Cloud
495-
// Filestore, locations map to GCP zones, for example **us-west1-b**. To
495+
// Required. The project and location for which to retrieve instance
496+
// information, in the format `projects/{project_id}/locations/{location}`. In
497+
// Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To
496498
// retrieve instance information for all locations, use "-" for the
497499
// `{location}` value.
498500
string parent = 1 [
@@ -572,40 +574,43 @@ message Backup {
572574
State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
573575

574576
// Output only. The time when the backup was created.
575-
google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
577+
google.protobuf.Timestamp create_time = 4
578+
[(google.api.field_behavior) = OUTPUT_ONLY];
576579

577580
// Resource labels to represent user provided metadata.
578581
map<string, string> labels = 5;
579582

580583
// Output only. Capacity of the source file share when the backup was created.
581584
int64 capacity_gb = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
582585

583-
// Output only. The size of the storage used by the backup. As backups share storage,
584-
// this number is expected to change with backup creation/deletion.
586+
// Output only. The size of the storage used by the backup. As backups share
587+
// storage, this number is expected to change with backup creation/deletion.
585588
int64 storage_bytes = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
586589

587590
// The resource name of the source Cloud Filestore instance, in the format
588591
// `projects/{project_number}/locations/{location_id}/instances/{instance_id}`,
589592
// used to create this backup.
590-
string source_instance = 8 [(google.api.resource_reference) = {
591-
type: "file.googleapis.com/Instance"
592-
}];
593+
string source_instance = 8 [
594+
(google.api.resource_reference) = { type: "file.googleapis.com/Instance" }
595+
];
593596

594597
// Name of the file share in the source Cloud Filestore instance that the
595598
// backup is created from.
596599
string source_file_share = 9;
597600

598-
// Output only. The service tier of the source Cloud Filestore instance that this backup
599-
// is created from.
600-
Instance.Tier source_instance_tier = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
601+
// Output only. The service tier of the source Cloud Filestore instance that
602+
// this backup is created from.
603+
Instance.Tier source_instance_tier = 10
604+
[(google.api.field_behavior) = OUTPUT_ONLY];
601605

602-
// Output only. Amount of bytes that will be downloaded if the backup is restored. This
603-
// may be different than storage bytes, since sequential backups of the same
604-
// disk will share storage.
606+
// Output only. Amount of bytes that will be downloaded if the backup is
607+
// restored. This may be different than storage bytes, since sequential
608+
// backups of the same disk will share storage.
605609
int64 download_bytes = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
606610

607611
// Output only. Reserved for future use.
608-
google.protobuf.BoolValue satisfies_pzs = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
612+
google.protobuf.BoolValue satisfies_pzs = 12
613+
[(google.api.field_behavior) = OUTPUT_ONLY];
609614
}
610615

611616
// CreateBackupRequest creates a backup.
@@ -639,9 +644,7 @@ message DeleteBackupRequest {
639644
// `projects/{project_number}/locations/{location}/backups/{backup_id}`
640645
string name = 1 [
641646
(google.api.field_behavior) = REQUIRED,
642-
(google.api.resource_reference) = {
643-
type: "file.googleapis.com/Backup"
644-
}
647+
(google.api.resource_reference) = { type: "file.googleapis.com/Backup" }
645648
];
646649
}
647650

@@ -650,9 +653,10 @@ message UpdateBackupRequest {
650653
// Required. A [backup resource][google.cloud.filestore.v1.Backup]
651654
Backup backup = 1 [(google.api.field_behavior) = REQUIRED];
652655

653-
// Required. Mask of fields to update. At least one path must be supplied in this
654-
// field.
655-
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
656+
// Required. Mask of fields to update. At least one path must be supplied in
657+
// this field.
658+
google.protobuf.FieldMask update_mask = 2
659+
[(google.api.field_behavior) = REQUIRED];
656660
}
657661

658662
// GetBackupRequest gets the state of a backup.
@@ -661,19 +665,17 @@ message GetBackupRequest {
661665
// `projects/{project_number}/locations/{location}/backups/{backup_id}`.
662666
string name = 1 [
663667
(google.api.field_behavior) = REQUIRED,
664-
(google.api.resource_reference) = {
665-
type: "file.googleapis.com/Backup"
666-
}
668+
(google.api.resource_reference) = { type: "file.googleapis.com/Backup" }
667669
];
668670
}
669671

670672
// ListBackupsRequest lists backups.
671673
message ListBackupsRequest {
672-
// Required. The project and location for which to retrieve backup information,
673-
// in the format `projects/{project_number}/locations/{location}`.
674-
// In Cloud Filestore, backup locations map to GCP regions,
675-
// for example **us-west1**.
676-
// To retrieve backup information for all locations, use "-" for the
674+
// Required. The project and location for which to retrieve backup
675+
// information, in the format
676+
// `projects/{project_number}/locations/{location}`. In Cloud Filestore,
677+
// backup locations map to GCP regions, for example **us-west1**. To retrieve
678+
// backup information for all locations, use "-" for the
677679
// `{location}` value.
678680
string parent = 1 [
679681
(google.api.field_behavior) = REQUIRED,

0 commit comments

Comments
 (0)