From 0d923840ab7c3a35455f655a1f146973492951d1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jan 2023 23:29:45 -0800 Subject: [PATCH] fix: proper http bindings for v2 API (#3884) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: reformat protos PiperOrigin-RevId: 504359717 Source-Link: https://github.com/googleapis/googleapis/commit/1266905b6b1faeca138cd07d8477030226ebced3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/881ee780389ca57235403e308065690b8478fe24 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRwdS8uT3dsQm90LnlhbWwiLCJoIjoiODgxZWU3ODAzODljYTU3MjM1NDAzZTMwODA2NTY5MGI4NDc4ZmUyNCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: update comment fix: update http bindings for alpha API PiperOrigin-RevId: 504360226 Source-Link: https://github.com/googleapis/googleapis/commit/44f176c4625ed7d18dbde835a74ec2ca4284c417 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c2c886b4989b35ab7a50824c2c67353a95ed89a7 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRwdS8uT3dsQm90LnlhbWwiLCJoIjoiYzJjODg2YjQ5ODliMzVhYjdhNTA4MjRjMmM2NzM1M2E5NWVkODlhNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: proper http bindings for v2 API chore: reformat protos PiperOrigin-RevId: 504361887 Source-Link: https://github.com/googleapis/googleapis/commit/1230a6b27d31299818d7ad741cb46c94d0dd918c Source-Link: https://github.com/googleapis/googleapis-gen/commit/51e8944ff6525b7dc567323617a9131c7dcbc544 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRwdS8uT3dsQm90LnlhbWwiLCJoIjoiNTFlODk0NGZmNjUyNWI3ZGM1NjczMjM2MTdhOTEzMWM3ZGNiYzU0NCJ9 * 🦉 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 Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../google/cloud/tpu/v1/cloud_tpu.proto | 61 ++++++++-------- .../google/cloud/tpu/v2/cloud_tpu.proto | 73 ++++++++++--------- .../google/cloud/tpu/v2alpha1/cloud_tpu.proto | 2 +- .../v2alpha1/tpu.create_queued_resource.js | 2 +- .../google-cloud-tpu/src/v2/tpu_client.ts | 44 ++--------- .../src/v2alpha1/tpu_client.ts | 46 ++---------- 6 files changed, 85 insertions(+), 143 deletions(-) diff --git a/packages/google-cloud-tpu/protos/google/cloud/tpu/v1/cloud_tpu.proto b/packages/google-cloud-tpu/protos/google/cloud/tpu/v1/cloud_tpu.proto index c2acf92f439..7436286628e 100644 --- a/packages/google-cloud-tpu/protos/google/cloud/tpu/v1/cloud_tpu.proto +++ b/packages/google-cloud-tpu/protos/google/cloud/tpu/v1/cloud_tpu.proto @@ -33,7 +33,8 @@ option java_package = "com.google.cloud.tpu.v1"; // TPU API v1 service Tpu { option (google.api.default_host) = "tpu.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 nodes. rpc ListNodes(ListNodesRequest) returns (ListNodesResponse) { @@ -113,7 +114,8 @@ service Tpu { } // List TensorFlow versions supported by this API. - rpc ListTensorFlowVersions(ListTensorFlowVersionsRequest) returns (ListTensorFlowVersionsResponse) { + rpc ListTensorFlowVersions(ListTensorFlowVersionsRequest) + returns (ListTensorFlowVersionsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/tensorflowVersions" }; @@ -121,7 +123,8 @@ service Tpu { } // Gets TensorFlow Version. - rpc GetTensorFlowVersion(GetTensorFlowVersionRequest) returns (TensorFlowVersion) { + rpc GetTensorFlowVersion(GetTensorFlowVersionRequest) + returns (TensorFlowVersion) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/tensorflowVersions/*}" }; @@ -129,7 +132,8 @@ service Tpu { } // Lists accelerator types supported by this API. - rpc ListAcceleratorTypes(ListAcceleratorTypesRequest) returns (ListAcceleratorTypesResponse) { + rpc ListAcceleratorTypes(ListAcceleratorTypesRequest) + returns (ListAcceleratorTypesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/acceleratorTypes" }; @@ -282,8 +286,8 @@ message Node { // Output only. The current state for the TPU Node. State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. If this field is populated, it contains a description of why the TPU Node - // is unhealthy. + // Output only. If this field is populated, it contains a description of why + // the TPU Node is unhealthy. string health_description = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. The version of Tensorflow running in the Node. @@ -304,14 +308,15 @@ message Node { // block. string cidr_block = 13; - // Output only. The service account used to run the tensor flow services within the node. - // To share resources, including Google Cloud Storage data, with the - // Tensorflow job running in the Node, this account must have permissions to - // that data. + // Output only. The service account used to run the tensor flow services + // within the node. To share resources, including Google Cloud Storage data, + // with the Tensorflow job running in the Node, this account must have + // permissions to that data. string service_account = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the node was created. - google.protobuf.Timestamp create_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; // The scheduling options for this node. SchedulingConfig scheduling_config = 17; @@ -319,7 +324,8 @@ message Node { // Output only. The network endpoints where TPU workers can be accessed and // sent work. It is recommended that Tensorflow clients of the node reach out // to the 0th entry in this map first. - repeated NetworkEndpoint network_endpoints = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated NetworkEndpoint network_endpoints = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; // The health status of the TPU node. Health health = 22; @@ -346,9 +352,7 @@ message ListNodesRequest { // Required. The parent resource name. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "tpu.googleapis.com/Node" - } + (google.api.resource_reference) = { child_type: "tpu.googleapis.com/Node" } ]; // The maximum number of items to return. @@ -375,9 +379,7 @@ message GetNodeRequest { // Required. The resource name. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "tpu.googleapis.com/Node" - } + (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } ]; } @@ -386,9 +388,7 @@ message CreateNodeRequest { // Required. The parent resource name. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "tpu.googleapis.com/Node" - } + (google.api.resource_reference) = { child_type: "tpu.googleapis.com/Node" } ]; // The unqualified resource name. @@ -403,9 +403,7 @@ message DeleteNodeRequest { // Required. The resource name. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "tpu.googleapis.com/Node" - } + (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } ]; } @@ -444,7 +442,8 @@ message TensorFlowVersion { string version = 2; } -// Request for [GetTensorFlowVersion][google.cloud.tpu.v1.Tpu.GetTensorFlowVersion]. +// Request for +// [GetTensorFlowVersion][google.cloud.tpu.v1.Tpu.GetTensorFlowVersion]. message GetTensorFlowVersionRequest { // Required. The resource name. string name = 1 [ @@ -455,7 +454,8 @@ message GetTensorFlowVersionRequest { ]; } -// Request for [ListTensorFlowVersions][google.cloud.tpu.v1.Tpu.ListTensorFlowVersions]. +// Request for +// [ListTensorFlowVersions][google.cloud.tpu.v1.Tpu.ListTensorFlowVersions]. message ListTensorFlowVersionsRequest { // Required. The parent resource name. string parent = 1 [ @@ -478,7 +478,8 @@ message ListTensorFlowVersionsRequest { string order_by = 6; } -// Response for [ListTensorFlowVersions][google.cloud.tpu.v1.Tpu.ListTensorFlowVersions]. +// Response for +// [ListTensorFlowVersions][google.cloud.tpu.v1.Tpu.ListTensorFlowVersions]. message ListTensorFlowVersionsResponse { // The listed nodes. repeated TensorFlowVersion tensorflow_versions = 1; @@ -515,7 +516,8 @@ message GetAcceleratorTypeRequest { ]; } -// Request for [ListAcceleratorTypes][google.cloud.tpu.v1.Tpu.ListAcceleratorTypes]. +// Request for +// [ListAcceleratorTypes][google.cloud.tpu.v1.Tpu.ListAcceleratorTypes]. message ListAcceleratorTypesRequest { // Required. The parent resource name. string parent = 1 [ @@ -538,7 +540,8 @@ message ListAcceleratorTypesRequest { string order_by = 6; } -// Response for [ListAcceleratorTypes][google.cloud.tpu.v1.Tpu.ListAcceleratorTypes]. +// Response for +// [ListAcceleratorTypes][google.cloud.tpu.v1.Tpu.ListAcceleratorTypes]. message ListAcceleratorTypesResponse { // The listed nodes. repeated AcceleratorType accelerator_types = 1; diff --git a/packages/google-cloud-tpu/protos/google/cloud/tpu/v2/cloud_tpu.proto b/packages/google-cloud-tpu/protos/google/cloud/tpu/v2/cloud_tpu.proto index b99a2013c2d..6f06133af6a 100644 --- a/packages/google-cloud-tpu/protos/google/cloud/tpu/v2/cloud_tpu.proto +++ b/packages/google-cloud-tpu/protos/google/cloud/tpu/v2/cloud_tpu.proto @@ -34,7 +34,8 @@ option java_package = "com.google.cloud.tpu.v2"; // TPU API v2 service Tpu { option (google.api.default_host) = "tpu.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 nodes. rpc ListNodes(ListNodesRequest) returns (ListNodesResponse) { @@ -115,7 +116,8 @@ service Tpu { } // Generates the Cloud TPU service identity for the project. - rpc GenerateServiceIdentity(GenerateServiceIdentityRequest) returns (GenerateServiceIdentityResponse) { + rpc GenerateServiceIdentity(GenerateServiceIdentityRequest) + returns (GenerateServiceIdentityResponse) { option (google.api.http) = { post: "/v2/{parent=projects/*/locations/*}:generateServiceIdentity" body: "*" @@ -123,7 +125,8 @@ service Tpu { } // Lists accelerator types supported by this API. - rpc ListAcceleratorTypes(ListAcceleratorTypesRequest) returns (ListAcceleratorTypesResponse) { + rpc ListAcceleratorTypes(ListAcceleratorTypesRequest) + returns (ListAcceleratorTypesResponse) { option (google.api.http) = { get: "/v2/{parent=projects/*/locations/*}/acceleratorTypes" }; @@ -139,7 +142,8 @@ service Tpu { } // Lists runtime versions supported by this API. - rpc ListRuntimeVersions(ListRuntimeVersionsRequest) returns (ListRuntimeVersionsResponse) { + rpc ListRuntimeVersions(ListRuntimeVersionsRequest) + returns (ListRuntimeVersionsResponse) { option (google.api.http) = { get: "/v2/{parent=projects/*/locations/*}/runtimeVersions" }; @@ -155,7 +159,8 @@ service Tpu { } // Retrieves the guest attributes for the node. - rpc GetGuestAttributes(GetGuestAttributesRequest) returns (GetGuestAttributesResponse) { + rpc GetGuestAttributes(GetGuestAttributesRequest) + returns (GetGuestAttributesResponse) { option (google.api.http) = { post: "/v2/{name=projects/*/locations/*/nodes/*}:getGuestAttributes" body: "*" @@ -389,8 +394,8 @@ message Node { // Output only. The current state for the TPU Node. State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. If this field is populated, it contains a description of why the TPU Node - // is unhealthy. + // Output only. If this field is populated, it contains a description of why + // the TPU Node is unhealthy. string health_description = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. The runtime version running in the Node. @@ -414,7 +419,8 @@ message Node { ServiceAccount service_account = 37; // Output only. The time when the node was created. - google.protobuf.Timestamp create_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; // The scheduling options for this node. SchedulingConfig scheduling_config = 17; @@ -422,7 +428,8 @@ message Node { // Output only. The network endpoints where TPU workers can be accessed and // sent work. It is recommended that runtime clients of the node reach out // to the 0th entry in this map first. - repeated NetworkEndpoint network_endpoints = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated NetworkEndpoint network_endpoints = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; // The health status of the TPU node. Health health = 22; @@ -459,9 +466,7 @@ message ListNodesRequest { // Required. The parent resource name. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "tpu.googleapis.com/Node" - } + (google.api.resource_reference) = { child_type: "tpu.googleapis.com/Node" } ]; // The maximum number of items to return. @@ -488,9 +493,7 @@ message GetNodeRequest { // Required. The resource name. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "tpu.googleapis.com/Node" - } + (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } ]; } @@ -516,9 +519,7 @@ message DeleteNodeRequest { // Required. The resource name. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "tpu.googleapis.com/Node" - } + (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } ]; } @@ -527,9 +528,7 @@ message StopNodeRequest { // Required. The resource name. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "tpu.googleapis.com/Node" - } + (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } ]; } @@ -538,9 +537,7 @@ message StartNodeRequest { // Required. The resource name. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "tpu.googleapis.com/Node" - } + (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } ]; } @@ -549,7 +546,8 @@ message UpdateNodeRequest { // Required. Mask of fields from [Node][Tpu.Node] to update. // Supported fields: [description, tags, labels, metadata, // network_config.enable_external_ips]. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; // Required. The node. Only fields specified in update_mask are updated. Node node = 2 [(google.api.field_behavior) = REQUIRED]; @@ -561,7 +559,8 @@ message ServiceIdentity { string email = 1; } -// Request for [GenerateServiceIdentity][google.cloud.tpu.v2.Tpu.GenerateServiceIdentity]. +// Request for +// [GenerateServiceIdentity][google.cloud.tpu.v2.Tpu.GenerateServiceIdentity]. message GenerateServiceIdentityRequest { // Required. The parent resource name. string parent = 1 [ @@ -572,7 +571,8 @@ message GenerateServiceIdentityRequest { ]; } -// Response for [GenerateServiceIdentity][google.cloud.tpu.v2.Tpu.GenerateServiceIdentity]. +// Response for +// [GenerateServiceIdentity][google.cloud.tpu.v2.Tpu.GenerateServiceIdentity]. message GenerateServiceIdentityResponse { // ServiceIdentity that was created or retrieved. ServiceIdentity identity = 1; @@ -603,7 +603,8 @@ message GetAcceleratorTypeRequest { ]; } -// Request for [ListAcceleratorTypes][google.cloud.tpu.v2.Tpu.ListAcceleratorTypes]. +// Request for +// [ListAcceleratorTypes][google.cloud.tpu.v2.Tpu.ListAcceleratorTypes]. message ListAcceleratorTypesRequest { // Required. The parent resource name. string parent = 1 [ @@ -626,7 +627,8 @@ message ListAcceleratorTypesRequest { string order_by = 6; } -// Response for [ListAcceleratorTypes][google.cloud.tpu.v2.Tpu.ListAcceleratorTypes]. +// Response for +// [ListAcceleratorTypes][google.cloud.tpu.v2.Tpu.ListAcceleratorTypes]. message ListAcceleratorTypesResponse { // The listed nodes. repeated AcceleratorType accelerator_types = 1; @@ -663,7 +665,8 @@ message GetRuntimeVersionRequest { ]; } -// Request for [ListRuntimeVersions][google.cloud.tpu.v2.Tpu.ListRuntimeVersions]. +// Request for +// [ListRuntimeVersions][google.cloud.tpu.v2.Tpu.ListRuntimeVersions]. message ListRuntimeVersionsRequest { // Required. The parent resource name. string parent = 1 [ @@ -686,7 +689,8 @@ message ListRuntimeVersionsRequest { string order_by = 6; } -// Response for [ListRuntimeVersions][google.cloud.tpu.v2.Tpu.ListRuntimeVersions]. +// Response for +// [ListRuntimeVersions][google.cloud.tpu.v2.Tpu.ListRuntimeVersions]. message ListRuntimeVersionsResponse { // The listed nodes. repeated RuntimeVersion runtime_versions = 1; @@ -769,9 +773,7 @@ message GetGuestAttributesRequest { // Required. The resource name. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "tpu.googleapis.com/Node" - } + (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } ]; // The guest attributes path to be queried. @@ -782,7 +784,8 @@ message GetGuestAttributesRequest { repeated string worker_ids = 3; } -// Response for [GetGuestAttributes][google.cloud.tpu.v2.Tpu.GetGuestAttributes]. +// Response for +// [GetGuestAttributes][google.cloud.tpu.v2.Tpu.GetGuestAttributes]. message GetGuestAttributesResponse { // The guest attributes for the TPU workers. repeated GuestAttributes guest_attributes = 1; diff --git a/packages/google-cloud-tpu/protos/google/cloud/tpu/v2alpha1/cloud_tpu.proto b/packages/google-cloud-tpu/protos/google/cloud/tpu/v2alpha1/cloud_tpu.proto index dc179c8183c..7f618ebdc64 100644 --- a/packages/google-cloud-tpu/protos/google/cloud/tpu/v2alpha1/cloud_tpu.proto +++ b/packages/google-cloud-tpu/protos/google/cloud/tpu/v2alpha1/cloud_tpu.proto @@ -880,7 +880,7 @@ message CreateQueuedResourceRequest { } ]; - // The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` + // The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$ // regex format. string queued_resource_id = 2; diff --git a/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_queued_resource.js b/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_queued_resource.js index c28e8945ad3..cb6dd204258 100644 --- a/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_queued_resource.js +++ b/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_queued_resource.js @@ -33,7 +33,7 @@ function main(parent, queuedResource) { */ // const parent = 'abc123' /** - * The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` + * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$ * regex format. */ // const queuedResourceId = 'abc123' diff --git a/packages/google-cloud-tpu/src/v2/tpu_client.ts b/packages/google-cloud-tpu/src/v2/tpu_client.ts index 2848514070f..6d22eccfad0 100644 --- a/packages/google-cloud-tpu/src/v2/tpu_client.ts +++ b/packages/google-cloud-tpu/src/v2/tpu_client.ts @@ -241,59 +241,27 @@ export class TpuClient { lroOptions.httpRules = [ { selector: 'google.cloud.location.Locations.GetLocation', - get: '/v1alpha1/{name=projects/*/locations/*}', - additional_bindings: [ - {get: '/v1/{name=projects/*/locations/*}'}, - {get: '/v2alpha1/{name=projects/*/locations/*}'}, - {get: '/v2/{name=projects/*/locations/*}'}, - ], + get: '/v2/{name=projects/*/locations/*}', }, { selector: 'google.cloud.location.Locations.ListLocations', - get: '/v1alpha1/{name=projects/*}/locations', - additional_bindings: [ - {get: '/v1/{name=projects/*}/locations'}, - {get: '/v2alpha1/{name=projects/*}/locations'}, - {get: '/v2/{name=projects/*}/locations'}, - ], + get: '/v2/{name=projects/*}/locations', }, { selector: 'google.longrunning.Operations.CancelOperation', - post: '/v1alpha1/{name=projects/*/locations/*/operations/*}:cancel', - additional_bindings: [ - {post: '/v1/{name=projects/*/locations/*/operations/*}:cancel'}, - { - post: '/v2alpha1/{name=projects/*/locations/*/operations/*}:cancel', - }, - {post: '/v2/{name=projects/*/locations/*/operations/*}:cancel'}, - ], + post: '/v2/{name=projects/*/locations/*/operations/*}:cancel', }, { selector: 'google.longrunning.Operations.DeleteOperation', - delete: '/v1alpha1/{name=projects/*/locations/*/operations/*}', - additional_bindings: [ - {delete: '/v1/{name=projects/*/locations/*/operations/*}'}, - {delete: '/v2alpha1/{name=projects/*/locations/*/operations/*}'}, - {delete: '/v2/{name=projects/*/locations/*/operations/*}'}, - ], + delete: '/v2/{name=projects/*/locations/*/operations/*}', }, { selector: 'google.longrunning.Operations.GetOperation', - get: '/v1alpha1/{name=projects/*/locations/*/operations/*}', - additional_bindings: [ - {get: '/v1/{name=projects/*/locations/*/operations/*}'}, - {get: '/v2alpha1/{name=projects/*/locations/*/operations/*}'}, - {get: '/v2/{name=projects/*/locations/*/operations/*}'}, - ], + get: '/v2/{name=projects/*/locations/*/operations/*}', }, { selector: 'google.longrunning.Operations.ListOperations', - get: '/v1alpha1/{name=projects/*/locations/*}/operations', - additional_bindings: [ - {get: '/v1/{name=projects/*/locations/*}/operations'}, - {get: '/v2alpha1/{name=projects/*/locations/*}/operations'}, - {get: '/v2/{name=projects/*/locations/*}/operations'}, - ], + get: '/v2/{name=projects/*/locations/*}/operations', }, ]; } diff --git a/packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts b/packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts index 80fc5e117cd..0ffd053b008 100644 --- a/packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts +++ b/packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts @@ -249,59 +249,27 @@ export class TpuClient { lroOptions.httpRules = [ { selector: 'google.cloud.location.Locations.GetLocation', - get: '/v1alpha1/{name=projects/*/locations/*}', - additional_bindings: [ - {get: '/v1/{name=projects/*/locations/*}'}, - {get: '/v2alpha1/{name=projects/*/locations/*}'}, - {get: '/v2/{name=projects/*/locations/*}'}, - ], + get: '/v2alpha1/{name=projects/*/locations/*}', }, { selector: 'google.cloud.location.Locations.ListLocations', - get: '/v1alpha1/{name=projects/*}/locations', - additional_bindings: [ - {get: '/v1/{name=projects/*}/locations'}, - {get: '/v2alpha1/{name=projects/*}/locations'}, - {get: '/v2/{name=projects/*}/locations'}, - ], + get: '/v2alpha1/{name=projects/*}/locations', }, { selector: 'google.longrunning.Operations.CancelOperation', - post: '/v1alpha1/{name=projects/*/locations/*/operations/*}:cancel', - additional_bindings: [ - {post: '/v1/{name=projects/*/locations/*/operations/*}:cancel'}, - { - post: '/v2alpha1/{name=projects/*/locations/*/operations/*}:cancel', - }, - {post: '/v2/{name=projects/*/locations/*/operations/*}:cancel'}, - ], + post: '/v2alpha1/{name=projects/*/locations/*/operations/*}:cancel', }, { selector: 'google.longrunning.Operations.DeleteOperation', - delete: '/v1alpha1/{name=projects/*/locations/*/operations/*}', - additional_bindings: [ - {delete: '/v1/{name=projects/*/locations/*/operations/*}'}, - {delete: '/v2alpha1/{name=projects/*/locations/*/operations/*}'}, - {delete: '/v2/{name=projects/*/locations/*/operations/*}'}, - ], + delete: '/v2alpha1/{name=projects/*/locations/*/operations/*}', }, { selector: 'google.longrunning.Operations.GetOperation', - get: '/v1alpha1/{name=projects/*/locations/*/operations/*}', - additional_bindings: [ - {get: '/v1/{name=projects/*/locations/*/operations/*}'}, - {get: '/v2alpha1/{name=projects/*/locations/*/operations/*}'}, - {get: '/v2/{name=projects/*/locations/*/operations/*}'}, - ], + get: '/v2alpha1/{name=projects/*/locations/*/operations/*}', }, { selector: 'google.longrunning.Operations.ListOperations', - get: '/v1alpha1/{name=projects/*/locations/*}/operations', - additional_bindings: [ - {get: '/v1/{name=projects/*/locations/*}/operations'}, - {get: '/v2alpha1/{name=projects/*/locations/*}/operations'}, - {get: '/v2/{name=projects/*/locations/*}/operations'}, - ], + get: '/v2alpha1/{name=projects/*/locations/*}/operations', }, ]; } @@ -1822,7 +1790,7 @@ export class TpuClient { * @param {string} request.parent * Required. The parent resource name. * @param {string} request.queuedResourceId - * The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` + * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$ * regex format. * @param {google.cloud.tpu.v2alpha1.QueuedResource} request.queuedResource * Required. The queued resource.