google-api-client 0.23.9 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +42 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +2030 -58
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +878 -43
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +604 -0
- data/generated/google/apis/adexperiencereport_v1.rb +1 -1
- data/generated/google/apis/adexperiencereport_v1/classes.rb +0 -1
- data/generated/google/apis/admin_directory_v1.rb +1 -1
- data/generated/google/apis/admin_directory_v1/classes.rb +8 -2
- data/generated/google/apis/admin_directory_v1/representations.rb +1 -0
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +108 -5
- data/generated/google/apis/androidenterprise_v1/representations.rb +60 -0
- data/generated/google/apis/appengine_v1.rb +1 -1
- data/generated/google/apis/appengine_v1/classes.rb +1 -1
- data/generated/google/apis/appengine_v1/service.rb +3 -3
- data/generated/google/apis/appengine_v1beta.rb +1 -1
- data/generated/google/apis/appengine_v1beta/classes.rb +1 -1
- data/generated/google/apis/appengine_v1beta/service.rb +3 -3
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/classroom_v1/classes.rb +14 -14
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +6 -0
- data/generated/google/apis/cloudbuild_v1/representations.rb +1 -0
- data/generated/google/apis/cloudtrace_v1.rb +1 -1
- data/generated/google/apis/cloudtrace_v1/classes.rb +3 -2
- data/generated/google/apis/composer_v1.rb +1 -1
- data/generated/google/apis/composer_v1/classes.rb +1 -1
- data/generated/google/apis/composer_v1/service.rb +6 -6
- data/generated/google/apis/composer_v1beta1.rb +1 -1
- data/generated/google/apis/composer_v1beta1/classes.rb +1 -1
- data/generated/google/apis/dataproc_v1.rb +1 -1
- data/generated/google/apis/dataproc_v1/classes.rb +475 -0
- data/generated/google/apis/dataproc_v1/representations.rb +188 -0
- data/generated/google/apis/dataproc_v1/service.rb +550 -0
- data/generated/google/apis/dlp_v2.rb +1 -1
- data/generated/google/apis/dlp_v2/classes.rb +21 -21
- data/generated/google/apis/file_v1beta1.rb +34 -0
- data/generated/google/apis/file_v1beta1/classes.rb +810 -0
- data/generated/google/apis/file_v1beta1/representations.rb +298 -0
- data/generated/google/apis/file_v1beta1/service.rb +472 -0
- data/generated/google/apis/jobs_v3.rb +1 -1
- data/generated/google/apis/jobs_v3/classes.rb +16 -17
- data/generated/google/apis/logging_v2.rb +1 -1
- data/generated/google/apis/logging_v2/classes.rb +8 -9
- data/generated/google/apis/logging_v2/service.rb +9 -9
- data/generated/google/apis/logging_v2beta1.rb +1 -1
- data/generated/google/apis/logging_v2beta1/classes.rb +8 -9
- data/generated/google/apis/logging_v2beta1/service.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +14 -14
- data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
- data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +142 -98
- data/generated/google/apis/servicecontrol_v1.rb +1 -1
- data/generated/google/apis/servicecontrol_v1/classes.rb +0 -2
- data/generated/google/apis/servicemanagement_v1.rb +1 -1
- data/generated/google/apis/servicemanagement_v1/classes.rb +142 -98
- data/generated/google/apis/serviceusage_v1.rb +1 -1
- data/generated/google/apis/serviceusage_v1/classes.rb +142 -98
- data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
- data/generated/google/apis/serviceusage_v1beta1/classes.rb +142 -98
- data/generated/google/apis/serviceuser_v1.rb +1 -1
- data/generated/google/apis/serviceuser_v1/classes.rb +142 -98
- data/generated/google/apis/speech_v1.rb +1 -1
- data/generated/google/apis/speech_v1/classes.rb +91 -0
- data/generated/google/apis/speech_v1/representations.rb +18 -0
- data/generated/google/apis/speech_v1/service.rb +47 -0
- data/generated/google/apis/speech_v1beta1.rb +1 -1
- data/generated/google/apis/speech_v1beta1/classes.rb +25 -0
- data/generated/google/apis/speech_v1beta1/representations.rb +15 -0
- data/generated/google/apis/speech_v1beta1/service.rb +47 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +3 -3
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +34 -31
- data/generated/google/apis/sqladmin_v1beta4/service.rb +8 -8
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +3 -4
- data/generated/google/apis/storage_v1/service.rb +2 -1
- data/generated/google/apis/storage_v1beta2.rb +1 -1
- data/generated/google/apis/storage_v1beta2/classes.rb +1 -2
- data/generated/google/apis/storage_v1beta2/service.rb +2 -1
- data/generated/google/apis/storagetransfer_v1.rb +1 -1
- data/generated/google/apis/storagetransfer_v1/classes.rb +21 -21
- data/generated/google/apis/testing_v1.rb +1 -1
- data/generated/google/apis/testing_v1/classes.rb +308 -14
- data/generated/google/apis/testing_v1/representations.rb +136 -0
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +156 -2
- data/generated/google/apis/vision_v1/representations.rb +60 -0
- data/generated/google/apis/vision_v1p1beta1.rb +1 -1
- data/generated/google/apis/vision_v1p1beta1/classes.rb +156 -2
- data/generated/google/apis/vision_v1p1beta1/representations.rb +60 -0
- data/generated/google/apis/vision_v1p2beta1.rb +1 -1
- data/generated/google/apis/vision_v1p2beta1/classes.rb +156 -2
- data/generated/google/apis/vision_v1p2beta1/representations.rb +60 -0
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/lib/google/apis/version.rb +1 -1
- metadata +6 -14
- data/generated/google/apis/adexchangeseller_v1.rb +0 -37
- data/generated/google/apis/adexchangeseller_v1/classes.rb +0 -557
- data/generated/google/apis/adexchangeseller_v1/representations.rb +0 -248
- data/generated/google/apis/adexchangeseller_v1/service.rb +0 -544
- data/generated/google/apis/adexchangeseller_v1_1.rb +0 -37
- data/generated/google/apis/adexchangeseller_v1_1/classes.rb +0 -842
- data/generated/google/apis/adexchangeseller_v1_1/representations.rb +0 -364
- data/generated/google/apis/adexchangeseller_v1_1/service.rb +0 -735
- data/generated/google/apis/adexchangeseller_v2_0.rb +0 -37
- data/generated/google/apis/adexchangeseller_v2_0/classes.rb +0 -792
- data/generated/google/apis/adexchangeseller_v2_0/representations.rb +0 -347
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +0 -638
|
@@ -27,7 +27,7 @@ module Google
|
|
|
27
27
|
# @see https://cloud.google.com/service-usage/
|
|
28
28
|
module ServiceusageV1beta1
|
|
29
29
|
VERSION = 'V1beta1'
|
|
30
|
-
REVISION = '
|
|
30
|
+
REVISION = '20180908'
|
|
31
31
|
|
|
32
32
|
# View and manage your data across Google Cloud Platform services
|
|
33
33
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
|
@@ -1975,79 +1975,79 @@ module Google
|
|
|
1975
1975
|
end
|
|
1976
1976
|
end
|
|
1977
1977
|
|
|
1978
|
-
#
|
|
1979
|
-
#
|
|
1980
|
-
#
|
|
1981
|
-
#
|
|
1982
|
-
#
|
|
1983
|
-
#
|
|
1984
|
-
#
|
|
1985
|
-
#
|
|
1986
|
-
#
|
|
1987
|
-
#
|
|
1978
|
+
# # gRPC Transcoding
|
|
1979
|
+
# gRPC Transcoding is a feature for mapping between a gRPC method and one or
|
|
1980
|
+
# more HTTP REST endpoints. It allows developers to build a single API service
|
|
1981
|
+
# that supports both gRPC APIs and REST APIs. Many systems, including [Google
|
|
1982
|
+
# APIs](https://github.com/googleapis/googleapis),
|
|
1983
|
+
# [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
|
|
1984
|
+
# Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
|
|
1985
|
+
# and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
|
|
1986
|
+
# and use it for large scale production services.
|
|
1987
|
+
# `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
|
|
1988
|
+
# how different portions of the gRPC request message are mapped to the URL
|
|
1989
|
+
# path, URL query parameters, and HTTP request body. It also controls how the
|
|
1990
|
+
# gRPC response message is mapped to the HTTP response body. `HttpRule` is
|
|
1991
|
+
# typically specified as an `google.api.http` annotation on the gRPC method.
|
|
1992
|
+
# Each mapping specifies a URL path template and an HTTP method. The path
|
|
1993
|
+
# template may refer to one or more fields in the gRPC request message, as long
|
|
1994
|
+
# as each field is a non-repeated field with a primitive (non-message) type.
|
|
1995
|
+
# The path template controls how fields of the request message are mapped to
|
|
1996
|
+
# the URL path.
|
|
1997
|
+
# Example:
|
|
1988
1998
|
# service Messaging `
|
|
1989
1999
|
# rpc GetMessage(GetMessageRequest) returns (Message) `
|
|
1990
|
-
# option (google.api.http)
|
|
1991
|
-
#
|
|
2000
|
+
# option (google.api.http) = `
|
|
2001
|
+
# get: "/v1/`name=messages/*"`"
|
|
2002
|
+
# `;
|
|
1992
2003
|
# `
|
|
1993
2004
|
# `
|
|
1994
2005
|
# message GetMessageRequest `
|
|
1995
|
-
#
|
|
1996
|
-
# string subfield = 1;
|
|
1997
|
-
# `
|
|
1998
|
-
# string message_id = 1; // mapped to the URL
|
|
1999
|
-
# SubMessage sub = 2; // `sub.subfield` is url-mapped
|
|
2006
|
+
# string name = 1; // Mapped to URL path.
|
|
2000
2007
|
# `
|
|
2001
2008
|
# message Message `
|
|
2002
|
-
# string text = 1; //
|
|
2009
|
+
# string text = 1; // The resource content.
|
|
2003
2010
|
# `
|
|
2004
|
-
#
|
|
2005
|
-
#
|
|
2006
|
-
# http:
|
|
2007
|
-
# rules:
|
|
2008
|
-
# - selector: <proto_package_name>.Messaging.GetMessage
|
|
2009
|
-
# get: /v1/messages/`message_id`/`sub.subfield`
|
|
2010
|
-
# This definition enables an automatic, bidrectional mapping of HTTP
|
|
2011
|
-
# JSON to RPC. Example:
|
|
2012
|
-
# HTTP | RPC
|
|
2011
|
+
# This enables an HTTP REST to gRPC mapping as below:
|
|
2012
|
+
# HTTP | gRPC
|
|
2013
2013
|
# -----|-----
|
|
2014
|
-
# `GET /v1/messages/123456
|
|
2015
|
-
#
|
|
2016
|
-
#
|
|
2017
|
-
#
|
|
2018
|
-
# repeated and must have a primitive (non-message) type.
|
|
2019
|
-
# Any fields in the request message which are not bound by the path
|
|
2020
|
-
# pattern automatically become (optional) HTTP query
|
|
2021
|
-
# parameters. Assume the following definition of the request message:
|
|
2014
|
+
# `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")`
|
|
2015
|
+
# Any fields in the request message which are not bound by the path template
|
|
2016
|
+
# automatically become HTTP query parameters if there is no HTTP request body.
|
|
2017
|
+
# For example:
|
|
2022
2018
|
# service Messaging `
|
|
2023
2019
|
# rpc GetMessage(GetMessageRequest) returns (Message) `
|
|
2024
|
-
# option (google.api.http)
|
|
2020
|
+
# option (google.api.http) = `
|
|
2021
|
+
# get:"/v1/messages/`message_id`"
|
|
2022
|
+
# `;
|
|
2025
2023
|
# `
|
|
2026
2024
|
# `
|
|
2027
2025
|
# message GetMessageRequest `
|
|
2028
2026
|
# message SubMessage `
|
|
2029
2027
|
# string subfield = 1;
|
|
2030
2028
|
# `
|
|
2031
|
-
# string message_id = 1; //
|
|
2032
|
-
# int64 revision = 2; //
|
|
2033
|
-
# SubMessage sub = 3; // `sub.subfield
|
|
2029
|
+
# string message_id = 1; // Mapped to URL path.
|
|
2030
|
+
# int64 revision = 2; // Mapped to URL query parameter `revision`.
|
|
2031
|
+
# SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
|
|
2034
2032
|
# `
|
|
2035
2033
|
# This enables a HTTP JSON to RPC mapping as below:
|
|
2036
|
-
# HTTP |
|
|
2034
|
+
# HTTP | gRPC
|
|
2037
2035
|
# -----|-----
|
|
2038
2036
|
# `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id:
|
|
2039
2037
|
# "123456" revision: 2 sub: SubMessage(subfield: "foo"))`
|
|
2040
|
-
# Note that fields which are mapped to
|
|
2041
|
-
# primitive type or a repeated primitive type
|
|
2042
|
-
#
|
|
2043
|
-
#
|
|
2044
|
-
#
|
|
2038
|
+
# Note that fields which are mapped to URL query parameters must have a
|
|
2039
|
+
# primitive type or a repeated primitive type or a non-repeated message type.
|
|
2040
|
+
# In the case of a repeated type, the parameter can be repeated in the URL
|
|
2041
|
+
# as `...?param=A¶m=B`. In the case of a message type, each field of the
|
|
2042
|
+
# message is mapped to a separate parameter, such as
|
|
2043
|
+
# `...?foo.a=A&foo.b=B&foo.c=C`.
|
|
2044
|
+
# For HTTP methods that allow a request body, the `body` field
|
|
2045
2045
|
# specifies the mapping. Consider a REST update method on the
|
|
2046
2046
|
# message resource collection:
|
|
2047
2047
|
# service Messaging `
|
|
2048
2048
|
# rpc UpdateMessage(UpdateMessageRequest) returns (Message) `
|
|
2049
2049
|
# option (google.api.http) = `
|
|
2050
|
-
#
|
|
2050
|
+
# patch: "/v1/messages/`message_id`"
|
|
2051
2051
|
# body: "message"
|
|
2052
2052
|
# `;
|
|
2053
2053
|
# `
|
|
@@ -2059,9 +2059,9 @@ module Google
|
|
|
2059
2059
|
# The following HTTP JSON to RPC mapping is enabled, where the
|
|
2060
2060
|
# representation of the JSON in the request body is determined by
|
|
2061
2061
|
# protos JSON encoding:
|
|
2062
|
-
# HTTP |
|
|
2062
|
+
# HTTP | gRPC
|
|
2063
2063
|
# -----|-----
|
|
2064
|
-
# `
|
|
2064
|
+
# `PATCH /v1/messages/123456 ` "text": "Hi!" `` | `UpdateMessage(message_id: "
|
|
2065
2065
|
# 123456" message ` text: "Hi!" `)`
|
|
2066
2066
|
# The special name `*` can be used in the body mapping to define that
|
|
2067
2067
|
# every field not bound by the path template should be mapped to the
|
|
@@ -2070,7 +2070,7 @@ module Google
|
|
|
2070
2070
|
# service Messaging `
|
|
2071
2071
|
# rpc UpdateMessage(Message) returns (Message) `
|
|
2072
2072
|
# option (google.api.http) = `
|
|
2073
|
-
#
|
|
2073
|
+
# patch: "/v1/messages/`message_id`"
|
|
2074
2074
|
# body: "*"
|
|
2075
2075
|
# `;
|
|
2076
2076
|
# `
|
|
@@ -2080,13 +2080,13 @@ module Google
|
|
|
2080
2080
|
# string text = 2;
|
|
2081
2081
|
# `
|
|
2082
2082
|
# The following HTTP JSON to RPC mapping is enabled:
|
|
2083
|
-
# HTTP |
|
|
2083
|
+
# HTTP | gRPC
|
|
2084
2084
|
# -----|-----
|
|
2085
|
-
# `
|
|
2085
|
+
# `PATCH /v1/messages/123456 ` "text": "Hi!" `` | `UpdateMessage(message_id: "
|
|
2086
2086
|
# 123456" text: "Hi!")`
|
|
2087
2087
|
# Note that when using `*` in the body mapping, it is not possible to
|
|
2088
2088
|
# have HTTP parameters, as all fields not bound by the path end in
|
|
2089
|
-
# the body. This makes this option more rarely used in practice
|
|
2089
|
+
# the body. This makes this option more rarely used in practice when
|
|
2090
2090
|
# defining REST APIs. The common usage of `*` is in custom methods
|
|
2091
2091
|
# which don't use the URL at all for transferring data.
|
|
2092
2092
|
# It is possible to define multiple HTTP methods for one RPC by using
|
|
@@ -2105,56 +2105,96 @@ module Google
|
|
|
2105
2105
|
# string message_id = 1;
|
|
2106
2106
|
# string user_id = 2;
|
|
2107
2107
|
# `
|
|
2108
|
-
# This enables the following two alternative HTTP JSON to RPC
|
|
2109
|
-
#
|
|
2110
|
-
# HTTP | RPC
|
|
2108
|
+
# This enables the following two alternative HTTP JSON to RPC mappings:
|
|
2109
|
+
# HTTP | gRPC
|
|
2111
2110
|
# -----|-----
|
|
2112
2111
|
# `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
|
|
2113
2112
|
# `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "
|
|
2114
2113
|
# 123456")`
|
|
2115
|
-
#
|
|
2116
|
-
#
|
|
2117
|
-
#
|
|
2118
|
-
#
|
|
2119
|
-
#
|
|
2120
|
-
#
|
|
2121
|
-
#
|
|
2122
|
-
#
|
|
2123
|
-
#
|
|
2124
|
-
#
|
|
2125
|
-
#
|
|
2126
|
-
#
|
|
2127
|
-
#
|
|
2128
|
-
#
|
|
2114
|
+
# ## Rules for HTTP mapping
|
|
2115
|
+
# 1. Leaf request fields (recursive expansion nested messages in the request
|
|
2116
|
+
# message) are classified into three categories:
|
|
2117
|
+
# - Fields referred by the path template. They are passed via the URL path.
|
|
2118
|
+
# - Fields referred by the HttpRule.body. They are passed via the HTTP
|
|
2119
|
+
# request body.
|
|
2120
|
+
# - All other fields are passed via the URL query parameters, and the
|
|
2121
|
+
# parameter name is the field path in the request message. A repeated
|
|
2122
|
+
# field can be represented as multiple query parameters under the same
|
|
2123
|
+
# name.
|
|
2124
|
+
# 2. If HttpRule.body is "*", there is no URL query parameter, all fields
|
|
2125
|
+
# are passed via URL path and HTTP request body.
|
|
2126
|
+
# 3. If HttpRule.body is omitted, there is no HTTP request body, all
|
|
2127
|
+
# fields are passed via URL path and URL query parameters.
|
|
2128
|
+
# ### Path template syntax
|
|
2129
2129
|
# Template = "/" Segments [ Verb ] ;
|
|
2130
2130
|
# Segments = Segment ` "/" Segment ` ;
|
|
2131
2131
|
# Segment = "*" | "**" | LITERAL | Variable ;
|
|
2132
2132
|
# Variable = "`" FieldPath [ "=" Segments ] "`" ;
|
|
2133
2133
|
# FieldPath = IDENT ` "." IDENT ` ;
|
|
2134
2134
|
# Verb = ":" LITERAL ;
|
|
2135
|
-
# The syntax `*` matches a single path segment. The syntax `**` matches
|
|
2136
|
-
# or more path segments, which must be the last part of the path
|
|
2137
|
-
# `Verb`.
|
|
2135
|
+
# The syntax `*` matches a single URL path segment. The syntax `**` matches
|
|
2136
|
+
# zero or more URL path segments, which must be the last part of the URL path
|
|
2137
|
+
# except the `Verb`.
|
|
2138
2138
|
# The syntax `Variable` matches part of the URL path as specified by its
|
|
2139
2139
|
# template. A variable template must not contain other variables. If a variable
|
|
2140
2140
|
# matches a single path segment, its template may be omitted, e.g. ``var``
|
|
2141
2141
|
# is equivalent to ``var=*``.
|
|
2142
|
+
# The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
|
|
2143
|
+
# contains any reserved character, such characters should be percent-encoded
|
|
2144
|
+
# before the matching.
|
|
2142
2145
|
# If a variable contains exactly one path segment, such as `"`var`"` or
|
|
2143
|
-
# `"`var=*`"`, when such a variable is expanded into a URL path
|
|
2144
|
-
# except `[-_.~0-9a-zA-Z]` are percent-encoded.
|
|
2145
|
-
#
|
|
2146
|
-
#
|
|
2147
|
-
#
|
|
2148
|
-
#
|
|
2149
|
-
#
|
|
2150
|
-
#
|
|
2151
|
-
#
|
|
2152
|
-
#
|
|
2153
|
-
#
|
|
2146
|
+
# `"`var=*`"`, when such a variable is expanded into a URL path on the client
|
|
2147
|
+
# side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
|
|
2148
|
+
# server side does the reverse decoding. Such variables show up in the
|
|
2149
|
+
# [Discovery Document](https://developers.google.com/discovery/v1/reference/apis)
|
|
2150
|
+
# as ``var``.
|
|
2151
|
+
# If a variable contains multiple path segments, such as `"`var=foo/*`"`
|
|
2152
|
+
# or `"`var=**`"`, when such a variable is expanded into a URL path on the
|
|
2153
|
+
# client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
|
|
2154
|
+
# The server side does the reverse decoding, except "%2F" and "%2f" are left
|
|
2155
|
+
# unchanged. Such variables show up in the
|
|
2156
|
+
# [Discovery Document](https://developers.google.com/discovery/v1/reference/apis)
|
|
2157
|
+
# as ``+var``.
|
|
2158
|
+
# ## Using gRPC API Service Configuration
|
|
2159
|
+
# gRPC API Service Configuration (service config) is a configuration language
|
|
2160
|
+
# for configuring a gRPC service to become a user-facing product. The
|
|
2161
|
+
# service config is simply the YAML representation of the `google.api.Service`
|
|
2162
|
+
# proto message.
|
|
2163
|
+
# As an alternative to annotating your proto file, you can configure gRPC
|
|
2164
|
+
# transcoding in your service config YAML files. You do this by specifying a
|
|
2165
|
+
# `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
|
|
2166
|
+
# effect as the proto annotation. This can be particularly useful if you
|
|
2167
|
+
# have a proto that is reused in multiple services. Note that any transcoding
|
|
2168
|
+
# specified in the service config will override any matching transcoding
|
|
2169
|
+
# configuration in the proto.
|
|
2170
|
+
# Example:
|
|
2171
|
+
# http:
|
|
2172
|
+
# rules:
|
|
2173
|
+
# # Selects a gRPC method and applies HttpRule to it.
|
|
2174
|
+
# - selector: example.v1.Messaging.GetMessage
|
|
2175
|
+
# get: /v1/messages/`message_id`/`sub.subfield`
|
|
2176
|
+
# ## Special notes
|
|
2177
|
+
# When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
|
|
2178
|
+
# proto to JSON conversion must follow the [proto3
|
|
2179
|
+
# specification](https://developers.google.com/protocol-buffers/docs/proto3#json)
|
|
2180
|
+
# .
|
|
2181
|
+
# While the single segment variable follows the semantics of
|
|
2182
|
+
# [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
|
|
2183
|
+
# Expansion, the multi segment variable **does not** follow RFC 6570 Section
|
|
2184
|
+
# 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
|
|
2154
2185
|
# does not expand special characters like `?` and `#`, which would lead
|
|
2155
|
-
# to invalid URLs.
|
|
2156
|
-
#
|
|
2157
|
-
# repeated
|
|
2186
|
+
# to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
|
|
2187
|
+
# for multi segment variables.
|
|
2188
|
+
# The path variables **must not** refer to any repeated or mapped field,
|
|
2189
|
+
# because client libraries are not capable of handling such variable expansion.
|
|
2190
|
+
# The path variables **must not** capture the leading "/" character. The reason
|
|
2191
|
+
# is that the most common use case "`var`" does not capture the leading "/"
|
|
2192
|
+
# character. For consistency, all path variables must share the same behavior.
|
|
2193
|
+
# Repeated message fields must not be mapped to URL query parameters, because
|
|
2194
|
+
# no client library can support such complicated mapping.
|
|
2195
|
+
# If an API needs to use a JSON array for request or response body, it can map
|
|
2196
|
+
# the request or response body to a repeated field. However, some gRPC
|
|
2197
|
+
# Transcoding implementations may not support this feature.
|
|
2158
2198
|
class HttpRule
|
|
2159
2199
|
include Google::Apis::Core::Hashable
|
|
2160
2200
|
|
|
@@ -2173,10 +2213,11 @@ module Google
|
|
|
2173
2213
|
# @return [Array<Google::Apis::ServiceusageV1beta1::AuthorizationRule>]
|
|
2174
2214
|
attr_accessor :authorizations
|
|
2175
2215
|
|
|
2176
|
-
# The name of the request field whose value is mapped to the HTTP
|
|
2177
|
-
# `*` for mapping all fields not captured by the path
|
|
2178
|
-
#
|
|
2179
|
-
# present at the top-level of request
|
|
2216
|
+
# The name of the request field whose value is mapped to the HTTP request
|
|
2217
|
+
# body, or `*` for mapping all request fields not captured by the path
|
|
2218
|
+
# pattern to the HTTP body, or omitted for not having any HTTP request body.
|
|
2219
|
+
# NOTE: the referred field must be present at the top-level of the request
|
|
2220
|
+
# message type.
|
|
2180
2221
|
# Corresponds to the JSON property `body`
|
|
2181
2222
|
# @return [String]
|
|
2182
2223
|
attr_accessor :body
|
|
@@ -2186,12 +2227,13 @@ module Google
|
|
|
2186
2227
|
# @return [Google::Apis::ServiceusageV1beta1::CustomHttpPattern]
|
|
2187
2228
|
attr_accessor :custom
|
|
2188
2229
|
|
|
2189
|
-
# Used for deleting a resource.
|
|
2230
|
+
# Maps to HTTP DELETE. Used for deleting a resource.
|
|
2190
2231
|
# Corresponds to the JSON property `delete`
|
|
2191
2232
|
# @return [String]
|
|
2192
2233
|
attr_accessor :delete
|
|
2193
2234
|
|
|
2194
|
-
# Used for listing and getting information about
|
|
2235
|
+
# Maps to HTTP GET. Used for listing and getting information about
|
|
2236
|
+
# resources.
|
|
2195
2237
|
# Corresponds to the JSON property `get`
|
|
2196
2238
|
# @return [String]
|
|
2197
2239
|
attr_accessor :get
|
|
@@ -2212,24 +2254,26 @@ module Google
|
|
|
2212
2254
|
# @return [Google::Apis::ServiceusageV1beta1::MediaUpload]
|
|
2213
2255
|
attr_accessor :media_upload
|
|
2214
2256
|
|
|
2215
|
-
# Used for updating a resource.
|
|
2257
|
+
# Maps to HTTP PATCH. Used for updating a resource.
|
|
2216
2258
|
# Corresponds to the JSON property `patch`
|
|
2217
2259
|
# @return [String]
|
|
2218
2260
|
attr_accessor :patch
|
|
2219
2261
|
|
|
2220
|
-
# Used for creating a resource.
|
|
2262
|
+
# Maps to HTTP POST. Used for creating a resource or performing an action.
|
|
2221
2263
|
# Corresponds to the JSON property `post`
|
|
2222
2264
|
# @return [String]
|
|
2223
2265
|
attr_accessor :post
|
|
2224
2266
|
|
|
2225
|
-
# Used for
|
|
2267
|
+
# Maps to HTTP PUT. Used for replacing a resource.
|
|
2226
2268
|
# Corresponds to the JSON property `put`
|
|
2227
2269
|
# @return [String]
|
|
2228
2270
|
attr_accessor :put
|
|
2229
2271
|
|
|
2230
2272
|
# Optional. The name of the response field whose value is mapped to the HTTP
|
|
2231
|
-
# body
|
|
2232
|
-
#
|
|
2273
|
+
# response body. When omitted, the entire response message will be used
|
|
2274
|
+
# as the HTTP response body.
|
|
2275
|
+
# NOTE: The referred field must be present at the top-level of the response
|
|
2276
|
+
# message type.
|
|
2233
2277
|
# Corresponds to the JSON property `responseBody`
|
|
2234
2278
|
# @return [String]
|
|
2235
2279
|
attr_accessor :response_body
|
|
@@ -2272,7 +2316,7 @@ module Google
|
|
|
2272
2316
|
# @return [String]
|
|
2273
2317
|
attr_accessor :rest_method_name
|
|
2274
2318
|
|
|
2275
|
-
# Selects
|
|
2319
|
+
# Selects a method to which this rule applies.
|
|
2276
2320
|
# Refer to selector for syntax details.
|
|
2277
2321
|
# Corresponds to the JSON property `selector`
|
|
2278
2322
|
# @return [String]
|
|
@@ -27,7 +27,7 @@ module Google
|
|
|
27
27
|
# @see https://cloud.google.com/service-management/
|
|
28
28
|
module ServiceuserV1
|
|
29
29
|
VERSION = 'V1'
|
|
30
|
-
REVISION = '
|
|
30
|
+
REVISION = '20180907'
|
|
31
31
|
|
|
32
32
|
# View and manage your data across Google Cloud Platform services
|
|
33
33
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
|
@@ -1118,79 +1118,79 @@ module Google
|
|
|
1118
1118
|
end
|
|
1119
1119
|
end
|
|
1120
1120
|
|
|
1121
|
-
#
|
|
1122
|
-
#
|
|
1123
|
-
#
|
|
1124
|
-
#
|
|
1125
|
-
#
|
|
1126
|
-
#
|
|
1127
|
-
#
|
|
1128
|
-
#
|
|
1129
|
-
#
|
|
1130
|
-
#
|
|
1121
|
+
# # gRPC Transcoding
|
|
1122
|
+
# gRPC Transcoding is a feature for mapping between a gRPC method and one or
|
|
1123
|
+
# more HTTP REST endpoints. It allows developers to build a single API service
|
|
1124
|
+
# that supports both gRPC APIs and REST APIs. Many systems, including [Google
|
|
1125
|
+
# APIs](https://github.com/googleapis/googleapis),
|
|
1126
|
+
# [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
|
|
1127
|
+
# Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
|
|
1128
|
+
# and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
|
|
1129
|
+
# and use it for large scale production services.
|
|
1130
|
+
# `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
|
|
1131
|
+
# how different portions of the gRPC request message are mapped to the URL
|
|
1132
|
+
# path, URL query parameters, and HTTP request body. It also controls how the
|
|
1133
|
+
# gRPC response message is mapped to the HTTP response body. `HttpRule` is
|
|
1134
|
+
# typically specified as an `google.api.http` annotation on the gRPC method.
|
|
1135
|
+
# Each mapping specifies a URL path template and an HTTP method. The path
|
|
1136
|
+
# template may refer to one or more fields in the gRPC request message, as long
|
|
1137
|
+
# as each field is a non-repeated field with a primitive (non-message) type.
|
|
1138
|
+
# The path template controls how fields of the request message are mapped to
|
|
1139
|
+
# the URL path.
|
|
1140
|
+
# Example:
|
|
1131
1141
|
# service Messaging `
|
|
1132
1142
|
# rpc GetMessage(GetMessageRequest) returns (Message) `
|
|
1133
|
-
# option (google.api.http)
|
|
1134
|
-
#
|
|
1143
|
+
# option (google.api.http) = `
|
|
1144
|
+
# get: "/v1/`name=messages/*"`"
|
|
1145
|
+
# `;
|
|
1135
1146
|
# `
|
|
1136
1147
|
# `
|
|
1137
1148
|
# message GetMessageRequest `
|
|
1138
|
-
#
|
|
1139
|
-
# string subfield = 1;
|
|
1140
|
-
# `
|
|
1141
|
-
# string message_id = 1; // mapped to the URL
|
|
1142
|
-
# SubMessage sub = 2; // `sub.subfield` is url-mapped
|
|
1149
|
+
# string name = 1; // Mapped to URL path.
|
|
1143
1150
|
# `
|
|
1144
1151
|
# message Message `
|
|
1145
|
-
# string text = 1; //
|
|
1152
|
+
# string text = 1; // The resource content.
|
|
1146
1153
|
# `
|
|
1147
|
-
#
|
|
1148
|
-
#
|
|
1149
|
-
# http:
|
|
1150
|
-
# rules:
|
|
1151
|
-
# - selector: <proto_package_name>.Messaging.GetMessage
|
|
1152
|
-
# get: /v1/messages/`message_id`/`sub.subfield`
|
|
1153
|
-
# This definition enables an automatic, bidrectional mapping of HTTP
|
|
1154
|
-
# JSON to RPC. Example:
|
|
1155
|
-
# HTTP | RPC
|
|
1154
|
+
# This enables an HTTP REST to gRPC mapping as below:
|
|
1155
|
+
# HTTP | gRPC
|
|
1156
1156
|
# -----|-----
|
|
1157
|
-
# `GET /v1/messages/123456
|
|
1158
|
-
#
|
|
1159
|
-
#
|
|
1160
|
-
#
|
|
1161
|
-
# repeated and must have a primitive (non-message) type.
|
|
1162
|
-
# Any fields in the request message which are not bound by the path
|
|
1163
|
-
# pattern automatically become (optional) HTTP query
|
|
1164
|
-
# parameters. Assume the following definition of the request message:
|
|
1157
|
+
# `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")`
|
|
1158
|
+
# Any fields in the request message which are not bound by the path template
|
|
1159
|
+
# automatically become HTTP query parameters if there is no HTTP request body.
|
|
1160
|
+
# For example:
|
|
1165
1161
|
# service Messaging `
|
|
1166
1162
|
# rpc GetMessage(GetMessageRequest) returns (Message) `
|
|
1167
|
-
# option (google.api.http)
|
|
1163
|
+
# option (google.api.http) = `
|
|
1164
|
+
# get:"/v1/messages/`message_id`"
|
|
1165
|
+
# `;
|
|
1168
1166
|
# `
|
|
1169
1167
|
# `
|
|
1170
1168
|
# message GetMessageRequest `
|
|
1171
1169
|
# message SubMessage `
|
|
1172
1170
|
# string subfield = 1;
|
|
1173
1171
|
# `
|
|
1174
|
-
# string message_id = 1; //
|
|
1175
|
-
# int64 revision = 2; //
|
|
1176
|
-
# SubMessage sub = 3; // `sub.subfield
|
|
1172
|
+
# string message_id = 1; // Mapped to URL path.
|
|
1173
|
+
# int64 revision = 2; // Mapped to URL query parameter `revision`.
|
|
1174
|
+
# SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
|
|
1177
1175
|
# `
|
|
1178
1176
|
# This enables a HTTP JSON to RPC mapping as below:
|
|
1179
|
-
# HTTP |
|
|
1177
|
+
# HTTP | gRPC
|
|
1180
1178
|
# -----|-----
|
|
1181
1179
|
# `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id:
|
|
1182
1180
|
# "123456" revision: 2 sub: SubMessage(subfield: "foo"))`
|
|
1183
|
-
# Note that fields which are mapped to
|
|
1184
|
-
# primitive type or a repeated primitive type
|
|
1185
|
-
#
|
|
1186
|
-
#
|
|
1187
|
-
#
|
|
1181
|
+
# Note that fields which are mapped to URL query parameters must have a
|
|
1182
|
+
# primitive type or a repeated primitive type or a non-repeated message type.
|
|
1183
|
+
# In the case of a repeated type, the parameter can be repeated in the URL
|
|
1184
|
+
# as `...?param=A¶m=B`. In the case of a message type, each field of the
|
|
1185
|
+
# message is mapped to a separate parameter, such as
|
|
1186
|
+
# `...?foo.a=A&foo.b=B&foo.c=C`.
|
|
1187
|
+
# For HTTP methods that allow a request body, the `body` field
|
|
1188
1188
|
# specifies the mapping. Consider a REST update method on the
|
|
1189
1189
|
# message resource collection:
|
|
1190
1190
|
# service Messaging `
|
|
1191
1191
|
# rpc UpdateMessage(UpdateMessageRequest) returns (Message) `
|
|
1192
1192
|
# option (google.api.http) = `
|
|
1193
|
-
#
|
|
1193
|
+
# patch: "/v1/messages/`message_id`"
|
|
1194
1194
|
# body: "message"
|
|
1195
1195
|
# `;
|
|
1196
1196
|
# `
|
|
@@ -1202,9 +1202,9 @@ module Google
|
|
|
1202
1202
|
# The following HTTP JSON to RPC mapping is enabled, where the
|
|
1203
1203
|
# representation of the JSON in the request body is determined by
|
|
1204
1204
|
# protos JSON encoding:
|
|
1205
|
-
# HTTP |
|
|
1205
|
+
# HTTP | gRPC
|
|
1206
1206
|
# -----|-----
|
|
1207
|
-
# `
|
|
1207
|
+
# `PATCH /v1/messages/123456 ` "text": "Hi!" `` | `UpdateMessage(message_id: "
|
|
1208
1208
|
# 123456" message ` text: "Hi!" `)`
|
|
1209
1209
|
# The special name `*` can be used in the body mapping to define that
|
|
1210
1210
|
# every field not bound by the path template should be mapped to the
|
|
@@ -1213,7 +1213,7 @@ module Google
|
|
|
1213
1213
|
# service Messaging `
|
|
1214
1214
|
# rpc UpdateMessage(Message) returns (Message) `
|
|
1215
1215
|
# option (google.api.http) = `
|
|
1216
|
-
#
|
|
1216
|
+
# patch: "/v1/messages/`message_id`"
|
|
1217
1217
|
# body: "*"
|
|
1218
1218
|
# `;
|
|
1219
1219
|
# `
|
|
@@ -1223,13 +1223,13 @@ module Google
|
|
|
1223
1223
|
# string text = 2;
|
|
1224
1224
|
# `
|
|
1225
1225
|
# The following HTTP JSON to RPC mapping is enabled:
|
|
1226
|
-
# HTTP |
|
|
1226
|
+
# HTTP | gRPC
|
|
1227
1227
|
# -----|-----
|
|
1228
|
-
# `
|
|
1228
|
+
# `PATCH /v1/messages/123456 ` "text": "Hi!" `` | `UpdateMessage(message_id: "
|
|
1229
1229
|
# 123456" text: "Hi!")`
|
|
1230
1230
|
# Note that when using `*` in the body mapping, it is not possible to
|
|
1231
1231
|
# have HTTP parameters, as all fields not bound by the path end in
|
|
1232
|
-
# the body. This makes this option more rarely used in practice
|
|
1232
|
+
# the body. This makes this option more rarely used in practice when
|
|
1233
1233
|
# defining REST APIs. The common usage of `*` is in custom methods
|
|
1234
1234
|
# which don't use the URL at all for transferring data.
|
|
1235
1235
|
# It is possible to define multiple HTTP methods for one RPC by using
|
|
@@ -1248,56 +1248,96 @@ module Google
|
|
|
1248
1248
|
# string message_id = 1;
|
|
1249
1249
|
# string user_id = 2;
|
|
1250
1250
|
# `
|
|
1251
|
-
# This enables the following two alternative HTTP JSON to RPC
|
|
1252
|
-
#
|
|
1253
|
-
# HTTP | RPC
|
|
1251
|
+
# This enables the following two alternative HTTP JSON to RPC mappings:
|
|
1252
|
+
# HTTP | gRPC
|
|
1254
1253
|
# -----|-----
|
|
1255
1254
|
# `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
|
|
1256
1255
|
# `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "
|
|
1257
1256
|
# 123456")`
|
|
1258
|
-
#
|
|
1259
|
-
#
|
|
1260
|
-
#
|
|
1261
|
-
#
|
|
1262
|
-
#
|
|
1263
|
-
#
|
|
1264
|
-
#
|
|
1265
|
-
#
|
|
1266
|
-
#
|
|
1267
|
-
#
|
|
1268
|
-
#
|
|
1269
|
-
#
|
|
1270
|
-
#
|
|
1271
|
-
#
|
|
1257
|
+
# ## Rules for HTTP mapping
|
|
1258
|
+
# 1. Leaf request fields (recursive expansion nested messages in the request
|
|
1259
|
+
# message) are classified into three categories:
|
|
1260
|
+
# - Fields referred by the path template. They are passed via the URL path.
|
|
1261
|
+
# - Fields referred by the HttpRule.body. They are passed via the HTTP
|
|
1262
|
+
# request body.
|
|
1263
|
+
# - All other fields are passed via the URL query parameters, and the
|
|
1264
|
+
# parameter name is the field path in the request message. A repeated
|
|
1265
|
+
# field can be represented as multiple query parameters under the same
|
|
1266
|
+
# name.
|
|
1267
|
+
# 2. If HttpRule.body is "*", there is no URL query parameter, all fields
|
|
1268
|
+
# are passed via URL path and HTTP request body.
|
|
1269
|
+
# 3. If HttpRule.body is omitted, there is no HTTP request body, all
|
|
1270
|
+
# fields are passed via URL path and URL query parameters.
|
|
1271
|
+
# ### Path template syntax
|
|
1272
1272
|
# Template = "/" Segments [ Verb ] ;
|
|
1273
1273
|
# Segments = Segment ` "/" Segment ` ;
|
|
1274
1274
|
# Segment = "*" | "**" | LITERAL | Variable ;
|
|
1275
1275
|
# Variable = "`" FieldPath [ "=" Segments ] "`" ;
|
|
1276
1276
|
# FieldPath = IDENT ` "." IDENT ` ;
|
|
1277
1277
|
# Verb = ":" LITERAL ;
|
|
1278
|
-
# The syntax `*` matches a single path segment. The syntax `**` matches
|
|
1279
|
-
# or more path segments, which must be the last part of the path
|
|
1280
|
-
# `Verb`.
|
|
1278
|
+
# The syntax `*` matches a single URL path segment. The syntax `**` matches
|
|
1279
|
+
# zero or more URL path segments, which must be the last part of the URL path
|
|
1280
|
+
# except the `Verb`.
|
|
1281
1281
|
# The syntax `Variable` matches part of the URL path as specified by its
|
|
1282
1282
|
# template. A variable template must not contain other variables. If a variable
|
|
1283
1283
|
# matches a single path segment, its template may be omitted, e.g. ``var``
|
|
1284
1284
|
# is equivalent to ``var=*``.
|
|
1285
|
+
# The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
|
|
1286
|
+
# contains any reserved character, such characters should be percent-encoded
|
|
1287
|
+
# before the matching.
|
|
1285
1288
|
# If a variable contains exactly one path segment, such as `"`var`"` or
|
|
1286
|
-
# `"`var=*`"`, when such a variable is expanded into a URL path
|
|
1287
|
-
# except `[-_.~0-9a-zA-Z]` are percent-encoded.
|
|
1288
|
-
#
|
|
1289
|
-
#
|
|
1290
|
-
#
|
|
1291
|
-
#
|
|
1292
|
-
#
|
|
1293
|
-
#
|
|
1294
|
-
#
|
|
1295
|
-
#
|
|
1296
|
-
#
|
|
1289
|
+
# `"`var=*`"`, when such a variable is expanded into a URL path on the client
|
|
1290
|
+
# side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
|
|
1291
|
+
# server side does the reverse decoding. Such variables show up in the
|
|
1292
|
+
# [Discovery Document](https://developers.google.com/discovery/v1/reference/apis)
|
|
1293
|
+
# as ``var``.
|
|
1294
|
+
# If a variable contains multiple path segments, such as `"`var=foo/*`"`
|
|
1295
|
+
# or `"`var=**`"`, when such a variable is expanded into a URL path on the
|
|
1296
|
+
# client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
|
|
1297
|
+
# The server side does the reverse decoding, except "%2F" and "%2f" are left
|
|
1298
|
+
# unchanged. Such variables show up in the
|
|
1299
|
+
# [Discovery Document](https://developers.google.com/discovery/v1/reference/apis)
|
|
1300
|
+
# as ``+var``.
|
|
1301
|
+
# ## Using gRPC API Service Configuration
|
|
1302
|
+
# gRPC API Service Configuration (service config) is a configuration language
|
|
1303
|
+
# for configuring a gRPC service to become a user-facing product. The
|
|
1304
|
+
# service config is simply the YAML representation of the `google.api.Service`
|
|
1305
|
+
# proto message.
|
|
1306
|
+
# As an alternative to annotating your proto file, you can configure gRPC
|
|
1307
|
+
# transcoding in your service config YAML files. You do this by specifying a
|
|
1308
|
+
# `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
|
|
1309
|
+
# effect as the proto annotation. This can be particularly useful if you
|
|
1310
|
+
# have a proto that is reused in multiple services. Note that any transcoding
|
|
1311
|
+
# specified in the service config will override any matching transcoding
|
|
1312
|
+
# configuration in the proto.
|
|
1313
|
+
# Example:
|
|
1314
|
+
# http:
|
|
1315
|
+
# rules:
|
|
1316
|
+
# # Selects a gRPC method and applies HttpRule to it.
|
|
1317
|
+
# - selector: example.v1.Messaging.GetMessage
|
|
1318
|
+
# get: /v1/messages/`message_id`/`sub.subfield`
|
|
1319
|
+
# ## Special notes
|
|
1320
|
+
# When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
|
|
1321
|
+
# proto to JSON conversion must follow the [proto3
|
|
1322
|
+
# specification](https://developers.google.com/protocol-buffers/docs/proto3#json)
|
|
1323
|
+
# .
|
|
1324
|
+
# While the single segment variable follows the semantics of
|
|
1325
|
+
# [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
|
|
1326
|
+
# Expansion, the multi segment variable **does not** follow RFC 6570 Section
|
|
1327
|
+
# 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
|
|
1297
1328
|
# does not expand special characters like `?` and `#`, which would lead
|
|
1298
|
-
# to invalid URLs.
|
|
1299
|
-
#
|
|
1300
|
-
# repeated
|
|
1329
|
+
# to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
|
|
1330
|
+
# for multi segment variables.
|
|
1331
|
+
# The path variables **must not** refer to any repeated or mapped field,
|
|
1332
|
+
# because client libraries are not capable of handling such variable expansion.
|
|
1333
|
+
# The path variables **must not** capture the leading "/" character. The reason
|
|
1334
|
+
# is that the most common use case "`var`" does not capture the leading "/"
|
|
1335
|
+
# character. For consistency, all path variables must share the same behavior.
|
|
1336
|
+
# Repeated message fields must not be mapped to URL query parameters, because
|
|
1337
|
+
# no client library can support such complicated mapping.
|
|
1338
|
+
# If an API needs to use a JSON array for request or response body, it can map
|
|
1339
|
+
# the request or response body to a repeated field. However, some gRPC
|
|
1340
|
+
# Transcoding implementations may not support this feature.
|
|
1301
1341
|
class HttpRule
|
|
1302
1342
|
include Google::Apis::Core::Hashable
|
|
1303
1343
|
|
|
@@ -1308,10 +1348,11 @@ module Google
|
|
|
1308
1348
|
# @return [Array<Google::Apis::ServiceuserV1::HttpRule>]
|
|
1309
1349
|
attr_accessor :additional_bindings
|
|
1310
1350
|
|
|
1311
|
-
# The name of the request field whose value is mapped to the HTTP
|
|
1312
|
-
# `*` for mapping all fields not captured by the path
|
|
1313
|
-
#
|
|
1314
|
-
# present at the top-level of request
|
|
1351
|
+
# The name of the request field whose value is mapped to the HTTP request
|
|
1352
|
+
# body, or `*` for mapping all request fields not captured by the path
|
|
1353
|
+
# pattern to the HTTP body, or omitted for not having any HTTP request body.
|
|
1354
|
+
# NOTE: the referred field must be present at the top-level of the request
|
|
1355
|
+
# message type.
|
|
1315
1356
|
# Corresponds to the JSON property `body`
|
|
1316
1357
|
# @return [String]
|
|
1317
1358
|
attr_accessor :body
|
|
@@ -1321,12 +1362,13 @@ module Google
|
|
|
1321
1362
|
# @return [Google::Apis::ServiceuserV1::CustomHttpPattern]
|
|
1322
1363
|
attr_accessor :custom
|
|
1323
1364
|
|
|
1324
|
-
# Used for deleting a resource.
|
|
1365
|
+
# Maps to HTTP DELETE. Used for deleting a resource.
|
|
1325
1366
|
# Corresponds to the JSON property `delete`
|
|
1326
1367
|
# @return [String]
|
|
1327
1368
|
attr_accessor :delete
|
|
1328
1369
|
|
|
1329
|
-
# Used for listing and getting information about
|
|
1370
|
+
# Maps to HTTP GET. Used for listing and getting information about
|
|
1371
|
+
# resources.
|
|
1330
1372
|
# Corresponds to the JSON property `get`
|
|
1331
1373
|
# @return [String]
|
|
1332
1374
|
attr_accessor :get
|
|
@@ -1347,29 +1389,31 @@ module Google
|
|
|
1347
1389
|
# @return [Google::Apis::ServiceuserV1::MediaUpload]
|
|
1348
1390
|
attr_accessor :media_upload
|
|
1349
1391
|
|
|
1350
|
-
# Used for updating a resource.
|
|
1392
|
+
# Maps to HTTP PATCH. Used for updating a resource.
|
|
1351
1393
|
# Corresponds to the JSON property `patch`
|
|
1352
1394
|
# @return [String]
|
|
1353
1395
|
attr_accessor :patch
|
|
1354
1396
|
|
|
1355
|
-
# Used for creating a resource.
|
|
1397
|
+
# Maps to HTTP POST. Used for creating a resource or performing an action.
|
|
1356
1398
|
# Corresponds to the JSON property `post`
|
|
1357
1399
|
# @return [String]
|
|
1358
1400
|
attr_accessor :post
|
|
1359
1401
|
|
|
1360
|
-
# Used for
|
|
1402
|
+
# Maps to HTTP PUT. Used for replacing a resource.
|
|
1361
1403
|
# Corresponds to the JSON property `put`
|
|
1362
1404
|
# @return [String]
|
|
1363
1405
|
attr_accessor :put
|
|
1364
1406
|
|
|
1365
1407
|
# Optional. The name of the response field whose value is mapped to the HTTP
|
|
1366
|
-
# body
|
|
1367
|
-
#
|
|
1408
|
+
# response body. When omitted, the entire response message will be used
|
|
1409
|
+
# as the HTTP response body.
|
|
1410
|
+
# NOTE: The referred field must be present at the top-level of the response
|
|
1411
|
+
# message type.
|
|
1368
1412
|
# Corresponds to the JSON property `responseBody`
|
|
1369
1413
|
# @return [String]
|
|
1370
1414
|
attr_accessor :response_body
|
|
1371
1415
|
|
|
1372
|
-
# Selects
|
|
1416
|
+
# Selects a method to which this rule applies.
|
|
1373
1417
|
# Refer to selector for syntax details.
|
|
1374
1418
|
# Corresponds to the JSON property `selector`
|
|
1375
1419
|
# @return [String]
|