Skip to content

Commit

Permalink
fix: proper http bindings for v2 API (#3884)
Browse files Browse the repository at this point in the history
* chore: reformat protos

PiperOrigin-RevId: 504359717

Source-Link: googleapis/googleapis@1266905

Source-Link: googleapis/googleapis-gen@881ee78
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: googleapis/googleapis@44f176c

Source-Link: googleapis/googleapis-gen@c2c886b
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: googleapis/googleapis@1230a6b

Source-Link: googleapis/googleapis-gen@51e8944
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 <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: sofisl <[email protected]>
  • Loading branch information
3 people authored Jan 25, 2023
1 parent e6a07e1 commit 0d92384
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -113,23 +114,26 @@ 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"
};
option (google.api.method_signature) = "parent";
}

// Gets TensorFlow Version.
rpc GetTensorFlowVersion(GetTensorFlowVersionRequest) returns (TensorFlowVersion) {
rpc GetTensorFlowVersion(GetTensorFlowVersionRequest)
returns (TensorFlowVersion) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/tensorflowVersions/*}"
};
option (google.api.method_signature) = "name";
}

// 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"
};
Expand Down Expand Up @@ -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.
Expand All @@ -304,22 +308,24 @@ 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;

// 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;
Expand All @@ -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.
Expand All @@ -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" }
];
}

Expand All @@ -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.
Expand All @@ -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" }
];
}

Expand Down Expand Up @@ -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 [
Expand All @@ -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 [
Expand All @@ -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;
Expand Down Expand Up @@ -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 [
Expand All @@ -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;
Expand Down
Loading

0 comments on commit 0d92384

Please sign in to comment.