google-cloud-iap-v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +201 -0
- data/README.md +139 -0
- data/lib/google-cloud-iap-v1.rb +21 -0
- data/lib/google/cloud/iap/v1.rb +39 -0
- data/lib/google/cloud/iap/v1/identity_aware_proxy_admin_service.rb +48 -0
- data/lib/google/cloud/iap/v1/identity_aware_proxy_admin_service/client.rb +701 -0
- data/lib/google/cloud/iap/v1/identity_aware_proxy_admin_service/credentials.rb +51 -0
- data/lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service.rb +50 -0
- data/lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client.rb +930 -0
- data/lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/credentials.rb +51 -0
- data/lib/google/cloud/iap/v1/service_pb.rb +133 -0
- data/lib/google/cloud/iap/v1/service_services_pb.rb +107 -0
- data/lib/google/cloud/iap/v1/version.rb +28 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/cloud/iap/v1/service.rb +336 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +80 -0
- data/proto_docs/google/iam/v1/options.rb +40 -0
- data/proto_docs/google/iam/v1/policy.rb +248 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +238 -0
@@ -0,0 +1,248 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Iam
|
22
|
+
module V1
|
23
|
+
# Defines an Identity and Access Management (IAM) policy. It is used to
|
24
|
+
# specify access control policies for Cloud Platform resources.
|
25
|
+
#
|
26
|
+
#
|
27
|
+
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
|
28
|
+
# `members` to a single `role`. Members can be user accounts, service accounts,
|
29
|
+
# Google groups, and domains (such as G Suite). A `role` is a named list of
|
30
|
+
# permissions (defined by IAM or configured by users). A `binding` can
|
31
|
+
# optionally specify a `condition`, which is a logic expression that further
|
32
|
+
# constrains the role binding based on attributes about the request and/or
|
33
|
+
# target resource.
|
34
|
+
#
|
35
|
+
# **JSON Example**
|
36
|
+
#
|
37
|
+
# {
|
38
|
+
# "bindings": [
|
39
|
+
# {
|
40
|
+
# "role": "roles/resourcemanager.organizationAdmin",
|
41
|
+
# "members": [
|
42
|
+
# "user:mike@example.com",
|
43
|
+
# "group:admins@example.com",
|
44
|
+
# "domain:google.com",
|
45
|
+
# "serviceAccount:my-project-id@appspot.gserviceaccount.com"
|
46
|
+
# ]
|
47
|
+
# },
|
48
|
+
# {
|
49
|
+
# "role": "roles/resourcemanager.organizationViewer",
|
50
|
+
# "members": ["user:eve@example.com"],
|
51
|
+
# "condition": {
|
52
|
+
# "title": "expirable access",
|
53
|
+
# "description": "Does not grant access after Sep 2020",
|
54
|
+
# "expression": "request.time <
|
55
|
+
# timestamp('2020-10-01T00:00:00.000Z')",
|
56
|
+
# }
|
57
|
+
# }
|
58
|
+
# ]
|
59
|
+
# }
|
60
|
+
#
|
61
|
+
# **YAML Example**
|
62
|
+
#
|
63
|
+
# bindings:
|
64
|
+
# - members:
|
65
|
+
# - user:mike@example.com
|
66
|
+
# - group:admins@example.com
|
67
|
+
# - domain:google.com
|
68
|
+
# - serviceAccount:my-project-id@appspot.gserviceaccount.com
|
69
|
+
# role: roles/resourcemanager.organizationAdmin
|
70
|
+
# - members:
|
71
|
+
# - user:eve@example.com
|
72
|
+
# role: roles/resourcemanager.organizationViewer
|
73
|
+
# condition:
|
74
|
+
# title: expirable access
|
75
|
+
# description: Does not grant access after Sep 2020
|
76
|
+
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
|
77
|
+
#
|
78
|
+
# For a description of IAM and its features, see the
|
79
|
+
# [IAM developer's guide](https://cloud.google.com/iam/docs).
|
80
|
+
# @!attribute [rw] version
|
81
|
+
# @return [::Integer]
|
82
|
+
# Specifies the format of the policy.
|
83
|
+
#
|
84
|
+
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
|
85
|
+
# rejected.
|
86
|
+
#
|
87
|
+
# Operations affecting conditional bindings must specify version 3. This can
|
88
|
+
# be either setting a conditional policy, modifying a conditional binding,
|
89
|
+
# or removing a binding (conditional or unconditional) from the stored
|
90
|
+
# conditional policy.
|
91
|
+
# Operations on non-conditional policies may specify any valid value or
|
92
|
+
# leave the field unset.
|
93
|
+
#
|
94
|
+
# If no etag is provided in the call to `setIamPolicy`, version compliance
|
95
|
+
# checks against the stored policy is skipped.
|
96
|
+
# @!attribute [rw] bindings
|
97
|
+
# @return [::Array<::Google::Iam::V1::Binding>]
|
98
|
+
# Associates a list of `members` to a `role`. Optionally may specify a
|
99
|
+
# `condition` that determines when binding is in effect.
|
100
|
+
# `bindings` with no members will result in an error.
|
101
|
+
# @!attribute [rw] etag
|
102
|
+
# @return [::String]
|
103
|
+
# `etag` is used for optimistic concurrency control as a way to help
|
104
|
+
# prevent simultaneous updates of a policy from overwriting each other.
|
105
|
+
# It is strongly suggested that systems make use of the `etag` in the
|
106
|
+
# read-modify-write cycle to perform policy updates in order to avoid race
|
107
|
+
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
|
108
|
+
# systems are expected to put that etag in the request to `setIamPolicy` to
|
109
|
+
# ensure that their change will be applied to the same version of the policy.
|
110
|
+
#
|
111
|
+
# If no `etag` is provided in the call to `setIamPolicy`, then the existing
|
112
|
+
# policy is overwritten. Due to blind-set semantics of an etag-less policy,
|
113
|
+
# 'setIamPolicy' will not fail even if the incoming policy version does not
|
114
|
+
# meet the requirements for modifying the stored policy.
|
115
|
+
class Policy
|
116
|
+
include ::Google::Protobuf::MessageExts
|
117
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
118
|
+
end
|
119
|
+
|
120
|
+
# Associates `members` with a `role`.
|
121
|
+
# @!attribute [rw] role
|
122
|
+
# @return [::String]
|
123
|
+
# Role that is assigned to `members`.
|
124
|
+
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
|
125
|
+
# @!attribute [rw] members
|
126
|
+
# @return [::Array<::String>]
|
127
|
+
# Specifies the identities requesting access for a Cloud Platform resource.
|
128
|
+
# `members` can have the following values:
|
129
|
+
#
|
130
|
+
# * `allUsers`: A special identifier that represents anyone who is
|
131
|
+
# on the internet; with or without a Google account.
|
132
|
+
#
|
133
|
+
# * `allAuthenticatedUsers`: A special identifier that represents anyone
|
134
|
+
# who is authenticated with a Google account or a service account.
|
135
|
+
#
|
136
|
+
# * `user:{emailid}`: An email address that represents a specific Google
|
137
|
+
# account. For example, `alice@example.com` .
|
138
|
+
#
|
139
|
+
#
|
140
|
+
# * `serviceAccount:{emailid}`: An email address that represents a service
|
141
|
+
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
|
142
|
+
#
|
143
|
+
# * `group:{emailid}`: An email address that represents a Google group.
|
144
|
+
# For example, `admins@example.com`.
|
145
|
+
#
|
146
|
+
#
|
147
|
+
# * `domain:{domain}`: The G Suite domain (primary) that represents all the
|
148
|
+
# users of that domain. For example, `google.com` or `example.com`.
|
149
|
+
# @!attribute [rw] condition
|
150
|
+
# @return [::Google::Type::Expr]
|
151
|
+
# The condition that is associated with this binding.
|
152
|
+
# NOTE: An unsatisfied condition will not allow user access via current
|
153
|
+
# binding. Different bindings, including their conditions, are examined
|
154
|
+
# independently.
|
155
|
+
class Binding
|
156
|
+
include ::Google::Protobuf::MessageExts
|
157
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
158
|
+
end
|
159
|
+
|
160
|
+
# The difference delta between two policies.
|
161
|
+
# @!attribute [rw] binding_deltas
|
162
|
+
# @return [::Array<::Google::Iam::V1::BindingDelta>]
|
163
|
+
# The delta for Bindings between two policies.
|
164
|
+
# @!attribute [rw] audit_config_deltas
|
165
|
+
# @return [::Array<::Google::Iam::V1::AuditConfigDelta>]
|
166
|
+
# The delta for AuditConfigs between two policies.
|
167
|
+
class PolicyDelta
|
168
|
+
include ::Google::Protobuf::MessageExts
|
169
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
170
|
+
end
|
171
|
+
|
172
|
+
# One delta entry for Binding. Each individual change (only one member in each
|
173
|
+
# entry) to a binding will be a separate entry.
|
174
|
+
# @!attribute [rw] action
|
175
|
+
# @return [::Google::Iam::V1::BindingDelta::Action]
|
176
|
+
# The action that was performed on a Binding.
|
177
|
+
# Required
|
178
|
+
# @!attribute [rw] role
|
179
|
+
# @return [::String]
|
180
|
+
# Role that is assigned to `members`.
|
181
|
+
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
|
182
|
+
# Required
|
183
|
+
# @!attribute [rw] member
|
184
|
+
# @return [::String]
|
185
|
+
# A single identity requesting access for a Cloud Platform resource.
|
186
|
+
# Follows the same format of Binding.members.
|
187
|
+
# Required
|
188
|
+
# @!attribute [rw] condition
|
189
|
+
# @return [::Google::Type::Expr]
|
190
|
+
# The condition that is associated with this binding.
|
191
|
+
class BindingDelta
|
192
|
+
include ::Google::Protobuf::MessageExts
|
193
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
194
|
+
|
195
|
+
# The type of action performed on a Binding in a policy.
|
196
|
+
module Action
|
197
|
+
# Unspecified.
|
198
|
+
ACTION_UNSPECIFIED = 0
|
199
|
+
|
200
|
+
# Addition of a Binding.
|
201
|
+
ADD = 1
|
202
|
+
|
203
|
+
# Removal of a Binding.
|
204
|
+
REMOVE = 2
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# One delta entry for AuditConfig. Each individual change (only one
|
209
|
+
# exempted_member in each entry) to a AuditConfig will be a separate entry.
|
210
|
+
# @!attribute [rw] action
|
211
|
+
# @return [::Google::Iam::V1::AuditConfigDelta::Action]
|
212
|
+
# The action that was performed on an audit configuration in a policy.
|
213
|
+
# Required
|
214
|
+
# @!attribute [rw] service
|
215
|
+
# @return [::String]
|
216
|
+
# Specifies a service that was configured for Cloud Audit Logging.
|
217
|
+
# For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
|
218
|
+
# `allServices` is a special value that covers all services.
|
219
|
+
# Required
|
220
|
+
# @!attribute [rw] exempted_member
|
221
|
+
# @return [::String]
|
222
|
+
# A single identity that is exempted from "data access" audit
|
223
|
+
# logging for the `service` specified above.
|
224
|
+
# Follows the same format of Binding.members.
|
225
|
+
# @!attribute [rw] log_type
|
226
|
+
# @return [::String]
|
227
|
+
# Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always
|
228
|
+
# enabled, and cannot be configured.
|
229
|
+
# Required
|
230
|
+
class AuditConfigDelta
|
231
|
+
include ::Google::Protobuf::MessageExts
|
232
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
233
|
+
|
234
|
+
# The type of action performed on an audit configuration in a policy.
|
235
|
+
module Action
|
236
|
+
# Unspecified.
|
237
|
+
ACTION_UNSPECIFIED = 0
|
238
|
+
|
239
|
+
# Addition of an audit configuration.
|
240
|
+
ADD = 1
|
241
|
+
|
242
|
+
# Removal of an audit configuration.
|
243
|
+
REMOVE = 2
|
244
|
+
end
|
245
|
+
end
|
246
|
+
end
|
247
|
+
end
|
248
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# A generic empty message that you can re-use to avoid defining duplicated
|
23
|
+
# empty messages in your APIs. A typical example is to use it as the request
|
24
|
+
# or the response type of an API method. For instance:
|
25
|
+
#
|
26
|
+
# service Foo {
|
27
|
+
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
28
|
+
# }
|
29
|
+
#
|
30
|
+
# The JSON representation for `Empty` is empty JSON object `{}`.
|
31
|
+
class Empty
|
32
|
+
include ::Google::Protobuf::MessageExts
|
33
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,229 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# `FieldMask` represents a set of symbolic field paths, for example:
|
23
|
+
#
|
24
|
+
# paths: "f.a"
|
25
|
+
# paths: "f.b.d"
|
26
|
+
#
|
27
|
+
# Here `f` represents a field in some root message, `a` and `b`
|
28
|
+
# fields in the message found in `f`, and `d` a field found in the
|
29
|
+
# message in `f.b`.
|
30
|
+
#
|
31
|
+
# Field masks are used to specify a subset of fields that should be
|
32
|
+
# returned by a get operation or modified by an update operation.
|
33
|
+
# Field masks also have a custom JSON encoding (see below).
|
34
|
+
#
|
35
|
+
# # Field Masks in Projections
|
36
|
+
#
|
37
|
+
# When used in the context of a projection, a response message or
|
38
|
+
# sub-message is filtered by the API to only contain those fields as
|
39
|
+
# specified in the mask. For example, if the mask in the previous
|
40
|
+
# example is applied to a response message as follows:
|
41
|
+
#
|
42
|
+
# f {
|
43
|
+
# a : 22
|
44
|
+
# b {
|
45
|
+
# d : 1
|
46
|
+
# x : 2
|
47
|
+
# }
|
48
|
+
# y : 13
|
49
|
+
# }
|
50
|
+
# z: 8
|
51
|
+
#
|
52
|
+
# The result will not contain specific values for fields x,y and z
|
53
|
+
# (their value will be set to the default, and omitted in proto text
|
54
|
+
# output):
|
55
|
+
#
|
56
|
+
#
|
57
|
+
# f {
|
58
|
+
# a : 22
|
59
|
+
# b {
|
60
|
+
# d : 1
|
61
|
+
# }
|
62
|
+
# }
|
63
|
+
#
|
64
|
+
# A repeated field is not allowed except at the last position of a
|
65
|
+
# paths string.
|
66
|
+
#
|
67
|
+
# If a FieldMask object is not present in a get operation, the
|
68
|
+
# operation applies to all fields (as if a FieldMask of all fields
|
69
|
+
# had been specified).
|
70
|
+
#
|
71
|
+
# Note that a field mask does not necessarily apply to the
|
72
|
+
# top-level response message. In case of a REST get operation, the
|
73
|
+
# field mask applies directly to the response, but in case of a REST
|
74
|
+
# list operation, the mask instead applies to each individual message
|
75
|
+
# in the returned resource list. In case of a REST custom method,
|
76
|
+
# other definitions may be used. Where the mask applies will be
|
77
|
+
# clearly documented together with its declaration in the API. In
|
78
|
+
# any case, the effect on the returned resource/resources is required
|
79
|
+
# behavior for APIs.
|
80
|
+
#
|
81
|
+
# # Field Masks in Update Operations
|
82
|
+
#
|
83
|
+
# A field mask in update operations specifies which fields of the
|
84
|
+
# targeted resource are going to be updated. The API is required
|
85
|
+
# to only change the values of the fields as specified in the mask
|
86
|
+
# and leave the others untouched. If a resource is passed in to
|
87
|
+
# describe the updated values, the API ignores the values of all
|
88
|
+
# fields not covered by the mask.
|
89
|
+
#
|
90
|
+
# If a repeated field is specified for an update operation, new values will
|
91
|
+
# be appended to the existing repeated field in the target resource. Note that
|
92
|
+
# a repeated field is only allowed in the last position of a `paths` string.
|
93
|
+
#
|
94
|
+
# If a sub-message is specified in the last position of the field mask for an
|
95
|
+
# update operation, then new value will be merged into the existing sub-message
|
96
|
+
# in the target resource.
|
97
|
+
#
|
98
|
+
# For example, given the target message:
|
99
|
+
#
|
100
|
+
# f {
|
101
|
+
# b {
|
102
|
+
# d: 1
|
103
|
+
# x: 2
|
104
|
+
# }
|
105
|
+
# c: [1]
|
106
|
+
# }
|
107
|
+
#
|
108
|
+
# And an update message:
|
109
|
+
#
|
110
|
+
# f {
|
111
|
+
# b {
|
112
|
+
# d: 10
|
113
|
+
# }
|
114
|
+
# c: [2]
|
115
|
+
# }
|
116
|
+
#
|
117
|
+
# then if the field mask is:
|
118
|
+
#
|
119
|
+
# paths: ["f.b", "f.c"]
|
120
|
+
#
|
121
|
+
# then the result will be:
|
122
|
+
#
|
123
|
+
# f {
|
124
|
+
# b {
|
125
|
+
# d: 10
|
126
|
+
# x: 2
|
127
|
+
# }
|
128
|
+
# c: [1, 2]
|
129
|
+
# }
|
130
|
+
#
|
131
|
+
# An implementation may provide options to override this default behavior for
|
132
|
+
# repeated and message fields.
|
133
|
+
#
|
134
|
+
# In order to reset a field's value to the default, the field must
|
135
|
+
# be in the mask and set to the default value in the provided resource.
|
136
|
+
# Hence, in order to reset all fields of a resource, provide a default
|
137
|
+
# instance of the resource and set all fields in the mask, or do
|
138
|
+
# not provide a mask as described below.
|
139
|
+
#
|
140
|
+
# If a field mask is not present on update, the operation applies to
|
141
|
+
# all fields (as if a field mask of all fields has been specified).
|
142
|
+
# Note that in the presence of schema evolution, this may mean that
|
143
|
+
# fields the client does not know and has therefore not filled into
|
144
|
+
# the request will be reset to their default. If this is unwanted
|
145
|
+
# behavior, a specific service may require a client to always specify
|
146
|
+
# a field mask, producing an error if not.
|
147
|
+
#
|
148
|
+
# As with get operations, the location of the resource which
|
149
|
+
# describes the updated values in the request message depends on the
|
150
|
+
# operation kind. In any case, the effect of the field mask is
|
151
|
+
# required to be honored by the API.
|
152
|
+
#
|
153
|
+
# ## Considerations for HTTP REST
|
154
|
+
#
|
155
|
+
# The HTTP kind of an update operation which uses a field mask must
|
156
|
+
# be set to PATCH instead of PUT in order to satisfy HTTP semantics
|
157
|
+
# (PUT must only be used for full updates).
|
158
|
+
#
|
159
|
+
# # JSON Encoding of Field Masks
|
160
|
+
#
|
161
|
+
# In JSON, a field mask is encoded as a single string where paths are
|
162
|
+
# separated by a comma. Fields name in each path are converted
|
163
|
+
# to/from lower-camel naming conventions.
|
164
|
+
#
|
165
|
+
# As an example, consider the following message declarations:
|
166
|
+
#
|
167
|
+
# message Profile {
|
168
|
+
# User user = 1;
|
169
|
+
# Photo photo = 2;
|
170
|
+
# }
|
171
|
+
# message User {
|
172
|
+
# string display_name = 1;
|
173
|
+
# string address = 2;
|
174
|
+
# }
|
175
|
+
#
|
176
|
+
# In proto a field mask for `Profile` may look as such:
|
177
|
+
#
|
178
|
+
# mask {
|
179
|
+
# paths: "user.display_name"
|
180
|
+
# paths: "photo"
|
181
|
+
# }
|
182
|
+
#
|
183
|
+
# In JSON, the same mask is represented as below:
|
184
|
+
#
|
185
|
+
# {
|
186
|
+
# mask: "user.displayName,photo"
|
187
|
+
# }
|
188
|
+
#
|
189
|
+
# # Field Masks and Oneof Fields
|
190
|
+
#
|
191
|
+
# Field masks treat fields in oneofs just as regular fields. Consider the
|
192
|
+
# following message:
|
193
|
+
#
|
194
|
+
# message SampleMessage {
|
195
|
+
# oneof test_oneof {
|
196
|
+
# string name = 4;
|
197
|
+
# SubMessage sub_message = 9;
|
198
|
+
# }
|
199
|
+
# }
|
200
|
+
#
|
201
|
+
# The field mask can be:
|
202
|
+
#
|
203
|
+
# mask {
|
204
|
+
# paths: "name"
|
205
|
+
# }
|
206
|
+
#
|
207
|
+
# Or:
|
208
|
+
#
|
209
|
+
# mask {
|
210
|
+
# paths: "sub_message"
|
211
|
+
# }
|
212
|
+
#
|
213
|
+
# Note that oneof type names ("test_oneof" in this case) cannot be used in
|
214
|
+
# paths.
|
215
|
+
#
|
216
|
+
# ## Field Mask Verification
|
217
|
+
#
|
218
|
+
# The implementation of any API method which has a FieldMask type field in the
|
219
|
+
# request should verify the included field paths, and return an
|
220
|
+
# `INVALID_ARGUMENT` error if any path is unmappable.
|
221
|
+
# @!attribute [rw] paths
|
222
|
+
# @return [::Array<::String>]
|
223
|
+
# The set of field mask paths.
|
224
|
+
class FieldMask
|
225
|
+
include ::Google::Protobuf::MessageExts
|
226
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|