Skip to content

Commit

Permalink
fix(filestore): add missing operation_metadata.proto import (#24)
Browse files Browse the repository at this point in the history
* fix(filestore): add missing operation_metadata.proto import

PiperOrigin-RevId: 399764091

Source-Link: googleapis/googleapis@5e5a44d

Source-Link: googleapis/googleapis-gen@e0dd43a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTBkZDQzYTUwNTI1NDllNjllOGU3YTI5YzY3ZWZkM2E0Zjg4YTBkZiJ9

* 🦉 Updates from OwlBot

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>
Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 1, 2021
1 parent ee746bb commit b53c8c9
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/common/operation_metadata.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
Expand Down Expand Up @@ -53,7 +54,8 @@ option php_namespace = "Google\\Cloud\\Filestore\\V1";
// * `projects/12345/locations/us-central1/backups/my-backup`
service CloudFilestoreManager {
option (google.api.default_host) = "file.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";

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

// Updates the settings of a specific instance.
rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) {
rpc UpdateInstance(UpdateInstanceRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
patch: "/v1/{instance.name=projects/*/locations/*/instances/*}"
body: "instance"
Expand All @@ -106,7 +110,8 @@ service CloudFilestoreManager {
// The capacity of the instance needs to be equal to or larger than the
// capacity of the backup (and also equal to or larger than the minimum
// capacity of the tier).
rpc RestoreInstance(RestoreInstanceRequest) returns (google.longrunning.Operation) {
rpc RestoreInstance(RestoreInstanceRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/instances/*}:restore"
body: "*"
Expand All @@ -118,7 +123,8 @@ service CloudFilestoreManager {
}

// Deletes an instance.
rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) {
rpc DeleteInstance(DeleteInstanceRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/instances/*}"
};
Expand Down Expand Up @@ -236,9 +242,9 @@ message FileShareConfig {
// The resource name of the backup, in the format
// `projects/{project_number}/locations/{location_id}/backups/{backup_id}`,
// that this file share has been restored from.
string source_backup = 8 [(google.api.resource_reference) = {
type: "file.googleapis.com/Backup"
}];
string source_backup = 8 [
(google.api.resource_reference) = { type: "file.googleapis.com/Backup" }
];
}

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

// Output only. The time when the instance was created.
google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp create_time = 7
[(google.api.field_behavior) = OUTPUT_ONLY];

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

// Output only. Reserved for future use.
google.protobuf.BoolValue satisfies_pzs = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.BoolValue satisfies_pzs = 13
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// CreateInstanceRequest creates an instance.
Expand Down Expand Up @@ -430,9 +438,7 @@ message GetInstanceRequest {
// `projects/{project_id}/locations/{location}/instances/{instance_id}`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "file.googleapis.com/Instance"
}
(google.api.resource_reference) = { type: "file.googleapis.com/Instance" }
];
}

Expand All @@ -458,21 +464,19 @@ message RestoreInstanceRequest {
// `projects/{project_number}/locations/{location_id}/instances/{instance_id}`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "file.googleapis.com/Instance"
}
(google.api.resource_reference) = { type: "file.googleapis.com/Instance" }
];

// Required. Name of the file share in the Cloud Filestore instance that the backup
// is being restored to.
// Required. Name of the file share in the Cloud Filestore instance that the
// backup is being restored to.
string file_share = 2 [(google.api.field_behavior) = REQUIRED];

oneof source {
// The resource name of the backup, in the format
// `projects/{project_number}/locations/{location_id}/backups/{backup_id}`.
string source_backup = 3 [(google.api.resource_reference) = {
type: "file.googleapis.com/Backup"
}];
string source_backup = 3 [
(google.api.resource_reference) = { type: "file.googleapis.com/Backup" }
];
}
}

Expand All @@ -482,17 +486,15 @@ message DeleteInstanceRequest {
// `projects/{project_id}/locations/{location}/instances/{instance_id}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "file.googleapis.com/Instance"
}
(google.api.resource_reference) = { type: "file.googleapis.com/Instance" }
];
}

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

// Output only. The time when the backup was created.
google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp create_time = 4
[(google.api.field_behavior) = OUTPUT_ONLY];

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

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

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

// The resource name of the source Cloud Filestore instance, in the format
// `projects/{project_number}/locations/{location_id}/instances/{instance_id}`,
// used to create this backup.
string source_instance = 8 [(google.api.resource_reference) = {
type: "file.googleapis.com/Instance"
}];
string source_instance = 8 [
(google.api.resource_reference) = { type: "file.googleapis.com/Instance" }
];

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

// Output only. The service tier of the source Cloud Filestore instance that this backup
// is created from.
Instance.Tier source_instance_tier = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The service tier of the source Cloud Filestore instance that
// this backup is created from.
Instance.Tier source_instance_tier = 10
[(google.api.field_behavior) = OUTPUT_ONLY];

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

// Output only. Reserved for future use.
google.protobuf.BoolValue satisfies_pzs = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.BoolValue satisfies_pzs = 12
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// CreateBackupRequest creates a backup.
Expand Down Expand Up @@ -639,9 +644,7 @@ message DeleteBackupRequest {
// `projects/{project_number}/locations/{location}/backups/{backup_id}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "file.googleapis.com/Backup"
}
(google.api.resource_reference) = { type: "file.googleapis.com/Backup" }
];
}

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

// Required. Mask of fields to update. At least one path must be supplied in this
// field.
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
// Required. Mask of fields to update. At least one path must be supplied in
// this field.
google.protobuf.FieldMask update_mask = 2
[(google.api.field_behavior) = REQUIRED];
}

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

// ListBackupsRequest lists backups.
message ListBackupsRequest {
// Required. The project and location for which to retrieve backup information,
// in the format `projects/{project_number}/locations/{location}`.
// In Cloud Filestore, backup locations map to GCP regions,
// for example **us-west1**.
// To retrieve backup information for all locations, use "-" for the
// Required. The project and location for which to retrieve backup
// information, in the format
// `projects/{project_number}/locations/{location}`. In Cloud Filestore,
// backup locations map to GCP regions, for example **us-west1**. To retrieve
// backup information for all locations, use "-" for the
// `{location}` value.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ function main(parent) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The project and location for which to retrieve backup information,
* in the format `projects/{project_number}/locations/{location}`.
* In Cloud Filestore, backup locations map to GCP regions,
* for example **us-west1**.
* To retrieve backup information for all locations, use "-" for the
* Required. The project and location for which to retrieve backup
* information, in the format
* `projects/{project_number}/locations/{location}`. In Cloud Filestore,
* backup locations map to GCP regions, for example **us-west1**. To retrieve
* backup information for all locations, use "-" for the
* `{location}` value.
*/
// const parent = 'abc123'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ function main(parent) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The project and location for which to retrieve instance information,
* in the format `projects/{project_id}/locations/{location}`. In Cloud
* Filestore, locations map to GCP zones, for example **us-west1-b**. To
* Required. The project and location for which to retrieve instance
* information, in the format `projects/{project_id}/locations/{location}`. In
* Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To
* retrieve instance information for all locations, use "-" for the
* `{location}` value.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ function main(name, fileShare) {
*/
// const name = 'abc123'
/**
* Required. Name of the file share in the Cloud Filestore instance that the backup
* is being restored to.
* Required. Name of the file share in the Cloud Filestore instance that the
* backup is being restored to.
*/
// const fileShare = 'abc123'
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ function main(backup, updateMask) {
*/
// const backup = ''
/**
* Required. Mask of fields to update. At least one path must be supplied in this
* field.
* Required. Mask of fields to update. At least one path must be supplied in
* this field.
*/
// const updateMask = ''

Expand Down
Loading

0 comments on commit b53c8c9

Please sign in to comment.