Skip to content

Instantly share code, notes, and snippets.

@danbills
Created May 21, 2017 18:01
Show Gist options
  • Save danbills/8a67fa129ad78ffb9363e36da97f142c to your computer and use it in GitHub Desktop.
Save danbills/8a67fa129ad78ffb9363e36da97f142c to your computer and use it in GitHub Desktop.
google/cloud/speech/v1/cloud_speech.proto: warning: Import google/protobuf/any.proto but not used.
google/cloud/speech/v1/cloud_speech.proto: warning: Import google/protobuf/duration.proto but not used.
fdp was Some(10)
fdp was Some(name: "google/api/http.proto"
package: "google.api"
message_type {
name: "Http"
field {
name: "rules"
number: 1
label: LABEL_REPEATED
type: TYPE_MESSAGE
type_name: ".google.api.HttpRule"
json_name: "rules"
}
}
message_type {
name: "HttpRule"
field {
name: "selector"
number: 1
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "selector"
}
field {
name: "get"
number: 2
label: LABEL_OPTIONAL
type: TYPE_STRING
oneof_index: 0
json_name: "get"
}
field {
name: "put"
number: 3
label: LABEL_OPTIONAL
type: TYPE_STRING
oneof_index: 0
json_name: "put"
}
field {
name: "post"
number: 4
label: LABEL_OPTIONAL
type: TYPE_STRING
oneof_index: 0
json_name: "post"
}
field {
name: "delete"
number: 5
label: LABEL_OPTIONAL
type: TYPE_STRING
oneof_index: 0
json_name: "delete"
}
field {
name: "patch"
number: 6
label: LABEL_OPTIONAL
type: TYPE_STRING
oneof_index: 0
json_name: "patch"
}
field {
name: "custom"
number: 8
label: LABEL_OPTIONAL
type: TYPE_MESSAGE
type_name: ".google.api.CustomHttpPattern"
oneof_index: 0
json_name: "custom"
}
field {
name: "body"
number: 7
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "body"
}
field {
name: "additional_bindings"
number: 11
label: LABEL_REPEATED
type: TYPE_MESSAGE
type_name: ".google.api.HttpRule"
json_name: "additionalBindings"
}
oneof_decl {
name: "pattern"
}
}
message_type {
name: "CustomHttpPattern"
field {
name: "kind"
number: 1
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "kind"
}
field {
name: "path"
number: 2
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "path"
}
}
options {
java_package: "com.google.api"
java_outer_classname: "HttpProto"
java_multiple_files: true
go_package: "google.golang.org/genproto/googleapis/api/annotations;annotations"
cc_enable_arenas: true
objc_class_prefix: "GAPI"
}
source_code_info {
location {
span: 14
span: 0
span: 290
span: 1
}
location {
path: 12
span: 14
span: 0
span: 18
leading_detached_comments: " Copyright 2016 Google Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n"
}
location {
path: 2
span: 16
span: 8
span: 18
}
location {
path: 8
span: 18
span: 0
span: 31
}
location {
path: 8
path: 999
path: 0
span: 18
span: 0
span: 31
}
location {
path: 8
path: 999
path: 0
path: 2
span: 18
span: 7
span: 23
}
location {
path: 8
path: 999
path: 0
path: 2
path: 0
span: 18
span: 7
span: 23
}
location {
path: 8
path: 999
path: 0
path: 2
path: 0
path: 1
span: 18
span: 7
span: 23
}
location {
path: 8
path: 999
path: 0
path: 3
span: 18
span: 26
span: 30
}
location {
path: 8
span: 19
span: 0
span: 88
}
location {
path: 8
path: 999
path: 1
span: 19
span: 0
span: 88
}
location {
path: 8
path: 999
path: 1
path: 2
span: 19
span: 7
span: 17
}
location {
path: 8
path: 999
path: 1
path: 2
path: 0
span: 19
span: 7
span: 17
}
location {
path: 8
path: 999
path: 1
path: 2
path: 0
path: 1
span: 19
span: 7
span: 17
}
location {
path: 8
path: 999
path: 1
path: 7
span: 19
span: 20
span: 87
}
location {
path: 8
span: 20
span: 0
span: 34
}
location {
path: 8
path: 999
path: 2
span: 20
span: 0
span: 34
}
location {
path: 8
path: 999
path: 2
path: 2
span: 20
span: 7
span: 26
}
location {
path: 8
path: 999
path: 2
path: 2
path: 0
span: 20
span: 7
span: 26
}
location {
path: 8
path: 999
path: 2
path: 2
path: 0
path: 1
span: 20
span: 7
span: 26
}
location {
path: 8
path: 999
path: 2
path: 3
span: 20
span: 29
span: 33
}
location {
path: 8
span: 21
span: 0
span: 42
}
location {
path: 8
path: 999
path: 3
span: 21
span: 0
span: 42
}
location {
path: 8
path: 999
path: 3
path: 2
span: 21
span: 7
span: 27
}
location {
path: 8
path: 999
path: 3
path: 2
path: 0
span: 21
span: 7
span: 27
}
location {
path: 8
path: 999
path: 3
path: 2
path: 0
path: 1
span: 21
span: 7
span: 27
}
location {
path: 8
path: 999
path: 3
path: 7
span: 21
span: 30
span: 41
}
location {
path: 8
span: 22
span: 0
span: 39
}
location {
path: 8
path: 999
path: 4
span: 22
span: 0
span: 39
}
location {
path: 8
path: 999
path: 4
path: 2
span: 22
span: 7
span: 19
}
location {
path: 8
path: 999
path: 4
path: 2
path: 0
span: 22
span: 7
span: 19
}
location {
path: 8
path: 999
path: 4
path: 2
path: 0
path: 1
span: 22
span: 7
span: 19
}
location {
path: 8
path: 999
path: 4
path: 7
span: 22
span: 22
span: 38
}
location {
path: 8
span: 23
span: 0
span: 34
}
location {
path: 8
path: 999
path: 5
span: 23
span: 0
span: 34
}
location {
path: 8
path: 999
path: 5
path: 2
span: 23
span: 7
span: 24
}
location {
path: 8
path: 999
path: 5
path: 2
path: 0
span: 23
span: 7
span: 24
}
location {
path: 8
path: 999
path: 5
path: 2
path: 0
path: 1
span: 23
span: 7
span: 24
}
location {
path: 8
path: 999
path: 5
path: 7
span: 23
span: 27
span: 33
}
location {
path: 4
path: 0
span: 29
span: 0
span: 34
span: 1
leading_comments: " Defines the HTTP configuration for a service. It contains a list of\n [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method\n to one or more HTTP REST API methods.\n"
}
location {
path: 4
path: 0
path: 1
span: 29
span: 8
span: 12
}
location {
path: 4
path: 0
path: 2
path: 0
span: 33
span: 2
span: 30
leading_comments: " A list of HTTP configuration rules that apply to individual API methods.\n\n **NOTE:** All service configuration rules follow \"last one wins\" order.\n"
}
location {
path: 4
path: 0
path: 2
path: 0
path: 4
span: 33
span: 2
span: 10
}
location {
path: 4
path: 0
path: 2
path: 0
path: 6
span: 33
span: 11
span: 19
}
location {
path: 4
path: 0
path: 2
path: 0
path: 1
span: 33
span: 20
span: 25
}
location {
path: 4
path: 0
path: 2
path: 0
path: 3
span: 33
span: 28
span: 29
}
location {
path: 4
path: 1
span: 242
span: 0
span: 281
span: 1
leading_comments: " `HttpRule` defines the mapping of an RPC method to one or more HTTP\n REST APIs. The mapping determines what portions of the request\n message are populated from the path, query parameters, or body of\n the HTTP request. The mapping is typically specified as an\n `google.api.http` annotation, see \"google/api/annotations.proto\"\n for details.\n\n The mapping consists of a field specifying the path template and\n method kind. The path template can refer to fields in the request\n message, as in the example below which describes a REST GET\n operation on a resource collection of messages:\n\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http).get = \"/v1/messages/{message_id}/{sub.subfield}\";\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n SubMessage sub = 2; // `sub.subfield` is url-mapped\n }\n message Message {\n string text = 1; // content of the resource\n }\n\n The same http annotation can alternatively be expressed inside the\n `GRPC API Configuration` YAML file.\n\n http:\n rules:\n - selector: <proto_package_name>.Messaging.GetMessage\n get: /v1/messages/{message_id}/{sub.subfield}\n\n This definition enables an automatic, bidrectional mapping of HTTP\n JSON to RPC. Example:\n\n HTTP | RPC\n -----|-----\n `GET /v1/messages/123456/foo` | `GetMessage(message_id: \"123456\" sub: SubMessage(subfield: \"foo\"))`\n\n In general, not only fields but also field paths can be referenced\n from a path pattern. Fields mapped to the path pattern cannot be\n repeated and must have a primitive (non-message) type.\n\n Any fields in the request message which are not bound by the path\n pattern automatically become (optional) HTTP query\n parameters. Assume the following definition of the request message:\n\n\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n int64 revision = 2; // becomes a parameter\n SubMessage sub = 3; // `sub.subfield` becomes a parameter\n }\n\n\n This enables a HTTP JSON to RPC mapping as below:\n\n HTTP | RPC\n -----|-----\n `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))`\n\n Note that fields which are mapped to HTTP parameters must have a\n primitive type or a repeated primitive type. Message types are not\n allowed. In the case of a repeated type, the parameter can be\n repeated in the URL, as in `...?param=A&param=B`.\n\n For HTTP method kinds which allow a request body, the `body` field\n specifies the mapping. Consider a REST update method on the\n message resource collection:\n\n\n service Messaging {\n rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"message\"\n };\n }\n }\n message UpdateMessageRequest {\n string message_id = 1; // mapped to the URL\n Message message = 2; // mapped to the body\n }\n\n\n The following HTTP JSON to RPC mapping is enabled, where the\n representation of the JSON in the request body is determined by\n protos JSON encoding:\n\n HTTP | RPC\n -----|-----\n `PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })`\n\n The special name `*` can be used in the body mapping to define that\n every field not bound by the path template should be mapped to the\n request body. This enables the following alternative definition of\n the update method:\n\n service Messaging {\n rpc UpdateMessage(Message) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"*\"\n };\n }\n }\n message Message {\n string message_id = 1;\n string text = 2;\n }\n\n\n The following HTTP JSON to RPC mapping is enabled:\n\n HTTP | RPC\n -----|-----\n `PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")`\n\n Note that when using `*` in the body mapping, it is not possible to\n have HTTP parameters, as all fields not bound by the path end in\n the body. This makes this option more rarely used in practice of\n defining REST APIs. The common usage of `*` is in custom methods\n which don\'t use the URL at all for transferring data.\n\n It is possible to define multiple HTTP methods for one RPC by using\n the `additional_bindings` option. Example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/messages/{message_id}\"\n additional_bindings {\n get: \"/v1/users/{user_id}/messages/{message_id}\"\n }\n };\n }\n }\n message GetMessageRequest {\n string message_id = 1;\n string user_id = 2;\n }\n\n\n This enables the following two alternative HTTP JSON to RPC\n mappings:\n\n HTTP | RPC\n -----|-----\n `GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")`\n `GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")`\n\n # Rules for HTTP mapping\n\n The rules for mapping HTTP path, query parameters, and body fields\n to the request message are as follows:\n\n 1. The `body` field specifies either `*` or a field path, or is\n omitted. If omitted, it assumes there is no HTTP body.\n 2. Leaf fields (recursive expansion of nested messages in the\n request) can be classified into three types:\n (a) Matched in the URL template.\n (b) Covered by body (if body is `*`, everything except (a) fields;\n else everything under the body field)\n (c) All other fields.\n 3. URL query parameters found in the HTTP request are mapped to (c) fields.\n 4. Any body sent with an HTTP request can contain only (b) fields.\n\n The syntax of the path template is as follows:\n\n Template = \"/\" Segments [ Verb ] ;\n Segments = Segment { \"/\" Segment } ;\n Segment = \"*\" | \"**\" | LITERAL | Variable ;\n Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n FieldPath = IDENT { \".\" IDENT } ;\n Verb = \":\" LITERAL ;\n\n The syntax `*` matches a single path segment. It follows the semantics of\n [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String\n Expansion.\n\n The syntax `**` matches zero or more path segments. It follows the semantics\n of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.3 Reserved\n Expansion. NOTE: it must be the last segment in the path except the Verb.\n\n The syntax `LITERAL` matches literal text in the URL path.\n\n The syntax `Variable` matches the entire path as specified by its template;\n this nested template must not contain further variables. If a variable\n matches a single path segment, its template may be omitted, e.g. `{var}`\n is equivalent to `{var=*}`.\n\n NOTE: the field paths in variables and in the `body` must not refer to\n repeated fields or map fields.\n\n Use CustomHttpPattern to specify any HTTP method that is not included in the\n `pattern` field, such as HEAD, or \"*\" to leave the HTTP method unspecified for\n a given URL path rule. The wild-card rule is useful for services that provide\n content to Web (HTML) clients.\n"
}
location {
path: 4
path: 1
path: 1
span: 242
span: 8
span: 16
}
location {
path: 4
path: 1
path: 2
path: 0
span: 246
span: 2
span: 22
leading_comments: " Selects methods to which this rule applies.\n\n Refer to [selector][google.api.DocumentationRule.selector] for syntax details.\n"
}
location {
path: 4
path: 1
path: 2
path: 0
path: 4
span: 246
span: 2
span: 242
span: 18
}
location {
path: 4
path: 1
path: 2
path: 0
path: 5
span: 246
span: 2
span: 8
}
location {
path: 4
path: 1
path: 2
path: 0
path: 1
span: 246
span: 9
span: 17
}
location {
path: 4
path: 1
path: 2
path: 0
path: 3
span: 246
span: 20
span: 21
}
location {
path: 4
path: 1
path: 8
path: 0
span: 251
span: 2
span: 269
span: 3
leading_comments: " Determines the URL pattern is matched by this rules. This pattern can be\n used with any of the {get|put|post|delete|patch} methods. A custom method\n can be defined using the \'custom\' field.\n"
}
location {
path: 4
path: 1
path: 8
path: 0
path: 1
span: 251
span: 8
span: 15
}
location {
path: 4
path: 1
path: 2
path: 1
span: 253
span: 4
span: 19
leading_comments: " Used for listing and getting information about resources.\n"
}
location {
path: 4
path: 1
path: 2
path: 1
path: 5
span: 253
span: 4
span: 10
}
location {
path: 4
path: 1
path: 2
path: 1
path: 1
span: 253
span: 11
span: 14
}
location {
path: 4
path: 1
path: 2
path: 1
path: 3
span: 253
span: 17
span: 18
}
location {
path: 4
path: 1
path: 2
path: 2
span: 256
span: 4
span: 19
leading_comments: " Used for updating a resource.\n"
}
location {
path: 4
path: 1
path: 2
path: 2
path: 5
span: 256
span: 4
span: 10
}
location {
path: 4
path: 1
path: 2
path: 2
path: 1
span: 256
span: 11
span: 14
}
location {
path: 4
path: 1
path: 2
path: 2
path: 3
span: 256
span: 17
span: 18
}
location {
path: 4
path: 1
path: 2
path: 3
span: 259
span: 4
span: 20
leading_comments: " Used for creating a resource.\n"
}
location {
path: 4
path: 1
path: 2
path: 3
path: 5
span: 259
span: 4
span: 10
}
location {
path: 4
path: 1
path: 2
path: 3
path: 1
span: 259
span: 11
span: 15
}
location {
path: 4
path: 1
path: 2
path: 3
path: 3
span: 259
span: 18
span: 19
}
location {
path: 4
path: 1
path: 2
path: 4
span: 262
span: 4
span: 22
leading_comments: " Used for deleting a resource.\n"
}
location {
path: 4
path: 1
path: 2
path: 4
path: 5
span: 262
span: 4
span: 10
}
location {
path: 4
path: 1
path: 2
path: 4
path: 1
span: 262
span: 11
span: 17
}
location {
path: 4
path: 1
path: 2
path: 4
path: 3
span: 262
span: 20
span: 21
}
location {
path: 4
path: 1
path: 2
path: 5
span: 265
span: 4
span: 21
leading_comments: " Used for updating a resource.\n"
}
location {
path: 4
path: 1
path: 2
path: 5
path: 5
span: 265
span: 4
span: 10
}
location {
path: 4
path: 1
path: 2
path: 5
path: 1
span: 265
span: 11
span: 16
}
location {
path: 4
path: 1
path: 2
path: 5
path: 3
span: 265
span: 19
span: 20
}
location {
path: 4
path: 1
path: 2
path: 6
span: 268
span: 4
span: 33
leading_comments: " Custom pattern is used for defining custom verbs.\n"
}
location {
path: 4
path: 1
path: 2
path: 6
path: 6
span: 268
span: 4
span: 21
}
location {
path: 4
path: 1
path: 2
path: 6
path: 1
span: 268
span: 22
span: 28
}
location {
path: 4
path: 1
path: 2
path: 6
path: 3
span: 268
span: 31
span: 32
}
location {
path: 4
path: 1
path: 2
path: 7
span: 275
span: 2
span: 18
leading_comments: " The name of the request field whose value is mapped to the HTTP body, or\n `*` for mapping all fields not captured by the path pattern to the HTTP\n body. NOTE: the referred field must not be a repeated field and must be\n present at the top-level of request message type.\n"
}
location {
path: 4
path: 1
path: 2
path: 7
path: 4
span: 275
span: 2
span: 269
span: 3
}
location {
path: 4
path: 1
path: 2
path: 7
path: 5
span: 275
span: 2
span: 8
}
location {
path: 4
path: 1
path: 2
path: 7
path: 1
span: 275
span: 9
span: 13
}
location {
path: 4
path: 1
path: 2
path: 7
path: 3
span: 275
span: 16
span: 17
}
location {
path: 4
path: 1
path: 2
path: 8
span: 280
span: 2
span: 45
leading_comments: " Additional HTTP bindings for the selector. Nested bindings must\n not contain an `additional_bindings` field themselves (that is,\n the nesting may only be one level deep).\n"
}
location {
path: 4
path: 1
path: 2
path: 8
path: 4
span: 280
span: 2
span: 10
}
location {
path: 4
path: 1
path: 2
path: 8
path: 6
span: 280
span: 11
span: 19
}
location {
path: 4
path: 1
path: 2
path: 8
path: 1
span: 280
span: 20
span: 39
}
location {
path: 4
path: 1
path: 2
path: 8
path: 3
span: 280
span: 42
span: 44
}
location {
path: 4
path: 2
span: 284
span: 0
span: 290
span: 1
leading_comments: " A custom pattern is used for defining custom HTTP verb.\n"
}
location {
path: 4
path: 2
path: 1
span: 284
span: 8
span: 25
}
location {
path: 4
path: 2
path: 2
path: 0
span: 286
span: 2
span: 18
leading_comments: " The name of this custom HTTP verb.\n"
}
location {
path: 4
path: 2
path: 2
path: 0
path: 4
span: 286
span: 2
span: 284
span: 27
}
location {
path: 4
path: 2
path: 2
path: 0
path: 5
span: 286
span: 2
span: 8
}
location {
path: 4
path: 2
path: 2
path: 0
path: 1
span: 286
span: 9
span: 13
}
location {
path: 4
path: 2
path: 2
path: 0
path: 3
span: 286
span: 16
span: 17
}
location {
path: 4
path: 2
path: 2
path: 1
span: 289
span: 2
span: 18
leading_comments: " The path matched by this custom verb.\n"
}
location {
path: 4
path: 2
path: 2
path: 1
path: 4
span: 289
span: 2
span: 286
span: 18
}
location {
path: 4
path: 2
path: 2
path: 1
path: 5
span: 289
span: 2
span: 8
}
location {
path: 4
path: 2
path: 2
path: 1
path: 1
span: 289
span: 9
span: 13
}
location {
path: 4
path: 2
path: 2
path: 1
path: 3
span: 289
span: 16
span: 17
}
}
syntax: "proto3"
)
out/: No such file or directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment