google-cloud-service_management-v1 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/api/servicemanagement/v1/servicemanager_pb.rb +3 -1
- data/lib/google/cloud/service_management/v1/bindings_override.rb +137 -0
- data/lib/google/cloud/service_management/v1/rest.rb +1 -0
- data/lib/google/cloud/service_management/v1/service_manager/client.rb +45 -27
- data/lib/google/cloud/service_management/v1/service_manager/operations.rb +3 -1
- data/lib/google/cloud/service_management/v1/service_manager/rest/client.rb +53 -27
- data/lib/google/cloud/service_management/v1/service_manager/rest/operations.rb +7 -5
- data/lib/google/cloud/service_management/v1/service_manager/rest/service_stub.rb +13 -13
- data/lib/google/cloud/service_management/v1/service_manager/rest.rb +1 -0
- data/lib/google/cloud/service_management/v1/version.rb +1 -1
- data/proto_docs/google/api/servicemanagement/v1/servicemanager.rb +33 -25
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +27 -4
@@ -446,7 +446,9 @@ module Google
|
|
446
446
|
class Configuration
|
447
447
|
extend ::Gapic::Config
|
448
448
|
|
449
|
-
|
449
|
+
DEFAULT_ENDPOINT = "servicemanagement.googleapis.com"
|
450
|
+
|
451
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
450
452
|
config_attr :credentials, nil do |value|
|
451
453
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
452
454
|
allowed.any? { |klass| klass === value }
|
@@ -567,7 +569,7 @@ module Google
|
|
567
569
|
|
568
570
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
|
569
571
|
query_string_params = if query_string_params.any?
|
570
|
-
query_string_params.to_h { |p| p.split
|
572
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
571
573
|
else
|
572
574
|
{}
|
573
575
|
end
|
@@ -605,7 +607,7 @@ module Google
|
|
605
607
|
|
606
608
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
|
607
609
|
query_string_params = if query_string_params.any?
|
608
|
-
query_string_params.to_h { |p| p.split
|
610
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
609
611
|
else
|
610
612
|
{}
|
611
613
|
end
|
@@ -643,7 +645,7 @@ module Google
|
|
643
645
|
|
644
646
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
|
645
647
|
query_string_params = if query_string_params.any?
|
646
|
-
query_string_params.to_h { |p| p.split
|
648
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
647
649
|
else
|
648
650
|
{}
|
649
651
|
end
|
@@ -681,7 +683,7 @@ module Google
|
|
681
683
|
|
682
684
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
|
683
685
|
query_string_params = if query_string_params.any?
|
684
|
-
query_string_params.to_h { |p| p.split
|
686
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
685
687
|
else
|
686
688
|
{}
|
687
689
|
end
|
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
|
60
60
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_services_request request_pb
|
61
61
|
query_string_params = if query_string_params.any?
|
62
|
-
query_string_params.to_h { |p| p.split
|
62
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
63
63
|
else
|
64
64
|
{}
|
65
65
|
end
|
@@ -97,7 +97,7 @@ module Google
|
|
97
97
|
|
98
98
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_service_request request_pb
|
99
99
|
query_string_params = if query_string_params.any?
|
100
|
-
query_string_params.to_h { |p| p.split
|
100
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
101
101
|
else
|
102
102
|
{}
|
103
103
|
end
|
@@ -135,7 +135,7 @@ module Google
|
|
135
135
|
|
136
136
|
verb, uri, query_string_params, body = ServiceStub.transcode_create_service_request request_pb
|
137
137
|
query_string_params = if query_string_params.any?
|
138
|
-
query_string_params.to_h { |p| p.split
|
138
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
139
139
|
else
|
140
140
|
{}
|
141
141
|
end
|
@@ -173,7 +173,7 @@ module Google
|
|
173
173
|
|
174
174
|
verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_request request_pb
|
175
175
|
query_string_params = if query_string_params.any?
|
176
|
-
query_string_params.to_h { |p| p.split
|
176
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
177
177
|
else
|
178
178
|
{}
|
179
179
|
end
|
@@ -211,7 +211,7 @@ module Google
|
|
211
211
|
|
212
212
|
verb, uri, query_string_params, body = ServiceStub.transcode_undelete_service_request request_pb
|
213
213
|
query_string_params = if query_string_params.any?
|
214
|
-
query_string_params.to_h { |p| p.split
|
214
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
215
215
|
else
|
216
216
|
{}
|
217
217
|
end
|
@@ -249,7 +249,7 @@ module Google
|
|
249
249
|
|
250
250
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_service_configs_request request_pb
|
251
251
|
query_string_params = if query_string_params.any?
|
252
|
-
query_string_params.to_h { |p| p.split
|
252
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
253
253
|
else
|
254
254
|
{}
|
255
255
|
end
|
@@ -287,7 +287,7 @@ module Google
|
|
287
287
|
|
288
288
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_service_config_request request_pb
|
289
289
|
query_string_params = if query_string_params.any?
|
290
|
-
query_string_params.to_h { |p| p.split
|
290
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
291
291
|
else
|
292
292
|
{}
|
293
293
|
end
|
@@ -325,7 +325,7 @@ module Google
|
|
325
325
|
|
326
326
|
verb, uri, query_string_params, body = ServiceStub.transcode_create_service_config_request request_pb
|
327
327
|
query_string_params = if query_string_params.any?
|
328
|
-
query_string_params.to_h { |p| p.split
|
328
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
329
329
|
else
|
330
330
|
{}
|
331
331
|
end
|
@@ -363,7 +363,7 @@ module Google
|
|
363
363
|
|
364
364
|
verb, uri, query_string_params, body = ServiceStub.transcode_submit_config_source_request request_pb
|
365
365
|
query_string_params = if query_string_params.any?
|
366
|
-
query_string_params.to_h { |p| p.split
|
366
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
367
367
|
else
|
368
368
|
{}
|
369
369
|
end
|
@@ -401,7 +401,7 @@ module Google
|
|
401
401
|
|
402
402
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_service_rollouts_request request_pb
|
403
403
|
query_string_params = if query_string_params.any?
|
404
|
-
query_string_params.to_h { |p| p.split
|
404
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
405
405
|
else
|
406
406
|
{}
|
407
407
|
end
|
@@ -439,7 +439,7 @@ module Google
|
|
439
439
|
|
440
440
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_service_rollout_request request_pb
|
441
441
|
query_string_params = if query_string_params.any?
|
442
|
-
query_string_params.to_h { |p| p.split
|
442
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
443
443
|
else
|
444
444
|
{}
|
445
445
|
end
|
@@ -477,7 +477,7 @@ module Google
|
|
477
477
|
|
478
478
|
verb, uri, query_string_params, body = ServiceStub.transcode_create_service_rollout_request request_pb
|
479
479
|
query_string_params = if query_string_params.any?
|
480
|
-
query_string_params.to_h { |p| p.split
|
480
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
481
481
|
else
|
482
482
|
{}
|
483
483
|
end
|
@@ -515,7 +515,7 @@ module Google
|
|
515
515
|
|
516
516
|
verb, uri, query_string_params, body = ServiceStub.transcode_generate_config_report_request request_pb
|
517
517
|
query_string_params = if query_string_params.any?
|
518
|
-
query_string_params.to_h { |p| p.split
|
518
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
519
519
|
else
|
520
520
|
{}
|
521
521
|
end
|
@@ -21,6 +21,7 @@ require "gapic/config"
|
|
21
21
|
require "gapic/config/method"
|
22
22
|
|
23
23
|
require "google/cloud/service_management/v1/version"
|
24
|
+
require "google/cloud/service_management/v1/bindings_override"
|
24
25
|
|
25
26
|
require "google/cloud/service_management/v1/service_manager/credentials"
|
26
27
|
require "google/cloud/service_management/v1/service_manager/rest/operations"
|
@@ -28,7 +28,7 @@ module Google
|
|
28
28
|
# @!attribute [rw] page_size
|
29
29
|
# @return [::Integer]
|
30
30
|
# The max number of items to include in the response list. Page size is 50
|
31
|
-
# if not specified. Maximum value is
|
31
|
+
# if not specified. Maximum value is 500.
|
32
32
|
# @!attribute [rw] page_token
|
33
33
|
# @return [::String]
|
34
34
|
# Token identifying which result to start with; returned by a previous list
|
@@ -80,8 +80,8 @@ module Google
|
|
80
80
|
# @!attribute [rw] service_name
|
81
81
|
# @return [::String]
|
82
82
|
# Required. The name of the service. See the
|
83
|
-
# [overview](https://cloud.google.com/service-
|
84
|
-
# example: `example.googleapis.com`.
|
83
|
+
# [overview](https://cloud.google.com/service-management/overview) for naming
|
84
|
+
# requirements. For example: `example.googleapis.com`.
|
85
85
|
class DeleteServiceRequest
|
86
86
|
include ::Google::Protobuf::MessageExts
|
87
87
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -91,8 +91,8 @@ module Google
|
|
91
91
|
# @!attribute [rw] service_name
|
92
92
|
# @return [::String]
|
93
93
|
# Required. The name of the service. See the
|
94
|
-
# [overview](https://cloud.google.com/service-
|
95
|
-
# example: `example.googleapis.com`.
|
94
|
+
# [overview](https://cloud.google.com/service-management/overview) for naming
|
95
|
+
# requirements. For example: `example.googleapis.com`.
|
96
96
|
class UndeleteServiceRequest
|
97
97
|
include ::Google::Protobuf::MessageExts
|
98
98
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -111,8 +111,8 @@ module Google
|
|
111
111
|
# @!attribute [rw] service_name
|
112
112
|
# @return [::String]
|
113
113
|
# Required. The name of the service. See the
|
114
|
-
# [overview](https://cloud.google.com/service-
|
115
|
-
# example: `example.googleapis.com`.
|
114
|
+
# [overview](https://cloud.google.com/service-management/overview) for naming
|
115
|
+
# requirements. For example: `example.googleapis.com`.
|
116
116
|
# @!attribute [rw] config_id
|
117
117
|
# @return [::String]
|
118
118
|
# Required. The id of the service configuration resource.
|
@@ -143,8 +143,8 @@ module Google
|
|
143
143
|
# @!attribute [rw] service_name
|
144
144
|
# @return [::String]
|
145
145
|
# Required. The name of the service. See the
|
146
|
-
# [overview](https://cloud.google.com/service-
|
147
|
-
# example: `example.googleapis.com`.
|
146
|
+
# [overview](https://cloud.google.com/service-management/overview) for naming
|
147
|
+
# requirements. For example: `example.googleapis.com`.
|
148
148
|
# @!attribute [rw] page_token
|
149
149
|
# @return [::String]
|
150
150
|
# The token of the page to retrieve.
|
@@ -173,8 +173,8 @@ module Google
|
|
173
173
|
# @!attribute [rw] service_name
|
174
174
|
# @return [::String]
|
175
175
|
# Required. The name of the service. See the
|
176
|
-
# [overview](https://cloud.google.com/service-
|
177
|
-
# example: `example.googleapis.com`.
|
176
|
+
# [overview](https://cloud.google.com/service-management/overview) for naming
|
177
|
+
# requirements. For example: `example.googleapis.com`.
|
178
178
|
# @!attribute [rw] service_config
|
179
179
|
# @return [::Google::Api::Service]
|
180
180
|
# Required. The service configuration resource.
|
@@ -187,8 +187,8 @@ module Google
|
|
187
187
|
# @!attribute [rw] service_name
|
188
188
|
# @return [::String]
|
189
189
|
# Required. The name of the service. See the
|
190
|
-
# [overview](https://cloud.google.com/service-
|
191
|
-
# example: `example.googleapis.com`.
|
190
|
+
# [overview](https://cloud.google.com/service-management/overview) for naming
|
191
|
+
# requirements. For example: `example.googleapis.com`.
|
192
192
|
# @!attribute [rw] config_source
|
193
193
|
# @return [::Google::Cloud::ServiceManagement::V1::ConfigSource]
|
194
194
|
# Required. The source configuration for the service.
|
@@ -215,8 +215,8 @@ module Google
|
|
215
215
|
# @!attribute [rw] service_name
|
216
216
|
# @return [::String]
|
217
217
|
# Required. The name of the service. See the
|
218
|
-
# [overview](https://cloud.google.com/service-
|
219
|
-
# example: `example.googleapis.com`.
|
218
|
+
# [overview](https://cloud.google.com/service-management/overview) for naming
|
219
|
+
# requirements. For example: `example.googleapis.com`.
|
220
220
|
# @!attribute [rw] rollout
|
221
221
|
# @return [::Google::Cloud::ServiceManagement::V1::Rollout]
|
222
222
|
# Required. The rollout resource. The `service_name` field is output only.
|
@@ -229,8 +229,8 @@ module Google
|
|
229
229
|
# @!attribute [rw] service_name
|
230
230
|
# @return [::String]
|
231
231
|
# Required. The name of the service. See the
|
232
|
-
# [overview](https://cloud.google.com/service-
|
233
|
-
# example: `example.googleapis.com`.
|
232
|
+
# [overview](https://cloud.google.com/service-management/overview) for naming
|
233
|
+
# requirements. For example: `example.googleapis.com`.
|
234
234
|
# @!attribute [rw] page_token
|
235
235
|
# @return [::String]
|
236
236
|
# The token of the page to retrieve.
|
@@ -242,12 +242,14 @@ module Google
|
|
242
242
|
# @return [::String]
|
243
243
|
# Required. Use `filter` to return subset of rollouts.
|
244
244
|
# The following filters are supported:
|
245
|
-
#
|
246
|
-
#
|
247
|
-
#
|
248
|
-
#
|
249
|
-
#
|
250
|
-
#
|
245
|
+
#
|
246
|
+
# -- By [status]
|
247
|
+
# [google.api.servicemanagement.v1.Rollout.RolloutStatus]. For example,
|
248
|
+
# `filter='status=SUCCESS'`
|
249
|
+
#
|
250
|
+
# -- By [strategy]
|
251
|
+
# [google.api.servicemanagement.v1.Rollout.strategy]. For example,
|
252
|
+
# `filter='strategy=TrafficPercentStrategy'`
|
251
253
|
class ListServiceRolloutsRequest
|
252
254
|
include ::Google::Protobuf::MessageExts
|
253
255
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -269,8 +271,8 @@ module Google
|
|
269
271
|
# @!attribute [rw] service_name
|
270
272
|
# @return [::String]
|
271
273
|
# Required. The name of the service. See the
|
272
|
-
# [overview](https://cloud.google.com/service-
|
273
|
-
# example: `example.googleapis.com`.
|
274
|
+
# [overview](https://cloud.google.com/service-management/overview) for naming
|
275
|
+
# requirements. For example: `example.googleapis.com`.
|
274
276
|
# @!attribute [rw] rollout_id
|
275
277
|
# @return [::String]
|
276
278
|
# Required. The id of the rollout resource.
|
@@ -279,6 +281,12 @@ module Google
|
|
279
281
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
280
282
|
end
|
281
283
|
|
284
|
+
# Operation payload for EnableService method.
|
285
|
+
class EnableServiceResponse
|
286
|
+
include ::Google::Protobuf::MessageExts
|
287
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
288
|
+
end
|
289
|
+
|
282
290
|
# Request message for GenerateConfigReport method.
|
283
291
|
# @!attribute [rw] new_config
|
284
292
|
# @return [::Google::Protobuf::Any]
|
@@ -0,0 +1,229 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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 Type
|
22
|
+
# Represents a textual expression in the Common Expression Language (CEL)
|
23
|
+
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL
|
24
|
+
# are documented at https://github.com/google/cel-spec.
|
25
|
+
#
|
26
|
+
# Example (Comparison):
|
27
|
+
#
|
28
|
+
# title: "Summary size limit"
|
29
|
+
# description: "Determines if a summary is less than 100 chars"
|
30
|
+
# expression: "document.summary.size() < 100"
|
31
|
+
#
|
32
|
+
# Example (Equality):
|
33
|
+
#
|
34
|
+
# title: "Requestor is owner"
|
35
|
+
# description: "Determines if requestor is the document owner"
|
36
|
+
# expression: "document.owner == request.auth.claims.email"
|
37
|
+
#
|
38
|
+
# Example (Logic):
|
39
|
+
#
|
40
|
+
# title: "Public documents"
|
41
|
+
# description: "Determine whether the document should be publicly visible"
|
42
|
+
# expression: "document.type != 'private' && document.type != 'internal'"
|
43
|
+
#
|
44
|
+
# Example (Data Manipulation):
|
45
|
+
#
|
46
|
+
# title: "Notification string"
|
47
|
+
# description: "Create a notification string with a timestamp."
|
48
|
+
# expression: "'New message received at ' + string(document.create_time)"
|
49
|
+
#
|
50
|
+
# The exact variables and functions that may be referenced within an expression
|
51
|
+
# are determined by the service that evaluates it. See the service
|
52
|
+
# documentation for additional information.
|
53
|
+
# @!attribute [rw] expression
|
54
|
+
# @return [::String]
|
55
|
+
# Textual representation of an expression in Common Expression Language
|
56
|
+
# syntax.
|
57
|
+
# @!attribute [rw] title
|
58
|
+
# @return [::String]
|
59
|
+
# Optional. Title for the expression, i.e. a short string describing
|
60
|
+
# its purpose. This can be used e.g. in UIs which allow to enter the
|
61
|
+
# expression.
|
62
|
+
# @!attribute [rw] description
|
63
|
+
# @return [::String]
|
64
|
+
# Optional. Description of the expression. This is a longer text which
|
65
|
+
# describes the expression, e.g. when hovered over it in a UI.
|
66
|
+
# @!attribute [rw] location
|
67
|
+
# @return [::String]
|
68
|
+
# Optional. String indicating the location of the expression for error
|
69
|
+
# reporting, e.g. a file name and a position in the file.
|
70
|
+
class Expr
|
71
|
+
include ::Google::Protobuf::MessageExts
|
72
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|