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 b6f0623b787..dc179c8183c 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 @@ -37,7 +37,8 @@ option java_package = "com.google.cloud.tpu.v2alpha1"; // TPU API v2alpha1 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) { @@ -118,7 +119,8 @@ service Tpu { } // Lists queued resources. - rpc ListQueuedResources(ListQueuedResourcesRequest) returns (ListQueuedResourcesResponse) { + rpc ListQueuedResources(ListQueuedResourcesRequest) + returns (ListQueuedResourcesResponse) { option (google.api.http) = { get: "/v2alpha1/{parent=projects/*/locations/*}/queuedResources" }; @@ -134,12 +136,14 @@ service Tpu { } // Creates a QueuedResource TPU instance. - rpc CreateQueuedResource(CreateQueuedResourceRequest) returns (google.longrunning.Operation) { + rpc CreateQueuedResource(CreateQueuedResourceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2alpha1/{parent=projects/*/locations/*}/queuedResources" body: "queued_resource" }; - option (google.api.method_signature) = "parent,queued_resource,queued_resource_id"; + option (google.api.method_signature) = + "parent,queued_resource,queued_resource_id"; option (google.longrunning.operation_info) = { response_type: "QueuedResource" metadata_type: "OperationMetadata" @@ -147,7 +151,8 @@ service Tpu { } // Deletes a QueuedResource TPU instance. - rpc DeleteQueuedResource(DeleteQueuedResourceRequest) returns (google.longrunning.Operation) { + rpc DeleteQueuedResource(DeleteQueuedResourceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v2alpha1/{name=projects/*/locations/*/queuedResources/*}" }; @@ -159,7 +164,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: "/v2alpha1/{parent=projects/*/locations/*}:generateServiceIdentity" body: "*" @@ -167,7 +173,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: "/v2alpha1/{parent=projects/*/locations/*}/acceleratorTypes" }; @@ -183,7 +190,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: "/v2alpha1/{parent=projects/*/locations/*}/runtimeVersions" }; @@ -199,7 +207,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: "/v2alpha1/{name=projects/*/locations/*/nodes/*}:getGuestAttributes" body: "*" @@ -207,7 +216,8 @@ service Tpu { } // Simulates a maintenance event. - rpc SimulateMaintenanceEvent(SimulateMaintenanceEventRequest) returns (google.longrunning.Operation) { + rpc SimulateMaintenanceEvent(SimulateMaintenanceEventRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2alpha1/{name=projects/*/locations/*/nodes/*}:simulateMaintenanceEvent" body: "*" @@ -442,8 +452,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. @@ -467,7 +477,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; @@ -475,7 +486,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; @@ -503,7 +515,8 @@ message Node { // Output only. The Symptoms that have occurred to the TPU Node. repeated Symptom symptoms = 39 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The qualified name of the QueuedResource that requested this Node. + // Output only. The qualified name of the QueuedResource that requested this + // Node. string queued_resource = 43 [(google.api.field_behavior) = OUTPUT_ONLY]; // Shielded Instance options. @@ -532,7 +545,7 @@ message QueuedResource { } ]; - // The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$ + // The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` // regex format. This is only specified when requesting a single node. // In case of multi-node requests, multi_node_params must be populated // instead. It's an error to specify both node_id and multi_node_params. @@ -547,16 +560,15 @@ message QueuedResource { } // BestEffort tier definition. - message BestEffort { - - } + message BestEffort {} // Guaranteed tier definition. message Guaranteed { // Optional. Defines the minimum duration of the guarantee. If specified, // the requested resources will only be provisioned if they can be // allocated for at least the given duration. - google.protobuf.Duration min_duration = 1 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Duration min_duration = 1 + [(google.api.field_behavior) = OPTIONAL]; // Optional. Specifies the request should be scheduled on reserved capacity. bool reserved = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -659,19 +671,13 @@ message QueuedResourceState { } // Further data for the creating state. - message CreatingData { - - } + message CreatingData {} // Further data for the accepted state. - message AcceptedData { - - } + message AcceptedData {} // Further data for the provisioning state. - message ProvisioningData { - - } + message ProvisioningData {} // Further data for the failed state. message FailedData { @@ -680,24 +686,16 @@ message QueuedResourceState { } // Further data for the deleting state. - message DeletingData { - - } + message DeletingData {} // Further data for the active state. - message ActiveData { - - } + message ActiveData {} // Further data for the suspending state. - message SuspendingData { - - } + message SuspendingData {} // Further data for the suspended state. - message SuspendedData { - - } + message SuspendedData {} // State of the QueuedResource request. State state = 1; @@ -735,9 +733,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. @@ -764,9 +760,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" } ]; } @@ -795,9 +789,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" } ]; // Idempotent request UUID. @@ -809,9 +801,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" } ]; } @@ -820,9 +810,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" } ]; } @@ -831,13 +819,15 @@ 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]; } -// Request for [ListQueuedResources][google.cloud.tpu.v2alpha1.Tpu.ListQueuedResources]. +// Request for +// [ListQueuedResources][google.cloud.tpu.v2alpha1.Tpu.ListQueuedResources]. message ListQueuedResourcesRequest { // Required. The parent resource name. string parent = 1 [ @@ -854,7 +844,8 @@ message ListQueuedResourcesRequest { string page_token = 3; } -// Response for [ListQueuedResources][google.cloud.tpu.v2alpha1.Tpu.ListQueuedResources]. +// Response for +// [ListQueuedResources][google.cloud.tpu.v2alpha1.Tpu.ListQueuedResources]. message ListQueuedResourcesResponse { // The listed queued resources. repeated QueuedResource queued_resources = 1; @@ -866,7 +857,8 @@ message ListQueuedResourcesResponse { repeated string unreachable = 3; } -// Request for [GetQueuedResource][google.cloud.tpu.v2alpha1.Tpu.GetQueuedResource] +// Request for +// [GetQueuedResource][google.cloud.tpu.v2alpha1.Tpu.GetQueuedResource] message GetQueuedResourceRequest { // Required. The resource name. string name = 1 [ @@ -877,7 +869,8 @@ message GetQueuedResourceRequest { ]; } -// Request for [CreateQueuedResource][google.cloud.tpu.v2alpha1.Tpu.CreateQueuedResource]. +// Request for +// [CreateQueuedResource][google.cloud.tpu.v2alpha1.Tpu.CreateQueuedResource]. message CreateQueuedResourceRequest { // Required. The parent resource name. string parent = 1 [ @@ -887,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; @@ -898,7 +891,8 @@ message CreateQueuedResourceRequest { string request_id = 4; } -// Request for [DeleteQueuedResource][google.cloud.tpu.v2alpha1.Tpu.DeleteQueuedResource]. +// Request for +// [DeleteQueuedResource][google.cloud.tpu.v2alpha1.Tpu.DeleteQueuedResource]. message DeleteQueuedResourceRequest { // Required. The resource name. string name = 1 [ @@ -918,7 +912,8 @@ message ServiceIdentity { string email = 1; } -// Request for [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity]. +// Request for +// [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity]. message GenerateServiceIdentityRequest { // Required. The parent resource name. string parent = 1 [ @@ -929,7 +924,8 @@ message GenerateServiceIdentityRequest { ]; } -// Response for [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity]. +// Response for +// [GenerateServiceIdentity][google.cloud.tpu.v2alpha1.Tpu.GenerateServiceIdentity]. message GenerateServiceIdentityResponse { // ServiceIdentity that was created or retrieved. ServiceIdentity identity = 1; @@ -949,7 +945,8 @@ message AcceleratorType { string type = 2; } -// Request for [GetAcceleratorType][google.cloud.tpu.v2alpha1.Tpu.GetAcceleratorType]. +// Request for +// [GetAcceleratorType][google.cloud.tpu.v2alpha1.Tpu.GetAcceleratorType]. message GetAcceleratorTypeRequest { // Required. The resource name. string name = 1 [ @@ -960,7 +957,8 @@ message GetAcceleratorTypeRequest { ]; } -// Request for [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes]. +// Request for +// [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes]. message ListAcceleratorTypesRequest { // Required. The parent resource name. string parent = 1 [ @@ -983,7 +981,8 @@ message ListAcceleratorTypesRequest { string order_by = 6; } -// Response for [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes]. +// Response for +// [ListAcceleratorTypes][google.cloud.tpu.v2alpha1.Tpu.ListAcceleratorTypes]. message ListAcceleratorTypesResponse { // The listed nodes. repeated AcceleratorType accelerator_types = 1; @@ -1009,7 +1008,8 @@ message RuntimeVersion { string version = 2; } -// Request for [GetRuntimeVersion][google.cloud.tpu.v2alpha1.Tpu.GetRuntimeVersion]. +// Request for +// [GetRuntimeVersion][google.cloud.tpu.v2alpha1.Tpu.GetRuntimeVersion]. message GetRuntimeVersionRequest { // Required. The resource name. string name = 1 [ @@ -1020,7 +1020,8 @@ message GetRuntimeVersionRequest { ]; } -// Request for [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions]. +// Request for +// [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions]. message ListRuntimeVersionsRequest { // Required. The parent resource name. string parent = 1 [ @@ -1043,7 +1044,8 @@ message ListRuntimeVersionsRequest { string order_by = 6; } -// Response for [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions]. +// Response for +// [ListRuntimeVersions][google.cloud.tpu.v2alpha1.Tpu.ListRuntimeVersions]. message ListRuntimeVersionsResponse { // The listed nodes. repeated RuntimeVersion runtime_versions = 1; @@ -1121,14 +1123,13 @@ message Symptom { string worker_id = 4; } -// Request for [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes]. +// Request for +// [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes]. 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. @@ -1139,20 +1140,20 @@ message GetGuestAttributesRequest { repeated string worker_ids = 3; } -// Response for [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes]. +// Response for +// [GetGuestAttributes][google.cloud.tpu.v2alpha1.Tpu.GetGuestAttributes]. message GetGuestAttributesResponse { // The guest attributes for the TPU workers. repeated GuestAttributes guest_attributes = 1; } -// Request for [SimulateMaintenanceEvent][google.cloud.tpu.v2alpha1.Tpu.SimulateMaintenanceEvent]. +// Request for +// [SimulateMaintenanceEvent][google.cloud.tpu.v2alpha1.Tpu.SimulateMaintenanceEvent]. message SimulateMaintenanceEventRequest { // 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 0-based worker ID. If it is empty, worker ID 0 will be selected for 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 ce18949212b..3fdbfcea9db 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/v2alpha1/tpu_client.ts b/packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts index a085faabcf0..2fa9f34008f 100644 --- a/packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts +++ b/packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts @@ -1822,7 +1822,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.