google-apis-servicemanagement_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,931 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module ServicemanagementV1
23
+ # Service Management API
24
+ #
25
+ # Google Service Management allows service producers to publish their services
26
+ # on Google Cloud Platform so that they can be discovered and used by service
27
+ # consumers.
28
+ #
29
+ # @example
30
+ # require 'google/apis/servicemanagement_v1'
31
+ #
32
+ # Servicemanagement = Google::Apis::ServicemanagementV1 # Alias the module
33
+ # service = Servicemanagement::ServiceManagementService.new
34
+ #
35
+ # @see https://cloud.google.com/service-management/
36
+ class ServiceManagementService < Google::Apis::Core::BaseService
37
+ # @return [String]
38
+ # API key. Your API key identifies your project and provides you with API access,
39
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
40
+ attr_accessor :key
41
+
42
+ # @return [String]
43
+ # Available to use for quota purposes for server-side applications. Can be any
44
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
45
+ attr_accessor :quota_user
46
+
47
+ def initialize
48
+ super('https://servicemanagement.googleapis.com/', '',
49
+ client_name: 'google-apis-servicemanagement_v1',
50
+ client_version: Google::Apis::ServicemanagementV1::GEM_VERSION)
51
+ @batch_path = 'batch'
52
+ end
53
+
54
+ # Gets the latest state of a long-running operation. Clients can use this method
55
+ # to poll the operation result at intervals as recommended by the API service.
56
+ # @param [String] name
57
+ # The name of the operation resource.
58
+ # @param [String] fields
59
+ # Selector specifying which fields to include in a partial response.
60
+ # @param [String] quota_user
61
+ # Available to use for quota purposes for server-side applications. Can be any
62
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
63
+ # @param [Google::Apis::RequestOptions] options
64
+ # Request-specific options
65
+ #
66
+ # @yield [result, err] Result & error if block supplied
67
+ # @yieldparam result [Google::Apis::ServicemanagementV1::Operation] parsed result object
68
+ # @yieldparam err [StandardError] error object if request failed
69
+ #
70
+ # @return [Google::Apis::ServicemanagementV1::Operation]
71
+ #
72
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
73
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
74
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
75
+ def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
76
+ command = make_simple_command(:get, 'v1/{+name}', options)
77
+ command.response_representation = Google::Apis::ServicemanagementV1::Operation::Representation
78
+ command.response_class = Google::Apis::ServicemanagementV1::Operation
79
+ command.params['name'] = name unless name.nil?
80
+ command.query['fields'] = fields unless fields.nil?
81
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
82
+ execute_or_queue_command(command, &block)
83
+ end
84
+
85
+ # Lists service operations that match the specified filter in the request.
86
+ # @param [String] filter
87
+ # A string for filtering Operations. The following filter fields are supported: *
88
+ # serviceName: Required. Only `=` operator is allowed. * startTime: The time
89
+ # this job was started, in ISO 8601 format. Allowed operators are `>=`, `>`, `<=`
90
+ # , and `<`. * status: Can be `done`, `in_progress`, or `failed`. Allowed
91
+ # operators are `=`, and `!=`. Filter expression supports conjunction (AND) and
92
+ # disjunction (OR) logical operators. However, the serviceName restriction must
93
+ # be at the top-level and can only be combined with other restrictions via the
94
+ # AND logical operator. Examples: * `serviceName=`some-service`.googleapis.com` *
95
+ # `serviceName=`some-service`.googleapis.com AND startTime>="2017-02-01"` * `
96
+ # serviceName=`some-service`.googleapis.com AND status=done` * `serviceName=`
97
+ # some-service`.googleapis.com AND (status=done OR startTime>="2017-02-01")`
98
+ # @param [String] name
99
+ # Not used.
100
+ # @param [Fixnum] page_size
101
+ # The maximum number of operations to return. If unspecified, defaults to 50.
102
+ # The maximum value is 100.
103
+ # @param [String] page_token
104
+ # The standard list page token.
105
+ # @param [String] fields
106
+ # Selector specifying which fields to include in a partial response.
107
+ # @param [String] quota_user
108
+ # Available to use for quota purposes for server-side applications. Can be any
109
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
110
+ # @param [Google::Apis::RequestOptions] options
111
+ # Request-specific options
112
+ #
113
+ # @yield [result, err] Result & error if block supplied
114
+ # @yieldparam result [Google::Apis::ServicemanagementV1::ListOperationsResponse] parsed result object
115
+ # @yieldparam err [StandardError] error object if request failed
116
+ #
117
+ # @return [Google::Apis::ServicemanagementV1::ListOperationsResponse]
118
+ #
119
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
120
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
121
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
122
+ def list_operations(filter: nil, name: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
123
+ command = make_simple_command(:get, 'v1/operations', options)
124
+ command.response_representation = Google::Apis::ServicemanagementV1::ListOperationsResponse::Representation
125
+ command.response_class = Google::Apis::ServicemanagementV1::ListOperationsResponse
126
+ command.query['filter'] = filter unless filter.nil?
127
+ command.query['name'] = name unless name.nil?
128
+ command.query['pageSize'] = page_size unless page_size.nil?
129
+ command.query['pageToken'] = page_token unless page_token.nil?
130
+ command.query['fields'] = fields unless fields.nil?
131
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
132
+ execute_or_queue_command(command, &block)
133
+ end
134
+
135
+ # Creates a new managed service. A managed service is immutable, and is subject
136
+ # to mandatory 30-day data retention. You cannot move a service or recreate it
137
+ # within 30 days after deletion. One producer project can own no more than 500
138
+ # services. For security and reliability purposes, a production service should
139
+ # be hosted in a dedicated producer project. Operation
140
+ # @param [Google::Apis::ServicemanagementV1::ManagedService] managed_service_object
141
+ # @param [String] fields
142
+ # Selector specifying which fields to include in a partial response.
143
+ # @param [String] quota_user
144
+ # Available to use for quota purposes for server-side applications. Can be any
145
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
146
+ # @param [Google::Apis::RequestOptions] options
147
+ # Request-specific options
148
+ #
149
+ # @yield [result, err] Result & error if block supplied
150
+ # @yieldparam result [Google::Apis::ServicemanagementV1::Operation] parsed result object
151
+ # @yieldparam err [StandardError] error object if request failed
152
+ #
153
+ # @return [Google::Apis::ServicemanagementV1::Operation]
154
+ #
155
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
156
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
157
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
158
+ def create_service(managed_service_object = nil, fields: nil, quota_user: nil, options: nil, &block)
159
+ command = make_simple_command(:post, 'v1/services', options)
160
+ command.request_representation = Google::Apis::ServicemanagementV1::ManagedService::Representation
161
+ command.request_object = managed_service_object
162
+ command.response_representation = Google::Apis::ServicemanagementV1::Operation::Representation
163
+ command.response_class = Google::Apis::ServicemanagementV1::Operation
164
+ command.query['fields'] = fields unless fields.nil?
165
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
166
+ execute_or_queue_command(command, &block)
167
+ end
168
+
169
+ # Deletes a managed service. This method will change the service to the `Soft-
170
+ # Delete` state for 30 days. Within this period, service producers may call
171
+ # UndeleteService to restore the service. After 30 days, the service will be
172
+ # permanently deleted. Operation
173
+ # @param [String] service_name
174
+ # Required. The name of the service. See the [overview](/service-management/
175
+ # overview) for naming requirements. For example: `example.googleapis.com`.
176
+ # @param [String] fields
177
+ # Selector specifying which fields to include in a partial response.
178
+ # @param [String] quota_user
179
+ # Available to use for quota purposes for server-side applications. Can be any
180
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
181
+ # @param [Google::Apis::RequestOptions] options
182
+ # Request-specific options
183
+ #
184
+ # @yield [result, err] Result & error if block supplied
185
+ # @yieldparam result [Google::Apis::ServicemanagementV1::Operation] parsed result object
186
+ # @yieldparam err [StandardError] error object if request failed
187
+ #
188
+ # @return [Google::Apis::ServicemanagementV1::Operation]
189
+ #
190
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
191
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
192
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
193
+ def delete_service(service_name, fields: nil, quota_user: nil, options: nil, &block)
194
+ command = make_simple_command(:delete, 'v1/services/{serviceName}', options)
195
+ command.response_representation = Google::Apis::ServicemanagementV1::Operation::Representation
196
+ command.response_class = Google::Apis::ServicemanagementV1::Operation
197
+ command.params['serviceName'] = service_name unless service_name.nil?
198
+ command.query['fields'] = fields unless fields.nil?
199
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
200
+ execute_or_queue_command(command, &block)
201
+ end
202
+
203
+ # Enables a service for a project, so it can be used for the project. See [Cloud
204
+ # Auth Guide](https://cloud.google.com/docs/authentication) for more information.
205
+ # Operation
206
+ # @param [String] service_name
207
+ # Required. Name of the service to enable. Specifying an unknown service name
208
+ # will cause the request to fail.
209
+ # @param [Google::Apis::ServicemanagementV1::EnableServiceRequest] enable_service_request_object
210
+ # @param [String] fields
211
+ # Selector specifying which fields to include in a partial response.
212
+ # @param [String] quota_user
213
+ # Available to use for quota purposes for server-side applications. Can be any
214
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
215
+ # @param [Google::Apis::RequestOptions] options
216
+ # Request-specific options
217
+ #
218
+ # @yield [result, err] Result & error if block supplied
219
+ # @yieldparam result [Google::Apis::ServicemanagementV1::Operation] parsed result object
220
+ # @yieldparam err [StandardError] error object if request failed
221
+ #
222
+ # @return [Google::Apis::ServicemanagementV1::Operation]
223
+ #
224
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
225
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
226
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
227
+ def enable_service(service_name, enable_service_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
228
+ command = make_simple_command(:post, 'v1/services/{serviceName}:enable', options)
229
+ command.request_representation = Google::Apis::ServicemanagementV1::EnableServiceRequest::Representation
230
+ command.request_object = enable_service_request_object
231
+ command.response_representation = Google::Apis::ServicemanagementV1::Operation::Representation
232
+ command.response_class = Google::Apis::ServicemanagementV1::Operation
233
+ command.params['serviceName'] = service_name unless service_name.nil?
234
+ command.query['fields'] = fields unless fields.nil?
235
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
236
+ execute_or_queue_command(command, &block)
237
+ end
238
+
239
+ # Generates and returns a report (errors, warnings and changes from existing
240
+ # configurations) associated with GenerateConfigReportRequest.new_value If
241
+ # GenerateConfigReportRequest.old_value is specified,
242
+ # GenerateConfigReportRequest will contain a single ChangeReport based on the
243
+ # comparison between GenerateConfigReportRequest.new_value and
244
+ # GenerateConfigReportRequest.old_value. If GenerateConfigReportRequest.
245
+ # old_value is not specified, this method will compare
246
+ # GenerateConfigReportRequest.new_value with the last pushed service
247
+ # configuration.
248
+ # @param [Google::Apis::ServicemanagementV1::GenerateConfigReportRequest] generate_config_report_request_object
249
+ # @param [String] fields
250
+ # Selector specifying which fields to include in a partial response.
251
+ # @param [String] quota_user
252
+ # Available to use for quota purposes for server-side applications. Can be any
253
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
254
+ # @param [Google::Apis::RequestOptions] options
255
+ # Request-specific options
256
+ #
257
+ # @yield [result, err] Result & error if block supplied
258
+ # @yieldparam result [Google::Apis::ServicemanagementV1::GenerateConfigReportResponse] parsed result object
259
+ # @yieldparam err [StandardError] error object if request failed
260
+ #
261
+ # @return [Google::Apis::ServicemanagementV1::GenerateConfigReportResponse]
262
+ #
263
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
264
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
265
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
266
+ def generate_service_config_report(generate_config_report_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
267
+ command = make_simple_command(:post, 'v1/services:generateConfigReport', options)
268
+ command.request_representation = Google::Apis::ServicemanagementV1::GenerateConfigReportRequest::Representation
269
+ command.request_object = generate_config_report_request_object
270
+ command.response_representation = Google::Apis::ServicemanagementV1::GenerateConfigReportResponse::Representation
271
+ command.response_class = Google::Apis::ServicemanagementV1::GenerateConfigReportResponse
272
+ command.query['fields'] = fields unless fields.nil?
273
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
274
+ execute_or_queue_command(command, &block)
275
+ end
276
+
277
+ # Gets a managed service. Authentication is required unless the service is
278
+ # public.
279
+ # @param [String] service_name
280
+ # Required. The name of the service. See the `ServiceManager` overview for
281
+ # naming requirements. For example: `example.googleapis.com`.
282
+ # @param [String] fields
283
+ # Selector specifying which fields to include in a partial response.
284
+ # @param [String] quota_user
285
+ # Available to use for quota purposes for server-side applications. Can be any
286
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
287
+ # @param [Google::Apis::RequestOptions] options
288
+ # Request-specific options
289
+ #
290
+ # @yield [result, err] Result & error if block supplied
291
+ # @yieldparam result [Google::Apis::ServicemanagementV1::ManagedService] parsed result object
292
+ # @yieldparam err [StandardError] error object if request failed
293
+ #
294
+ # @return [Google::Apis::ServicemanagementV1::ManagedService]
295
+ #
296
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
297
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
298
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
299
+ def get_service(service_name, fields: nil, quota_user: nil, options: nil, &block)
300
+ command = make_simple_command(:get, 'v1/services/{serviceName}', options)
301
+ command.response_representation = Google::Apis::ServicemanagementV1::ManagedService::Representation
302
+ command.response_class = Google::Apis::ServicemanagementV1::ManagedService
303
+ command.params['serviceName'] = service_name unless service_name.nil?
304
+ command.query['fields'] = fields unless fields.nil?
305
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
306
+ execute_or_queue_command(command, &block)
307
+ end
308
+
309
+ # Gets a service configuration (version) for a managed service.
310
+ # @param [String] service_name
311
+ # Required. The name of the service. See the [overview](/service-management/
312
+ # overview) for naming requirements. For example: `example.googleapis.com`.
313
+ # @param [String] config_id
314
+ # Required. The id of the service configuration resource. This field must be
315
+ # specified for the server to return all fields, including `SourceInfo`.
316
+ # @param [String] view
317
+ # Specifies which parts of the Service Config should be returned in the response.
318
+ # @param [String] fields
319
+ # Selector specifying which fields to include in a partial response.
320
+ # @param [String] quota_user
321
+ # Available to use for quota purposes for server-side applications. Can be any
322
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
323
+ # @param [Google::Apis::RequestOptions] options
324
+ # Request-specific options
325
+ #
326
+ # @yield [result, err] Result & error if block supplied
327
+ # @yieldparam result [Google::Apis::ServicemanagementV1::Service] parsed result object
328
+ # @yieldparam err [StandardError] error object if request failed
329
+ #
330
+ # @return [Google::Apis::ServicemanagementV1::Service]
331
+ #
332
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
333
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
334
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
335
+ def get_service_configuration(service_name, config_id: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
336
+ command = make_simple_command(:get, 'v1/services/{serviceName}/config', options)
337
+ command.response_representation = Google::Apis::ServicemanagementV1::Service::Representation
338
+ command.response_class = Google::Apis::ServicemanagementV1::Service
339
+ command.params['serviceName'] = service_name unless service_name.nil?
340
+ command.query['configId'] = config_id unless config_id.nil?
341
+ command.query['view'] = view unless view.nil?
342
+ command.query['fields'] = fields unless fields.nil?
343
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
344
+ execute_or_queue_command(command, &block)
345
+ end
346
+
347
+ # Gets the access control policy for a resource. Returns an empty policy if the
348
+ # resource exists and does not have a policy set.
349
+ # @param [String] resource
350
+ # REQUIRED: The resource for which the policy is being requested. See the
351
+ # operation documentation for the appropriate value for this field.
352
+ # @param [Google::Apis::ServicemanagementV1::GetIamPolicyRequest] get_iam_policy_request_object
353
+ # @param [String] fields
354
+ # Selector specifying which fields to include in a partial response.
355
+ # @param [String] quota_user
356
+ # Available to use for quota purposes for server-side applications. Can be any
357
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
358
+ # @param [Google::Apis::RequestOptions] options
359
+ # Request-specific options
360
+ #
361
+ # @yield [result, err] Result & error if block supplied
362
+ # @yieldparam result [Google::Apis::ServicemanagementV1::Policy] parsed result object
363
+ # @yieldparam err [StandardError] error object if request failed
364
+ #
365
+ # @return [Google::Apis::ServicemanagementV1::Policy]
366
+ #
367
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
368
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
369
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
370
+ def get_service_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
371
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
372
+ command.request_representation = Google::Apis::ServicemanagementV1::GetIamPolicyRequest::Representation
373
+ command.request_object = get_iam_policy_request_object
374
+ command.response_representation = Google::Apis::ServicemanagementV1::Policy::Representation
375
+ command.response_class = Google::Apis::ServicemanagementV1::Policy
376
+ command.params['resource'] = resource unless resource.nil?
377
+ command.query['fields'] = fields unless fields.nil?
378
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
379
+ execute_or_queue_command(command, &block)
380
+ end
381
+
382
+ # Lists managed services. Returns all public services. For authenticated users,
383
+ # also returns all services the calling user has "servicemanagement.services.get"
384
+ # permission for. **BETA:** If the caller specifies the `consumer_id`, it
385
+ # returns only the services enabled on the consumer. The `consumer_id` must have
386
+ # the format of "project:`PROJECT-ID`".
387
+ # @param [String] consumer_id
388
+ # Include services consumed by the specified consumer. The Google Service
389
+ # Management implementation accepts the following forms: - project:
390
+ # @param [Fixnum] page_size
391
+ # The max number of items to include in the response list. Page size is 50 if
392
+ # not specified. Maximum value is 100.
393
+ # @param [String] page_token
394
+ # Token identifying which result to start with; returned by a previous list call.
395
+ # @param [String] producer_project_id
396
+ # Include services produced by the specified project.
397
+ # @param [String] fields
398
+ # Selector specifying which fields to include in a partial response.
399
+ # @param [String] quota_user
400
+ # Available to use for quota purposes for server-side applications. Can be any
401
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
402
+ # @param [Google::Apis::RequestOptions] options
403
+ # Request-specific options
404
+ #
405
+ # @yield [result, err] Result & error if block supplied
406
+ # @yieldparam result [Google::Apis::ServicemanagementV1::ListServicesResponse] parsed result object
407
+ # @yieldparam err [StandardError] error object if request failed
408
+ #
409
+ # @return [Google::Apis::ServicemanagementV1::ListServicesResponse]
410
+ #
411
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
412
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
413
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
414
+ def list_services(consumer_id: nil, page_size: nil, page_token: nil, producer_project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
415
+ command = make_simple_command(:get, 'v1/services', options)
416
+ command.response_representation = Google::Apis::ServicemanagementV1::ListServicesResponse::Representation
417
+ command.response_class = Google::Apis::ServicemanagementV1::ListServicesResponse
418
+ command.query['consumerId'] = consumer_id unless consumer_id.nil?
419
+ command.query['pageSize'] = page_size unless page_size.nil?
420
+ command.query['pageToken'] = page_token unless page_token.nil?
421
+ command.query['producerProjectId'] = producer_project_id unless producer_project_id.nil?
422
+ command.query['fields'] = fields unless fields.nil?
423
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
424
+ execute_or_queue_command(command, &block)
425
+ end
426
+
427
+ # Sets the access control policy on the specified resource. Replaces any
428
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
429
+ # PERMISSION_DENIED` errors.
430
+ # @param [String] resource
431
+ # REQUIRED: The resource for which the policy is being specified. See the
432
+ # operation documentation for the appropriate value for this field.
433
+ # @param [Google::Apis::ServicemanagementV1::SetIamPolicyRequest] set_iam_policy_request_object
434
+ # @param [String] fields
435
+ # Selector specifying which fields to include in a partial response.
436
+ # @param [String] quota_user
437
+ # Available to use for quota purposes for server-side applications. Can be any
438
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
439
+ # @param [Google::Apis::RequestOptions] options
440
+ # Request-specific options
441
+ #
442
+ # @yield [result, err] Result & error if block supplied
443
+ # @yieldparam result [Google::Apis::ServicemanagementV1::Policy] parsed result object
444
+ # @yieldparam err [StandardError] error object if request failed
445
+ #
446
+ # @return [Google::Apis::ServicemanagementV1::Policy]
447
+ #
448
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
449
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
450
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
451
+ def set_service_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
452
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
453
+ command.request_representation = Google::Apis::ServicemanagementV1::SetIamPolicyRequest::Representation
454
+ command.request_object = set_iam_policy_request_object
455
+ command.response_representation = Google::Apis::ServicemanagementV1::Policy::Representation
456
+ command.response_class = Google::Apis::ServicemanagementV1::Policy
457
+ command.params['resource'] = resource unless resource.nil?
458
+ command.query['fields'] = fields unless fields.nil?
459
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
460
+ execute_or_queue_command(command, &block)
461
+ end
462
+
463
+ # Returns permissions that a caller has on the specified resource. If the
464
+ # resource does not exist, this will return an empty set of permissions, not a `
465
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
466
+ # permission-aware UIs and command-line tools, not for authorization checking.
467
+ # This operation may "fail open" without warning.
468
+ # @param [String] resource
469
+ # REQUIRED: The resource for which the policy detail is being requested. See the
470
+ # operation documentation for the appropriate value for this field.
471
+ # @param [Google::Apis::ServicemanagementV1::TestIamPermissionsRequest] test_iam_permissions_request_object
472
+ # @param [String] fields
473
+ # Selector specifying which fields to include in a partial response.
474
+ # @param [String] quota_user
475
+ # Available to use for quota purposes for server-side applications. Can be any
476
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
477
+ # @param [Google::Apis::RequestOptions] options
478
+ # Request-specific options
479
+ #
480
+ # @yield [result, err] Result & error if block supplied
481
+ # @yieldparam result [Google::Apis::ServicemanagementV1::TestIamPermissionsResponse] parsed result object
482
+ # @yieldparam err [StandardError] error object if request failed
483
+ #
484
+ # @return [Google::Apis::ServicemanagementV1::TestIamPermissionsResponse]
485
+ #
486
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
487
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
488
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
489
+ def test_service_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
490
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
491
+ command.request_representation = Google::Apis::ServicemanagementV1::TestIamPermissionsRequest::Representation
492
+ command.request_object = test_iam_permissions_request_object
493
+ command.response_representation = Google::Apis::ServicemanagementV1::TestIamPermissionsResponse::Representation
494
+ command.response_class = Google::Apis::ServicemanagementV1::TestIamPermissionsResponse
495
+ command.params['resource'] = resource unless resource.nil?
496
+ command.query['fields'] = fields unless fields.nil?
497
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
498
+ execute_or_queue_command(command, &block)
499
+ end
500
+
501
+ # Revives a previously deleted managed service. The method restores the service
502
+ # using the configuration at the time the service was deleted. The target
503
+ # service must exist and must have been deleted within the last 30 days.
504
+ # Operation
505
+ # @param [String] service_name
506
+ # Required. The name of the service. See the [overview](/service-management/
507
+ # overview) for naming requirements. For example: `example.googleapis.com`.
508
+ # @param [String] fields
509
+ # Selector specifying which fields to include in a partial response.
510
+ # @param [String] quota_user
511
+ # Available to use for quota purposes for server-side applications. Can be any
512
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
513
+ # @param [Google::Apis::RequestOptions] options
514
+ # Request-specific options
515
+ #
516
+ # @yield [result, err] Result & error if block supplied
517
+ # @yieldparam result [Google::Apis::ServicemanagementV1::Operation] parsed result object
518
+ # @yieldparam err [StandardError] error object if request failed
519
+ #
520
+ # @return [Google::Apis::ServicemanagementV1::Operation]
521
+ #
522
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
523
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
524
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
525
+ def undelete_service(service_name, fields: nil, quota_user: nil, options: nil, &block)
526
+ command = make_simple_command(:post, 'v1/services/{serviceName}:undelete', options)
527
+ command.response_representation = Google::Apis::ServicemanagementV1::Operation::Representation
528
+ command.response_class = Google::Apis::ServicemanagementV1::Operation
529
+ command.params['serviceName'] = service_name unless service_name.nil?
530
+ command.query['fields'] = fields unless fields.nil?
531
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
532
+ execute_or_queue_command(command, &block)
533
+ end
534
+
535
+ # Creates a new service configuration (version) for a managed service. This
536
+ # method only stores the service configuration. To roll out the service
537
+ # configuration to backend systems please call CreateServiceRollout. Only the
538
+ # 100 most recent service configurations and ones referenced by existing
539
+ # rollouts are kept for each service. The rest will be deleted eventually.
540
+ # @param [String] service_name
541
+ # Required. The name of the service. See the [overview](/service-management/
542
+ # overview) for naming requirements. For example: `example.googleapis.com`.
543
+ # @param [Google::Apis::ServicemanagementV1::Service] service_object
544
+ # @param [String] fields
545
+ # Selector specifying which fields to include in a partial response.
546
+ # @param [String] quota_user
547
+ # Available to use for quota purposes for server-side applications. Can be any
548
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
549
+ # @param [Google::Apis::RequestOptions] options
550
+ # Request-specific options
551
+ #
552
+ # @yield [result, err] Result & error if block supplied
553
+ # @yieldparam result [Google::Apis::ServicemanagementV1::Service] parsed result object
554
+ # @yieldparam err [StandardError] error object if request failed
555
+ #
556
+ # @return [Google::Apis::ServicemanagementV1::Service]
557
+ #
558
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
559
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
560
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
561
+ def create_service_config(service_name, service_object = nil, fields: nil, quota_user: nil, options: nil, &block)
562
+ command = make_simple_command(:post, 'v1/services/{serviceName}/configs', options)
563
+ command.request_representation = Google::Apis::ServicemanagementV1::Service::Representation
564
+ command.request_object = service_object
565
+ command.response_representation = Google::Apis::ServicemanagementV1::Service::Representation
566
+ command.response_class = Google::Apis::ServicemanagementV1::Service
567
+ command.params['serviceName'] = service_name unless service_name.nil?
568
+ command.query['fields'] = fields unless fields.nil?
569
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
570
+ execute_or_queue_command(command, &block)
571
+ end
572
+
573
+ # Gets a service configuration (version) for a managed service.
574
+ # @param [String] service_name
575
+ # Required. The name of the service. See the [overview](/service-management/
576
+ # overview) for naming requirements. For example: `example.googleapis.com`.
577
+ # @param [String] config_id
578
+ # Required. The id of the service configuration resource. This field must be
579
+ # specified for the server to return all fields, including `SourceInfo`.
580
+ # @param [String] view
581
+ # Specifies which parts of the Service Config should be returned in the response.
582
+ # @param [String] fields
583
+ # Selector specifying which fields to include in a partial response.
584
+ # @param [String] quota_user
585
+ # Available to use for quota purposes for server-side applications. Can be any
586
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
587
+ # @param [Google::Apis::RequestOptions] options
588
+ # Request-specific options
589
+ #
590
+ # @yield [result, err] Result & error if block supplied
591
+ # @yieldparam result [Google::Apis::ServicemanagementV1::Service] parsed result object
592
+ # @yieldparam err [StandardError] error object if request failed
593
+ #
594
+ # @return [Google::Apis::ServicemanagementV1::Service]
595
+ #
596
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
597
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
598
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
599
+ def get_service_config(service_name, config_id, view: nil, fields: nil, quota_user: nil, options: nil, &block)
600
+ command = make_simple_command(:get, 'v1/services/{serviceName}/configs/{configId}', options)
601
+ command.response_representation = Google::Apis::ServicemanagementV1::Service::Representation
602
+ command.response_class = Google::Apis::ServicemanagementV1::Service
603
+ command.params['serviceName'] = service_name unless service_name.nil?
604
+ command.params['configId'] = config_id unless config_id.nil?
605
+ command.query['view'] = view unless view.nil?
606
+ command.query['fields'] = fields unless fields.nil?
607
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
608
+ execute_or_queue_command(command, &block)
609
+ end
610
+
611
+ # Lists the history of the service configuration for a managed service, from the
612
+ # newest to the oldest.
613
+ # @param [String] service_name
614
+ # Required. The name of the service. See the [overview](/service-management/
615
+ # overview) for naming requirements. For example: `example.googleapis.com`.
616
+ # @param [Fixnum] page_size
617
+ # The max number of items to include in the response list. Page size is 50 if
618
+ # not specified. Maximum value is 100.
619
+ # @param [String] page_token
620
+ # The token of the page to retrieve.
621
+ # @param [String] fields
622
+ # Selector specifying which fields to include in a partial response.
623
+ # @param [String] quota_user
624
+ # Available to use for quota purposes for server-side applications. Can be any
625
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
626
+ # @param [Google::Apis::RequestOptions] options
627
+ # Request-specific options
628
+ #
629
+ # @yield [result, err] Result & error if block supplied
630
+ # @yieldparam result [Google::Apis::ServicemanagementV1::ListServiceConfigsResponse] parsed result object
631
+ # @yieldparam err [StandardError] error object if request failed
632
+ #
633
+ # @return [Google::Apis::ServicemanagementV1::ListServiceConfigsResponse]
634
+ #
635
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
636
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
637
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
638
+ def list_service_configs(service_name, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
639
+ command = make_simple_command(:get, 'v1/services/{serviceName}/configs', options)
640
+ command.response_representation = Google::Apis::ServicemanagementV1::ListServiceConfigsResponse::Representation
641
+ command.response_class = Google::Apis::ServicemanagementV1::ListServiceConfigsResponse
642
+ command.params['serviceName'] = service_name unless service_name.nil?
643
+ command.query['pageSize'] = page_size unless page_size.nil?
644
+ command.query['pageToken'] = page_token unless page_token.nil?
645
+ command.query['fields'] = fields unless fields.nil?
646
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
647
+ execute_or_queue_command(command, &block)
648
+ end
649
+
650
+ # Creates a new service configuration (version) for a managed service based on
651
+ # user-supplied configuration source files (for example: OpenAPI Specification).
652
+ # This method stores the source configurations as well as the generated service
653
+ # configuration. To rollout the service configuration to other services, please
654
+ # call CreateServiceRollout. Only the 100 most recent configuration sources and
655
+ # ones referenced by existing service configurtions are kept for each service.
656
+ # The rest will be deleted eventually. Operation
657
+ # @param [String] service_name
658
+ # Required. The name of the service. See the [overview](/service-management/
659
+ # overview) for naming requirements. For example: `example.googleapis.com`.
660
+ # @param [Google::Apis::ServicemanagementV1::SubmitConfigSourceRequest] submit_config_source_request_object
661
+ # @param [String] fields
662
+ # Selector specifying which fields to include in a partial response.
663
+ # @param [String] quota_user
664
+ # Available to use for quota purposes for server-side applications. Can be any
665
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
666
+ # @param [Google::Apis::RequestOptions] options
667
+ # Request-specific options
668
+ #
669
+ # @yield [result, err] Result & error if block supplied
670
+ # @yieldparam result [Google::Apis::ServicemanagementV1::Operation] parsed result object
671
+ # @yieldparam err [StandardError] error object if request failed
672
+ #
673
+ # @return [Google::Apis::ServicemanagementV1::Operation]
674
+ #
675
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
676
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
677
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
678
+ def submit_config_source(service_name, submit_config_source_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
679
+ command = make_simple_command(:post, 'v1/services/{serviceName}/configs:submit', options)
680
+ command.request_representation = Google::Apis::ServicemanagementV1::SubmitConfigSourceRequest::Representation
681
+ command.request_object = submit_config_source_request_object
682
+ command.response_representation = Google::Apis::ServicemanagementV1::Operation::Representation
683
+ command.response_class = Google::Apis::ServicemanagementV1::Operation
684
+ command.params['serviceName'] = service_name unless service_name.nil?
685
+ command.query['fields'] = fields unless fields.nil?
686
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
687
+ execute_or_queue_command(command, &block)
688
+ end
689
+
690
+ # Gets the access control policy for a resource. Returns an empty policy if the
691
+ # resource exists and does not have a policy set.
692
+ # @param [String] resource
693
+ # REQUIRED: The resource for which the policy is being requested. See the
694
+ # operation documentation for the appropriate value for this field.
695
+ # @param [Google::Apis::ServicemanagementV1::GetIamPolicyRequest] get_iam_policy_request_object
696
+ # @param [String] fields
697
+ # Selector specifying which fields to include in a partial response.
698
+ # @param [String] quota_user
699
+ # Available to use for quota purposes for server-side applications. Can be any
700
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
701
+ # @param [Google::Apis::RequestOptions] options
702
+ # Request-specific options
703
+ #
704
+ # @yield [result, err] Result & error if block supplied
705
+ # @yieldparam result [Google::Apis::ServicemanagementV1::Policy] parsed result object
706
+ # @yieldparam err [StandardError] error object if request failed
707
+ #
708
+ # @return [Google::Apis::ServicemanagementV1::Policy]
709
+ #
710
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
711
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
712
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
713
+ def get_consumer_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
714
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
715
+ command.request_representation = Google::Apis::ServicemanagementV1::GetIamPolicyRequest::Representation
716
+ command.request_object = get_iam_policy_request_object
717
+ command.response_representation = Google::Apis::ServicemanagementV1::Policy::Representation
718
+ command.response_class = Google::Apis::ServicemanagementV1::Policy
719
+ command.params['resource'] = resource unless resource.nil?
720
+ command.query['fields'] = fields unless fields.nil?
721
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
722
+ execute_or_queue_command(command, &block)
723
+ end
724
+
725
+ # Sets the access control policy on the specified resource. Replaces any
726
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
727
+ # PERMISSION_DENIED` errors.
728
+ # @param [String] resource
729
+ # REQUIRED: The resource for which the policy is being specified. See the
730
+ # operation documentation for the appropriate value for this field.
731
+ # @param [Google::Apis::ServicemanagementV1::SetIamPolicyRequest] set_iam_policy_request_object
732
+ # @param [String] fields
733
+ # Selector specifying which fields to include in a partial response.
734
+ # @param [String] quota_user
735
+ # Available to use for quota purposes for server-side applications. Can be any
736
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
737
+ # @param [Google::Apis::RequestOptions] options
738
+ # Request-specific options
739
+ #
740
+ # @yield [result, err] Result & error if block supplied
741
+ # @yieldparam result [Google::Apis::ServicemanagementV1::Policy] parsed result object
742
+ # @yieldparam err [StandardError] error object if request failed
743
+ #
744
+ # @return [Google::Apis::ServicemanagementV1::Policy]
745
+ #
746
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
747
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
748
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
749
+ def set_consumer_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
750
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
751
+ command.request_representation = Google::Apis::ServicemanagementV1::SetIamPolicyRequest::Representation
752
+ command.request_object = set_iam_policy_request_object
753
+ command.response_representation = Google::Apis::ServicemanagementV1::Policy::Representation
754
+ command.response_class = Google::Apis::ServicemanagementV1::Policy
755
+ command.params['resource'] = resource unless resource.nil?
756
+ command.query['fields'] = fields unless fields.nil?
757
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
758
+ execute_or_queue_command(command, &block)
759
+ end
760
+
761
+ # Returns permissions that a caller has on the specified resource. If the
762
+ # resource does not exist, this will return an empty set of permissions, not a `
763
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
764
+ # permission-aware UIs and command-line tools, not for authorization checking.
765
+ # This operation may "fail open" without warning.
766
+ # @param [String] resource
767
+ # REQUIRED: The resource for which the policy detail is being requested. See the
768
+ # operation documentation for the appropriate value for this field.
769
+ # @param [Google::Apis::ServicemanagementV1::TestIamPermissionsRequest] test_iam_permissions_request_object
770
+ # @param [String] fields
771
+ # Selector specifying which fields to include in a partial response.
772
+ # @param [String] quota_user
773
+ # Available to use for quota purposes for server-side applications. Can be any
774
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
775
+ # @param [Google::Apis::RequestOptions] options
776
+ # Request-specific options
777
+ #
778
+ # @yield [result, err] Result & error if block supplied
779
+ # @yieldparam result [Google::Apis::ServicemanagementV1::TestIamPermissionsResponse] parsed result object
780
+ # @yieldparam err [StandardError] error object if request failed
781
+ #
782
+ # @return [Google::Apis::ServicemanagementV1::TestIamPermissionsResponse]
783
+ #
784
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
785
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
786
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
787
+ def test_consumer_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
788
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
789
+ command.request_representation = Google::Apis::ServicemanagementV1::TestIamPermissionsRequest::Representation
790
+ command.request_object = test_iam_permissions_request_object
791
+ command.response_representation = Google::Apis::ServicemanagementV1::TestIamPermissionsResponse::Representation
792
+ command.response_class = Google::Apis::ServicemanagementV1::TestIamPermissionsResponse
793
+ command.params['resource'] = resource unless resource.nil?
794
+ command.query['fields'] = fields unless fields.nil?
795
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
796
+ execute_or_queue_command(command, &block)
797
+ end
798
+
799
+ # Creates a new service configuration rollout. Based on rollout, the Google
800
+ # Service Management will roll out the service configurations to different
801
+ # backend services. For example, the logging configuration will be pushed to
802
+ # Google Cloud Logging. Please note that any previous pending and running
803
+ # Rollouts and associated Operations will be automatically cancelled so that the
804
+ # latest Rollout will not be blocked by previous Rollouts. Only the 100 most
805
+ # recent (in any state) and the last 10 successful (if not already part of the
806
+ # set of 100 most recent) rollouts are kept for each service. The rest will be
807
+ # deleted eventually. Operation
808
+ # @param [String] service_name
809
+ # Required. The name of the service. See the [overview](/service-management/
810
+ # overview) for naming requirements. For example: `example.googleapis.com`.
811
+ # @param [Google::Apis::ServicemanagementV1::Rollout] rollout_object
812
+ # @param [String] fields
813
+ # Selector specifying which fields to include in a partial response.
814
+ # @param [String] quota_user
815
+ # Available to use for quota purposes for server-side applications. Can be any
816
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
817
+ # @param [Google::Apis::RequestOptions] options
818
+ # Request-specific options
819
+ #
820
+ # @yield [result, err] Result & error if block supplied
821
+ # @yieldparam result [Google::Apis::ServicemanagementV1::Operation] parsed result object
822
+ # @yieldparam err [StandardError] error object if request failed
823
+ #
824
+ # @return [Google::Apis::ServicemanagementV1::Operation]
825
+ #
826
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
827
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
828
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
829
+ def create_service_rollout(service_name, rollout_object = nil, fields: nil, quota_user: nil, options: nil, &block)
830
+ command = make_simple_command(:post, 'v1/services/{serviceName}/rollouts', options)
831
+ command.request_representation = Google::Apis::ServicemanagementV1::Rollout::Representation
832
+ command.request_object = rollout_object
833
+ command.response_representation = Google::Apis::ServicemanagementV1::Operation::Representation
834
+ command.response_class = Google::Apis::ServicemanagementV1::Operation
835
+ command.params['serviceName'] = service_name unless service_name.nil?
836
+ command.query['fields'] = fields unless fields.nil?
837
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
838
+ execute_or_queue_command(command, &block)
839
+ end
840
+
841
+ # Gets a service configuration rollout.
842
+ # @param [String] service_name
843
+ # Required. The name of the service. See the [overview](/service-management/
844
+ # overview) for naming requirements. For example: `example.googleapis.com`.
845
+ # @param [String] rollout_id
846
+ # Required. The id of the rollout resource.
847
+ # @param [String] fields
848
+ # Selector specifying which fields to include in a partial response.
849
+ # @param [String] quota_user
850
+ # Available to use for quota purposes for server-side applications. Can be any
851
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
852
+ # @param [Google::Apis::RequestOptions] options
853
+ # Request-specific options
854
+ #
855
+ # @yield [result, err] Result & error if block supplied
856
+ # @yieldparam result [Google::Apis::ServicemanagementV1::Rollout] parsed result object
857
+ # @yieldparam err [StandardError] error object if request failed
858
+ #
859
+ # @return [Google::Apis::ServicemanagementV1::Rollout]
860
+ #
861
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
862
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
863
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
864
+ def get_service_rollout(service_name, rollout_id, fields: nil, quota_user: nil, options: nil, &block)
865
+ command = make_simple_command(:get, 'v1/services/{serviceName}/rollouts/{rolloutId}', options)
866
+ command.response_representation = Google::Apis::ServicemanagementV1::Rollout::Representation
867
+ command.response_class = Google::Apis::ServicemanagementV1::Rollout
868
+ command.params['serviceName'] = service_name unless service_name.nil?
869
+ command.params['rolloutId'] = rollout_id unless rollout_id.nil?
870
+ command.query['fields'] = fields unless fields.nil?
871
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
872
+ execute_or_queue_command(command, &block)
873
+ end
874
+
875
+ # Lists the history of the service configuration rollouts for a managed service,
876
+ # from the newest to the oldest.
877
+ # @param [String] service_name
878
+ # Required. The name of the service. See the [overview](/service-management/
879
+ # overview) for naming requirements. For example: `example.googleapis.com`.
880
+ # @param [String] filter
881
+ # Required. Use `filter` to return subset of rollouts. The following filters are
882
+ # supported: -- To limit the results to only those in [status](google.api.
883
+ # servicemanagement.v1.RolloutStatus) 'SUCCESS', use filter='status=SUCCESS' --
884
+ # To limit the results to those in [status](google.api.servicemanagement.v1.
885
+ # RolloutStatus) 'CANCELLED' or 'FAILED', use filter='status=CANCELLED OR status=
886
+ # FAILED'
887
+ # @param [Fixnum] page_size
888
+ # The max number of items to include in the response list. Page size is 50 if
889
+ # not specified. Maximum value is 100.
890
+ # @param [String] page_token
891
+ # The token of the page to retrieve.
892
+ # @param [String] fields
893
+ # Selector specifying which fields to include in a partial response.
894
+ # @param [String] quota_user
895
+ # Available to use for quota purposes for server-side applications. Can be any
896
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
897
+ # @param [Google::Apis::RequestOptions] options
898
+ # Request-specific options
899
+ #
900
+ # @yield [result, err] Result & error if block supplied
901
+ # @yieldparam result [Google::Apis::ServicemanagementV1::ListServiceRolloutsResponse] parsed result object
902
+ # @yieldparam err [StandardError] error object if request failed
903
+ #
904
+ # @return [Google::Apis::ServicemanagementV1::ListServiceRolloutsResponse]
905
+ #
906
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
907
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
908
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
909
+ def list_service_rollouts(service_name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
910
+ command = make_simple_command(:get, 'v1/services/{serviceName}/rollouts', options)
911
+ command.response_representation = Google::Apis::ServicemanagementV1::ListServiceRolloutsResponse::Representation
912
+ command.response_class = Google::Apis::ServicemanagementV1::ListServiceRolloutsResponse
913
+ command.params['serviceName'] = service_name unless service_name.nil?
914
+ command.query['filter'] = filter unless filter.nil?
915
+ command.query['pageSize'] = page_size unless page_size.nil?
916
+ command.query['pageToken'] = page_token unless page_token.nil?
917
+ command.query['fields'] = fields unless fields.nil?
918
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
919
+ execute_or_queue_command(command, &block)
920
+ end
921
+
922
+ protected
923
+
924
+ def apply_command_defaults(command)
925
+ command.query['key'] = key unless key.nil?
926
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
927
+ end
928
+ end
929
+ end
930
+ end
931
+ end