From d8605d9a6ac9b4f8d2908778c789e9654811fc71 Mon Sep 17 00:00:00 2001 From: Gus Class Date: Mon, 6 Feb 2017 10:57:36 -0800 Subject: [PATCH] Removes custom proto / libraries --- speech/grpc/pom.xml | 107 +----- .../grpc/src/main/java/third_party/.gitignore | 4 - .../third_party/google/api/annotations.proto | 29 -- .../java/third_party/google/api/http.proto | 245 ------------- .../java/third_party/google/api/label.proto | 46 --- .../google/api/monitored_resource.proto | 64 ---- .../java/third_party/google/logging/README.md | 2 - .../google/logging/type/http_request.proto | 69 ---- .../google/logging/type/log_severity.proto | 62 ---- .../google/logging/v2/log_entry.proto | 114 ------ .../google/logging/v2/logging.proto | 167 --------- .../google/logging/v2/logging_config.proto | 171 --------- .../google/logging/v2/logging_metrics.proto | 146 -------- .../google/longrunning/operations.proto | 144 -------- .../java/third_party/google/rpc/README.md | 5 - .../java/third_party/google/rpc/code.proto | 190 ---------- .../google/rpc/error_details.proto | 157 -------- .../java/third_party/google/rpc/status.proto | 90 ----- .../google/speech/v1/cloud-speech.proto | 269 -------------- .../google/speech/v1beta1/cloud_speech.proto | 335 ------------------ .../java/third_party/google/type/README.md | 10 - .../java/third_party/google/type/color.proto | 163 --------- .../java/third_party/google/type/date.proto | 43 --- .../third_party/google/type/dayofweek.proto | 50 --- .../java/third_party/google/type/latlng.proto | 36 -- .../java/third_party/google/type/money.proto | 40 --- .../third_party/google/type/timeofday.proto | 42 --- 27 files changed, 5 insertions(+), 2795 deletions(-) delete mode 100644 speech/grpc/src/main/java/third_party/.gitignore delete mode 100644 speech/grpc/src/main/java/third_party/google/api/annotations.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/api/http.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/api/label.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/api/monitored_resource.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/logging/README.md delete mode 100644 speech/grpc/src/main/java/third_party/google/logging/type/http_request.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/logging/type/log_severity.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/logging/v2/log_entry.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/logging/v2/logging.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/logging/v2/logging_config.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/logging/v2/logging_metrics.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/longrunning/operations.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/rpc/README.md delete mode 100644 speech/grpc/src/main/java/third_party/google/rpc/code.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/rpc/error_details.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/rpc/status.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/speech/v1/cloud-speech.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/speech/v1beta1/cloud_speech.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/type/README.md delete mode 100644 speech/grpc/src/main/java/third_party/google/type/color.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/type/date.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/type/dayofweek.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/type/latlng.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/type/money.proto delete mode 100644 speech/grpc/src/main/java/third_party/google/type/timeofday.proto diff --git a/speech/grpc/pom.xml b/speech/grpc/pom.xml index ca857bb323b..794a7350dfc 100644 --- a/speech/grpc/pom.xml +++ b/speech/grpc/pom.xml @@ -55,21 +55,6 @@ limitations under the License. - - staged - - - snapshots-repo - https://oss.sonatype.org/content/repositories/snapshots - - false - - - true - - - - jdk7 @@ -88,34 +73,15 @@ limitations under the License. 1.8 - - fedora - - - os.detected.classifier - os.detected.release.fedora - - - - ${os.detected.classifier}-fedora - - - - non-fedora - - - os.detected.classifier - !os.detected.release.fedora - - - - ${os.detected.classifier} - - + + com.google.cloud + google-cloud-speech + 0.8.1-alpha + junit junit @@ -182,20 +148,6 @@ limitations under the License. grpc-stub 1.0.3 - - - io.netty - netty-tcnative-boringssl-static - 1.1.33.Fork25 - ${tcnative.classifier} - log4j log4j @@ -216,60 +168,11 @@ limitations under the License. Central Repository https://repo.maven.apache.org/maven2 - - protoc-plugin - https://dl.bintray.com/sergei-ivanov/maven/ - - - - kr.motd.maven - os-maven-plugin - 1.4.1.Final - - - - org.xolstice.maven.plugins - protobuf-maven-plugin - ${xolstice-protobuf-maven-plugin-version} - - - com.google.protobuf:protoc:3.0.0:exe:${os.detected.classifier} - grpc-java - ${basedir}/src/main/java/third_party - io.grpc:protoc-gen-grpc-java:${grpc-protobuf-version}:exe:${os.detected.classifier} - - - - - compile - compile-custom - - - - - - org.codehaus.mojo - versions-maven-plugin - ${codehaus-versions-maven-plugin-version} - - - compile - - display-dependency-updates - - - - maven-compiler-plugin ${maven-compiler-plugin-version} diff --git a/speech/grpc/src/main/java/third_party/.gitignore b/speech/grpc/src/main/java/third_party/.gitignore deleted file mode 100644 index 65267c8e5d7..00000000000 --- a/speech/grpc/src/main/java/third_party/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -OWNERS -README.google -google/internal -google/protobuf diff --git a/speech/grpc/src/main/java/third_party/google/api/annotations.proto b/speech/grpc/src/main/java/third_party/google/api/annotations.proto deleted file mode 100644 index cbd18b847f3..00000000000 --- a/speech/grpc/src/main/java/third_party/google/api/annotations.proto +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} diff --git a/speech/grpc/src/main/java/third_party/google/api/http.proto b/speech/grpc/src/main/java/third_party/google/api/http.proto deleted file mode 100644 index 4bbadbb76d0..00000000000 --- a/speech/grpc/src/main/java/third_party/google/api/http.proto +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; - - -// `HttpRule` defines the mapping of an RPC method to one or more HTTP -// REST APIs. The mapping determines what portions of the request -// message are populated from the path, query parameters, or body of -// the HTTP request. The mapping is typically specified as an -// `google.api.http` annotation, see "google/api/annotations.proto" -// for details. -// -// The mapping consists of a field specifying the path template and -// method kind. The path template can refer to fields in the request -// message, as in the example below which describes a REST GET -// operation on a resource collection of messages: -// -// ```proto -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}"; -// } -// } -// message GetMessageRequest { -// string message_id = 1; // mapped to the URL -// } -// message Message { -// string text = 1; // content of the resource -// } -// ``` -// -// This definition enables an automatic, bidrectional mapping of HTTP -// JSON to RPC. Example: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// -// In general, not only fields but also field paths can be referenced -// from a path pattern. Fields mapped to the path pattern cannot be -// repeated and must have a primitive (non-message) type. -// -// Any fields in the request message which are not bound by the path -// pattern automatically become (optional) HTTP query -// parameters. Assume the following definition of the request message: -// -// ```proto -// message GetMessageRequest { -// string message_id = 1; // mapped to the URL -// int64 revision = 2; // becomes a parameter -// } -// ``` -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456?revision=2` | `GetMessage(message_id: "123456" revision: 2)` -// -// Note that fields which are mapped to HTTP parameters must have a -// primitive type or a repeated primitive type. Message types are not -// allowed. In the case of a repeated type, the parameter can be -// repeated in the URL, as in `...?param=A¶m=B`. -// -// For HTTP method kinds which allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// ```proto -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// put: "/v1/messages/{message_id}" -// body: "message" -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// ``` -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | RPC -// -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// ```proto -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// put: "/v1/messages/{message_id}" -// body: "*" -// } -// } -// message Message { -// string message_id = 2; -// string text = 2; -// } -// ``` -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | RPC -// -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice of -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// ```proto -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// ``` -// -// This enables the following two alternative HTTP JSON to RPC -// mappings: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` -// -// # Rules for HTTP mapping -// The rules for mapping HTTP path, query parameters, and body fields -// to the request message are as follows: -// -// 1. The `body` field specifies either `*` or a field path, or is -// omitted. If omitted, it assumes there is no HTTP body. -// 2. Leaf fields (recursive expansion of nested messages in the -// request) can be classified into three types: -// (a) Matched in the URL template. -// (b) Covered by body (if body is `*`, everything except (a) fields; -// else everything under the body field) -// (c) All other fields. -// 3. URL query parameters found in the HTTP request are mapped to (c) fields. -// 4. Any body sent with an HTTP request can contain only (b) fields. -// -// The syntax of the path template is as follows: -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// `*` matches a single path component, `**` zero or more path components, and -// `LITERAL` a constant. A `Variable` can match an entire path as specified -// again by a template; this nested template must not contain further variables. -// If no template is given with a variable, it matches a single path component. -// The notation `{var}` is henceforth equivalent to `{var=*}`. NOTE: the field -// paths in variables and in the `body` must not refer to repeated fields. -// -// Use CustomHttpPattern to specify any HTTP method that is not included in the -// pattern field, such as HEAD, or "*" to leave the HTTP method unspecified for -// a given URL path rule. The wild-card rule is useful for services that provide -// content to Web (HTML) clients. -message HttpRule { - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Used for listing and getting information about resources. - string get = 2; - - // Used for updating a resource. - string put = 3; - - // Used for creating a resource. - string post = 4; - - // Used for deleting a resource. - string delete = 5; - - // Used for updating a resource. - string patch = 6; - - // Custom pattern is used for defining custom verbs. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP body, or - // `*` for mapping all fields not captured by the path pattern to the HTTP - // body. NOTE: the referred field must not be a repeated field. - string body = 7; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} diff --git a/speech/grpc/src/main/java/third_party/google/api/label.proto b/speech/grpc/src/main/java/third_party/google/api/label.proto deleted file mode 100644 index 680bf119423..00000000000 --- a/speech/grpc/src/main/java/third_party/google/api/label.proto +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option java_multiple_files = true; -option java_outer_classname = "LabelProto"; -option java_package = "com.google.api"; - - -// A description of a label. -message LabelDescriptor { - // Value types that can be used as label values. - enum ValueType { - // A variable-length string. This is the default. - STRING = 0; - - // Boolean; true or false. - BOOL = 1; - - // A 64-bit signed integer. - INT64 = 2; - } - - // The label key. - string key = 1; - - // The type of data that can be assigned to the label. - ValueType value_type = 2; - - // A human-readable description for the label. - string description = 3; -} diff --git a/speech/grpc/src/main/java/third_party/google/api/monitored_resource.proto b/speech/grpc/src/main/java/third_party/google/api/monitored_resource.proto deleted file mode 100644 index 16ac9fad3c0..00000000000 --- a/speech/grpc/src/main/java/third_party/google/api/monitored_resource.proto +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/label.proto"; - -option java_multiple_files = true; -option java_outer_classname = "MonitoredResourceProto"; -option java_package = "com.google.api"; - - -// A descriptor that describes the schema of [MonitoredResource][google.api.MonitoredResource]. -message MonitoredResourceDescriptor { - // The monitored resource type. For example, the type `"cloudsql_database"` - // represents databases in Google Cloud SQL. - string type = 1; - - // A concise name for the monitored resource type that can be displayed in - // user interfaces. For example, `"Google Cloud SQL Database"`. - string display_name = 2; - - // A detailed description of the monitored resource type that can be used in - // documentation. - string description = 3; - - // A set of labels that can be used to describe instances of this monitored - // resource type. For example, Google Cloud SQL databases can be labeled with - // their `"database_id"` and their `"zone"`. - repeated LabelDescriptor labels = 4; -} - -// A monitored resource describes a resource that can be used for monitoring -// purpose. It can also be used for logging, billing, and other purposes. Each -// resource has a `type` and a set of `labels`. The labels contain information -// that identifies the resource and describes attributes of it. For example, -// you can use monitored resource to describe a normal file, where the resource -// has `type` as `"file"`, the label `path` identifies the file, and the label -// `size` describes the file size. The monitoring system can use a set of -// monitored resources of files to generate file size distribution. -message MonitoredResource { - // The monitored resource type. This field must match the corresponding - // [MonitoredResourceDescriptor.type][google.api.MonitoredResourceDescriptor.type] to this resource.. For example, - // `"cloudsql_database"` represents Cloud SQL databases. - string type = 1; - - // Values for some or all of the labels listed in the associated monitored - // resource descriptor. For example, you specify a specific Cloud SQL database - // by supplying values for both the `"database_id"` and `"zone"` labels. - map labels = 2; -} diff --git a/speech/grpc/src/main/java/third_party/google/logging/README.md b/speech/grpc/src/main/java/third_party/google/logging/README.md deleted file mode 100644 index 6a414eb07b7..00000000000 --- a/speech/grpc/src/main/java/third_party/google/logging/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Introduction -The Google logging service. diff --git a/speech/grpc/src/main/java/third_party/google/logging/type/http_request.proto b/speech/grpc/src/main/java/third_party/google/logging/type/http_request.proto deleted file mode 100644 index bd28a36057c..00000000000 --- a/speech/grpc/src/main/java/third_party/google/logging/type/http_request.proto +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.logging.type; - -import "google/api/annotations.proto"; - -option java_multiple_files = true; -option java_outer_classname = "HttpRequestProto"; -option java_package = "com.google.logging.type"; - - -// A common proto for logging HTTP requests. -// -message HttpRequest { - // The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. - string request_method = 1; - - // The scheme (http, https), the host name, the path and the query - // portion of the URL that was requested. - // Example: `"http://example.com/some/info?color=red"`. - string request_url = 2; - - // The size of the HTTP request message in bytes, including the request - // headers and the request body. - int64 request_size = 3; - - // The response code indicating the status of response. - // Examples: 200, 404. - int32 status = 4; - - // The size of the HTTP response message sent back to the client, in bytes, - // including the response headers and the response body. - int64 response_size = 5; - - // The user agent sent by the client. Example: - // `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`. - string user_agent = 6; - - // The IP address (IPv4 or IPv6) of the client that issued the HTTP - // request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. - string remote_ip = 7; - - // The referer URL of the request, as defined in - // [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). - string referer = 8; - - // Whether or not an entity was served from cache - // (with or without validation). - bool cache_hit = 9; - - // Whether or not the response was validated with the origin server before - // being served from cache. This field is only meaningful if `cache_hit` is - // True. - bool validated_with_origin_server = 10; -} diff --git a/speech/grpc/src/main/java/third_party/google/logging/type/log_severity.proto b/speech/grpc/src/main/java/third_party/google/logging/type/log_severity.proto deleted file mode 100644 index 77bdeeac981..00000000000 --- a/speech/grpc/src/main/java/third_party/google/logging/type/log_severity.proto +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.logging.type; - -import "google/api/annotations.proto"; - -option java_multiple_files = true; -option java_outer_classname = "LogSeverityProto"; -option java_package = "com.google.logging.type"; - - -// The severity of the event described in a log entry. These guideline severity -// levels are ordered, with numerically smaller levels treated as less severe -// than numerically larger levels. If the source of the log entries uses a -// different set of severity levels, the client should select the closest -// corresponding `LogSeverity` value. For example, Java's FINE, FINER, and -// FINEST levels might all map to `LogSeverity.DEBUG`. If the original severity -// code must be preserved, it can be stored in the payload. -// -enum LogSeverity { - // The log entry has no assigned severity level. - DEFAULT = 0; - - // Debug or trace information. - DEBUG = 100; - - // Routine information, such as ongoing status or performance. - INFO = 200; - - // Normal but significant events, such as start up, shut down, or - // configuration. - NOTICE = 300; - - // Warning events might cause problems. - WARNING = 400; - - // Error events are likely to cause problems. - ERROR = 500; - - // Critical events cause more severe problems or brief outages. - CRITICAL = 600; - - // A person must take an action immediately. - ALERT = 700; - - // One or more systems are unusable. - EMERGENCY = 800; -} diff --git a/speech/grpc/src/main/java/third_party/google/logging/v2/log_entry.proto b/speech/grpc/src/main/java/third_party/google/logging/v2/log_entry.proto deleted file mode 100644 index 5fb8e8e2783..00000000000 --- a/speech/grpc/src/main/java/third_party/google/logging/v2/log_entry.proto +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.logging.v2; - -import "google/api/annotations.proto"; -import "google/api/monitored_resource.proto"; -import "google/logging/type/http_request.proto"; -import "google/logging/type/log_severity.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; - -option java_multiple_files = true; -option java_outer_classname = "LogEntryProto"; -option java_package = "com.google.logging.v2"; - - -// An individual entry in a log. -message LogEntry { - // Required. The resource name of the log to which this log entry - // belongs. The format of the name is - // `projects/<project-id>/logs/<log-id%gt;`. Examples: - // `"projects/my-projectid/logs/syslog"`, - // `"projects/1234567890/logs/library.googleapis.com%2Fbook_log"`. - // - // The log ID part of resource name must be less than 512 characters - // long and can only include the following characters: upper and - // lower case alphanumeric characters: [A-Za-z0-9]; and punctuation - // characters: forward-slash, underscore, hyphen, and period. - // Forward-slash (`/`) characters in the log ID must be URL-encoded. - string log_name = 12; - - // Required. The monitored resource associated with this log entry. - // Example: a log entry that reports a database error would be - // associated with the monitored resource designating the particular - // database that reported the error. - google.api.MonitoredResource resource = 8; - - // Required. The log entry payload, which can be one of multiple types. - oneof payload { - // The log entry payload, represented as a protocol buffer. - // You can only use `protoPayload` values that belong to a set of approved - // types. - google.protobuf.Any proto_payload = 2; - - // The log entry payload, represented as a Unicode string (UTF-8). - string text_payload = 3; - - // The log entry payload, represented as a structure that - // is expressed as a JSON object. - google.protobuf.Struct json_payload = 6; - } - - // Optional. The time the event described by the log entry occurred. If - // omitted, Cloud Logging will use the time the log entry is written. - google.protobuf.Timestamp timestamp = 9; - - // Optional. The severity of the log entry. The default value is - // `LogSeverity.DEFAULT`. - google.logging.type.LogSeverity severity = 10; - - // Optional. A unique ID for the log entry. If you provide this field, the - // logging service considers other log entries in the same log with the same - // ID as duplicates which can be removed. - // If omitted, Cloud Logging will generate a unique ID for this log entry. - string insert_id = 4; - - // Optional. Information about the HTTP request associated with this log entry, - // if applicable. - google.logging.type.HttpRequest http_request = 7; - - // Optional. A set of user-defined (key, value) data that provides additional - // information about the log entry. - map labels = 11; - - // Optional. Information about an operation associated with the log entry, if - // applicable. - LogEntryOperation operation = 15; -} - -// Additional information about a potentially long-running operation with which -// a log entry is associated. -message LogEntryOperation { - // Required. An arbitrary operation identifier. Log entries with the - // same identifier are assumed to be part of the same operation. - // - string id = 1; - - // Required. An arbitrary producer identifier. The combination of - // `id` and `producer` must be globally unique. Examples for `producer`: - // `"MyDivision.MyBigCompany.com"`, "github.com/MyProject/MyApplication"`. - // - string producer = 2; - - // Optional. Set this to True if this is the first log entry in the operation. - bool first = 3; - - // Optional. Set this to True if this is the last log entry in the operation. - bool last = 4; -} diff --git a/speech/grpc/src/main/java/third_party/google/logging/v2/logging.proto b/speech/grpc/src/main/java/third_party/google/logging/v2/logging.proto deleted file mode 100644 index 44230fcde70..00000000000 --- a/speech/grpc/src/main/java/third_party/google/logging/v2/logging.proto +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.logging.v2; - -import "google/api/annotations.proto"; -import "google/api/monitored_resource.proto"; -import "google/logging/v2/log_entry.proto"; -import "google/protobuf/empty.proto"; -import "google/rpc/status.proto"; - -option cc_enable_arenas = true; -option java_multiple_files = true; -option java_outer_classname = "LoggingProto"; -option java_package = "com.google.logging.v2"; - - -// Service for ingesting and querying logs. -service LoggingServiceV2 { - // Deletes a log and all its log entries. - // The log will reappear if it receives new entries. - // - rpc DeleteLog(DeleteLogRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v2beta1/{log_name=projects/*/logs/*}" }; - } - - // Writes log entries to Cloud Logging. - // All log entries in Cloud Logging are written by this method. - // - rpc WriteLogEntries(WriteLogEntriesRequest) returns (WriteLogEntriesResponse) { - option (google.api.http) = { post: "/v2beta1/entries:write" body: "*" }; - } - - // Lists log entries. Use this method to retrieve log entries from Cloud - // Logging. For ways to export log entries, see - // [Exporting Logs](/logging/docs/export). - // - rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { - option (google.api.http) = { post: "/v2beta1/entries:list" body: "*" }; - } - - // Lists monitored resource descriptors that are used by Cloud Logging. - rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { - option (google.api.http) = { get: "/v2beta1/monitoredResourceDescriptors" }; - } -} - -// The parameters to DeleteLog. -message DeleteLogRequest { - // Required. The resource name of the log to delete. Example: - // `"projects/my-project/logs/syslog"`. - string log_name = 1; -} - -// The parameters to WriteLogEntries. -message WriteLogEntriesRequest { - // Optional. A default log resource name for those log entries in `entries` - // that do not specify their own `logName`. Example: - // `"projects/my-project/logs/syslog"`. See - // [LogEntry][google.logging.v2.LogEntry]. - string log_name = 1; - - // Optional. A default monitored resource for those log entries in `entries` - // that do not specify their own `resource`. - google.api.MonitoredResource resource = 2; - - // Optional. User-defined `key:value` items that are added to - // the `labels` field of each log entry in `entries`, except when a log - // entry specifies its own `key:value` item with the same key. - // Example: `{ "size": "large", "color":"red" }` - map labels = 3; - - // Required. The log entries to write. The log entries must have values for - // all required fields. - repeated LogEntry entries = 4; -} - -// Result returned from WriteLogEntries. -message WriteLogEntriesResponse { - -} - -// The parameters to `ListLogEntries`. -message ListLogEntriesRequest { - // Required. One or more project IDs or project numbers from which to retrieve - // log entries. Examples of a project ID: `"my-project-1A"`, `"1234567890"`. - repeated string project_ids = 1; - - // Optional. An [advanced logs filter](/logging/docs/view/advanced_filters). - // The filter is compared against all log entries in the projects specified by - // `projectIds`. Only entries that match the filter are retrieved. An empty - // filter matches all log entries. - string filter = 2; - - // Optional. How the results should be sorted. Presently, the only permitted - // values are `"timestamp"` (default) and `"timestamp desc"`. The first - // option returns entries in order of increasing values of - // `LogEntry.timestamp` (oldest first), and the second option returns entries - // in order of decreasing timestamps (newest first). Entries with equal - // timestamps are returned in order of `LogEntry.insertId`. - string order_by = 3; - - // Optional. The maximum number of results to return from this request. Fewer - // results might be returned. You must check for the `nextPageToken` result to - // determine if additional results are available, which you can retrieve by - // passing the `nextPageToken` value in the `pageToken` parameter to the next - // request. - int32 page_size = 4; - - // Optional. If the `pageToken` request parameter is supplied, then the next - // page of results in the set are retrieved. The `pageToken` parameter must - // be set with the value of the `nextPageToken` result parameter from the - // previous request. The values of `projectIds`, `filter`, and `orderBy` must - // be the same as in the previous request. - string page_token = 5; -} - -// Result returned from `ListLogEntries`. -message ListLogEntriesResponse { - // A list of log entries. - repeated LogEntry entries = 1; - - // If there are more results than were returned, then `nextPageToken` is - // given a value in the response. To get the next batch of results, call - // this method again using the value of `nextPageToken` as `pageToken`. - string next_page_token = 2; -} - -// The parameters to ListMonitoredResourceDescriptors -message ListMonitoredResourceDescriptorsRequest { - // Optional. The maximum number of results to return from this request. Fewer - // results might be returned. You must check for the `nextPageToken` result to - // determine if additional results are available, which you can retrieve by - // passing the `nextPageToken` value in the `pageToken` parameter to the next - // request. - int32 page_size = 1; - - // Optional. If the `pageToken` request parameter is supplied, then the next - // page of results in the set are retrieved. The `pageToken` parameter must - // be set with the value of the `nextPageToken` result parameter from the - // previous request. - string page_token = 2; -} - -// Result returned from ListMonitoredResourceDescriptors. -message ListMonitoredResourceDescriptorsResponse { - // A list of resource descriptors. - repeated google.api.MonitoredResourceDescriptor resource_descriptors = 1; - - // If there are more results than were returned, then `nextPageToken` is - // returned in the response. To get the next batch of results, call this - // method again using the value of `nextPageToken` as `pageToken`. - string next_page_token = 2; -} diff --git a/speech/grpc/src/main/java/third_party/google/logging/v2/logging_config.proto b/speech/grpc/src/main/java/third_party/google/logging/v2/logging_config.proto deleted file mode 100644 index 5fdc407af84..00000000000 --- a/speech/grpc/src/main/java/third_party/google/logging/v2/logging_config.proto +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.logging.v2; - -import "google/api/annotations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; - -option java_multiple_files = true; -option java_outer_classname = "LoggingConfig"; -option java_package = "com.google.logging.v2"; - - -service ConfigServiceV2 { - // Lists sinks. - rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { - option (google.api.http) = { get: "/v2beta1/{project_name=projects/*}/sinks" }; - } - - // Gets a sink. - rpc GetSink(GetSinkRequest) returns (LogSink) { - option (google.api.http) = { get: "/v2beta1/{sink_name=projects/*/sinks/*}" }; - } - - // Creates a sink. - rpc CreateSink(CreateSinkRequest) returns (LogSink) { - option (google.api.http) = { post: "/v2beta1/{project_name=projects/*}/sinks" body: "sink" }; - } - - // Creates or updates a sink. - rpc UpdateSink(UpdateSinkRequest) returns (LogSink) { - option (google.api.http) = { put: "/v2beta1/{sink_name=projects/*/sinks/*}" body: "sink" }; - } - - // Deletes a sink. - rpc DeleteSink(DeleteSinkRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v2beta1/{sink_name=projects/*/sinks/*}" }; - } -} - -// Describes a sink used to export log entries outside Cloud Logging. -message LogSink { - // Available log entry formats. Log entries can be written to Cloud - // Logging in either format and can be exported in either format. - // Version 2 is the preferred format. - enum VersionFormat { - // An unspecified version format will default to V2. - VERSION_FORMAT_UNSPECIFIED = 0; - - // `LogEntry` version 2 format. - V2 = 1; - - // `LogEntry` version 1 format. - V1 = 2; - } - - // Required. The client-assigned sink identifier. Example: - // `"my-severe-errors-to-pubsub"`. - // Sink identifiers are limited to 1000 characters - // and can include only the following characters: `A-Z`, `a-z`, - // `0-9`, and the special characters `_-.`. - string name = 1; - - // The export destination. See - // [Exporting Logs With Sinks](/logging/docs/api/tasks/exporting-logs). - // Examples: `"storage.googleapis.com/a-bucket"`, - // `"bigquery.googleapis.com/projects/a-project-id/datasets/a-dataset"`. - string destination = 3; - - // An [advanced logs filter](/logging/docs/view/advanced_filters) - // that defines the log entries to be exported. The filter must be - // consistent with the log entry format designed by the - // `outputVersionFormat` parameter, regardless of the format of the - // log entry that was originally written to Cloud Logging. - // Example: `"logName:syslog AND severity>=ERROR"`. - string filter = 5; - - // The log entry version used when exporting log entries from this - // sink. This version does not have to correspond to the version of - // the log entry when it was written to Cloud Logging. - VersionFormat output_version_format = 6; -} - -// The parameters to `ListSinks`. -message ListSinksRequest { - // Required. The resource name of the project containing the sinks. - // Example: `"projects/my-logging-project"`, `"projects/01234567890"`. - string project_name = 1; - - // Optional. If the `pageToken` request parameter is supplied, then the next - // page of results in the set are retrieved. The `pageToken` parameter must - // be set with the value of the `nextPageToken` result parameter from the - // previous request. The value of `projectName` must be the same as in the - // previous request. - string page_token = 2; - - // Optional. The maximum number of results to return from this request. Fewer - // results might be returned. You must check for the `nextPageToken` result to - // determine if additional results are available, which you can retrieve by - // passing the `nextPageToken` value in the `pageToken` parameter to the next - // request. - int32 page_size = 3; -} - -// Result returned from `ListSinks`. -message ListSinksResponse { - // A list of sinks. - repeated LogSink sinks = 1; - - // If there are more results than were returned, then `nextPageToken` is - // given a value in the response. To get the next batch of results, call this - // method again using the value of `nextPageToken` as `pageToken`. - string next_page_token = 2; -} - -// The parameters to `GetSink`. -message GetSinkRequest { - // The resource name of the sink to return. - // Example: `"projects/my-project-id/sinks/my-sink-id"`. - string sink_name = 1; -} - -// The parameters to `CreateSink`. -message CreateSinkRequest { - // The resource name of the project in which to create the sink. - // Example: `"projects/my-project-id"`. - // - // The new sink must be provided in the request. - string project_name = 1; - - // The new sink, which must not have an identifier that already - // exists. - LogSink sink = 2; -} - -// The parameters to `UpdateSink`. -message UpdateSinkRequest { - // The resource name of the sink to update. - // Example: `"projects/my-project-id/sinks/my-sink-id"`. - // - // The updated sink must be provided in the request and have the - // same name that is specified in `sinkName`. If the sink does not - // exist, it is created. - string sink_name = 1; - - // The updated sink, whose name must be the same as the sink - // identifier in `sinkName`. If `sinkName` does not exist, then - // this method creates a new sink. - LogSink sink = 2; -} - -// The parameters to `DeleteSink`. -message DeleteSinkRequest { - // The resource name of the sink to delete. - // Example: `"projects/my-project-id/sinks/my-sink-id"`. - string sink_name = 1; -} diff --git a/speech/grpc/src/main/java/third_party/google/logging/v2/logging_metrics.proto b/speech/grpc/src/main/java/third_party/google/logging/v2/logging_metrics.proto deleted file mode 100644 index 638cbc377ab..00000000000 --- a/speech/grpc/src/main/java/third_party/google/logging/v2/logging_metrics.proto +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.logging.v2; - -import "google/api/annotations.proto"; -import "google/protobuf/empty.proto"; - -option java_multiple_files = true; -option java_package = "com.google.logging.v2"; - - -service MetricsServiceV2 { - // Lists logs-based metrics. - rpc ListLogMetrics(ListLogMetricsRequest) returns (ListLogMetricsResponse) { - option (google.api.http) = { get: "/v2beta1/{project_name=projects/*}/metrics" }; - } - - // Gets a logs-based metric. - rpc GetLogMetric(GetLogMetricRequest) returns (LogMetric) { - option (google.api.http) = { get: "/v2beta1/{metric_name=projects/*/metrics/*}" }; - } - - // Creates a logs-based metric. - rpc CreateLogMetric(CreateLogMetricRequest) returns (LogMetric) { - option (google.api.http) = { post: "/v2beta1/{project_name=projects/*}/metrics" body: "metric" }; - } - - // Creates or updates a logs-based metric. - rpc UpdateLogMetric(UpdateLogMetricRequest) returns (LogMetric) { - option (google.api.http) = { put: "/v2beta1/{metric_name=projects/*/metrics/*}" body: "metric" }; - } - - // Deletes a logs-based metric. - rpc DeleteLogMetric(DeleteLogMetricRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v2beta1/{metric_name=projects/*/metrics/*}" }; - } -} - -// Describes a logs-based metric. The value of the metric is the -// number of log entries that match a logs filter. -message LogMetric { - // Required. The client-assigned metric identifier. Example: - // `"severe_errors"`. Metric identifiers are limited to 1000 - // characters and can include only the following characters: `A-Z`, - // `a-z`, `0-9`, and the special characters `_-.,+!*',()%/\`. The - // forward-slash character (`/`) denotes a hierarchy of name pieces, - // and it cannot be the first character of the name. - string name = 1; - - // A description of this metric, which is used in documentation. - string description = 2; - - // An [advanced logs filter](/logging/docs/view/advanced_filters). - // Example: `"logName:syslog AND severity>=ERROR"`. - string filter = 3; -} - -// The parameters to ListLogMetrics. -message ListLogMetricsRequest { - // Required. The resource name of the project containing the metrics. - // Example: `"projects/my-project-id"`. - string project_name = 1; - - // Optional. If the `pageToken` request parameter is supplied, then the next - // page of results in the set are retrieved. The `pageToken` parameter must - // be set with the value of the `nextPageToken` result parameter from the - // previous request. The value of `projectName` must - // be the same as in the previous request. - string page_token = 2; - - // Optional. The maximum number of results to return from this request. Fewer - // results might be returned. You must check for the `nextPageToken` result to - // determine if additional results are available, which you can retrieve by - // passing the `nextPageToken` value in the `pageToken` parameter to the next - // request. - int32 page_size = 3; -} - -// Result returned from ListLogMetrics. -message ListLogMetricsResponse { - // A list of logs-based metrics. - repeated LogMetric metrics = 1; - - // If there are more results than were returned, then `nextPageToken` is given - // a value in the response. To get the next batch of results, call this - // method again using the value of `nextPageToken` as `pageToken`. - string next_page_token = 2; -} - -// The parameters to GetLogMetric. -message GetLogMetricRequest { - // The resource name of the desired metric. - // Example: `"projects/my-project-id/metrics/my-metric-id"`. - string metric_name = 1; -} - -// The parameters to CreateLogMetric. -message CreateLogMetricRequest { - // The resource name of the project in which to create the metric. - // Example: `"projects/my-project-id"`. - // - // The new metric must be provided in the request. - string project_name = 1; - - // The new logs-based metric, which must not have an identifier that - // already exists. - LogMetric metric = 2; -} - -// The parameters to UpdateLogMetric. -// -message UpdateLogMetricRequest { - // The resource name of the metric to update. - // Example: `"projects/my-project-id/metrics/my-metric-id"`. - // - // The updated metric must be provided in the request and have the - // same identifier that is specified in `metricName`. - // If the metric does not exist, it is created. - string metric_name = 1; - - // The updated metric, whose name must be the same as the - // metric identifier in `metricName`. If `metricName` does not - // exist, then a new metric is created. - LogMetric metric = 2; -} - -// The parameters to DeleteLogMetric. -message DeleteLogMetricRequest { - // The resource name of the metric to delete. - // Example: `"projects/my-project-id/metrics/my-metric-id"`. - string metric_name = 1; -} diff --git a/speech/grpc/src/main/java/third_party/google/longrunning/operations.proto b/speech/grpc/src/main/java/third_party/google/longrunning/operations.proto deleted file mode 100644 index a358d0a3878..00000000000 --- a/speech/grpc/src/main/java/third_party/google/longrunning/operations.proto +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.longrunning; - -import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/empty.proto"; -import "google/rpc/status.proto"; - -option java_multiple_files = true; -option java_outer_classname = "OperationsProto"; -option java_package = "com.google.longrunning"; - - -// Manages long-running operations with an API service. -// -// When an API method normally takes long time to complete, it can be designed -// to return [Operation][google.longrunning.Operation] to the client, and the client can use this -// interface to receive the real response asynchronously by polling the -// operation resource, or using `google.watcher.v1.Watcher` interface to watch -// the response, or pass the operation resource to another API (such as Google -// Cloud Pub/Sub API) to receive the response. Any API service that returns -// long-running operations should implement the `Operations` interface so -// developers can have a consistent client experience. -service Operations { - // Gets the latest state of a long-running operation. Clients may use this - // method to poll the operation result at intervals as recommended by the API - // service. - rpc GetOperation(GetOperationRequest) returns (Operation) { - option (google.api.http) = { get: "/v1/{name=operations/**}" }; - } - - // Lists operations that match the specified filter in the request. If the - // server doesn't support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. - rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) { - option (google.api.http) = { get: "/v1/{name=operations}" }; - } - - // Starts asynchronous cancellation on a long-running operation. The server - // makes a best effort to cancel the operation, but success is not - // guaranteed. If the server doesn't support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. Clients may use - // [Operations.GetOperation] or other methods to check whether the - // cancellation succeeded or the operation completed despite cancellation. - rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { post: "/v1/{name=operations/**}:cancel" body: "*" }; - } - - // Deletes a long-running operation. It indicates the client is no longer - // interested in the operation result. It does not cancel the operation. - rpc DeleteOperation(DeleteOperationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v1/{name=operations/**}" }; - } -} - -// This resource represents a long-running operation that is the result of a -// network API call. -message Operation { - // The name of the operation resource, which is only unique within the same - // service that originally returns it. - string name = 1; - - // Some service-specific metadata associated with the operation. It typically - // contains progress information and common metadata such as create time. - // Some services may not provide such metadata. Any method that returns a - // long-running operation should document the metadata type, if any. - google.protobuf.Any metadata = 2; - - // If the value is false, it means the operation is still in progress. - // If true, the operation is completed and the `result` is available. - bool done = 3; - - oneof result { - // The error result of the operation in case of failure. - google.rpc.Status error = 4; - - // The normal response of the operation in case of success. If the original - // method returns no data on success, such as `Delete`, the response will be - // `google.protobuf.Empty`. If the original method is standard - // `Get`/`Create`/`Update`, the response should be the resource. For other - // methods, the response should have the type `XxxResponse`, where `Xxx` - // is the original method name. For example, if the original method name - // is `TakeSnapshot()`, the inferred response type will be - // `TakeSnapshotResponse`. - google.protobuf.Any response = 5; - } -} - -// The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation]. -message GetOperationRequest { - // The name of the operation resource. - string name = 1; -} - -// The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. -message ListOperationsRequest { - // The name of the operation collection. - string name = 4; - - // The standard List filter. - string filter = 1; - - // The standard List page size. - int32 page_size = 2; - - // The standard List page token. - string page_token = 3; -} - -// The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. -message ListOperationsResponse { - // A list of operations that match the specified filter in the request. - repeated Operation operations = 1; - - // The standard List next-page token. - string next_page_token = 2; -} - -// The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. -message CancelOperationRequest { - // The name of the operation resource to be cancelled. - string name = 1; -} - -// The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation]. -message DeleteOperationRequest { - // The name of the operation resource to be deleted. - string name = 1; -} diff --git a/speech/grpc/src/main/java/third_party/google/rpc/README.md b/speech/grpc/src/main/java/third_party/google/rpc/README.md deleted file mode 100644 index aa8877db842..00000000000 --- a/speech/grpc/src/main/java/third_party/google/rpc/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Google RPC - -This package contains type definitions for general RPC systems. While -[gRPC](https://github.com/grpc) is using these defintions, but they -are not designed specifically to support gRPC. diff --git a/speech/grpc/src/main/java/third_party/google/rpc/code.proto b/speech/grpc/src/main/java/third_party/google/rpc/code.proto deleted file mode 100644 index f9ceddcbc10..00000000000 --- a/speech/grpc/src/main/java/third_party/google/rpc/code.proto +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -option java_multiple_files = true; -option java_outer_classname = "CodeProto"; -option java_package = "com.google.rpc"; - - -// The canonical error codes for Google APIs. -// Warnings: -// -// - Do not change any numeric assignments. -// - Changes to this list should be made only if there is a compelling -// need that can't be satisfied in another way. -// -// Sometimes multiple error codes may apply. Services should return -// the most specific error code that applies. For example, prefer -// `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. -// Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`. -enum Code { - // Not an error; returned on success - // - // HTTP Mapping: 200 OK - OK = 0; - - // The operation was cancelled, typically by the caller. - // - // HTTP Mapping: 499 Client Closed Request - CANCELLED = 1; - - // Unknown error. For example, this error may be returned when - // a `Status` value received from another address space belongs to - // an error space that is not known in this address space. Also - // errors raised by APIs that do not return enough error information - // may be converted to this error. - // - // HTTP Mapping: 500 Internal Server Error - UNKNOWN = 2; - - // The client specified an invalid argument. Note that this differs - // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments - // that are problematic regardless of the state of the system - // (e.g., a malformed file name). - // - // HTTP Mapping: 400 Bad Request - INVALID_ARGUMENT = 3; - - // The deadline expired before the operation could complete. For operations - // that change the state of the system, this error may be returned - // even if the operation has completed successfully. For example, a - // successful response from a server could have been delayed long - // enough for the deadline to expire. - // - // HTTP Mapping: 504 Gateway Timeout - DEADLINE_EXCEEDED = 4; - - // Some requested entity (e.g., file or directory) was not found. - // For privacy reasons, this code *might* be returned when the client - // does not have the access rights to the entity. - // - // HTTP Mapping: 404 Not Found - NOT_FOUND = 5; - - // The entity that a client attempted to create (e.g., file or directory) - // already exists. - // - // HTTP Mapping: 409 Conflict - ALREADY_EXISTS = 6; - - // The caller does not have permission to execute the specified - // operation. `PERMISSION_DENIED` must not be used for rejections - // caused by exhausting some resource (use `RESOURCE_EXHAUSTED` - // instead for those errors). `PERMISSION_DENIED` must not be - // used if the caller can not be identified (use `UNAUTHENTICATED` - // instead for those errors). - // - // HTTP Mapping: 403 Forbidden - PERMISSION_DENIED = 7; - - // The request does not have valid authentication credentials for the - // operation. - // - // HTTP Mapping: 401 Unauthorized - UNAUTHENTICATED = 16; - - // Some resource has been exhausted, perhaps a per-user quota, or - // perhaps the entire file system is out of space. - // - // HTTP Mapping: 429 Too Many Requests - RESOURCE_EXHAUSTED = 8; - - // The operation was rejected because the system is not in a state - // required for the operation's execution. For example, the directory - // to be deleted is non-empty, an rmdir operation is applied to - // a non-directory, etc. - // - // Service implementors can use the following guidelines to decide - // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: - // (a) Use `UNAVAILABLE` if the client can retry just the failing call. - // (b) Use `ABORTED` if the client should retry at a higher level - // (e.g., restarting a read-modify-write sequence). - // (c) Use `FAILED_PRECONDITION` if the client should not retry until - // the system state has been explicitly fixed. E.g., if an "rmdir" - // fails because the directory is non-empty, `FAILED_PRECONDITION` - // should be returned since the client should not retry unless - // the files are deleted from the directory. - // (d) Use `FAILED_PRECONDITION` if the client performs conditional - // REST Get/Update/Delete on a resource and the resource on the - // server does not match the condition. E.g., conflicting - // read-modify-write on the same resource. - // - // HTTP Mapping: 400 Bad Request - // - // NOTE: HTTP spec says `412 Precondition Failed` should be used only if - // the request contains Etag-related headers. So if the server does see - // Etag-related headers in the request, it may choose to return 412 - // instead of 400 for this error code. - FAILED_PRECONDITION = 9; - - // The operation was aborted, typically due to a concurrency issue such as - // a sequencer check failure or transaction abort. - // - // See the guidelines above for deciding between `FAILED_PRECONDITION`, - // `ABORTED`, and `UNAVAILABLE`. - // - // HTTP Mapping: 409 Conflict - ABORTED = 10; - - // The operation was attempted past the valid range. E.g., seeking or - // reading past end-of-file. - // - // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may - // be fixed if the system state changes. For example, a 32-bit file - // system will generate `INVALID_ARGUMENT` if asked to read at an - // offset that is not in the range [0,2^32-1], but it will generate - // `OUT_OF_RANGE` if asked to read from an offset past the current - // file size. - // - // There is a fair bit of overlap between `FAILED_PRECONDITION` and - // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific - // error) when it applies so that callers who are iterating through - // a space can easily look for an `OUT_OF_RANGE` error to detect when - // they are done. - // - // HTTP Mapping: 400 Bad Request - OUT_OF_RANGE = 11; - - // The operation is not implemented or is not supported/enabled in this - // service. - // - // HTTP Mapping: 501 Not Implemented - UNIMPLEMENTED = 12; - - // Internal errors. This means that some invariants expected by the - // underlying system have been broken. This error code is reserved - // for serious errors. - // - // HTTP Mapping: 500 Internal Server Error - INTERNAL = 13; - - // The service is currently unavailable. This is most likely a - // transient condition, which can be corrected by retrying with - // a backoff. - // - // See the guidelines above for deciding between `FAILED_PRECONDITION`, - // `ABORTED`, and `UNAVAILABLE`. - // - // HTTP Mapping: 503 Service Unavailable - UNAVAILABLE = 14; - - // Unrecoverable data loss or corruption. - // - // HTTP Mapping: 500 Internal Server Error - DATA_LOSS = 15; -} diff --git a/speech/grpc/src/main/java/third_party/google/rpc/error_details.proto b/speech/grpc/src/main/java/third_party/google/rpc/error_details.proto deleted file mode 100644 index 82472b8b2e6..00000000000 --- a/speech/grpc/src/main/java/third_party/google/rpc/error_details.proto +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -import "google/protobuf/duration.proto"; - -option java_multiple_files = true; -option java_outer_classname = "ErrorDetailsProto"; -option java_package = "com.google.rpc"; - - -// Describes when the clients can retry a failed request. Clients could ignore -// the recommendation here or retry when this information is missing from error -// responses. -// -// It's always recommended that clients should use exponential backoff when -// retrying. -// -// Clients should wait until `retry_delay` amount of time has passed since -// receiving the error response before retrying. If retrying requests also -// fail, clients should use an exponential backoff scheme to gradually increase -// the delay between retries based on `retry_delay`, until either a maximum -// number of retires have been reached or a maximum retry delay cap has been -// reached. -message RetryInfo { - // Clients should wait at least this long between retrying the same request. - google.protobuf.Duration retry_delay = 1; -} - -// Describes additional debugging info. -message DebugInfo { - // The stack trace entries indicating where the error occurred. - repeated string stack_entries = 1; - - // Additional debugging information provided by the server. - string detail = 2; -} - -// Describes how a quota check failed. -// -// For example if a daily limit was exceeded for the calling project, -// a service could respond with a QuotaFailure detail containing the project -// id and the description of the quota limit that was exceeded. If the -// calling project hasn't enabled the service in the developer console, then -// a service could respond with the project id and set `service_disabled` -// to true. -// -// Also see RetryDetail and Help types for other details about handling a -// quota failure. -message QuotaFailure { - // A message type used to describe a single quota violation. For example, a - // daily quota or a custom quota that was exceeded. - message Violation { - // The subject on which the quota check failed. - // For example, "clientip:" or "project:". - string subject = 1; - - // A description of how the quota check failed. Clients can use this - // description to find more about the quota configuration in the service's - // public documentation, or find the relevant quota limit to adjust through - // developer console. - // - // For example: "Service disabled" or "Daily Limit for read operations - // exceeded". - string description = 2; - } - - // Describes all quota violations. - repeated Violation violations = 1; -} - -// Describes violations in a client request. This error type focuses on the -// syntactic aspects of the request. -message BadRequest { - // A message type used to describe a single bad request field. - message FieldViolation { - // A path leading to a field in the request body. The value will be a - // sequence of dot-separated identifiers that identify a protocol buffer - // field. E.g., "violations.field" would identify this field. - string field = 1; - - // A description of why the request element is bad. - string description = 2; - } - - // Describes all violations in a client request. - repeated FieldViolation field_violations = 1; -} - -// Contains metadata about the request that clients can attach when filing a bug -// or providing other forms of feedback. -message RequestInfo { - // An opaque string that should only be interpreted by the service generating - // it. For example, it can be used to identify requests in the service's logs. - string request_id = 1; - - // Any data that was used to serve this request. For example, an encrypted - // stack trace that can be sent back to the service provider for debugging. - string serving_data = 2; -} - -// Describes the resource that is being accessed. -message ResourceInfo { - // A name for the type of resource being accessed, e.g. "sql table", - // "cloud storage bucket", "file", "Google calendar"; or the type URL - // of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". - string resource_type = 1; - - // The name of the resource being accessed. For example, a shared calendar - // name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current - // error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. - string resource_name = 2; - - // The owner of the resource (optional). - // For example, "user:" or "project:". - string owner = 3; - - // Describes what error is encountered when accessing this resource. - // For example, updating a cloud project may require the `writer` permission - // on the developer console project. - string description = 4; -} - -// Provides links to documentation or for performing an out of band action. -// -// For example, if a quota check failed with an error indicating the calling -// project hasn't enabled the accessed service, this can contain a URL pointing -// directly to the right place in the developer console to flip the bit. -message Help { - // Describes a URL link. - message Link { - // Describes what the link offers. - string description = 1; - - // The URL of the link. - string url = 2; - } - - // URL(s) pointing to additional information on handling the current error. - repeated Link links = 1; -} diff --git a/speech/grpc/src/main/java/third_party/google/rpc/status.proto b/speech/grpc/src/main/java/third_party/google/rpc/status.proto deleted file mode 100644 index 8fca6ab22d9..00000000000 --- a/speech/grpc/src/main/java/third_party/google/rpc/status.proto +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -import "google/protobuf/any.proto"; - -option java_multiple_files = true; -option java_outer_classname = "StatusProto"; -option java_package = "com.google.rpc"; - - -// The `Status` type defines a logical error model that is suitable for different -// programming environments, including REST APIs and RPC APIs. It is used by -// [gRPC](https://github.com/grpc). The error model is designed to be: -// -// - Simple to use and understand for most users -// - Flexible enough to meet unexpected needs -// -// # Overview -// -// The `Status` message contains three pieces of data: error code, error message, -// and error details. The error code should be an enum value of -// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The -// error message should be a developer-facing English message that helps -// developers *understand* and *resolve* the error. If a localized user-facing -// error message is needed, put the localized message in the error details or -// localize it in the client. The optional error details may contain arbitrary -// information about the error. There is a predefined set of error detail types -// in the package `google.rpc` which can be used for common error conditions. -// -// # Language mapping -// -// The `Status` message is the logical representation of the error model, but it -// is not necessarily the actual wire format. When the `Status` message is -// exposed in different client libraries and different wire protocols, it can be -// mapped differently. For example, it will likely be mapped to some exceptions -// in Java, but more likely mapped to some error codes in C. -// -// # Other uses -// -// The error model and the `Status` message can be used in a variety of -// environments, either with or without APIs, to provide a -// consistent developer experience across different environments. -// -// Example uses of this error model include: -// -// - Partial errors. If a service needs to return partial errors to the client, -// it may embed the `Status` in the normal response to indicate the partial -// errors. -// -// - Workflow errors. A typical workflow has multiple steps. Each step may -// have a `Status` message for error reporting purpose. -// -// - Batch operations. If a client uses batch request and batch response, the -// `Status` message should be used directly inside batch response, one for -// each error sub-response. -// -// - Asynchronous operations. If an API call embeds asynchronous operation -// results in its response, the status of those operations should be -// represented directly using the `Status` message. -// -// - Logging. If some API errors are stored in logs, the message `Status` could -// be used directly after any stripping needed for security/privacy reasons. -message Status { - // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - int32 code = 1; - - // A developer-facing error message, which should be in English. Any - // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. - string message = 2; - - // A list of messages that carry the error details. There will be a - // common set of message types for APIs to use. - repeated google.protobuf.Any details = 3; -} diff --git a/speech/grpc/src/main/java/third_party/google/speech/v1/cloud-speech.proto b/speech/grpc/src/main/java/third_party/google/speech/v1/cloud-speech.proto deleted file mode 100644 index 97dd8629649..00000000000 --- a/speech/grpc/src/main/java/third_party/google/speech/v1/cloud-speech.proto +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.speech.v1; - -import "google/api/annotations.proto"; -import "google/rpc/status.proto"; - -option java_multiple_files = true; -option java_outer_classname = "SpeechProto"; -option java_package = "com.google.cloud.speech.v1"; - - -// Service that implements Google Cloud Speech API. -service Speech { - // Perform bidirectional streaming speech recognition on audio using gRPC. - rpc Recognize(stream RecognizeRequest) returns (stream RecognizeResponse); - - // Perform non-streaming speech recognition on audio using HTTPS. - rpc NonStreamingRecognize(RecognizeRequest) returns (NonStreamingRecognizeResponse) { - option (google.api.http) = { post: "/v1/speech:recognize" body: "*" }; - } -} - -// `RecognizeRequest` is the only message type sent by the client. -// -// `NonStreamingRecognize` sends only one `RecognizeRequest` message and it -// must contain both an `initial_request` and an 'audio_request`. -// -// Streaming `Recognize` sends one or more `RecognizeRequest` messages. The -// first message must contain an `initial_request` and may contain an -// 'audio_request`. Any subsequent messages must not contain an -// `initial_request` and must contain an 'audio_request`. -message RecognizeRequest { - // The `initial_request` message provides information to the recognizer - // that specifies how to process the request. - // - // The first `RecognizeRequest` message must contain an `initial_request`. - // Any subsequent `RecognizeRequest` messages must not contain an - // `initial_request`. - InitialRecognizeRequest initial_request = 1; - - // The audio data to be recognized. For `NonStreamingRecognize`, all the - // audio data must be contained in the first (and only) `RecognizeRequest` - // message. For streaming `Recognize`, sequential chunks of audio data are - // sent in sequential `RecognizeRequest` messages. - AudioRequest audio_request = 2; -} - -// The `InitialRecognizeRequest` message provides information to the recognizer -// that specifies how to process the request. -message InitialRecognizeRequest { - // Audio encoding of the data sent in the audio message. - enum AudioEncoding { - // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - ENCODING_UNSPECIFIED = 0; - - // Uncompressed 16-bit signed little-endian samples. - // This is the simplest encoding format, useful for getting started. - // However, because it is uncompressed, it is not recommended for deployed - // clients. - LINEAR16 = 1; - - // This is the recommended encoding format because it uses lossless - // compression; therefore recognition accuracy is not compromised by a lossy - // codec. - // - // The stream FLAC format is specified at: - // http://flac.sourceforge.net/documentation.html. - // Only 16-bit samples are supported. - // Not all fields in STREAMINFO are supported. - FLAC = 2; - - // 8-bit samples that compand 14-bit audio samples using PCMU/mu-law. - MULAW = 3; - - // Adaptive Multi-Rate Narrowband codec. `sample_rate` must be 8000 Hz. - AMR = 4; - - // Adaptive Multi-Rate Wideband codec. `sample_rate` must be 16000 Hz. - AMR_WB = 5; - } - - // [Required] Encoding of audio data sent in all `AudioRequest` messages. - AudioEncoding encoding = 1; - - // [Required] Sample rate in Hertz of the audio data sent in all - // AudioRequest messages. - // 16000 is optimal. Valid values are: 8000-48000. - int32 sample_rate = 2; - - // [Optional] The language of the supplied audio as a BCP-47 language tag. - // Example: "en-GB" https://www.rfc-editor.org/rfc/bcp/bcp47.txt - // If omitted, defaults to "en-US". - string language_code = 3; - - // [Optional] Maximum number of recognition hypotheses to be returned. - // Specifically, the maximum number of `SpeechRecognitionAlternative` messages - // within each `SpeechRecognitionResult`. - // The server may return fewer than `max_alternatives`. - // Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of - // `1`. If omitted, defaults to `1`. - int32 max_alternatives = 4; - - // [Optional] If set to `true`, the server will attempt to filter out - // profanities, replacing all but the initial character in each filtered word - // with asterisks, e.g. "f***". If set to `false` or omitted, profanities - // won't be filtered out. - bool profanity_filter = 5; - - // [Optional] If `false` or omitted, the recognizer will detect a single - // spoken utterance, and it will cease recognition when the user stops - // speaking. If `enable_endpointer_events` is `true`, it will return - // `END_OF_UTTERANCE` when it detects that the user has stopped speaking. - // In all cases, it will return no more than one `SpeechRecognitionResult`, - // and set the `is_final` flag to `true`. - // - // If `true`, the recognizer will continue recognition (even if the user - // pauses speaking) until the client sends an `end_of_data` message or when - // the maximum time limit has been reached. Multiple - // `SpeechRecognitionResult`s with the `is_final` flag set to `true` may be - // returned to indicate that the recognizer will not return any further - // hypotheses for this portion of the transcript. - bool continuous = 6; - - // [Optional] If this parameter is `true`, interim results may be returned as - // they become available. - // If `false` or omitted, only `is_final=true` result(s) are returned. - bool interim_results = 7; - - // [Optional] If this parameter is `true`, `EndpointerEvents` may be returned - // as they become available. - // If `false` or omitted, no `EndpointerEvents` are returned. - bool enable_endpointer_events = 8; - - // [Optional] URI that points to a file where the recognition result should - // be stored in JSON format. If omitted or empty string, the recognition - // result is returned in the response. Should be specified only for - // `NonStreamingRecognize`. If specified in a `Recognize` request, - // `Recognize` returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - // If specified in a `NonStreamingRecognize` request, - // `NonStreamingRecognize` returns immediately, and the output file - // is created asynchronously once the audio processing completes. - // Currently, only Google Cloud Storage URIs are supported, which must be - // specified in the following format: `gs://bucket_name/object_name` - // (other URI formats return [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - // more information, see [Request URIs](/storage/docs/reference-uris). - string output_uri = 9; -} - -// Contains audio data in the format specified in the `InitialRecognizeRequest`. -// Either `content` or `uri` must be supplied. Supplying both or neither -// returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. -message AudioRequest { - // The audio data bytes encoded as specified in - // `InitialRecognizeRequest`. Note: as with all bytes fields, protobuffers - // use a pure binary representation, whereas JSON representations use base64. - bytes content = 1; - - // URI that points to a file that contains audio data bytes as specified in - // `InitialRecognizeRequest`. Currently, only Google Cloud Storage URIs are - // supported, which must be specified in the following format: - // `gs://bucket_name/object_name` (other URI formats return - // [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see - // [Request URIs](/storage/docs/reference-uris). - string uri = 2; -} - -// `NonStreamingRecognizeResponse` is the only message returned to the client by -// `NonStreamingRecognize`. It contains the result as zero or more sequential -// `RecognizeResponse` messages. -// -// Note that streaming `Recognize` will also return multiple `RecognizeResponse` -// messages, but each message is individually streamed. -message NonStreamingRecognizeResponse { - // [Output-only] Sequential list of messages returned by the recognizer. - repeated RecognizeResponse responses = 1; -} - -// `RecognizeResponse` is the only message type returned to the client. -message RecognizeResponse { - // Indicates the type of endpointer event. - enum EndpointerEvent { - // No endpointer event specified. - ENDPOINTER_EVENT_UNSPECIFIED = 0; - - // Speech has been detected in the audio stream. - START_OF_SPEECH = 1; - - // Speech has ceased to be detected in the audio stream. - END_OF_SPEECH = 2; - - // The end of the audio stream has been reached. and it is being processed. - END_OF_AUDIO = 3; - - // This event is only sent when continuous is `false`. It indicates that the - // server has detected the end of the user's speech utterance and expects no - // additional speech. Therefore, the server will not process additional - // audio. The client should stop sending additional audio data. - END_OF_UTTERANCE = 4; - } - - // [Output-only] If set, returns a [google.rpc.Status][] message that - // specifies the error for the operation. - google.rpc.Status error = 1; - - // [Output-only] For `continuous=false`, this repeated list contains zero or - // one result that corresponds to all of the audio processed so far. For - // `continuous=true`, this repeated list contains zero or more results that - // correspond to consecutive portions of the audio being processed. - // In both cases, contains zero or one `is_final=true` result (the newly - // settled portion), followed by zero or more `is_final=false` results. - repeated SpeechRecognitionResult results = 2; - - // [Output-only] Indicates the lowest index in the `results` array that has - // changed. The repeated `SpeechRecognitionResult` results overwrite past - // results at this index and higher. - int32 result_index = 3; - - // [Output-only] Indicates the type of endpointer event. - EndpointerEvent endpoint = 4; -} - -// A speech recognition result corresponding to a portion of the audio. -message SpeechRecognitionResult { - // [Output-only] May contain one or more recognition hypotheses (up to the - // maximum specified in `max_alternatives`). - repeated SpeechRecognitionAlternative alternatives = 1; - - // [Output-only] Set `true` if this is the final time the speech service will - // return this particular `SpeechRecognitionResult`. If `false`, this - // represents an interim result that may change. - bool is_final = 2; - - // [Output-only] An estimate of the probability that the recognizer will not - // change its guess about this interim result. Values range from 0.0 - // (completely unstable) to 1.0 (completely stable). Note that this is not the - // same as `confidence`, which estimates the probability that a recognition - // result is correct. - // This field is only provided for interim results (`is_final=false`). - // The default of 0.0 is a sentinel value indicating stability was not set. - float stability = 3; -} - -// Alternative hypotheses (a.k.a. n-best list). -message SpeechRecognitionAlternative { - // [Output-only] Transcript text representing the words that the user spoke. - string transcript = 1; - - // [Output-only] The confidence estimate between 0.0 and 1.0. A higher number - // means the system is more confident that the recognition is correct. - // This field is typically provided only for the top hypothesis. and only for - // `is_final=true` results. - // The default of 0.0 is a sentinel value indicating confidence was not set. - float confidence = 2; -} diff --git a/speech/grpc/src/main/java/third_party/google/speech/v1beta1/cloud_speech.proto b/speech/grpc/src/main/java/third_party/google/speech/v1beta1/cloud_speech.proto deleted file mode 100644 index 735be84fad4..00000000000 --- a/speech/grpc/src/main/java/third_party/google/speech/v1beta1/cloud_speech.proto +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright 2016 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.speech.v1beta1; - -option java_multiple_files = true; -option java_outer_classname = "SpeechProto"; -option java_package = "com.google.cloud.speech.v1beta1"; - -import "google/api/annotations.proto"; -import "google/longrunning/operations.proto"; -import "google/rpc/status.proto"; - - -// Service that implements Google Cloud Speech API. -service Speech { - // Perform synchronous speech-recognition: receive results after all audio - // has been sent and processed. - rpc SyncRecognize(SyncRecognizeRequest) returns (SyncRecognizeResponse) { - option (google.api.http) = - { post: "/v1beta1/speech:syncrecognize" body: "*" }; - } - - // Perform asynchronous speech-recognition: receive results via the - // google.longrunning.Operations interface. `Operation.response` returns - // `AsyncRecognizeResponse`. - rpc AsyncRecognize(AsyncRecognizeRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = - { post: "/v1beta1/speech:asyncrecognize" body: "*" }; - } - - // Perform bidirectional streaming speech-recognition: receive results while - // sending audio. This method is only available via the gRPC API (not REST). - rpc StreamingRecognize(stream StreamingRecognizeRequest) - returns (stream StreamingRecognizeResponse); -} - -// `SyncRecognizeRequest` is the top-level message sent by the client for -// the `SyncRecognize` method. -message SyncRecognizeRequest { - // [Required] The `config` message provides information to the recognizer - // that specifies how to process the request. - RecognitionConfig config = 1; - - // [Required] The audio data to be recognized. - RecognitionAudio audio = 2; -} - -// `AsyncRecognizeRequest` is the top-level message sent by the client for -// the `AsyncRecognize` method. -message AsyncRecognizeRequest { - // [Required] The `config` message provides information to the recognizer - // that specifies how to process the request. - RecognitionConfig config = 1; - - // [Required] The audio data to be recognized. - RecognitionAudio audio = 2; -} - -// `StreamingRecognizeRequest` is the top-level message sent by the client for -// the `StreamingRecognize`. Multiple `StreamingRecognizeRequest` messages are -// sent. The first message must contain a `streaming_config` message and must -// not contain `audio` data. All subsequent messages must contain `audio` data -// and must not contain a `streaming_config` message. -message StreamingRecognizeRequest { - oneof streaming_request { - // The `streaming_config` message provides information to the recognizer - // that specifies how to process the request. - // - // The first `StreamingRecognizeRequest` message must contain a - // `streaming_config` message. - StreamingRecognitionConfig streaming_config = 1; - - // The audio data to be recognized. Sequential chunks of audio data are sent - // in sequential `StreamingRecognizeRequest` messages. The first - // `StreamingRecognizeRequest` message must not contain `audio_content` data - // and all subsequent `StreamingRecognizeRequest` messages must contain - // `audio_content` data. The audio bytes must be encoded as specified in - // `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a - // pure binary representation (not base64). - bytes audio_content = 2 [ctype = CORD]; - } -} - -// The `StreamingRecognitionConfig` message provides information to the -// recognizer that specifies how to process the request. -message StreamingRecognitionConfig { - // [Required] The `config` message provides information to the recognizer - // that specifies how to process the request. - RecognitionConfig config = 1; - - // [Optional] If `false` or omitted, the recognizer will perform continuous - // recognition (continuing to process audio even if the user pauses speaking) - // until the client closes the output stream (gRPC API) or when the maximum - // time limit has been reached. Multiple `SpeechRecognitionResult`s with the - // `is_final` flag set to `true` may be returned. - // - // If `true`, the recognizer will detect a single spoken utterance. When it - // detects that the user has paused or stopped speaking, it will return an - // `END_OF_UTTERANCE` event and cease recognition. It will return no more than - // one `SpeechRecognitionResult` with the `is_final` flag set to `true`. - bool single_utterance = 2; - - // [Optional] If `true`, interim results (tentative hypotheses) may be - // returned as they become available (these interim results are indicated with - // the `is_final=false` flag). - // If `false` or omitted, only `is_final=true` result(s) are returned. - bool interim_results = 3; -} - -// The `RecognitionConfig` message provides information to the recognizer -// that specifies how to process the request. -message RecognitionConfig { - // Audio encoding of the data sent in the audio message. All encodings support - // only 1 channel (mono) audio. Only `FLAC` includes a header that describes - // the bytes of audio that follow the header. The other encodings are raw - // audio bytes with no header. - // - // For best results, the audio source should be captured and transmitted using - // a lossless encoding (`FLAC` or `LINEAR16`). Recognition accuracy may be - // reduced if lossy codecs (such as AMR, AMR_WB and MULAW) are used to capture - // or transmit the audio, particularly if background noise is present. - enum AudioEncoding { - // Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][]. - ENCODING_UNSPECIFIED = 0; - - // Uncompressed 16-bit signed little-endian samples. - // This is the only encoding that may be used by `AsyncRecognize`. - LINEAR16 = 1; - - // This is the recommended encoding for `SyncRecognize` and - // `StreamingRecognize` because it uses lossless compression; therefore - // recognition accuracy is not compromised by a lossy codec. - // - // The stream FLAC (Free Lossless Audio Codec) encoding is specified at: - // http://flac.sourceforge.net/documentation.html. - // Only 16-bit samples are supported. - // Not all fields in STREAMINFO are supported. - FLAC = 2; - - // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - MULAW = 3; - - // Adaptive Multi-Rate Narrowband codec. `sample_rate` must be 8000 Hz. - AMR = 4; - - // Adaptive Multi-Rate Wideband codec. `sample_rate` must be 16000 Hz. - AMR_WB = 5; - } - - // [Required] Encoding of audio data sent in all `RecognitionAudio` messages. - AudioEncoding encoding = 1; - - // [Required] Sample rate in Hertz of the audio data sent in all - // `RecognitionAudio` messages. Valid values are: 8000-48000. - // 16000 is optimal. For best results, set the sampling rate of the audio - // source to 16000 Hz. If that's not possible, use the native sample rate of - // the audio source (instead of re-sampling). - int32 sample_rate = 2; - - // [Optional] The language of the supplied audio as a BCP-47 language tag. - // Example: "en-GB" https://www.rfc-editor.org/rfc/bcp/bcp47.txt - // If omitted, defaults to "en-US". See - // [Language Support](/speech/docs/best-practices#language_support) for - // a list of the currently supported language codes. - string language_code = 3; - - // [Optional] Maximum number of recognition hypotheses to be returned. - // Specifically, the maximum number of `SpeechRecognitionAlternative` messages - // within each `SpeechRecognitionResult`. - // The server may return fewer than `max_alternatives`. - // Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of - // `1`. If omitted, defaults to `1`. - int32 max_alternatives = 4; - - // [Optional] If set to `true`, the server will attempt to filter out - // profanities, replacing all but the initial character in each filtered word - // with asterisks, e.g. "f***". If set to `false` or omitted, profanities - // won't be filtered out. - bool profanity_filter = 5; - - // [Optional] A means to provide context to assist the speech recognition. - SpeechContext speech_context = 6; -} - -// Provides "hints" to the speech recognizer to favor specific words and phrases -// in the results. -message SpeechContext { - // [Optional] A list of up to 50 phrases of up to 100 characters each to - // provide words and phrases "hints" to the speech recognition so that it is - // more likely to recognize them. - repeated string phrases = 1; -} - -// Contains audio data in the encoding specified in the `RecognitionConfig`. -// Either `content` or `uri` must be supplied. Supplying both or neither -// returns [google.rpc.Code.INVALID_ARGUMENT][]. -message RecognitionAudio { - oneof audio_source { - // The audio data bytes encoded as specified in - // `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a - // pure binary representation, whereas JSON representations use base64. - bytes content = 1 [ctype = CORD]; - - // URI that points to a file that contains audio data bytes as specified in - // `RecognitionConfig`. Currently, only Google Cloud Storage URIs are - // supported, which must be specified in the following format: - // `gs://bucket_name/object_name` (other URI formats return - // [google.rpc.Code.INVALID_ARGUMENT][]). For more information, see - // [Request URIs](/storage/docs/reference-uris). - string uri = 2; - } -} - -// `SyncRecognizeResponse` is the only message returned to the client by -// `SyncRecognize`. It contains the result as zero or more -// sequential `RecognizeResponse` messages. -message SyncRecognizeResponse { - // [Output-only] Sequential list of transcription results corresponding to - // sequential portions of audio. - repeated SpeechRecognitionResult results = 2; -} - -// `AsyncRecognizeResponse` is the only message returned to the client by -// `AsyncRecognize`. It contains the result as zero or more -// sequential `RecognizeResponse` messages. -message AsyncRecognizeResponse { - // [Output-only] Sequential list of transcription results corresponding to - // sequential portions of audio. - repeated SpeechRecognitionResult results = 2; -} - -// `StreamingRecognizeResponse` is the only message returned to the client by -// `StreamingRecognize`. It contains the result as zero or more -// sequential `RecognizeResponse` messages. -message StreamingRecognizeResponse { - // Indicates the type of endpointer event. - enum EndpointerType { - // No endpointer event specified. - ENDPOINTER_EVENT_UNSPECIFIED = 0; - - // Speech has been detected in the audio stream. - START_OF_SPEECH = 1; - - // Speech has ceased to be detected in the audio stream. - END_OF_SPEECH = 2; - - // The end of the audio stream has been reached. and it is being processed. - END_OF_AUDIO = 3; - - // This event is only sent when `single_utterance` is `true`. It indicates - // that the server has detected the end of the user's speech utterance and - // expects no additional speech. Therefore, the server will not process - // additional audio. The client should stop sending additional audio data. - END_OF_UTTERANCE = 4; - } - - // [Output-only] If set, returns a [google.rpc.Status][] message that - // specifies the error for the operation. - google.rpc.Status error = 1; - - // [Output-only] This repeated list contains zero or more results that - // correspond to consecutive portions of the audio currently being processed. - // It contains zero or one `is_final=true` result (the newly settled portion), - // followed by zero or more `is_final=false` results. - repeated StreamingRecognitionResult results = 2; - - // [Output-only] Indicates the lowest index in the `results` array that has - // changed. The repeated `SpeechRecognitionResult` results overwrite past - // results at this index and higher. - int32 result_index = 3; - - // [Output-only] Indicates the type of endpointer event. - EndpointerType endpointer_type = 4; -} - -// A speech recognition result corresponding to a portion of the audio that is -// currently being processed. -// TODO(gshires): add a comment describing the various repeated interim and -// alternative results fields. -message StreamingRecognitionResult { - // [Output-only] May contain one or more recognition hypotheses (up to the - // maximum specified in `max_alternatives`). - repeated SpeechRecognitionAlternative alternatives = 1; - - // [Output-only] If `false`, this `SpeechRecognitionResult` represents an - // interim result that may change. If `true`, this is the final time the - // speech service will return this particular `SpeechRecognitionResult`, - // the recognizer will not return any further hypotheses for this portion of - // the transcript and corresponding audio. - bool is_final = 2; - - // [Output-only] An estimate of the probability that the recognizer will not - // change its guess about this interim result. Values range from 0.0 - // (completely unstable) to 1.0 (completely stable). Note that this is not the - // same as `confidence`, which estimates the probability that a recognition - // result is correct. - // This field is only provided for interim results (`is_final=false`). - // The default of 0.0 is a sentinel value indicating stability was not set. - float stability = 3; -} - -// A speech recognition result corresponding to a portion of the audio. -message SpeechRecognitionResult { - // [Output-only] May contain one or more recognition hypotheses (up to the - // maximum specified in `max_alternatives`). - repeated SpeechRecognitionAlternative alternatives = 1; -} - -// Alternative hypotheses (a.k.a. n-best list). -message SpeechRecognitionAlternative { - // [Output-only] Transcript text representing the words that the user spoke. - string transcript = 1; - - // [Output-only] The confidence estimate between 0.0 and 1.0. A higher number - // means the system is more confident that the recognition is correct. - // This field is typically provided only for the top hypothesis, and only for - // `is_final=true` results. - // The default of 0.0 is a sentinel value indicating confidence was not set. - float confidence = 2; -} diff --git a/speech/grpc/src/main/java/third_party/google/type/README.md b/speech/grpc/src/main/java/third_party/google/type/README.md deleted file mode 100644 index f8079ab1ea6..00000000000 --- a/speech/grpc/src/main/java/third_party/google/type/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Google Common Types -This package contains definitions of common types for Google APIs. -All types defined in this package are suitable for different APIs to -exchange data, and will never break binary compatibility. They should -have design quality comparable to major programming languages like -Java and C#. - -NOTE: Some common types are defined in the package `google.protobuf` -as they are directly supported by Protocol Buffers compiler and -runtime. Those types are called Well-Known Types. diff --git a/speech/grpc/src/main/java/third_party/google/type/color.proto b/speech/grpc/src/main/java/third_party/google/type/color.proto deleted file mode 100644 index 3e200230d82..00000000000 --- a/speech/grpc/src/main/java/third_party/google/type/color.proto +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -import "google/protobuf/wrappers.proto"; - -option java_multiple_files = true; -option java_outer_classname = "ColorProto"; -option java_package = "com.google.type"; - - -// Represents a color in the RGBA color space. This representation is designed -// for simplicity of conversion to/from color representations in various -// languages over compactness; for example, the fields of this representation -// can be trivially provided to the constructor of "java.awt.Color" in Java; it -// can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" -// method in iOS; and, with just a little work, it can be easily formatted into -// a CSS "rgba()" string in JavaScript, as well. Here are some examples: -// -// Example (Java): -// -// import com.google.type.Color; -// -// // ... -// public static java.awt.Color fromProto(Color protocolor) { -// float alpha = protocolor.hasAlpha() -// ? protocolor.getAlpha().getValue() -// : 1.0; -// -// return new java.awt.Color( -// protocolor.getRed(), -// protocolor.getGreen(), -// protocolor.getBlue(), -// alpha); -// } -// -// public static Color toProto(java.awt.Color color) { -// float red = (float) color.getRed(); -// float green = (float) color.getGreen(); -// float blue = (float) color.getBlue(); -// float denominator = 255.0; -// Color.Builder resultBuilder = -// Color -// .newBuilder() -// .setRed(red / denominator) -// .setGreen(green / denominator) -// .setBlue(blue / denominator); -// int alpha = color.getAlpha(); -// if (alpha != 255) { -// result.setAlpha( -// FloatValue -// .newBuilder() -// .setValue(((float) alpha) / denominator) -// .build()); -// } -// return resultBuilder.build(); -// } -// // ... -// -// Example (iOS / Obj-C): -// -// // ... -// static UIColor* fromProto(Color* protocolor) { -// float red = [protocolor red]; -// float green = [protocolor green]; -// float blue = [protocolor blue]; -// FloatValue* alpha_wrapper = [protocolor alpha]; -// float alpha = 1.0; -// if (alpha_wrapper != nil) { -// alpha = [alpha_wrapper value]; -// } -// return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; -// } -// -// static Color* toProto(UIColor* color) { -// CGFloat red, green, blue, alpha; -// if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { -// return nil; -// } -// Color* result = [Color alloc] init]; -// [result setRed:red]; -// [result setGreen:green]; -// [result setBlue:blue]; -// if (alpha <= 0.9999) { -// [result setAlpha:floatWrapperWithValue(alpha)]; -// } -// [result autorelease]; -// return result; -// } -// // ... -// -// Example (JavaScript): -// -// // ... -// -// var protoToCssColor = function(rgb_color) { -// var redFrac = rgb_color.red || 0.0; -// var greenFrac = rgb_color.green || 0.0; -// var blueFrac = rgb_color.blue || 0.0; -// var red = Math.floor(redFrac * 255); -// var green = Math.floor(greenFrac * 255); -// var blue = Math.floor(blueFrac * 255); -// -// if (!('alpha' in rgb_color)) { -// return rgbToCssColor_(red, green, blue); -// } -// -// var alphaFrac = rgb_color.alpha.value || 0.0; -// var rgbParams = [red, green, blue].join(','); -// return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); -// }; -// -// var rgbToCssColor_ = function(red, green, blue) { -// var rgbNumber = new Number((red << 16) | (green << 8) | blue); -// var hexString = rgbNumber.toString(16); -// var missingZeros = 6 - hexString.length; -// var resultBuilder = ['#']; -// for (var i = 0; i < missingZeros; i++) { -// resultBuilder.push('0'); -// } -// resultBuilder.push(hexString); -// return resultBuilder.join(''); -// }; -// -// // ... -// -message Color { - // The amount of red in the color as a value in the interval [0, 1]. - float red = 1; - - // The amount of green in the color as a value in the interval [0, 1]. - float green = 2; - - // The amount of blue in the color as a value in the interval [0, 1]. - float blue = 3; - - // The fraction of this color that should be applied to the pixel. That is, - // the final pixel color is defined by the equation: - // - // pixel color = alpha * (this color) + (1.0 - alpha) * (background color) - // - // This means that a value of 1.0 corresponds to a solid color, whereas - // a value of 0.0 corresponds to a completely transparent color. This - // uses a wrapper message rather than a simple float scalar so that it is - // possible to distinguish between a default value and the value being unset. - // If omitted, this color object is to be rendered as a solid color - // (as if the alpha value had been explicitly given with a value of 1.0). - google.protobuf.FloatValue alpha = 4; -} diff --git a/speech/grpc/src/main/java/third_party/google/type/date.proto b/speech/grpc/src/main/java/third_party/google/type/date.proto deleted file mode 100644 index a12090b8a4e..00000000000 --- a/speech/grpc/src/main/java/third_party/google/type/date.proto +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option java_generate_equals_and_hash = true; -option java_multiple_files = true; -option java_outer_classname = "DateProto"; -option java_package = "com.google.type"; - - -// Represents a whole calendar date, e.g. date of birth. The time of day and -// time zone are either specified elsewhere or are not significant. The date -// is relative to the Proleptic Gregorian Calendar. The day may be 0 to -// represent a year and month where the day is not significant, e.g. credit card -// expiration date. The year may be 0 to represent a month and day independent -// of year, e.g. anniversary date. Related types are [google.type.TimeOfDay][google.type.TimeOfDay] -// and [google.protobuf.Timestamp][google.protobuf.Timestamp]. -message Date { - // Year of date. Must be from 1 to 9,999, or 0 if specifying a date without - // a year. - int32 year = 1; - - // Month of year of date. Must be from 1 to 12. - int32 month = 2; - - // Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - // if specifying a year/month where the day is not sigificant. - int32 day = 3; -} diff --git a/speech/grpc/src/main/java/third_party/google/type/dayofweek.proto b/speech/grpc/src/main/java/third_party/google/type/dayofweek.proto deleted file mode 100644 index df09f69912b..00000000000 --- a/speech/grpc/src/main/java/third_party/google/type/dayofweek.proto +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option java_generate_equals_and_hash = true; -option java_multiple_files = true; -option java_outer_classname = "DayOfWeekProto"; -option java_package = "com.google.type"; - - -// Represents a day of week. -enum DayOfWeek { - // The unspecified day-of-week. - DAY_OF_WEEK_UNSPECIFIED = 0; - - // The day-of-week of Monday. - MONDAY = 1; - - // The day-of-week of Tuesday. - TUESDAY = 2; - - // The day-of-week of Wednesday. - WEDNESDAY = 3; - - // The day-of-week of Thursday. - THURSDAY = 4; - - // The day-of-week of Friday. - FRIDAY = 5; - - // The day-of-week of Saturday. - SATURDAY = 6; - - // The day-of-week of Sunday. - SUNDAY = 7; -} diff --git a/speech/grpc/src/main/java/third_party/google/type/latlng.proto b/speech/grpc/src/main/java/third_party/google/type/latlng.proto deleted file mode 100644 index 198decc0e76..00000000000 --- a/speech/grpc/src/main/java/third_party/google/type/latlng.proto +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option java_generate_equals_and_hash = true; -option java_multiple_files = true; -option java_outer_classname = "LatLngProto"; -option java_package = "com.google.type"; - - -// An object representing a latitude/longitude pair. This is expressed as a pair -// of doubles representing degrees latitude and degrees longitude. Unless -// specified otherwise, this must conform to the -// WGS84 -// standard. Values must be within normalized ranges. -message LatLng { - // The latitude in degrees. It must be in the range [-90.0, +90.0]. - double latitude = 1; - - // The longitude in degrees. It must be in the range [-180.0, +180.0]. - double longitude = 2; -} diff --git a/speech/grpc/src/main/java/third_party/google/type/money.proto b/speech/grpc/src/main/java/third_party/google/type/money.proto deleted file mode 100644 index 041454a23a7..00000000000 --- a/speech/grpc/src/main/java/third_party/google/type/money.proto +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option java_multiple_files = true; -option java_outer_classname = "MoneyProto"; -option java_package = "com.google.type"; - - -// Represents an amount of money with its currency type. -message Money { - // The 3-letter currency code defined in ISO 4217. - string currency_code = 1; - - // The whole units of the amount. - // For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. - int64 units = 2; - - // Number of nano (10^-9) units of the amount. - // The value must be between -999,999,999 and +999,999,999 inclusive. - // If `units` is positive, `nanos` must be positive or zero. - // If `units` is zero, `nanos` can be positive, zero, or negative. - // If `units` is negative, `nanos` must be negative or zero. - // For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - int32 nanos = 3; -} diff --git a/speech/grpc/src/main/java/third_party/google/type/timeofday.proto b/speech/grpc/src/main/java/third_party/google/type/timeofday.proto deleted file mode 100644 index f39266e00cf..00000000000 --- a/speech/grpc/src/main/java/third_party/google/type/timeofday.proto +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.type; - -option java_generate_equals_and_hash = true; -option java_multiple_files = true; -option java_outer_classname = "TimeOfDayProto"; -option java_package = "com.google.type"; - - -// Represents a time of day. The date and time zone are either not significant -// or are specified elsewhere. An API may chose to allow leap seconds. Related -// types are [google.type.Date][google.type.Date] and [google.protobuf.Timestamp][google.protobuf.Timestamp]. -message TimeOfDay { - // Hours of day in 24 hour format. Should be from 0 to 23. An API may choose - // to allow the value "24:00:00" for scenarios like business closing time. - int32 hours = 1; - - // Minutes of hour of day. Must be from 0 to 59. - int32 minutes = 2; - - // Seconds of minutes of the time. Must normally be from 0 to 59. An API may - // allow the value 60 if it allows leap-seconds. - int32 seconds = 3; - - // Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. - int32 nanos = 4; -}