google-apis-apihub_v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3651 @@
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 ApihubV1
23
+ # API hub API
24
+ #
25
+ #
26
+ #
27
+ # @example
28
+ # require 'google/apis/apihub_v1'
29
+ #
30
+ # Apihub = Google::Apis::ApihubV1 # Alias the module
31
+ # service = Apihub::APIhubService.new
32
+ #
33
+ # @see https://cloud.google.com/apigee/docs/api-hub/what-is-api-hub
34
+ class APIhubService < Google::Apis::Core::BaseService
35
+ DEFAULT_ENDPOINT_TEMPLATE = "https://apihub.$UNIVERSE_DOMAIN$/"
36
+
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(DEFAULT_ENDPOINT_TEMPLATE, '',
49
+ client_name: 'google-apis-apihub_v1',
50
+ client_version: Google::Apis::ApihubV1::GEM_VERSION)
51
+ @batch_path = 'batch'
52
+ end
53
+
54
+ # Collect API data from a source and push it to Hub's collect layer.
55
+ # @param [String] location
56
+ # Required. The regional location of the API hub instance and its resources.
57
+ # Format: `projects/`project`/locations/`location``
58
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1CollectApiDataRequest] google_cloud_apihub_v1_collect_api_data_request_object
59
+ # @param [String] fields
60
+ # Selector specifying which fields to include in a partial response.
61
+ # @param [String] quota_user
62
+ # Available to use for quota purposes for server-side applications. Can be any
63
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
64
+ # @param [Google::Apis::RequestOptions] options
65
+ # Request-specific options
66
+ #
67
+ # @yield [result, err] Result & error if block supplied
68
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleLongrunningOperation] parsed result object
69
+ # @yieldparam err [StandardError] error object if request failed
70
+ #
71
+ # @return [Google::Apis::ApihubV1::GoogleLongrunningOperation]
72
+ #
73
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
74
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
75
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
76
+ def collect_project_location_api_data(location, google_cloud_apihub_v1_collect_api_data_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
77
+ command = make_simple_command(:post, 'v1/{+location}:collectApiData', options)
78
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1CollectApiDataRequest::Representation
79
+ command.request_object = google_cloud_apihub_v1_collect_api_data_request_object
80
+ command.response_representation = Google::Apis::ApihubV1::GoogleLongrunningOperation::Representation
81
+ command.response_class = Google::Apis::ApihubV1::GoogleLongrunningOperation
82
+ command.params['location'] = location unless location.nil?
83
+ command.query['fields'] = fields unless fields.nil?
84
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
85
+ execute_or_queue_command(command, &block)
86
+ end
87
+
88
+ # Gets information about a location.
89
+ # @param [String] name
90
+ # Resource name for the location.
91
+ # @param [String] fields
92
+ # Selector specifying which fields to include in a partial response.
93
+ # @param [String] quota_user
94
+ # Available to use for quota purposes for server-side applications. Can be any
95
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
96
+ # @param [Google::Apis::RequestOptions] options
97
+ # Request-specific options
98
+ #
99
+ # @yield [result, err] Result & error if block supplied
100
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudLocationLocation] parsed result object
101
+ # @yieldparam err [StandardError] error object if request failed
102
+ #
103
+ # @return [Google::Apis::ApihubV1::GoogleCloudLocationLocation]
104
+ #
105
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
106
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
107
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
108
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
109
+ command = make_simple_command(:get, 'v1/{+name}', options)
110
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudLocationLocation::Representation
111
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudLocationLocation
112
+ command.params['name'] = name unless name.nil?
113
+ command.query['fields'] = fields unless fields.nil?
114
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
115
+ execute_or_queue_command(command, &block)
116
+ end
117
+
118
+ # Lists information about the supported locations for this service.
119
+ # @param [String] name
120
+ # The resource that owns the locations collection, if applicable.
121
+ # @param [Array<String>, String] extra_location_types
122
+ # Optional. A list of extra location types that should be used as conditions for
123
+ # controlling the visibility of the locations.
124
+ # @param [String] filter
125
+ # A filter to narrow down results to a preferred subset. The filtering language
126
+ # accepts strings like `"displayName=tokyo"`, and is documented in more detail
127
+ # in [AIP-160](https://google.aip.dev/160).
128
+ # @param [Fixnum] page_size
129
+ # The maximum number of results to return. If not set, the service selects a
130
+ # default.
131
+ # @param [String] page_token
132
+ # A page token received from the `next_page_token` field in the response. Send
133
+ # that page token to receive the subsequent page.
134
+ # @param [String] fields
135
+ # Selector specifying which fields to include in a partial response.
136
+ # @param [String] quota_user
137
+ # Available to use for quota purposes for server-side applications. Can be any
138
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
139
+ # @param [Google::Apis::RequestOptions] options
140
+ # Request-specific options
141
+ #
142
+ # @yield [result, err] Result & error if block supplied
143
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudLocationListLocationsResponse] parsed result object
144
+ # @yieldparam err [StandardError] error object if request failed
145
+ #
146
+ # @return [Google::Apis::ApihubV1::GoogleCloudLocationListLocationsResponse]
147
+ #
148
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
149
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
150
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
151
+ def list_project_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
152
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
153
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudLocationListLocationsResponse::Representation
154
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudLocationListLocationsResponse
155
+ command.params['name'] = name unless name.nil?
156
+ command.query['extraLocationTypes'] = extra_location_types unless extra_location_types.nil?
157
+ command.query['filter'] = filter unless filter.nil?
158
+ command.query['pageSize'] = page_size unless page_size.nil?
159
+ command.query['pageToken'] = page_token unless page_token.nil?
160
+ command.query['fields'] = fields unless fields.nil?
161
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
162
+ execute_or_queue_command(command, &block)
163
+ end
164
+
165
+ # Look up a runtime project attachment. This API can be called in the context of
166
+ # any project.
167
+ # @param [String] name
168
+ # Required. Runtime project ID to look up runtime project attachment for. Lookup
169
+ # happens across all regions. Expected format: `projects/`project`/locations/`
170
+ # location``.
171
+ # @param [String] fields
172
+ # Selector specifying which fields to include in a partial response.
173
+ # @param [String] quota_user
174
+ # Available to use for quota purposes for server-side applications. Can be any
175
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
176
+ # @param [Google::Apis::RequestOptions] options
177
+ # Request-specific options
178
+ #
179
+ # @yield [result, err] Result & error if block supplied
180
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1LookupRuntimeProjectAttachmentResponse] parsed result object
181
+ # @yieldparam err [StandardError] error object if request failed
182
+ #
183
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1LookupRuntimeProjectAttachmentResponse]
184
+ #
185
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
186
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
187
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
188
+ def lookup_project_location_runtime_project_attachment(name, fields: nil, quota_user: nil, options: nil, &block)
189
+ command = make_simple_command(:get, 'v1/{+name}:lookupRuntimeProjectAttachment', options)
190
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1LookupRuntimeProjectAttachmentResponse::Representation
191
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1LookupRuntimeProjectAttachmentResponse
192
+ command.params['name'] = name unless name.nil?
193
+ command.query['fields'] = fields unless fields.nil?
194
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
195
+ execute_or_queue_command(command, &block)
196
+ end
197
+
198
+ # Search across API-Hub resources.
199
+ # @param [String] location
200
+ # Required. The resource name of the location which will be of the type `
201
+ # projects/`project_id`/locations/`location_id``. This field is used to identify
202
+ # the instance of API-Hub in which resources should be searched.
203
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1SearchResourcesRequest] google_cloud_apihub_v1_search_resources_request_object
204
+ # @param [String] fields
205
+ # Selector specifying which fields to include in a partial response.
206
+ # @param [String] quota_user
207
+ # Available to use for quota purposes for server-side applications. Can be any
208
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
209
+ # @param [Google::Apis::RequestOptions] options
210
+ # Request-specific options
211
+ #
212
+ # @yield [result, err] Result & error if block supplied
213
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1SearchResourcesResponse] parsed result object
214
+ # @yieldparam err [StandardError] error object if request failed
215
+ #
216
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1SearchResourcesResponse]
217
+ #
218
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
219
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
220
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
221
+ def search_project_location_resources(location, google_cloud_apihub_v1_search_resources_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
222
+ command = make_simple_command(:post, 'v1/{+location}:searchResources', options)
223
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1SearchResourcesRequest::Representation
224
+ command.request_object = google_cloud_apihub_v1_search_resources_request_object
225
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1SearchResourcesResponse::Representation
226
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1SearchResourcesResponse
227
+ command.params['location'] = location unless location.nil?
228
+ command.query['fields'] = fields unless fields.nil?
229
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
230
+ execute_or_queue_command(command, &block)
231
+ end
232
+
233
+ # Provisions instance resources for the API Hub.
234
+ # @param [String] parent
235
+ # Required. The parent resource for the Api Hub instance resource. Format: `
236
+ # projects/`project`/locations/`location``
237
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1ApiHubInstance] google_cloud_apihub_v1_api_hub_instance_object
238
+ # @param [String] api_hub_instance_id
239
+ # Optional. Identifier to assign to the Api Hub instance. Must be unique within
240
+ # scope of the parent resource. If the field is not provided, system generated
241
+ # id will be used. This value should be 4-40 characters, and valid characters
242
+ # are `/a-z[0-9]-_/`.
243
+ # @param [String] fields
244
+ # Selector specifying which fields to include in a partial response.
245
+ # @param [String] quota_user
246
+ # Available to use for quota purposes for server-side applications. Can be any
247
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
248
+ # @param [Google::Apis::RequestOptions] options
249
+ # Request-specific options
250
+ #
251
+ # @yield [result, err] Result & error if block supplied
252
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleLongrunningOperation] parsed result object
253
+ # @yieldparam err [StandardError] error object if request failed
254
+ #
255
+ # @return [Google::Apis::ApihubV1::GoogleLongrunningOperation]
256
+ #
257
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
258
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
259
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
260
+ def create_project_location_api_hub_instance(parent, google_cloud_apihub_v1_api_hub_instance_object = nil, api_hub_instance_id: nil, fields: nil, quota_user: nil, options: nil, &block)
261
+ command = make_simple_command(:post, 'v1/{+parent}/apiHubInstances', options)
262
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ApiHubInstance::Representation
263
+ command.request_object = google_cloud_apihub_v1_api_hub_instance_object
264
+ command.response_representation = Google::Apis::ApihubV1::GoogleLongrunningOperation::Representation
265
+ command.response_class = Google::Apis::ApihubV1::GoogleLongrunningOperation
266
+ command.params['parent'] = parent unless parent.nil?
267
+ command.query['apiHubInstanceId'] = api_hub_instance_id unless api_hub_instance_id.nil?
268
+ command.query['fields'] = fields unless fields.nil?
269
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
270
+ execute_or_queue_command(command, &block)
271
+ end
272
+
273
+ # Deletes the API hub instance.
274
+ # @param [String] name
275
+ # Required. The name of the Api Hub instance to delete. Format: `projects/`
276
+ # project`/locations/`location`/apiHubInstances/`apiHubInstance``.
277
+ # @param [String] fields
278
+ # Selector specifying which fields to include in a partial response.
279
+ # @param [String] quota_user
280
+ # Available to use for quota purposes for server-side applications. Can be any
281
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
282
+ # @param [Google::Apis::RequestOptions] options
283
+ # Request-specific options
284
+ #
285
+ # @yield [result, err] Result & error if block supplied
286
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleLongrunningOperation] parsed result object
287
+ # @yieldparam err [StandardError] error object if request failed
288
+ #
289
+ # @return [Google::Apis::ApihubV1::GoogleLongrunningOperation]
290
+ #
291
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
292
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
293
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
294
+ def delete_project_location_api_hub_instance(name, fields: nil, quota_user: nil, options: nil, &block)
295
+ command = make_simple_command(:delete, 'v1/{+name}', options)
296
+ command.response_representation = Google::Apis::ApihubV1::GoogleLongrunningOperation::Representation
297
+ command.response_class = Google::Apis::ApihubV1::GoogleLongrunningOperation
298
+ command.params['name'] = name unless name.nil?
299
+ command.query['fields'] = fields unless fields.nil?
300
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
301
+ execute_or_queue_command(command, &block)
302
+ end
303
+
304
+ # Gets details of a single API Hub instance.
305
+ # @param [String] name
306
+ # Required. The name of the Api Hub instance to retrieve. Format: `projects/`
307
+ # project`/locations/`location`/apiHubInstances/`apiHubInstance``.
308
+ # @param [String] fields
309
+ # Selector specifying which fields to include in a partial response.
310
+ # @param [String] quota_user
311
+ # Available to use for quota purposes for server-side applications. Can be any
312
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
313
+ # @param [Google::Apis::RequestOptions] options
314
+ # Request-specific options
315
+ #
316
+ # @yield [result, err] Result & error if block supplied
317
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ApiHubInstance] parsed result object
318
+ # @yieldparam err [StandardError] error object if request failed
319
+ #
320
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ApiHubInstance]
321
+ #
322
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
323
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
324
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
325
+ def get_project_location_api_hub_instance(name, fields: nil, quota_user: nil, options: nil, &block)
326
+ command = make_simple_command(:get, 'v1/{+name}', options)
327
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ApiHubInstance::Representation
328
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ApiHubInstance
329
+ command.params['name'] = name unless name.nil?
330
+ command.query['fields'] = fields unless fields.nil?
331
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
332
+ execute_or_queue_command(command, &block)
333
+ end
334
+
335
+ # Looks up an Api Hub instance in a given GCP project. There will always be only
336
+ # one Api Hub instance for a GCP project across all locations.
337
+ # @param [String] parent
338
+ # Required. There will always be only one Api Hub instance for a GCP project
339
+ # across all locations. The parent resource for the Api Hub instance resource.
340
+ # Format: `projects/`project`/locations/`location``
341
+ # @param [String] fields
342
+ # Selector specifying which fields to include in a partial response.
343
+ # @param [String] quota_user
344
+ # Available to use for quota purposes for server-side applications. Can be any
345
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
346
+ # @param [Google::Apis::RequestOptions] options
347
+ # Request-specific options
348
+ #
349
+ # @yield [result, err] Result & error if block supplied
350
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1LookupApiHubInstanceResponse] parsed result object
351
+ # @yieldparam err [StandardError] error object if request failed
352
+ #
353
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1LookupApiHubInstanceResponse]
354
+ #
355
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
356
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
357
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
358
+ def lookup_project_location_api_hub_instance(parent, fields: nil, quota_user: nil, options: nil, &block)
359
+ command = make_simple_command(:get, 'v1/{+parent}/apiHubInstances:lookup', options)
360
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1LookupApiHubInstanceResponse::Representation
361
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1LookupApiHubInstanceResponse
362
+ command.params['parent'] = parent unless parent.nil?
363
+ command.query['fields'] = fields unless fields.nil?
364
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
365
+ execute_or_queue_command(command, &block)
366
+ end
367
+
368
+ # Create an API resource in the API hub. Once an API resource is created,
369
+ # versions can be added to it.
370
+ # @param [String] parent
371
+ # Required. The parent resource for the API resource. Format: `projects/`project`
372
+ # /locations/`location``
373
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1Api] google_cloud_apihub_v1_api_object
374
+ # @param [String] api_id
375
+ # Optional. The ID to use for the API resource, which will become the final
376
+ # component of the API's resource name. This field is optional. * If provided,
377
+ # the same will be used. The service will throw an error if the specified id is
378
+ # already used by another API resource in the API hub. * If not provided, a
379
+ # system generated id will be used. This value should be 4-500 characters, and
380
+ # valid characters are /a-z[0-9]-_/.
381
+ # @param [String] fields
382
+ # Selector specifying which fields to include in a partial response.
383
+ # @param [String] quota_user
384
+ # Available to use for quota purposes for server-side applications. Can be any
385
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
386
+ # @param [Google::Apis::RequestOptions] options
387
+ # Request-specific options
388
+ #
389
+ # @yield [result, err] Result & error if block supplied
390
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Api] parsed result object
391
+ # @yieldparam err [StandardError] error object if request failed
392
+ #
393
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Api]
394
+ #
395
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
396
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
397
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
398
+ def create_project_location_api(parent, google_cloud_apihub_v1_api_object = nil, api_id: nil, fields: nil, quota_user: nil, options: nil, &block)
399
+ command = make_simple_command(:post, 'v1/{+parent}/apis', options)
400
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Api::Representation
401
+ command.request_object = google_cloud_apihub_v1_api_object
402
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Api::Representation
403
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Api
404
+ command.params['parent'] = parent unless parent.nil?
405
+ command.query['apiId'] = api_id unless api_id.nil?
406
+ command.query['fields'] = fields unless fields.nil?
407
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
408
+ execute_or_queue_command(command, &block)
409
+ end
410
+
411
+ # Delete an API resource in the API hub. API can only be deleted if all
412
+ # underlying versions are deleted.
413
+ # @param [String] name
414
+ # Required. The name of the API resource to delete. Format: `projects/`project`/
415
+ # locations/`location`/apis/`api``
416
+ # @param [Boolean] force
417
+ # Optional. If set to true, any versions from this API will also be deleted.
418
+ # Otherwise, the request will only work if the API has no versions.
419
+ # @param [String] fields
420
+ # Selector specifying which fields to include in a partial response.
421
+ # @param [String] quota_user
422
+ # Available to use for quota purposes for server-side applications. Can be any
423
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
424
+ # @param [Google::Apis::RequestOptions] options
425
+ # Request-specific options
426
+ #
427
+ # @yield [result, err] Result & error if block supplied
428
+ # @yieldparam result [Google::Apis::ApihubV1::Empty] parsed result object
429
+ # @yieldparam err [StandardError] error object if request failed
430
+ #
431
+ # @return [Google::Apis::ApihubV1::Empty]
432
+ #
433
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
434
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
435
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
436
+ def delete_project_location_api(name, force: nil, fields: nil, quota_user: nil, options: nil, &block)
437
+ command = make_simple_command(:delete, 'v1/{+name}', options)
438
+ command.response_representation = Google::Apis::ApihubV1::Empty::Representation
439
+ command.response_class = Google::Apis::ApihubV1::Empty
440
+ command.params['name'] = name unless name.nil?
441
+ command.query['force'] = force unless force.nil?
442
+ command.query['fields'] = fields unless fields.nil?
443
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
444
+ execute_or_queue_command(command, &block)
445
+ end
446
+
447
+ # Get API resource details including the API versions contained in it.
448
+ # @param [String] name
449
+ # Required. The name of the API resource to retrieve. Format: `projects/`project`
450
+ # /locations/`location`/apis/`api``
451
+ # @param [String] fields
452
+ # Selector specifying which fields to include in a partial response.
453
+ # @param [String] quota_user
454
+ # Available to use for quota purposes for server-side applications. Can be any
455
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
456
+ # @param [Google::Apis::RequestOptions] options
457
+ # Request-specific options
458
+ #
459
+ # @yield [result, err] Result & error if block supplied
460
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Api] parsed result object
461
+ # @yieldparam err [StandardError] error object if request failed
462
+ #
463
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Api]
464
+ #
465
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
466
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
467
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
468
+ def get_project_location_api(name, fields: nil, quota_user: nil, options: nil, &block)
469
+ command = make_simple_command(:get, 'v1/{+name}', options)
470
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Api::Representation
471
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Api
472
+ command.params['name'] = name unless name.nil?
473
+ command.query['fields'] = fields unless fields.nil?
474
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
475
+ execute_or_queue_command(command, &block)
476
+ end
477
+
478
+ # List API resources in the API hub.
479
+ # @param [String] parent
480
+ # Required. The parent, which owns this collection of API resources. Format: `
481
+ # projects/`project`/locations/`location``
482
+ # @param [String] filter
483
+ # Optional. An expression that filters the list of ApiResources. A filter
484
+ # expression consists of a field name, a comparison operator, and a value for
485
+ # filtering. The value must be a string. The comparison operator must be one of:
486
+ # `<`, `>`, `:` or `=`. Filters are not case sensitive. The following fields in
487
+ # the `ApiResource` are eligible for filtering: * `owner.email` - The email of
488
+ # the team which owns the ApiResource. Allowed comparison operators: `=`. * `
489
+ # create_time` - The time at which the ApiResource was created. The value should
490
+ # be in the (RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed
491
+ # comparison operators: `>` and `<`. * `display_name` - The display name of the
492
+ # ApiResource. Allowed comparison operators: `=`. * `target_user.enum_values.
493
+ # values.id` - The allowed value id of the target users attribute associated
494
+ # with the ApiResource. Allowed comparison operator is `:`. * `target_user.
495
+ # enum_values.values.display_name` - The allowed value display name of the
496
+ # target users attribute associated with the ApiResource. Allowed comparison
497
+ # operator is `:`. * `team.enum_values.values.id` - The allowed value id of the
498
+ # team attribute associated with the ApiResource. Allowed comparison operator is
499
+ # `:`. * `team.enum_values.values.display_name` - The allowed value display name
500
+ # of the team attribute associated with the ApiResource. Allowed comparison
501
+ # operator is `:`. * `business_unit.enum_values.values.id` - The allowed value
502
+ # id of the business unit attribute associated with the ApiResource. Allowed
503
+ # comparison operator is `:`. * `business_unit.enum_values.values.display_name` -
504
+ # The allowed value display name of the business unit attribute associated with
505
+ # the ApiResource. Allowed comparison operator is `:`. * `maturity_level.
506
+ # enum_values.values.id` - The allowed value id of the maturity level attribute
507
+ # associated with the ApiResource. Allowed comparison operator is `:`. * `
508
+ # maturity_level.enum_values.values.display_name` - The allowed value display
509
+ # name of the maturity level attribute associated with the ApiResource. Allowed
510
+ # comparison operator is `:`. * `api_style.enum_values.values.id` - The allowed
511
+ # value id of the api style attribute associated with the ApiResource. Allowed
512
+ # comparison operator is `:`. * `api_style.enum_values.values.display_name` -
513
+ # The allowed value display name of the api style attribute associated with the
514
+ # ApiResource. Allowed comparison operator is `:`. * `attributes.projects/test-
515
+ # project-id/locations/test-location-id/ attributes/user-defined-attribute-id.
516
+ # enum_values.values.id` - The allowed value id of the user defined enum
517
+ # attribute associated with the Resource. Allowed comparison operator is `:`.
518
+ # Here user-defined-attribute-enum-id is a placeholder that can be replaced with
519
+ # any user defined enum attribute name. * `attributes.projects/test-project-id/
520
+ # locations/test-location-id/ attributes/user-defined-attribute-id.enum_values.
521
+ # values.display_name` - The allowed value display name of the user defined enum
522
+ # attribute associated with the Resource. Allowed comparison operator is `:`.
523
+ # Here user-defined-attribute-enum-display-name is a placeholder that can be
524
+ # replaced with any user defined enum attribute enum name. * `attributes.
525
+ # projects/test-project-id/locations/test-location-id/ attributes/user-defined-
526
+ # attribute-id.string_values.values` - The allowed value of the user defined
527
+ # string attribute associated with the Resource. Allowed comparison operator is `
528
+ # :`. Here user-defined-attribute-string is a placeholder that can be replaced
529
+ # with any user defined string attribute name. * `attributes.projects/test-
530
+ # project-id/locations/test-location-id/ attributes/user-defined-attribute-id.
531
+ # json_values.values` - The allowed value of the user defined JSON attribute
532
+ # associated with the Resource. Allowed comparison operator is `:`. Here user-
533
+ # defined-attribute-json is a placeholder that can be replaced with any user
534
+ # defined JSON attribute name. Expressions are combined with either `AND` logic
535
+ # operator or `OR` logical operator but not both of them together i.e. only one
536
+ # of the `AND` or `OR` operator can be used throughout the filter string and
537
+ # both the operators cannot be used together. No other logical operators are
538
+ # supported. At most three filter fields are allowed in the filter string and if
539
+ # provided more than that then `INVALID_ARGUMENT` error is returned by the API.
540
+ # Here are a few examples: * `owner.email = \"apihub@google.com\"` - - The owner
541
+ # team email is _apihub@google.com_. * `owner.email = \"apihub@google.com\" AND
542
+ # create_time < \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:
543
+ # 00Z\"` - The owner team email is _apihub@google.com_ and the api was created
544
+ # before _2021-08-15 14:50:00 UTC_ and after _2021-08-10 12:00:00 UTC_. * `owner.
545
+ # email = \"apihub@google.com\" OR team.enum_values.values.id: apihub-team-id` -
546
+ # The filter string specifies the APIs where the owner team email is _apihub@
547
+ # google.com_ or the id of the allowed value associated with the team attribute
548
+ # is _apihub-team-id_. * `owner.email = \"apihub@google.com\" OR team.
549
+ # enum_values.values.display_name: ApiHub Team` - The filter string specifies
550
+ # the APIs where the owner team email is _apihub@google.com_ or the display name
551
+ # of the allowed value associated with the team attribute is `ApiHub Team`. * `
552
+ # owner.email = \"apihub@google.com\" AND attributes.projects/test-project-id/
553
+ # locations/test-location-id/ attributes/17650f90-4a29-4971-b3c0-d5532da3764b.
554
+ # enum_values.values.id: test_enum_id AND attributes.projects/test-project-id/
555
+ # locations/test-location-id/ attributes/1765\0f90-4a29-5431-b3d0-d5532da3764c.
556
+ # string_values.values: test_string_value` - The filter string specifies the
557
+ # APIs where the owner team email is _apihub@google.com_ and the id of the
558
+ # allowed value associated with the user defined attribute of type enum is
559
+ # _test_enum_id_ and the value of the user defined attribute of type string is
560
+ # _test_..
561
+ # @param [Fixnum] page_size
562
+ # Optional. The maximum number of API resources to return. The service may
563
+ # return fewer than this value. If unspecified, at most 50 Apis will be returned.
564
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
565
+ # @param [String] page_token
566
+ # Optional. A page token, received from a previous `ListApis` call. Provide this
567
+ # to retrieve the subsequent page. When paginating, all other parameters (except
568
+ # page_size) provided to `ListApis` must match the call that provided the page
569
+ # token.
570
+ # @param [String] fields
571
+ # Selector specifying which fields to include in a partial response.
572
+ # @param [String] quota_user
573
+ # Available to use for quota purposes for server-side applications. Can be any
574
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
575
+ # @param [Google::Apis::RequestOptions] options
576
+ # Request-specific options
577
+ #
578
+ # @yield [result, err] Result & error if block supplied
579
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ListApisResponse] parsed result object
580
+ # @yieldparam err [StandardError] error object if request failed
581
+ #
582
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ListApisResponse]
583
+ #
584
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
585
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
586
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
587
+ def list_project_location_apis(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
588
+ command = make_simple_command(:get, 'v1/{+parent}/apis', options)
589
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ListApisResponse::Representation
590
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ListApisResponse
591
+ command.params['parent'] = parent unless parent.nil?
592
+ command.query['filter'] = filter unless filter.nil?
593
+ command.query['pageSize'] = page_size unless page_size.nil?
594
+ command.query['pageToken'] = page_token unless page_token.nil?
595
+ command.query['fields'] = fields unless fields.nil?
596
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
597
+ execute_or_queue_command(command, &block)
598
+ end
599
+
600
+ # Update an API resource in the API hub. The following fields in the API can be
601
+ # updated: * display_name * description * owner * documentation * target_user *
602
+ # team * business_unit * maturity_level * api_style * attributes The update_mask
603
+ # should be used to specify the fields being updated. Updating the owner field
604
+ # requires complete owner message and updates both owner and email fields.
605
+ # @param [String] name
606
+ # Identifier. The name of the API resource in the API Hub. Format: `projects/`
607
+ # project`/locations/`location`/apis/`api``
608
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1Api] google_cloud_apihub_v1_api_object
609
+ # @param [String] update_mask
610
+ # Required. The list of fields to update.
611
+ # @param [String] fields
612
+ # Selector specifying which fields to include in a partial response.
613
+ # @param [String] quota_user
614
+ # Available to use for quota purposes for server-side applications. Can be any
615
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
616
+ # @param [Google::Apis::RequestOptions] options
617
+ # Request-specific options
618
+ #
619
+ # @yield [result, err] Result & error if block supplied
620
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Api] parsed result object
621
+ # @yieldparam err [StandardError] error object if request failed
622
+ #
623
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Api]
624
+ #
625
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
626
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
627
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
628
+ def patch_project_location_api(name, google_cloud_apihub_v1_api_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
629
+ command = make_simple_command(:patch, 'v1/{+name}', options)
630
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Api::Representation
631
+ command.request_object = google_cloud_apihub_v1_api_object
632
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Api::Representation
633
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Api
634
+ command.params['name'] = name unless name.nil?
635
+ command.query['updateMask'] = update_mask unless update_mask.nil?
636
+ command.query['fields'] = fields unless fields.nil?
637
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
638
+ execute_or_queue_command(command, &block)
639
+ end
640
+
641
+ # Create an API version for an API resource in the API hub.
642
+ # @param [String] parent
643
+ # Required. The parent resource for API version. Format: `projects/`project`/
644
+ # locations/`location`/apis/`api``
645
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1Version] google_cloud_apihub_v1_version_object
646
+ # @param [String] version_id
647
+ # Optional. The ID to use for the API version, which will become the final
648
+ # component of the version's resource name. This field is optional. * If
649
+ # provided, the same will be used. The service will throw an error if the
650
+ # specified id is already used by another version in the API resource. * If not
651
+ # provided, a system generated id will be used. This value should be 4-500
652
+ # characters, overall resource name which will be of format `projects/`project`/
653
+ # locations/`location`/apis/`api`/versions/`version``, its length is limited to
654
+ # 700 characters and valid characters are /a-z[0-9]-_/.
655
+ # @param [String] fields
656
+ # Selector specifying which fields to include in a partial response.
657
+ # @param [String] quota_user
658
+ # Available to use for quota purposes for server-side applications. Can be any
659
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
660
+ # @param [Google::Apis::RequestOptions] options
661
+ # Request-specific options
662
+ #
663
+ # @yield [result, err] Result & error if block supplied
664
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Version] parsed result object
665
+ # @yieldparam err [StandardError] error object if request failed
666
+ #
667
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Version]
668
+ #
669
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
670
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
671
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
672
+ def create_project_location_api_version(parent, google_cloud_apihub_v1_version_object = nil, version_id: nil, fields: nil, quota_user: nil, options: nil, &block)
673
+ command = make_simple_command(:post, 'v1/{+parent}/versions', options)
674
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Version::Representation
675
+ command.request_object = google_cloud_apihub_v1_version_object
676
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Version::Representation
677
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Version
678
+ command.params['parent'] = parent unless parent.nil?
679
+ command.query['versionId'] = version_id unless version_id.nil?
680
+ command.query['fields'] = fields unless fields.nil?
681
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
682
+ execute_or_queue_command(command, &block)
683
+ end
684
+
685
+ # Delete an API version. Version can only be deleted if all underlying specs,
686
+ # operations, definitions and linked deployments are deleted.
687
+ # @param [String] name
688
+ # Required. The name of the version to delete. Format: `projects/`project`/
689
+ # locations/`location`/apis/`api`/versions/`version``
690
+ # @param [Boolean] force
691
+ # Optional. If set to true, any specs from this version will also be deleted.
692
+ # Otherwise, the request will only work if the version has no specs.
693
+ # @param [String] fields
694
+ # Selector specifying which fields to include in a partial response.
695
+ # @param [String] quota_user
696
+ # Available to use for quota purposes for server-side applications. Can be any
697
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
698
+ # @param [Google::Apis::RequestOptions] options
699
+ # Request-specific options
700
+ #
701
+ # @yield [result, err] Result & error if block supplied
702
+ # @yieldparam result [Google::Apis::ApihubV1::Empty] parsed result object
703
+ # @yieldparam err [StandardError] error object if request failed
704
+ #
705
+ # @return [Google::Apis::ApihubV1::Empty]
706
+ #
707
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
708
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
709
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
710
+ def delete_project_location_api_version(name, force: nil, fields: nil, quota_user: nil, options: nil, &block)
711
+ command = make_simple_command(:delete, 'v1/{+name}', options)
712
+ command.response_representation = Google::Apis::ApihubV1::Empty::Representation
713
+ command.response_class = Google::Apis::ApihubV1::Empty
714
+ command.params['name'] = name unless name.nil?
715
+ command.query['force'] = force unless force.nil?
716
+ command.query['fields'] = fields unless fields.nil?
717
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
718
+ execute_or_queue_command(command, &block)
719
+ end
720
+
721
+ # Get details about the API version of an API resource. This will include
722
+ # information about the specs and operations present in the API version as well
723
+ # as the deployments linked to it.
724
+ # @param [String] name
725
+ # Required. The name of the API version to retrieve. Format: `projects/`project`/
726
+ # locations/`location`/apis/`api`/versions/`version``
727
+ # @param [String] fields
728
+ # Selector specifying which fields to include in a partial response.
729
+ # @param [String] quota_user
730
+ # Available to use for quota purposes for server-side applications. Can be any
731
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
732
+ # @param [Google::Apis::RequestOptions] options
733
+ # Request-specific options
734
+ #
735
+ # @yield [result, err] Result & error if block supplied
736
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Version] parsed result object
737
+ # @yieldparam err [StandardError] error object if request failed
738
+ #
739
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Version]
740
+ #
741
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
742
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
743
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
744
+ def get_project_location_api_version(name, fields: nil, quota_user: nil, options: nil, &block)
745
+ command = make_simple_command(:get, 'v1/{+name}', options)
746
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Version::Representation
747
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Version
748
+ command.params['name'] = name unless name.nil?
749
+ command.query['fields'] = fields unless fields.nil?
750
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
751
+ execute_or_queue_command(command, &block)
752
+ end
753
+
754
+ # List API versions of an API resource in the API hub.
755
+ # @param [String] parent
756
+ # Required. The parent which owns this collection of API versions i.e., the API
757
+ # resource Format: `projects/`project`/locations/`location`/apis/`api``
758
+ # @param [String] filter
759
+ # Optional. An expression that filters the list of Versions. A filter expression
760
+ # consists of a field name, a comparison operator, and a value for filtering.
761
+ # The value must be a string, a number, or a boolean. The comparison operator
762
+ # must be one of: `<`, `>` or `=`. Filters are not case sensitive. The following
763
+ # fields in the `Version` are eligible for filtering: * `display_name` - The
764
+ # display name of the Version. Allowed comparison operators: `=`. * `create_time`
765
+ # - The time at which the Version was created. The value should be in the (
766
+ # RFC3339)[https://tools.ietf.org/html/rfc3339] format. Allowed comparison
767
+ # operators: `>` and `<`. * `lifecycle.enum_values.values.id` - The allowed
768
+ # value id of the lifecycle attribute associated with the Version. Allowed
769
+ # comparison operators: `:`. * `lifecycle.enum_values.values.display_name` - The
770
+ # allowed value display name of the lifecycle attribute associated with the
771
+ # Version. Allowed comparison operators: `:`. * `compliance.enum_values.values.
772
+ # id` - The allowed value id of the compliances attribute associated with the
773
+ # Version. Allowed comparison operators: `:`. * `compliance.enum_values.values.
774
+ # display_name` - The allowed value display name of the compliances attribute
775
+ # associated with the Version. Allowed comparison operators: `:`. * `
776
+ # accreditation.enum_values.values.id` - The allowed value id of the
777
+ # accreditations attribute associated with the Version. Allowed comparison
778
+ # operators: `:`. * `accreditation.enum_values.values.display_name` - The
779
+ # allowed value display name of the accreditations attribute associated with the
780
+ # Version. Allowed comparison operators: `:`. * `attributes.projects/test-
781
+ # project-id/locations/test-location-id/ attributes/user-defined-attribute-id.
782
+ # enum_values.values.id` - The allowed value id of the user defined enum
783
+ # attribute associated with the Resource. Allowed comparison operator is `:`.
784
+ # Here user-defined-attribute-enum-id is a placeholder that can be replaced with
785
+ # any user defined enum attribute name. * `attributes.projects/test-project-id/
786
+ # locations/test-location-id/ attributes/user-defined-attribute-id.enum_values.
787
+ # values.display_name` - The allowed value display name of the user defined enum
788
+ # attribute associated with the Resource. Allowed comparison operator is `:`.
789
+ # Here user-defined-attribute-enum-display-name is a placeholder that can be
790
+ # replaced with any user defined enum attribute enum name. * `attributes.
791
+ # projects/test-project-id/locations/test-location-id/ attributes/user-defined-
792
+ # attribute-id.string_values.values` - The allowed value of the user defined
793
+ # string attribute associated with the Resource. Allowed comparison operator is `
794
+ # :`. Here user-defined-attribute-string is a placeholder that can be replaced
795
+ # with any user defined string attribute name. * `attributes.projects/test-
796
+ # project-id/locations/test-location-id/ attributes/user-defined-attribute-id.
797
+ # json_values.values` - The allowed value of the user defined JSON attribute
798
+ # associated with the Resource. Allowed comparison operator is `:`. Here user-
799
+ # defined-attribute-json is a placeholder that can be replaced with any user
800
+ # defined JSON attribute name. Expressions are combined with either `AND` logic
801
+ # operator or `OR` logical operator but not both of them together i.e. only one
802
+ # of the `AND` or `OR` operator can be used throughout the filter string and
803
+ # both the operators cannot be used together. No other logical operators are
804
+ # supported. At most three filter fields are allowed in the filter string and if
805
+ # provided more than that then `INVALID_ARGUMENT` error is returned by the API.
806
+ # Here are a few examples: * `lifecycle.enum_values.values.id: preview-id` - The
807
+ # filter string specifies that the id of the allowed value associated with the
808
+ # lifecycle attribute of the Version is _preview-id_. * `lifecycle.enum_values.
809
+ # values.display_name: \"Preview Display Name\"` - The filter string specifies
810
+ # that the display name of the allowed value associated with the lifecycle
811
+ # attribute of the Version is `Preview Display Name`. * `lifecycle.enum_values.
812
+ # values.id: preview-id AND create_time < \"2021-08-15T14:50:00Z\" AND
813
+ # create_time > \"2021-08-10T12:00:00Z\"` - The id of the allowed value
814
+ # associated with the lifecycle attribute of the Version is _preview-id_ and it
815
+ # was created before _2021-08-15 14:50:00 UTC_ and after _2021-08-10 12:00:00
816
+ # UTC_. * `compliance.enum_values.values.id: gdpr-id OR compliance.enum_values.
817
+ # values.id: pci-dss-id` - The id of the allowed value associated with the
818
+ # compliance attribute is _gdpr-id_ or _pci-dss-id_. * `lifecycle.enum_values.
819
+ # values.id: preview-id AND attributes.projects/test-project-id/locations/test-
820
+ # location-id/ attributes/17650f90-4a29-4971-b3c0-d5532da3764b.string_values.
821
+ # values: test` - The filter string specifies that the id of the allowed value
822
+ # associated with the lifecycle attribute of the Version is _preview-id_ and the
823
+ # value of the user defined attribute of type string is _test_.
824
+ # @param [Fixnum] page_size
825
+ # Optional. The maximum number of versions to return. The service may return
826
+ # fewer than this value. If unspecified, at most 50 versions will be returned.
827
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
828
+ # @param [String] page_token
829
+ # Optional. A page token, received from a previous `ListVersions` call. Provide
830
+ # this to retrieve the subsequent page. When paginating, all other parameters (
831
+ # except page_size) provided to `ListVersions` must match the call that provided
832
+ # the page token.
833
+ # @param [String] fields
834
+ # Selector specifying which fields to include in a partial response.
835
+ # @param [String] quota_user
836
+ # Available to use for quota purposes for server-side applications. Can be any
837
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
838
+ # @param [Google::Apis::RequestOptions] options
839
+ # Request-specific options
840
+ #
841
+ # @yield [result, err] Result & error if block supplied
842
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ListVersionsResponse] parsed result object
843
+ # @yieldparam err [StandardError] error object if request failed
844
+ #
845
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ListVersionsResponse]
846
+ #
847
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
848
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
849
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
850
+ def list_project_location_api_versions(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
851
+ command = make_simple_command(:get, 'v1/{+parent}/versions', options)
852
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ListVersionsResponse::Representation
853
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ListVersionsResponse
854
+ command.params['parent'] = parent unless parent.nil?
855
+ command.query['filter'] = filter unless filter.nil?
856
+ command.query['pageSize'] = page_size unless page_size.nil?
857
+ command.query['pageToken'] = page_token unless page_token.nil?
858
+ command.query['fields'] = fields unless fields.nil?
859
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
860
+ execute_or_queue_command(command, &block)
861
+ end
862
+
863
+ # Update API version. The following fields in the version can be updated
864
+ # currently: * display_name * description * documentation * deployments *
865
+ # lifecycle * compliance * accreditation * attributes The update_mask should be
866
+ # used to specify the fields being updated.
867
+ # @param [String] name
868
+ # Identifier. The name of the version. Format: `projects/`project`/locations/`
869
+ # location`/apis/`api`/versions/`version``
870
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1Version] google_cloud_apihub_v1_version_object
871
+ # @param [String] update_mask
872
+ # Required. The list of fields to update.
873
+ # @param [String] fields
874
+ # Selector specifying which fields to include in a partial response.
875
+ # @param [String] quota_user
876
+ # Available to use for quota purposes for server-side applications. Can be any
877
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
878
+ # @param [Google::Apis::RequestOptions] options
879
+ # Request-specific options
880
+ #
881
+ # @yield [result, err] Result & error if block supplied
882
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Version] parsed result object
883
+ # @yieldparam err [StandardError] error object if request failed
884
+ #
885
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Version]
886
+ #
887
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
888
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
889
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
890
+ def patch_project_location_api_version(name, google_cloud_apihub_v1_version_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
891
+ command = make_simple_command(:patch, 'v1/{+name}', options)
892
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Version::Representation
893
+ command.request_object = google_cloud_apihub_v1_version_object
894
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Version::Representation
895
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Version
896
+ command.params['name'] = name unless name.nil?
897
+ command.query['updateMask'] = update_mask unless update_mask.nil?
898
+ command.query['fields'] = fields unless fields.nil?
899
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
900
+ execute_or_queue_command(command, &block)
901
+ end
902
+
903
+ # Get details about a definition in an API version.
904
+ # @param [String] name
905
+ # Required. The name of the definition to retrieve. Format: `projects/`project`/
906
+ # locations/`location`/apis/`api`/versions/`version`/definitions/`definition``
907
+ # @param [String] fields
908
+ # Selector specifying which fields to include in a partial response.
909
+ # @param [String] quota_user
910
+ # Available to use for quota purposes for server-side applications. Can be any
911
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
912
+ # @param [Google::Apis::RequestOptions] options
913
+ # Request-specific options
914
+ #
915
+ # @yield [result, err] Result & error if block supplied
916
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Definition] parsed result object
917
+ # @yieldparam err [StandardError] error object if request failed
918
+ #
919
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Definition]
920
+ #
921
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
922
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
923
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
924
+ def get_project_location_api_version_definition(name, fields: nil, quota_user: nil, options: nil, &block)
925
+ command = make_simple_command(:get, 'v1/{+name}', options)
926
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Definition::Representation
927
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Definition
928
+ command.params['name'] = name unless name.nil?
929
+ command.query['fields'] = fields unless fields.nil?
930
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
931
+ execute_or_queue_command(command, &block)
932
+ end
933
+
934
+ # Create an apiOperation in an API version. An apiOperation can be created only
935
+ # if the version has no apiOperations which were created by parsing a spec.
936
+ # @param [String] parent
937
+ # Required. The parent resource for the operation resource. Format: `projects/`
938
+ # project`/locations/`location`/apis/`api`/versions/`version``
939
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation] google_cloud_apihub_v1_api_operation_object
940
+ # @param [String] api_operation_id
941
+ # Optional. The ID to use for the operation resource, which will become the
942
+ # final component of the operation's resource name. This field is optional. * If
943
+ # provided, the same will be used. The service will throw an error if the
944
+ # specified id is already used by another operation resource in the API hub. *
945
+ # If not provided, a system generated id will be used. This value should be 4-
946
+ # 500 characters, overall resource name which will be of format `projects/`
947
+ # project`/locations/`location`/apis/`api`/versions/`version`/operations/`
948
+ # operation``, its length is limited to 700 characters, and valid characters are
949
+ # /a-z[0-9]-_/.
950
+ # @param [String] fields
951
+ # Selector specifying which fields to include in a partial response.
952
+ # @param [String] quota_user
953
+ # Available to use for quota purposes for server-side applications. Can be any
954
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
955
+ # @param [Google::Apis::RequestOptions] options
956
+ # Request-specific options
957
+ #
958
+ # @yield [result, err] Result & error if block supplied
959
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation] parsed result object
960
+ # @yieldparam err [StandardError] error object if request failed
961
+ #
962
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation]
963
+ #
964
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
965
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
966
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
967
+ def create_project_location_api_version_operation(parent, google_cloud_apihub_v1_api_operation_object = nil, api_operation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
968
+ command = make_simple_command(:post, 'v1/{+parent}/operations', options)
969
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation::Representation
970
+ command.request_object = google_cloud_apihub_v1_api_operation_object
971
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation::Representation
972
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation
973
+ command.params['parent'] = parent unless parent.nil?
974
+ command.query['apiOperationId'] = api_operation_id unless api_operation_id.nil?
975
+ command.query['fields'] = fields unless fields.nil?
976
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
977
+ execute_or_queue_command(command, &block)
978
+ end
979
+
980
+ # Delete an operation in an API version and we can delete only the operations
981
+ # created via create API. If the operation was created by parsing the spec, then
982
+ # it can be deleted by editing or deleting the spec.
983
+ # @param [String] name
984
+ # Required. The name of the operation resource to delete. Format: `projects/`
985
+ # project`/locations/`location`/apis/`api`/versions/`version`/operations/`
986
+ # operation``
987
+ # @param [String] fields
988
+ # Selector specifying which fields to include in a partial response.
989
+ # @param [String] quota_user
990
+ # Available to use for quota purposes for server-side applications. Can be any
991
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
992
+ # @param [Google::Apis::RequestOptions] options
993
+ # Request-specific options
994
+ #
995
+ # @yield [result, err] Result & error if block supplied
996
+ # @yieldparam result [Google::Apis::ApihubV1::Empty] parsed result object
997
+ # @yieldparam err [StandardError] error object if request failed
998
+ #
999
+ # @return [Google::Apis::ApihubV1::Empty]
1000
+ #
1001
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1002
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1003
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1004
+ def delete_project_location_api_version_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1005
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1006
+ command.response_representation = Google::Apis::ApihubV1::Empty::Representation
1007
+ command.response_class = Google::Apis::ApihubV1::Empty
1008
+ command.params['name'] = name unless name.nil?
1009
+ command.query['fields'] = fields unless fields.nil?
1010
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1011
+ execute_or_queue_command(command, &block)
1012
+ end
1013
+
1014
+ # Get details about a particular operation in API version.
1015
+ # @param [String] name
1016
+ # Required. The name of the operation to retrieve. Format: `projects/`project`/
1017
+ # locations/`location`/apis/`api`/versions/`version`/operations/`operation``
1018
+ # @param [String] fields
1019
+ # Selector specifying which fields to include in a partial response.
1020
+ # @param [String] quota_user
1021
+ # Available to use for quota purposes for server-side applications. Can be any
1022
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1023
+ # @param [Google::Apis::RequestOptions] options
1024
+ # Request-specific options
1025
+ #
1026
+ # @yield [result, err] Result & error if block supplied
1027
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation] parsed result object
1028
+ # @yieldparam err [StandardError] error object if request failed
1029
+ #
1030
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation]
1031
+ #
1032
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1033
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1034
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1035
+ def get_project_location_api_version_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1036
+ command = make_simple_command(:get, 'v1/{+name}', options)
1037
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation::Representation
1038
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation
1039
+ command.params['name'] = name unless name.nil?
1040
+ command.query['fields'] = fields unless fields.nil?
1041
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1042
+ execute_or_queue_command(command, &block)
1043
+ end
1044
+
1045
+ # List operations in an API version.
1046
+ # @param [String] parent
1047
+ # Required. The parent which owns this collection of operations i.e., the API
1048
+ # version. Format: `projects/`project`/locations/`location`/apis/`api`/versions/`
1049
+ # version``
1050
+ # @param [String] filter
1051
+ # Optional. An expression that filters the list of ApiOperations. A filter
1052
+ # expression consists of a field name, a comparison operator, and a value for
1053
+ # filtering. The value must be a string or a boolean. The comparison operator
1054
+ # must be one of: `<`, `>` or `=`. Filters are not case sensitive. The following
1055
+ # fields in the `ApiOperation` are eligible for filtering: * `name` - The
1056
+ # ApiOperation resource name. Allowed comparison operators: `=`. * `details.
1057
+ # http_operation.path.path` - The http operation's complete path relative to
1058
+ # server endpoint. Allowed comparison operators: `=`. * `details.http_operation.
1059
+ # method` - The http operation method type. Allowed comparison operators: `=`. *
1060
+ # `details.deprecated` - Indicates if the ApiOperation is deprecated. Allowed
1061
+ # values are True / False indicating the deprycation status of the ApiOperation.
1062
+ # Allowed comparison operators: `=`. * `create_time` - The time at which the
1063
+ # ApiOperation was created. The value should be in the (RFC3339)[https://tools.
1064
+ # ietf.org/html/rfc3339] format. Allowed comparison operators: `>` and `<`. * `
1065
+ # attributes.projects/test-project-id/locations/test-location-id/ attributes/
1066
+ # user-defined-attribute-id.enum_values.values.id` - The allowed value id of the
1067
+ # user defined enum attribute associated with the Resource. Allowed comparison
1068
+ # operator is `:`. Here user-defined-attribute-enum-id is a placeholder that can
1069
+ # be replaced with any user defined enum attribute name. * `attributes.projects/
1070
+ # test-project-id/locations/test-location-id/ attributes/user-defined-attribute-
1071
+ # id.enum_values.values.display_name` - The allowed value display name of the
1072
+ # user defined enum attribute associated with the Resource. Allowed comparison
1073
+ # operator is `:`. Here user-defined-attribute-enum-display-name is a
1074
+ # placeholder that can be replaced with any user defined enum attribute enum
1075
+ # name. * `attributes.projects/test-project-id/locations/test-location-id/
1076
+ # attributes/user-defined-attribute-id.string_values.values` - The allowed value
1077
+ # of the user defined string attribute associated with the Resource. Allowed
1078
+ # comparison operator is `:`. Here user-defined-attribute-string is a
1079
+ # placeholder that can be replaced with any user defined string attribute name. *
1080
+ # `attributes.projects/test-project-id/locations/test-location-id/ attributes/
1081
+ # user-defined-attribute-id.json_values.values` - The allowed value of the user
1082
+ # defined JSON attribute associated with the Resource. Allowed comparison
1083
+ # operator is `:`. Here user-defined-attribute-json is a placeholder that can be
1084
+ # replaced with any user defined JSON attribute name. Expressions are combined
1085
+ # with either `AND` logic operator or `OR` logical operator but not both of them
1086
+ # together i.e. only one of the `AND` or `OR` operator can be used throughout
1087
+ # the filter string and both the operators cannot be used together. No other
1088
+ # logical operators are supported. At most three filter fields are allowed in
1089
+ # the filter string and if provided more than that then `INVALID_ARGUMENT` error
1090
+ # is returned by the API. Here are a few examples: * `details.deprecated = True`
1091
+ # - The ApiOperation is deprecated. * `details.http_operation.method = GET AND
1092
+ # create_time < \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:
1093
+ # 00Z\"` - The method of the http operation of the ApiOperation is _GET_ and the
1094
+ # spec was created before _2021-08-15 14:50:00 UTC_ and after _2021-08-10 12:00:
1095
+ # 00 UTC_. * `details.http_operation.method = GET OR details.http_operation.
1096
+ # method = POST`. - The http operation of the method of ApiOperation is _GET_ or
1097
+ # _POST_. * `details.deprecated = True AND attributes.projects/test-project-id/
1098
+ # locations/test-location-id/ attributes/17650f90-4a29-4971-b3c0-d5532da3764b.
1099
+ # string_values.values: test` - The filter string specifies that the
1100
+ # ApiOperation is deprecated and the value of the user defined attribute of type
1101
+ # string is _test_.
1102
+ # @param [Fixnum] page_size
1103
+ # Optional. The maximum number of operations to return. The service may return
1104
+ # fewer than this value. If unspecified, at most 50 operations will be returned.
1105
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
1106
+ # @param [String] page_token
1107
+ # Optional. A page token, received from a previous `ListApiOperations` call.
1108
+ # Provide this to retrieve the subsequent page. When paginating, all other
1109
+ # parameters (except page_size) provided to `ListApiOperations` must match the
1110
+ # call that provided the page token.
1111
+ # @param [String] fields
1112
+ # Selector specifying which fields to include in a partial response.
1113
+ # @param [String] quota_user
1114
+ # Available to use for quota purposes for server-side applications. Can be any
1115
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1116
+ # @param [Google::Apis::RequestOptions] options
1117
+ # Request-specific options
1118
+ #
1119
+ # @yield [result, err] Result & error if block supplied
1120
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ListApiOperationsResponse] parsed result object
1121
+ # @yieldparam err [StandardError] error object if request failed
1122
+ #
1123
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ListApiOperationsResponse]
1124
+ #
1125
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1126
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1127
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1128
+ def list_project_location_api_version_operations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1129
+ command = make_simple_command(:get, 'v1/{+parent}/operations', options)
1130
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ListApiOperationsResponse::Representation
1131
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ListApiOperationsResponse
1132
+ command.params['parent'] = parent unless parent.nil?
1133
+ command.query['filter'] = filter unless filter.nil?
1134
+ command.query['pageSize'] = page_size unless page_size.nil?
1135
+ command.query['pageToken'] = page_token unless page_token.nil?
1136
+ command.query['fields'] = fields unless fields.nil?
1137
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1138
+ execute_or_queue_command(command, &block)
1139
+ end
1140
+
1141
+ # Update an operation in an API version. The following fields in the
1142
+ # ApiOperation resource can be updated: * details.description * details.
1143
+ # documentation * details.http_operation.path * details.http_operation.method *
1144
+ # details.deprecated * attributes The update_mask should be used to specify the
1145
+ # fields being updated. An operation can be updated only if the operation was
1146
+ # created via CreateApiOperation API. If the operation was created by parsing
1147
+ # the spec, then it can be edited by updating the spec.
1148
+ # @param [String] name
1149
+ # Identifier. The name of the operation. Format: `projects/`project`/locations/`
1150
+ # location`/apis/`api`/versions/`version`/operations/`operation``
1151
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation] google_cloud_apihub_v1_api_operation_object
1152
+ # @param [String] update_mask
1153
+ # Required. The list of fields to update.
1154
+ # @param [String] fields
1155
+ # Selector specifying which fields to include in a partial response.
1156
+ # @param [String] quota_user
1157
+ # Available to use for quota purposes for server-side applications. Can be any
1158
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1159
+ # @param [Google::Apis::RequestOptions] options
1160
+ # Request-specific options
1161
+ #
1162
+ # @yield [result, err] Result & error if block supplied
1163
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation] parsed result object
1164
+ # @yieldparam err [StandardError] error object if request failed
1165
+ #
1166
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation]
1167
+ #
1168
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1169
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1170
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1171
+ def patch_project_location_api_version_operation(name, google_cloud_apihub_v1_api_operation_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1172
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1173
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation::Representation
1174
+ command.request_object = google_cloud_apihub_v1_api_operation_object
1175
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation::Representation
1176
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ApiOperation
1177
+ command.params['name'] = name unless name.nil?
1178
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1179
+ command.query['fields'] = fields unless fields.nil?
1180
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1181
+ execute_or_queue_command(command, &block)
1182
+ end
1183
+
1184
+ # Add a spec to an API version in the API hub. Multiple specs can be added to an
1185
+ # API version. Note, while adding a spec, at least one of `contents` or `
1186
+ # source_uri` must be provided. If `contents` is provided, then `spec_type` must
1187
+ # also be provided. On adding a spec with contents to the version, the
1188
+ # operations present in it will be added to the version.Note that the file
1189
+ # contents in the spec should be of the same type as defined in the `projects/`
1190
+ # project`/locations/`location`/attributes/system-spec-type` attribute
1191
+ # associated with spec resource. Note that specs of various types can be
1192
+ # uploaded, however parsing of details is supported for OpenAPI spec currently.
1193
+ # In order to access the information parsed from the spec, use the GetSpec
1194
+ # method. In order to access the raw contents for a particular spec, use the
1195
+ # GetSpecContents method. In order to access the operations parsed from the spec,
1196
+ # use the ListAPIOperations method.
1197
+ # @param [String] parent
1198
+ # Required. The parent resource for Spec. Format: `projects/`project`/locations/`
1199
+ # location`/apis/`api`/versions/`version``
1200
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1Spec] google_cloud_apihub_v1_spec_object
1201
+ # @param [String] spec_id
1202
+ # Optional. The ID to use for the spec, which will become the final component of
1203
+ # the spec's resource name. This field is optional. * If provided, the same will
1204
+ # be used. The service will throw an error if the specified id is already used
1205
+ # by another spec in the API resource. * If not provided, a system generated id
1206
+ # will be used. This value should be 4-500 characters, overall resource name
1207
+ # which will be of format `projects/`project`/locations/`location`/apis/`api`/
1208
+ # versions/`version`/specs/`spec``, its length is limited to 1000 characters and
1209
+ # valid characters are /a-z[0-9]-_/.
1210
+ # @param [String] fields
1211
+ # Selector specifying which fields to include in a partial response.
1212
+ # @param [String] quota_user
1213
+ # Available to use for quota purposes for server-side applications. Can be any
1214
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1215
+ # @param [Google::Apis::RequestOptions] options
1216
+ # Request-specific options
1217
+ #
1218
+ # @yield [result, err] Result & error if block supplied
1219
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Spec] parsed result object
1220
+ # @yieldparam err [StandardError] error object if request failed
1221
+ #
1222
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Spec]
1223
+ #
1224
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1225
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1226
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1227
+ def create_project_location_api_version_spec(parent, google_cloud_apihub_v1_spec_object = nil, spec_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1228
+ command = make_simple_command(:post, 'v1/{+parent}/specs', options)
1229
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Spec::Representation
1230
+ command.request_object = google_cloud_apihub_v1_spec_object
1231
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Spec::Representation
1232
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Spec
1233
+ command.params['parent'] = parent unless parent.nil?
1234
+ command.query['specId'] = spec_id unless spec_id.nil?
1235
+ command.query['fields'] = fields unless fields.nil?
1236
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1237
+ execute_or_queue_command(command, &block)
1238
+ end
1239
+
1240
+ # Delete a spec. Deleting a spec will also delete the associated operations from
1241
+ # the version.
1242
+ # @param [String] name
1243
+ # Required. The name of the spec to delete. Format: `projects/`project`/
1244
+ # locations/`location`/apis/`api`/versions/`version`/specs/`spec``
1245
+ # @param [String] fields
1246
+ # Selector specifying which fields to include in a partial response.
1247
+ # @param [String] quota_user
1248
+ # Available to use for quota purposes for server-side applications. Can be any
1249
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1250
+ # @param [Google::Apis::RequestOptions] options
1251
+ # Request-specific options
1252
+ #
1253
+ # @yield [result, err] Result & error if block supplied
1254
+ # @yieldparam result [Google::Apis::ApihubV1::Empty] parsed result object
1255
+ # @yieldparam err [StandardError] error object if request failed
1256
+ #
1257
+ # @return [Google::Apis::ApihubV1::Empty]
1258
+ #
1259
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1260
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1261
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1262
+ def delete_project_location_api_version_spec(name, fields: nil, quota_user: nil, options: nil, &block)
1263
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1264
+ command.response_representation = Google::Apis::ApihubV1::Empty::Representation
1265
+ command.response_class = Google::Apis::ApihubV1::Empty
1266
+ command.params['name'] = name unless name.nil?
1267
+ command.query['fields'] = fields unless fields.nil?
1268
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1269
+ execute_or_queue_command(command, &block)
1270
+ end
1271
+
1272
+ # Get details about the information parsed from a spec. Note that this method
1273
+ # does not return the raw spec contents. Use GetSpecContents method to retrieve
1274
+ # the same.
1275
+ # @param [String] name
1276
+ # Required. The name of the spec to retrieve. Format: `projects/`project`/
1277
+ # locations/`location`/apis/`api`/versions/`version`/specs/`spec``
1278
+ # @param [String] fields
1279
+ # Selector specifying which fields to include in a partial response.
1280
+ # @param [String] quota_user
1281
+ # Available to use for quota purposes for server-side applications. Can be any
1282
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1283
+ # @param [Google::Apis::RequestOptions] options
1284
+ # Request-specific options
1285
+ #
1286
+ # @yield [result, err] Result & error if block supplied
1287
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Spec] parsed result object
1288
+ # @yieldparam err [StandardError] error object if request failed
1289
+ #
1290
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Spec]
1291
+ #
1292
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1293
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1294
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1295
+ def get_project_location_api_version_spec(name, fields: nil, quota_user: nil, options: nil, &block)
1296
+ command = make_simple_command(:get, 'v1/{+name}', options)
1297
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Spec::Representation
1298
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Spec
1299
+ command.params['name'] = name unless name.nil?
1300
+ command.query['fields'] = fields unless fields.nil?
1301
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1302
+ execute_or_queue_command(command, &block)
1303
+ end
1304
+
1305
+ # Get spec contents.
1306
+ # @param [String] name
1307
+ # Required. The name of the spec whose contents need to be retrieved. Format: `
1308
+ # projects/`project`/locations/`location`/apis/`api`/versions/`version`/specs/`
1309
+ # spec``
1310
+ # @param [String] fields
1311
+ # Selector specifying which fields to include in a partial response.
1312
+ # @param [String] quota_user
1313
+ # Available to use for quota purposes for server-side applications. Can be any
1314
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1315
+ # @param [Google::Apis::RequestOptions] options
1316
+ # Request-specific options
1317
+ #
1318
+ # @yield [result, err] Result & error if block supplied
1319
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1SpecContents] parsed result object
1320
+ # @yieldparam err [StandardError] error object if request failed
1321
+ #
1322
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1SpecContents]
1323
+ #
1324
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1325
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1326
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1327
+ def get_project_location_api_version_spec_contents(name, fields: nil, quota_user: nil, options: nil, &block)
1328
+ command = make_simple_command(:get, 'v1/{+name}:contents', options)
1329
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1SpecContents::Representation
1330
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1SpecContents
1331
+ command.params['name'] = name unless name.nil?
1332
+ command.query['fields'] = fields unless fields.nil?
1333
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1334
+ execute_or_queue_command(command, &block)
1335
+ end
1336
+
1337
+ # Lints the requested spec and updates the corresponding API Spec with the lint
1338
+ # response. This lint response will be available in all subsequent Get and List
1339
+ # Spec calls to Core service.
1340
+ # @param [String] name
1341
+ # Required. The name of the spec to be linted. Format: `projects/`project`/
1342
+ # locations/`location`/apis/`api`/versions/`version`/specs/`spec``
1343
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1LintSpecRequest] google_cloud_apihub_v1_lint_spec_request_object
1344
+ # @param [String] fields
1345
+ # Selector specifying which fields to include in a partial response.
1346
+ # @param [String] quota_user
1347
+ # Available to use for quota purposes for server-side applications. Can be any
1348
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1349
+ # @param [Google::Apis::RequestOptions] options
1350
+ # Request-specific options
1351
+ #
1352
+ # @yield [result, err] Result & error if block supplied
1353
+ # @yieldparam result [Google::Apis::ApihubV1::Empty] parsed result object
1354
+ # @yieldparam err [StandardError] error object if request failed
1355
+ #
1356
+ # @return [Google::Apis::ApihubV1::Empty]
1357
+ #
1358
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1359
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1360
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1361
+ def lint_project_location_api_version_spec(name, google_cloud_apihub_v1_lint_spec_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1362
+ command = make_simple_command(:post, 'v1/{+name}:lint', options)
1363
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1LintSpecRequest::Representation
1364
+ command.request_object = google_cloud_apihub_v1_lint_spec_request_object
1365
+ command.response_representation = Google::Apis::ApihubV1::Empty::Representation
1366
+ command.response_class = Google::Apis::ApihubV1::Empty
1367
+ command.params['name'] = name unless name.nil?
1368
+ command.query['fields'] = fields unless fields.nil?
1369
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1370
+ execute_or_queue_command(command, &block)
1371
+ end
1372
+
1373
+ # List specs corresponding to a particular API resource.
1374
+ # @param [String] parent
1375
+ # Required. The parent, which owns this collection of specs. Format: `projects/`
1376
+ # project`/locations/`location`/apis/`api`/versions/`version``
1377
+ # @param [String] filter
1378
+ # Optional. An expression that filters the list of Specs. A filter expression
1379
+ # consists of a field name, a comparison operator, and a value for filtering.
1380
+ # The value must be a string. The comparison operator must be one of: `<`, `>`, `
1381
+ # :` or `=`. Filters are not case sensitive. The following fields in the `Spec`
1382
+ # are eligible for filtering: * `display_name` - The display name of the Spec.
1383
+ # Allowed comparison operators: `=`. * `create_time` - The time at which the
1384
+ # Spec was created. The value should be in the (RFC3339)[https://tools.ietf.org/
1385
+ # html/rfc3339] format. Allowed comparison operators: `>` and `<`. * `spec_type.
1386
+ # enum_values.values.id` - The allowed value id of the spec_type attribute
1387
+ # associated with the Spec. Allowed comparison operators: `:`. * `spec_type.
1388
+ # enum_values.values.display_name` - The allowed value display name of the
1389
+ # spec_type attribute associated with the Spec. Allowed comparison operators: `:`
1390
+ # . * `lint_response.json_values.values` - The json value of the lint_response
1391
+ # attribute associated with the Spec. Allowed comparison operators: `:`. * `
1392
+ # mime_type` - The MIME type of the Spec. Allowed comparison operators: `=`. * `
1393
+ # attributes.projects/test-project-id/locations/test-location-id/ attributes/
1394
+ # user-defined-attribute-id.enum_values.values.id` - The allowed value id of the
1395
+ # user defined enum attribute associated with the Resource. Allowed comparison
1396
+ # operator is `:`. Here user-defined-attribute-enum-id is a placeholder that can
1397
+ # be replaced with any user defined enum attribute name. * `attributes.projects/
1398
+ # test-project-id/locations/test-location-id/ attributes/user-defined-attribute-
1399
+ # id.enum_values.values.display_name` - The allowed value display name of the
1400
+ # user defined enum attribute associated with the Resource. Allowed comparison
1401
+ # operator is `:`. Here user-defined-attribute-enum-display-name is a
1402
+ # placeholder that can be replaced with any user defined enum attribute enum
1403
+ # name. * `attributes.projects/test-project-id/locations/test-location-id/
1404
+ # attributes/user-defined-attribute-id.string_values.values` - The allowed value
1405
+ # of the user defined string attribute associated with the Resource. Allowed
1406
+ # comparison operator is `:`. Here user-defined-attribute-string is a
1407
+ # placeholder that can be replaced with any user defined string attribute name. *
1408
+ # `attributes.projects/test-project-id/locations/test-location-id/ attributes/
1409
+ # user-defined-attribute-id.json_values.values` - The allowed value of the user
1410
+ # defined JSON attribute associated with the Resource. Allowed comparison
1411
+ # operator is `:`. Here user-defined-attribute-json is a placeholder that can be
1412
+ # replaced with any user defined JSON attribute name. Expressions are combined
1413
+ # with either `AND` logic operator or `OR` logical operator but not both of them
1414
+ # together i.e. only one of the `AND` or `OR` operator can be used throughout
1415
+ # the filter string and both the operators cannot be used together. No other
1416
+ # logical operators are supported. At most three filter fields are allowed in
1417
+ # the filter string and if provided more than that then `INVALID_ARGUMENT` error
1418
+ # is returned by the API. Here are a few examples: * `spec_type.enum_values.
1419
+ # values.id: rest-id` - The filter string specifies that the id of the allowed
1420
+ # value associated with the spec_type attribute is _rest-id_. * `spec_type.
1421
+ # enum_values.values.display_name: \"Rest Display Name\"` - The filter string
1422
+ # specifies that the display name of the allowed value associated with the
1423
+ # spec_type attribute is `Rest Display Name`. * `spec_type.enum_values.values.id:
1424
+ # grpc-id AND create_time < \"2021-08-15T14:50:00Z\" AND create_time > \"2021-
1425
+ # 08-10T12:00:00Z\"` - The id of the allowed value associated with the spec_type
1426
+ # attribute is _grpc-id_ and the spec was created before _2021-08-15 14:50:00
1427
+ # UTC_ and after _2021-08-10 12:00:00 UTC_. * `spec_type.enum_values.values.id:
1428
+ # rest-id OR spec_type.enum_values.values.id: grpc-id` - The id of the allowed
1429
+ # value associated with the spec_type attribute is _rest-id_ or _grpc-id_. * `
1430
+ # spec_type.enum_values.values.id: rest-id AND attributes.projects/test-project-
1431
+ # id/locations/test-location-id/ attributes/17650f90-4a29-4971-b3c0-d5532da3764b.
1432
+ # enum_values.values.id: test` - The filter string specifies that the id of the
1433
+ # allowed value associated with the spec_type attribute is _rest-id_ and the id
1434
+ # of the allowed value associated with the user defined attribute of type enum
1435
+ # is _test_.
1436
+ # @param [Fixnum] page_size
1437
+ # Optional. The maximum number of specs to return. The service may return fewer
1438
+ # than this value. If unspecified, at most 50 specs will be returned. The
1439
+ # maximum value is 1000; values above 1000 will be coerced to 1000.
1440
+ # @param [String] page_token
1441
+ # Optional. A page token, received from a previous `ListSpecs` call. Provide
1442
+ # this to retrieve the subsequent page. When paginating, all other parameters
1443
+ # provided to `ListSpecs` must match the call that provided the page token.
1444
+ # @param [String] fields
1445
+ # Selector specifying which fields to include in a partial response.
1446
+ # @param [String] quota_user
1447
+ # Available to use for quota purposes for server-side applications. Can be any
1448
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1449
+ # @param [Google::Apis::RequestOptions] options
1450
+ # Request-specific options
1451
+ #
1452
+ # @yield [result, err] Result & error if block supplied
1453
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ListSpecsResponse] parsed result object
1454
+ # @yieldparam err [StandardError] error object if request failed
1455
+ #
1456
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ListSpecsResponse]
1457
+ #
1458
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1459
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1460
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1461
+ def list_project_location_api_version_specs(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1462
+ command = make_simple_command(:get, 'v1/{+parent}/specs', options)
1463
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ListSpecsResponse::Representation
1464
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ListSpecsResponse
1465
+ command.params['parent'] = parent unless parent.nil?
1466
+ command.query['filter'] = filter unless filter.nil?
1467
+ command.query['pageSize'] = page_size unless page_size.nil?
1468
+ command.query['pageToken'] = page_token unless page_token.nil?
1469
+ command.query['fields'] = fields unless fields.nil?
1470
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1471
+ execute_or_queue_command(command, &block)
1472
+ end
1473
+
1474
+ # Update spec. The following fields in the spec can be updated: * display_name *
1475
+ # source_uri * lint_response * attributes * contents * spec_type In case of an
1476
+ # OAS spec, updating spec contents can lead to: 1. Creation, deletion and update
1477
+ # of operations. 2. Creation, deletion and update of definitions. 3. Update of
1478
+ # other info parsed out from the new spec. In case of contents or source_uri
1479
+ # being present in update mask, spec_type must also be present. Also, spec_type
1480
+ # can not be present in update mask if contents or source_uri is not present.
1481
+ # The update_mask should be used to specify the fields being updated.
1482
+ # @param [String] name
1483
+ # Identifier. The name of the spec. Format: `projects/`project`/locations/`
1484
+ # location`/apis/`api`/versions/`version`/specs/`spec``
1485
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1Spec] google_cloud_apihub_v1_spec_object
1486
+ # @param [String] update_mask
1487
+ # Required. The list of fields to update.
1488
+ # @param [String] fields
1489
+ # Selector specifying which fields to include in a partial response.
1490
+ # @param [String] quota_user
1491
+ # Available to use for quota purposes for server-side applications. Can be any
1492
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1493
+ # @param [Google::Apis::RequestOptions] options
1494
+ # Request-specific options
1495
+ #
1496
+ # @yield [result, err] Result & error if block supplied
1497
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Spec] parsed result object
1498
+ # @yieldparam err [StandardError] error object if request failed
1499
+ #
1500
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Spec]
1501
+ #
1502
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1503
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1504
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1505
+ def patch_project_location_api_version_spec(name, google_cloud_apihub_v1_spec_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1506
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1507
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Spec::Representation
1508
+ command.request_object = google_cloud_apihub_v1_spec_object
1509
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Spec::Representation
1510
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Spec
1511
+ command.params['name'] = name unless name.nil?
1512
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1513
+ command.query['fields'] = fields unless fields.nil?
1514
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1515
+ execute_or_queue_command(command, &block)
1516
+ end
1517
+
1518
+ # Create a user defined attribute. Certain pre defined attributes are already
1519
+ # created by the API hub. These attributes will have type as `SYSTEM_DEFINED`
1520
+ # and can be listed via ListAttributes method. Allowed values for the same can
1521
+ # be updated via UpdateAttribute method.
1522
+ # @param [String] parent
1523
+ # Required. The parent resource for Attribute. Format: `projects/`project`/
1524
+ # locations/`location``
1525
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute] google_cloud_apihub_v1_attribute_object
1526
+ # @param [String] attribute_id
1527
+ # Optional. The ID to use for the attribute, which will become the final
1528
+ # component of the attribute's resource name. This field is optional. * If
1529
+ # provided, the same will be used. The service will throw an error if the
1530
+ # specified id is already used by another attribute resource in the API hub. *
1531
+ # If not provided, a system generated id will be used. This value should be 4-
1532
+ # 500 characters, and valid characters are /a-z[0-9]-_/.
1533
+ # @param [String] fields
1534
+ # Selector specifying which fields to include in a partial response.
1535
+ # @param [String] quota_user
1536
+ # Available to use for quota purposes for server-side applications. Can be any
1537
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1538
+ # @param [Google::Apis::RequestOptions] options
1539
+ # Request-specific options
1540
+ #
1541
+ # @yield [result, err] Result & error if block supplied
1542
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute] parsed result object
1543
+ # @yieldparam err [StandardError] error object if request failed
1544
+ #
1545
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute]
1546
+ #
1547
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1548
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1549
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1550
+ def create_project_location_attribute(parent, google_cloud_apihub_v1_attribute_object = nil, attribute_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1551
+ command = make_simple_command(:post, 'v1/{+parent}/attributes', options)
1552
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute::Representation
1553
+ command.request_object = google_cloud_apihub_v1_attribute_object
1554
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute::Representation
1555
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute
1556
+ command.params['parent'] = parent unless parent.nil?
1557
+ command.query['attributeId'] = attribute_id unless attribute_id.nil?
1558
+ command.query['fields'] = fields unless fields.nil?
1559
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1560
+ execute_or_queue_command(command, &block)
1561
+ end
1562
+
1563
+ # Delete an attribute. Note: System defined attributes cannot be deleted. All
1564
+ # associations of the attribute being deleted with any API hub resource will
1565
+ # also get deleted.
1566
+ # @param [String] name
1567
+ # Required. The name of the attribute to delete. Format: `projects/`project`/
1568
+ # locations/`location`/attributes/`attribute``
1569
+ # @param [String] fields
1570
+ # Selector specifying which fields to include in a partial response.
1571
+ # @param [String] quota_user
1572
+ # Available to use for quota purposes for server-side applications. Can be any
1573
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1574
+ # @param [Google::Apis::RequestOptions] options
1575
+ # Request-specific options
1576
+ #
1577
+ # @yield [result, err] Result & error if block supplied
1578
+ # @yieldparam result [Google::Apis::ApihubV1::Empty] parsed result object
1579
+ # @yieldparam err [StandardError] error object if request failed
1580
+ #
1581
+ # @return [Google::Apis::ApihubV1::Empty]
1582
+ #
1583
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1584
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1585
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1586
+ def delete_project_location_attribute(name, fields: nil, quota_user: nil, options: nil, &block)
1587
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1588
+ command.response_representation = Google::Apis::ApihubV1::Empty::Representation
1589
+ command.response_class = Google::Apis::ApihubV1::Empty
1590
+ command.params['name'] = name unless name.nil?
1591
+ command.query['fields'] = fields unless fields.nil?
1592
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1593
+ execute_or_queue_command(command, &block)
1594
+ end
1595
+
1596
+ # Get details about the attribute.
1597
+ # @param [String] name
1598
+ # Required. The name of the attribute to retrieve. Format: `projects/`project`/
1599
+ # locations/`location`/attributes/`attribute``
1600
+ # @param [String] fields
1601
+ # Selector specifying which fields to include in a partial response.
1602
+ # @param [String] quota_user
1603
+ # Available to use for quota purposes for server-side applications. Can be any
1604
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1605
+ # @param [Google::Apis::RequestOptions] options
1606
+ # Request-specific options
1607
+ #
1608
+ # @yield [result, err] Result & error if block supplied
1609
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute] parsed result object
1610
+ # @yieldparam err [StandardError] error object if request failed
1611
+ #
1612
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute]
1613
+ #
1614
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1615
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1616
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1617
+ def get_project_location_attribute(name, fields: nil, quota_user: nil, options: nil, &block)
1618
+ command = make_simple_command(:get, 'v1/{+name}', options)
1619
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute::Representation
1620
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute
1621
+ command.params['name'] = name unless name.nil?
1622
+ command.query['fields'] = fields unless fields.nil?
1623
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1624
+ execute_or_queue_command(command, &block)
1625
+ end
1626
+
1627
+ # List all attributes.
1628
+ # @param [String] parent
1629
+ # Required. The parent resource for Attribute. Format: `projects/`project`/
1630
+ # locations/`location``
1631
+ # @param [String] filter
1632
+ # Optional. An expression that filters the list of Attributes. A filter
1633
+ # expression consists of a field name, a comparison operator, and a value for
1634
+ # filtering. The value must be a string or a boolean. The comparison operator
1635
+ # must be one of: `<`, `>` or `=`. Filters are not case sensitive. The following
1636
+ # fields in the `Attribute` are eligible for filtering: * `display_name` - The
1637
+ # display name of the Attribute. Allowed comparison operators: `=`. * `
1638
+ # definition_type` - The definition type of the attribute. Allowed comparison
1639
+ # operators: `=`. * `scope` - The scope of the attribute. Allowed comparison
1640
+ # operators: `=`. * `data_type` - The type of the data of the attribute. Allowed
1641
+ # comparison operators: `=`. * `mandatory` - Denotes whether the attribute is
1642
+ # mandatory or not. Allowed comparison operators: `=`. * `create_time` - The
1643
+ # time at which the Attribute was created. The value should be in the (RFC3339)[
1644
+ # https://tools.ietf.org/html/rfc3339] format. Allowed comparison operators: `>`
1645
+ # and `<`. Expressions are combined with either `AND` logic operator or `OR`
1646
+ # logical operator but not both of them together i.e. only one of the `AND` or `
1647
+ # OR` operator can be used throughout the filter string and both the operators
1648
+ # cannot be used together. No other logical operators are supported. At most
1649
+ # three filter fields are allowed in the filter string and if provided more than
1650
+ # that then `INVALID_ARGUMENT` error is returned by the API. Here are a few
1651
+ # examples: * `display_name = production` - - The display name of the attribute
1652
+ # is _production_. * `(display_name = production) AND (create_time < \"2021-08-
1653
+ # 15T14:50:00Z\") AND (create_time > \"2021-08-10T12:00:00Z\")` - The display
1654
+ # name of the attribute is _production_ and the attribute was created before
1655
+ # _2021-08-15 14:50:00 UTC_ and after _2021-08-10 12:00:00 UTC_. * `display_name
1656
+ # = production OR scope = api` - The attribute where the display name is
1657
+ # _production_ or the scope is _api_.
1658
+ # @param [Fixnum] page_size
1659
+ # Optional. The maximum number of attribute resources to return. The service may
1660
+ # return fewer than this value. If unspecified, at most 50 attributes will be
1661
+ # returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
1662
+ # @param [String] page_token
1663
+ # Optional. A page token, received from a previous `ListAttributes` call.
1664
+ # Provide this to retrieve the subsequent page. When paginating, all other
1665
+ # parameters provided to `ListAttributes` must match the call that provided the
1666
+ # page token.
1667
+ # @param [String] fields
1668
+ # Selector specifying which fields to include in a partial response.
1669
+ # @param [String] quota_user
1670
+ # Available to use for quota purposes for server-side applications. Can be any
1671
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1672
+ # @param [Google::Apis::RequestOptions] options
1673
+ # Request-specific options
1674
+ #
1675
+ # @yield [result, err] Result & error if block supplied
1676
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ListAttributesResponse] parsed result object
1677
+ # @yieldparam err [StandardError] error object if request failed
1678
+ #
1679
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ListAttributesResponse]
1680
+ #
1681
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1682
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1683
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1684
+ def list_project_location_attributes(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1685
+ command = make_simple_command(:get, 'v1/{+parent}/attributes', options)
1686
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ListAttributesResponse::Representation
1687
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ListAttributesResponse
1688
+ command.params['parent'] = parent unless parent.nil?
1689
+ command.query['filter'] = filter unless filter.nil?
1690
+ command.query['pageSize'] = page_size unless page_size.nil?
1691
+ command.query['pageToken'] = page_token unless page_token.nil?
1692
+ command.query['fields'] = fields unless fields.nil?
1693
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1694
+ execute_or_queue_command(command, &block)
1695
+ end
1696
+
1697
+ # Update the attribute. The following fields in the Attribute resource can be
1698
+ # updated: * display_name The display name can be updated for user defined
1699
+ # attributes only. * description The description can be updated for user defined
1700
+ # attributes only. * allowed_values To update the list of allowed values,
1701
+ # clients need to use the fetched list of allowed values and add or remove
1702
+ # values to or from the same list. The mutable allowed values can be updated for
1703
+ # both user defined and System defined attributes. The immutable allowed values
1704
+ # cannot be updated or deleted. The updated list of allowed values cannot be
1705
+ # empty. If an allowed value that is already used by some resource's attribute
1706
+ # is deleted, then the association between the resource and the attribute value
1707
+ # will also be deleted. * cardinality The cardinality can be updated for user
1708
+ # defined attributes only. Cardinality can only be increased during an update.
1709
+ # The update_mask should be used to specify the fields being updated.
1710
+ # @param [String] name
1711
+ # Identifier. The name of the attribute in the API Hub. Format: `projects/`
1712
+ # project`/locations/`location`/attributes/`attribute``
1713
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute] google_cloud_apihub_v1_attribute_object
1714
+ # @param [String] update_mask
1715
+ # Required. The list of fields to update.
1716
+ # @param [String] fields
1717
+ # Selector specifying which fields to include in a partial response.
1718
+ # @param [String] quota_user
1719
+ # Available to use for quota purposes for server-side applications. Can be any
1720
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1721
+ # @param [Google::Apis::RequestOptions] options
1722
+ # Request-specific options
1723
+ #
1724
+ # @yield [result, err] Result & error if block supplied
1725
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute] parsed result object
1726
+ # @yieldparam err [StandardError] error object if request failed
1727
+ #
1728
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute]
1729
+ #
1730
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1731
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1732
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1733
+ def patch_project_location_attribute(name, google_cloud_apihub_v1_attribute_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1734
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1735
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute::Representation
1736
+ command.request_object = google_cloud_apihub_v1_attribute_object
1737
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute::Representation
1738
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute
1739
+ command.params['name'] = name unless name.nil?
1740
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1741
+ command.query['fields'] = fields unless fields.nil?
1742
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1743
+ execute_or_queue_command(command, &block)
1744
+ end
1745
+
1746
+ # Create a curation resource in the API hub. Once a curation resource is created,
1747
+ # plugin instances can start using it.
1748
+ # @param [String] parent
1749
+ # Required. The parent resource for the curation resource. Format: `projects/`
1750
+ # project`/locations/`location``
1751
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1Curation] google_cloud_apihub_v1_curation_object
1752
+ # @param [String] curation_id
1753
+ # Optional. The ID to use for the curation resource, which will become the final
1754
+ # component of the curations's resource name. This field is optional. * If
1755
+ # provided, the same will be used. The service will throw an error if the
1756
+ # specified ID is already used by another curation resource in the API hub. * If
1757
+ # not provided, a system generated ID will be used. This value should be 4-500
1758
+ # characters, and valid characters are /a-z[0-9]-_/.
1759
+ # @param [String] fields
1760
+ # Selector specifying which fields to include in a partial response.
1761
+ # @param [String] quota_user
1762
+ # Available to use for quota purposes for server-side applications. Can be any
1763
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1764
+ # @param [Google::Apis::RequestOptions] options
1765
+ # Request-specific options
1766
+ #
1767
+ # @yield [result, err] Result & error if block supplied
1768
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Curation] parsed result object
1769
+ # @yieldparam err [StandardError] error object if request failed
1770
+ #
1771
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Curation]
1772
+ #
1773
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1774
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1775
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1776
+ def create_project_location_curation(parent, google_cloud_apihub_v1_curation_object = nil, curation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1777
+ command = make_simple_command(:post, 'v1/{+parent}/curations', options)
1778
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Curation::Representation
1779
+ command.request_object = google_cloud_apihub_v1_curation_object
1780
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Curation::Representation
1781
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Curation
1782
+ command.params['parent'] = parent unless parent.nil?
1783
+ command.query['curationId'] = curation_id unless curation_id.nil?
1784
+ command.query['fields'] = fields unless fields.nil?
1785
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1786
+ execute_or_queue_command(command, &block)
1787
+ end
1788
+
1789
+ # Delete a curation resource in the API hub. A curation can only be deleted if
1790
+ # it's not being used by any plugin instance.
1791
+ # @param [String] name
1792
+ # Required. The name of the curation resource to delete. Format: `projects/`
1793
+ # project`/locations/`location`/curations/`curation``
1794
+ # @param [String] fields
1795
+ # Selector specifying which fields to include in a partial response.
1796
+ # @param [String] quota_user
1797
+ # Available to use for quota purposes for server-side applications. Can be any
1798
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1799
+ # @param [Google::Apis::RequestOptions] options
1800
+ # Request-specific options
1801
+ #
1802
+ # @yield [result, err] Result & error if block supplied
1803
+ # @yieldparam result [Google::Apis::ApihubV1::Empty] parsed result object
1804
+ # @yieldparam err [StandardError] error object if request failed
1805
+ #
1806
+ # @return [Google::Apis::ApihubV1::Empty]
1807
+ #
1808
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1809
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1810
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1811
+ def delete_project_location_curation(name, fields: nil, quota_user: nil, options: nil, &block)
1812
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1813
+ command.response_representation = Google::Apis::ApihubV1::Empty::Representation
1814
+ command.response_class = Google::Apis::ApihubV1::Empty
1815
+ command.params['name'] = name unless name.nil?
1816
+ command.query['fields'] = fields unless fields.nil?
1817
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1818
+ execute_or_queue_command(command, &block)
1819
+ end
1820
+
1821
+ # Get curation resource details.
1822
+ # @param [String] name
1823
+ # Required. The name of the curation resource to retrieve. Format: `projects/`
1824
+ # project`/locations/`location`/curations/`curation``
1825
+ # @param [String] fields
1826
+ # Selector specifying which fields to include in a partial response.
1827
+ # @param [String] quota_user
1828
+ # Available to use for quota purposes for server-side applications. Can be any
1829
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1830
+ # @param [Google::Apis::RequestOptions] options
1831
+ # Request-specific options
1832
+ #
1833
+ # @yield [result, err] Result & error if block supplied
1834
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Curation] parsed result object
1835
+ # @yieldparam err [StandardError] error object if request failed
1836
+ #
1837
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Curation]
1838
+ #
1839
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1840
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1841
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1842
+ def get_project_location_curation(name, fields: nil, quota_user: nil, options: nil, &block)
1843
+ command = make_simple_command(:get, 'v1/{+name}', options)
1844
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Curation::Representation
1845
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Curation
1846
+ command.params['name'] = name unless name.nil?
1847
+ command.query['fields'] = fields unless fields.nil?
1848
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1849
+ execute_or_queue_command(command, &block)
1850
+ end
1851
+
1852
+ # List curation resources in the API hub.
1853
+ # @param [String] parent
1854
+ # Required. The parent, which owns this collection of curation resources. Format:
1855
+ # `projects/`project`/locations/`location``
1856
+ # @param [String] filter
1857
+ # Optional. An expression that filters the list of curation resources. A filter
1858
+ # expression consists of a field name, a comparison operator, and a value for
1859
+ # filtering. The value must be a string. The comparison operator must be one of:
1860
+ # `<`, `>`, `:` or `=`. Filters are case insensitive. The following fields in
1861
+ # the `curation resource` are eligible for filtering: * `create_time` - The time
1862
+ # at which the curation was created. The value should be in the (RFC3339)[https:/
1863
+ # /tools.ietf.org/html/rfc3339] format. Allowed comparison operators: `>` and `<`
1864
+ # . * `display_name` - The display name of the curation. Allowed comparison
1865
+ # operators: `=`. * `state` - The state of the curation. Allowed comparison
1866
+ # operators: `=`. Expressions are combined with either `AND` logic operator or `
1867
+ # OR` logical operator but not both of them together i.e. only one of the `AND`
1868
+ # or `OR` operator can be used throughout the filter string and both the
1869
+ # operators cannot be used together. No other logical operators are supported.
1870
+ # At most three filter fields are allowed in the filter string and if provided
1871
+ # more than that then `INVALID_ARGUMENT` error is returned by the API. Here are
1872
+ # a few examples: * `create_time < \"2021-08-15T14:50:00Z\" AND create_time > \"
1873
+ # 2021-08-10T12:00:00Z\"` - The curation resource was created before _2021-08-15
1874
+ # 14:50:00 UTC_ and after _2021-08-10 12:00:00 UTC_.
1875
+ # @param [Fixnum] page_size
1876
+ # Optional. The maximum number of curation resources to return. The service may
1877
+ # return fewer than this value. If unspecified, at most 50 curations will be
1878
+ # returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
1879
+ # @param [String] page_token
1880
+ # Optional. A page token, received from a previous `ListCurations` call. Provide
1881
+ # this to retrieve the subsequent page. When paginating, all other parameters (
1882
+ # except page_size) provided to `ListCurations` must match the call that
1883
+ # provided the page token.
1884
+ # @param [String] fields
1885
+ # Selector specifying which fields to include in a partial response.
1886
+ # @param [String] quota_user
1887
+ # Available to use for quota purposes for server-side applications. Can be any
1888
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1889
+ # @param [Google::Apis::RequestOptions] options
1890
+ # Request-specific options
1891
+ #
1892
+ # @yield [result, err] Result & error if block supplied
1893
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ListCurationsResponse] parsed result object
1894
+ # @yieldparam err [StandardError] error object if request failed
1895
+ #
1896
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ListCurationsResponse]
1897
+ #
1898
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1899
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1900
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1901
+ def list_project_location_curations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1902
+ command = make_simple_command(:get, 'v1/{+parent}/curations', options)
1903
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ListCurationsResponse::Representation
1904
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ListCurationsResponse
1905
+ command.params['parent'] = parent unless parent.nil?
1906
+ command.query['filter'] = filter unless filter.nil?
1907
+ command.query['pageSize'] = page_size unless page_size.nil?
1908
+ command.query['pageToken'] = page_token unless page_token.nil?
1909
+ command.query['fields'] = fields unless fields.nil?
1910
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1911
+ execute_or_queue_command(command, &block)
1912
+ end
1913
+
1914
+ # Update a curation resource in the API hub. The following fields in the
1915
+ # curation can be updated: * display_name * description The update_mask should
1916
+ # be used to specify the fields being updated.
1917
+ # @param [String] name
1918
+ # Identifier. The name of the curation. Format: `projects/`project`/locations/`
1919
+ # location`/curations/`curation``
1920
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1Curation] google_cloud_apihub_v1_curation_object
1921
+ # @param [String] update_mask
1922
+ # Optional. The list of fields to update.
1923
+ # @param [String] fields
1924
+ # Selector specifying which fields to include in a partial response.
1925
+ # @param [String] quota_user
1926
+ # Available to use for quota purposes for server-side applications. Can be any
1927
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1928
+ # @param [Google::Apis::RequestOptions] options
1929
+ # Request-specific options
1930
+ #
1931
+ # @yield [result, err] Result & error if block supplied
1932
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Curation] parsed result object
1933
+ # @yieldparam err [StandardError] error object if request failed
1934
+ #
1935
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Curation]
1936
+ #
1937
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1938
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1939
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1940
+ def patch_project_location_curation(name, google_cloud_apihub_v1_curation_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1941
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1942
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Curation::Representation
1943
+ command.request_object = google_cloud_apihub_v1_curation_object
1944
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Curation::Representation
1945
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Curation
1946
+ command.params['name'] = name unless name.nil?
1947
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1948
+ command.query['fields'] = fields unless fields.nil?
1949
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1950
+ execute_or_queue_command(command, &block)
1951
+ end
1952
+
1953
+ # Create a dependency between two entities in the API hub.
1954
+ # @param [String] parent
1955
+ # Required. The parent resource for the dependency resource. Format: `projects/`
1956
+ # project`/locations/`location``
1957
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency] google_cloud_apihub_v1_dependency_object
1958
+ # @param [String] dependency_id
1959
+ # Optional. The ID to use for the dependency resource, which will become the
1960
+ # final component of the dependency's resource name. This field is optional. *
1961
+ # If provided, the same will be used. The service will throw an error if
1962
+ # duplicate id is provided by the client. * If not provided, a system generated
1963
+ # id will be used. This value should be 4-500 characters, and valid characters
1964
+ # are `a-z[0-9]-_`.
1965
+ # @param [String] fields
1966
+ # Selector specifying which fields to include in a partial response.
1967
+ # @param [String] quota_user
1968
+ # Available to use for quota purposes for server-side applications. Can be any
1969
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1970
+ # @param [Google::Apis::RequestOptions] options
1971
+ # Request-specific options
1972
+ #
1973
+ # @yield [result, err] Result & error if block supplied
1974
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency] parsed result object
1975
+ # @yieldparam err [StandardError] error object if request failed
1976
+ #
1977
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency]
1978
+ #
1979
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1980
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1981
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1982
+ def create_project_location_dependency(parent, google_cloud_apihub_v1_dependency_object = nil, dependency_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1983
+ command = make_simple_command(:post, 'v1/{+parent}/dependencies', options)
1984
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency::Representation
1985
+ command.request_object = google_cloud_apihub_v1_dependency_object
1986
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency::Representation
1987
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency
1988
+ command.params['parent'] = parent unless parent.nil?
1989
+ command.query['dependencyId'] = dependency_id unless dependency_id.nil?
1990
+ command.query['fields'] = fields unless fields.nil?
1991
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1992
+ execute_or_queue_command(command, &block)
1993
+ end
1994
+
1995
+ # Delete the dependency resource.
1996
+ # @param [String] name
1997
+ # Required. The name of the dependency resource to delete. Format: `projects/`
1998
+ # project`/locations/`location`/dependencies/`dependency``
1999
+ # @param [String] fields
2000
+ # Selector specifying which fields to include in a partial response.
2001
+ # @param [String] quota_user
2002
+ # Available to use for quota purposes for server-side applications. Can be any
2003
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2004
+ # @param [Google::Apis::RequestOptions] options
2005
+ # Request-specific options
2006
+ #
2007
+ # @yield [result, err] Result & error if block supplied
2008
+ # @yieldparam result [Google::Apis::ApihubV1::Empty] parsed result object
2009
+ # @yieldparam err [StandardError] error object if request failed
2010
+ #
2011
+ # @return [Google::Apis::ApihubV1::Empty]
2012
+ #
2013
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2014
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2015
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2016
+ def delete_project_location_dependency(name, fields: nil, quota_user: nil, options: nil, &block)
2017
+ command = make_simple_command(:delete, 'v1/{+name}', options)
2018
+ command.response_representation = Google::Apis::ApihubV1::Empty::Representation
2019
+ command.response_class = Google::Apis::ApihubV1::Empty
2020
+ command.params['name'] = name unless name.nil?
2021
+ command.query['fields'] = fields unless fields.nil?
2022
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2023
+ execute_or_queue_command(command, &block)
2024
+ end
2025
+
2026
+ # Get details about a dependency resource in the API hub.
2027
+ # @param [String] name
2028
+ # Required. The name of the dependency resource to retrieve. Format: `projects/`
2029
+ # project`/locations/`location`/dependencies/`dependency``
2030
+ # @param [String] fields
2031
+ # Selector specifying which fields to include in a partial response.
2032
+ # @param [String] quota_user
2033
+ # Available to use for quota purposes for server-side applications. Can be any
2034
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2035
+ # @param [Google::Apis::RequestOptions] options
2036
+ # Request-specific options
2037
+ #
2038
+ # @yield [result, err] Result & error if block supplied
2039
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency] parsed result object
2040
+ # @yieldparam err [StandardError] error object if request failed
2041
+ #
2042
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency]
2043
+ #
2044
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2045
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2046
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2047
+ def get_project_location_dependency(name, fields: nil, quota_user: nil, options: nil, &block)
2048
+ command = make_simple_command(:get, 'v1/{+name}', options)
2049
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency::Representation
2050
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency
2051
+ command.params['name'] = name unless name.nil?
2052
+ command.query['fields'] = fields unless fields.nil?
2053
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2054
+ execute_or_queue_command(command, &block)
2055
+ end
2056
+
2057
+ # List dependencies based on the provided filter and pagination parameters.
2058
+ # @param [String] parent
2059
+ # Required. The parent which owns this collection of dependency resources.
2060
+ # Format: `projects/`project`/locations/`location``
2061
+ # @param [String] filter
2062
+ # Optional. An expression that filters the list of Dependencies. A filter
2063
+ # expression consists of a field name, a comparison operator, and a value for
2064
+ # filtering. The value must be a string. Allowed comparison operator is `=`.
2065
+ # Filters are not case sensitive. The following fields in the `Dependency` are
2066
+ # eligible for filtering: * `consumer.operation_resource_name` - The operation
2067
+ # resource name for the consumer entity involved in a dependency. Allowed
2068
+ # comparison operators: `=`. * `consumer.external_api_resource_name` - The
2069
+ # external api resource name for the consumer entity involved in a dependency.
2070
+ # Allowed comparison operators: `=`. * `supplier.operation_resource_name` - The
2071
+ # operation resource name for the supplier entity involved in a dependency.
2072
+ # Allowed comparison operators: `=`. * `supplier.external_api_resource_name` -
2073
+ # The external api resource name for the supplier entity involved in a
2074
+ # dependency. Allowed comparison operators: `=`. Expressions are combined with
2075
+ # either `AND` logic operator or `OR` logical operator but not both of them
2076
+ # together i.e. only one of the `AND` or `OR` operator can be used throughout
2077
+ # the filter string and both the operators cannot be used together. No other
2078
+ # logical operators are supported. At most three filter fields are allowed in
2079
+ # the filter string and if provided more than that then `INVALID_ARGUMENT` error
2080
+ # is returned by the API. For example, `consumer.operation_resource_name = \"
2081
+ # projects/p1/locations/global/apis/a1/versions/v1/operations/o1\" OR supplier.
2082
+ # operation_resource_name = \"projects/p1/locations/global/apis/a1/versions/v1/
2083
+ # operations/o1\"` - The dependencies with either consumer or supplier operation
2084
+ # resource name as _projects/p1/locations/global/apis/a1/versions/v1/operations/
2085
+ # o1_.
2086
+ # @param [Fixnum] page_size
2087
+ # Optional. The maximum number of dependency resources to return. The service
2088
+ # may return fewer than this value. If unspecified, at most 50 dependencies will
2089
+ # be returned. The maximum value is 1000; values above 1000 will be coerced to
2090
+ # 1000.
2091
+ # @param [String] page_token
2092
+ # Optional. A page token, received from a previous `ListDependencies` call.
2093
+ # Provide this to retrieve the subsequent page. When paginating, all other
2094
+ # parameters provided to `ListDependencies` must match the call that provided
2095
+ # the page token.
2096
+ # @param [String] fields
2097
+ # Selector specifying which fields to include in a partial response.
2098
+ # @param [String] quota_user
2099
+ # Available to use for quota purposes for server-side applications. Can be any
2100
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2101
+ # @param [Google::Apis::RequestOptions] options
2102
+ # Request-specific options
2103
+ #
2104
+ # @yield [result, err] Result & error if block supplied
2105
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ListDependenciesResponse] parsed result object
2106
+ # @yieldparam err [StandardError] error object if request failed
2107
+ #
2108
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ListDependenciesResponse]
2109
+ #
2110
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2111
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2112
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2113
+ def list_project_location_dependencies(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2114
+ command = make_simple_command(:get, 'v1/{+parent}/dependencies', options)
2115
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ListDependenciesResponse::Representation
2116
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ListDependenciesResponse
2117
+ command.params['parent'] = parent unless parent.nil?
2118
+ command.query['filter'] = filter unless filter.nil?
2119
+ command.query['pageSize'] = page_size unless page_size.nil?
2120
+ command.query['pageToken'] = page_token unless page_token.nil?
2121
+ command.query['fields'] = fields unless fields.nil?
2122
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2123
+ execute_or_queue_command(command, &block)
2124
+ end
2125
+
2126
+ # Update a dependency based on the update_mask provided in the request. The
2127
+ # following fields in the dependency can be updated: * description
2128
+ # @param [String] name
2129
+ # Identifier. The name of the dependency in the API Hub. Format: `projects/`
2130
+ # project`/locations/`location`/dependencies/`dependency``
2131
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency] google_cloud_apihub_v1_dependency_object
2132
+ # @param [String] update_mask
2133
+ # Required. The list of fields to update.
2134
+ # @param [String] fields
2135
+ # Selector specifying which fields to include in a partial response.
2136
+ # @param [String] quota_user
2137
+ # Available to use for quota purposes for server-side applications. Can be any
2138
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2139
+ # @param [Google::Apis::RequestOptions] options
2140
+ # Request-specific options
2141
+ #
2142
+ # @yield [result, err] Result & error if block supplied
2143
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency] parsed result object
2144
+ # @yieldparam err [StandardError] error object if request failed
2145
+ #
2146
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency]
2147
+ #
2148
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2149
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2150
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2151
+ def patch_project_location_dependency(name, google_cloud_apihub_v1_dependency_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2152
+ command = make_simple_command(:patch, 'v1/{+name}', options)
2153
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency::Representation
2154
+ command.request_object = google_cloud_apihub_v1_dependency_object
2155
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency::Representation
2156
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Dependency
2157
+ command.params['name'] = name unless name.nil?
2158
+ command.query['updateMask'] = update_mask unless update_mask.nil?
2159
+ command.query['fields'] = fields unless fields.nil?
2160
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2161
+ execute_or_queue_command(command, &block)
2162
+ end
2163
+
2164
+ # Create a deployment resource in the API hub. Once a deployment resource is
2165
+ # created, it can be associated with API versions.
2166
+ # @param [String] parent
2167
+ # Required. The parent resource for the deployment resource. Format: `projects/`
2168
+ # project`/locations/`location``
2169
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment] google_cloud_apihub_v1_deployment_object
2170
+ # @param [String] deployment_id
2171
+ # Optional. The ID to use for the deployment resource, which will become the
2172
+ # final component of the deployment's resource name. This field is optional. *
2173
+ # If provided, the same will be used. The service will throw an error if the
2174
+ # specified id is already used by another deployment resource in the API hub. *
2175
+ # If not provided, a system generated id will be used. This value should be 4-
2176
+ # 500 characters, and valid characters are /a-z[0-9]-_/.
2177
+ # @param [String] fields
2178
+ # Selector specifying which fields to include in a partial response.
2179
+ # @param [String] quota_user
2180
+ # Available to use for quota purposes for server-side applications. Can be any
2181
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2182
+ # @param [Google::Apis::RequestOptions] options
2183
+ # Request-specific options
2184
+ #
2185
+ # @yield [result, err] Result & error if block supplied
2186
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment] parsed result object
2187
+ # @yieldparam err [StandardError] error object if request failed
2188
+ #
2189
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment]
2190
+ #
2191
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2192
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2193
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2194
+ def create_project_location_deployment(parent, google_cloud_apihub_v1_deployment_object = nil, deployment_id: nil, fields: nil, quota_user: nil, options: nil, &block)
2195
+ command = make_simple_command(:post, 'v1/{+parent}/deployments', options)
2196
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment::Representation
2197
+ command.request_object = google_cloud_apihub_v1_deployment_object
2198
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment::Representation
2199
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment
2200
+ command.params['parent'] = parent unless parent.nil?
2201
+ command.query['deploymentId'] = deployment_id unless deployment_id.nil?
2202
+ command.query['fields'] = fields unless fields.nil?
2203
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2204
+ execute_or_queue_command(command, &block)
2205
+ end
2206
+
2207
+ # Delete a deployment resource in the API hub.
2208
+ # @param [String] name
2209
+ # Required. The name of the deployment resource to delete. Format: `projects/`
2210
+ # project`/locations/`location`/deployments/`deployment``
2211
+ # @param [String] fields
2212
+ # Selector specifying which fields to include in a partial response.
2213
+ # @param [String] quota_user
2214
+ # Available to use for quota purposes for server-side applications. Can be any
2215
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2216
+ # @param [Google::Apis::RequestOptions] options
2217
+ # Request-specific options
2218
+ #
2219
+ # @yield [result, err] Result & error if block supplied
2220
+ # @yieldparam result [Google::Apis::ApihubV1::Empty] parsed result object
2221
+ # @yieldparam err [StandardError] error object if request failed
2222
+ #
2223
+ # @return [Google::Apis::ApihubV1::Empty]
2224
+ #
2225
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2226
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2227
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2228
+ def delete_project_location_deployment(name, fields: nil, quota_user: nil, options: nil, &block)
2229
+ command = make_simple_command(:delete, 'v1/{+name}', options)
2230
+ command.response_representation = Google::Apis::ApihubV1::Empty::Representation
2231
+ command.response_class = Google::Apis::ApihubV1::Empty
2232
+ command.params['name'] = name unless name.nil?
2233
+ command.query['fields'] = fields unless fields.nil?
2234
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2235
+ execute_or_queue_command(command, &block)
2236
+ end
2237
+
2238
+ # Get details about a deployment and the API versions linked to it.
2239
+ # @param [String] name
2240
+ # Required. The name of the deployment resource to retrieve. Format: `projects/`
2241
+ # project`/locations/`location`/deployments/`deployment``
2242
+ # @param [String] fields
2243
+ # Selector specifying which fields to include in a partial response.
2244
+ # @param [String] quota_user
2245
+ # Available to use for quota purposes for server-side applications. Can be any
2246
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2247
+ # @param [Google::Apis::RequestOptions] options
2248
+ # Request-specific options
2249
+ #
2250
+ # @yield [result, err] Result & error if block supplied
2251
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment] parsed result object
2252
+ # @yieldparam err [StandardError] error object if request failed
2253
+ #
2254
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment]
2255
+ #
2256
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2257
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2258
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2259
+ def get_project_location_deployment(name, fields: nil, quota_user: nil, options: nil, &block)
2260
+ command = make_simple_command(:get, 'v1/{+name}', options)
2261
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment::Representation
2262
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment
2263
+ command.params['name'] = name unless name.nil?
2264
+ command.query['fields'] = fields unless fields.nil?
2265
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2266
+ execute_or_queue_command(command, &block)
2267
+ end
2268
+
2269
+ # List deployment resources in the API hub.
2270
+ # @param [String] parent
2271
+ # Required. The parent, which owns this collection of deployment resources.
2272
+ # Format: `projects/`project`/locations/`location``
2273
+ # @param [String] filter
2274
+ # Optional. An expression that filters the list of Deployments. A filter
2275
+ # expression consists of a field name, a comparison operator, and a value for
2276
+ # filtering. The value must be a string. The comparison operator must be one of:
2277
+ # `<`, `>` or `=`. Filters are not case sensitive. The following fields in the `
2278
+ # Deployments` are eligible for filtering: * `display_name` - The display name
2279
+ # of the Deployment. Allowed comparison operators: `=`. * `create_time` - The
2280
+ # time at which the Deployment was created. The value should be in the (RFC3339)[
2281
+ # https://tools.ietf.org/html/rfc3339] format. Allowed comparison operators: `>`
2282
+ # and `<`. * `resource_uri` - A URI to the deployment resource. Allowed
2283
+ # comparison operators: `=`. * `api_versions` - The API versions linked to this
2284
+ # deployment. Allowed comparison operators: `:`. * `deployment_type.enum_values.
2285
+ # values.id` - The allowed value id of the deployment_type attribute associated
2286
+ # with the Deployment. Allowed comparison operators: `:`. * `deployment_type.
2287
+ # enum_values.values.display_name` - The allowed value display name of the
2288
+ # deployment_type attribute associated with the Deployment. Allowed comparison
2289
+ # operators: `:`. * `slo.string_values.values` -The allowed string value of the
2290
+ # slo attribute associated with the deployment. Allowed comparison operators: `:`
2291
+ # . * `environment.enum_values.values.id` - The allowed value id of the
2292
+ # environment attribute associated with the deployment. Allowed comparison
2293
+ # operators: `:`. * `environment.enum_values.values.display_name` - The allowed
2294
+ # value display name of the environment attribute associated with the deployment.
2295
+ # Allowed comparison operators: `:`. * `attributes.projects/test-project-id/
2296
+ # locations/test-location-id/ attributes/user-defined-attribute-id.enum_values.
2297
+ # values.id` - The allowed value id of the user defined enum attribute
2298
+ # associated with the Resource. Allowed comparison operator is `:`. Here user-
2299
+ # defined-attribute-enum-id is a placeholder that can be replaced with any user
2300
+ # defined enum attribute name. * `attributes.projects/test-project-id/locations/
2301
+ # test-location-id/ attributes/user-defined-attribute-id.enum_values.values.
2302
+ # display_name` - The allowed value display name of the user defined enum
2303
+ # attribute associated with the Resource. Allowed comparison operator is `:`.
2304
+ # Here user-defined-attribute-enum-display-name is a placeholder that can be
2305
+ # replaced with any user defined enum attribute enum name. * `attributes.
2306
+ # projects/test-project-id/locations/test-location-id/ attributes/user-defined-
2307
+ # attribute-id.string_values.values` - The allowed value of the user defined
2308
+ # string attribute associated with the Resource. Allowed comparison operator is `
2309
+ # :`. Here user-defined-attribute-string is a placeholder that can be replaced
2310
+ # with any user defined string attribute name. * `attributes.projects/test-
2311
+ # project-id/locations/test-location-id/ attributes/user-defined-attribute-id.
2312
+ # json_values.values` - The allowed value of the user defined JSON attribute
2313
+ # associated with the Resource. Allowed comparison operator is `:`. Here user-
2314
+ # defined-attribute-json is a placeholder that can be replaced with any user
2315
+ # defined JSON attribute name. Expressions are combined with either `AND` logic
2316
+ # operator or `OR` logical operator but not both of them together i.e. only one
2317
+ # of the `AND` or `OR` operator can be used throughout the filter string and
2318
+ # both the operators cannot be used together. No other logical operators are
2319
+ # supported. At most three filter fields are allowed in the filter string and if
2320
+ # provided more than that then `INVALID_ARGUMENT` error is returned by the API.
2321
+ # Here are a few examples: * `environment.enum_values.values.id: staging-id` -
2322
+ # The allowed value id of the environment attribute associated with the
2323
+ # Deployment is _staging-id_. * `environment.enum_values.values.display_name: \"
2324
+ # Staging Deployment\"` - The allowed value display name of the environment
2325
+ # attribute associated with the Deployment is `Staging Deployment`. * `
2326
+ # environment.enum_values.values.id: production-id AND create_time < \"2021-08-
2327
+ # 15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\"` - The allowed value
2328
+ # id of the environment attribute associated with the Deployment is _production-
2329
+ # id_ and Deployment was created before _2021-08-15 14:50:00 UTC_ and after
2330
+ # _2021-08-10 12:00:00 UTC_. * `environment.enum_values.values.id: production-id
2331
+ # OR slo.string_values.values: \"99.99%\"` - The allowed value id of the
2332
+ # environment attribute Deployment is _production-id_ or string value of the slo
2333
+ # attribute is _99.99%_. * `environment.enum_values.values.id: staging-id AND
2334
+ # attributes.projects/test-project-id/locations/test-location-id/ attributes/
2335
+ # 17650f90-4a29-4971-b3c0-d5532da3764b.string_values.values: test` - The filter
2336
+ # string specifies that the allowed value id of the environment attribute
2337
+ # associated with the Deployment is _staging-id_ and the value of the user
2338
+ # defined attribute of type string is _test_.
2339
+ # @param [Fixnum] page_size
2340
+ # Optional. The maximum number of deployment resources to return. The service
2341
+ # may return fewer than this value. If unspecified, at most 50 deployments will
2342
+ # be returned. The maximum value is 1000; values above 1000 will be coerced to
2343
+ # 1000.
2344
+ # @param [String] page_token
2345
+ # Optional. A page token, received from a previous `ListDeployments` call.
2346
+ # Provide this to retrieve the subsequent page. When paginating, all other
2347
+ # parameters (except page_size) provided to `ListDeployments` must match the
2348
+ # call that provided the page token.
2349
+ # @param [String] fields
2350
+ # Selector specifying which fields to include in a partial response.
2351
+ # @param [String] quota_user
2352
+ # Available to use for quota purposes for server-side applications. Can be any
2353
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2354
+ # @param [Google::Apis::RequestOptions] options
2355
+ # Request-specific options
2356
+ #
2357
+ # @yield [result, err] Result & error if block supplied
2358
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ListDeploymentsResponse] parsed result object
2359
+ # @yieldparam err [StandardError] error object if request failed
2360
+ #
2361
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ListDeploymentsResponse]
2362
+ #
2363
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2364
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2365
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2366
+ def list_project_location_deployments(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2367
+ command = make_simple_command(:get, 'v1/{+parent}/deployments', options)
2368
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ListDeploymentsResponse::Representation
2369
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ListDeploymentsResponse
2370
+ command.params['parent'] = parent unless parent.nil?
2371
+ command.query['filter'] = filter unless filter.nil?
2372
+ command.query['pageSize'] = page_size unless page_size.nil?
2373
+ command.query['pageToken'] = page_token unless page_token.nil?
2374
+ command.query['fields'] = fields unless fields.nil?
2375
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2376
+ execute_or_queue_command(command, &block)
2377
+ end
2378
+
2379
+ # Update a deployment resource in the API hub. The following fields in the
2380
+ # deployment resource can be updated: * display_name * description *
2381
+ # documentation * deployment_type * resource_uri * endpoints * slo * environment
2382
+ # * attributes The update_mask should be used to specify the fields being
2383
+ # updated.
2384
+ # @param [String] name
2385
+ # Identifier. The name of the deployment. Format: `projects/`project`/locations/`
2386
+ # location`/deployments/`deployment``
2387
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment] google_cloud_apihub_v1_deployment_object
2388
+ # @param [String] update_mask
2389
+ # Required. The list of fields to update.
2390
+ # @param [String] fields
2391
+ # Selector specifying which fields to include in a partial response.
2392
+ # @param [String] quota_user
2393
+ # Available to use for quota purposes for server-side applications. Can be any
2394
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2395
+ # @param [Google::Apis::RequestOptions] options
2396
+ # Request-specific options
2397
+ #
2398
+ # @yield [result, err] Result & error if block supplied
2399
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment] parsed result object
2400
+ # @yieldparam err [StandardError] error object if request failed
2401
+ #
2402
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment]
2403
+ #
2404
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2405
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2406
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2407
+ def patch_project_location_deployment(name, google_cloud_apihub_v1_deployment_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2408
+ command = make_simple_command(:patch, 'v1/{+name}', options)
2409
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment::Representation
2410
+ command.request_object = google_cloud_apihub_v1_deployment_object
2411
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment::Representation
2412
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Deployment
2413
+ command.params['name'] = name unless name.nil?
2414
+ command.query['updateMask'] = update_mask unless update_mask.nil?
2415
+ command.query['fields'] = fields unless fields.nil?
2416
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2417
+ execute_or_queue_command(command, &block)
2418
+ end
2419
+
2420
+ # Create an External API resource in the API hub.
2421
+ # @param [String] parent
2422
+ # Required. The parent resource for the External API resource. Format: `projects/
2423
+ # `project`/locations/`location``
2424
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi] google_cloud_apihub_v1_external_api_object
2425
+ # @param [String] external_api_id
2426
+ # Optional. The ID to use for the External API resource, which will become the
2427
+ # final component of the External API's resource name. This field is optional. *
2428
+ # If provided, the same will be used. The service will throw an error if the
2429
+ # specified id is already used by another External API resource in the API hub. *
2430
+ # If not provided, a system generated id will be used. This value should be 4-
2431
+ # 500 characters, and valid characters are /a-z[0-9]-_/.
2432
+ # @param [String] fields
2433
+ # Selector specifying which fields to include in a partial response.
2434
+ # @param [String] quota_user
2435
+ # Available to use for quota purposes for server-side applications. Can be any
2436
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2437
+ # @param [Google::Apis::RequestOptions] options
2438
+ # Request-specific options
2439
+ #
2440
+ # @yield [result, err] Result & error if block supplied
2441
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi] parsed result object
2442
+ # @yieldparam err [StandardError] error object if request failed
2443
+ #
2444
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi]
2445
+ #
2446
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2447
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2448
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2449
+ def create_project_location_external_api(parent, google_cloud_apihub_v1_external_api_object = nil, external_api_id: nil, fields: nil, quota_user: nil, options: nil, &block)
2450
+ command = make_simple_command(:post, 'v1/{+parent}/externalApis', options)
2451
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi::Representation
2452
+ command.request_object = google_cloud_apihub_v1_external_api_object
2453
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi::Representation
2454
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi
2455
+ command.params['parent'] = parent unless parent.nil?
2456
+ command.query['externalApiId'] = external_api_id unless external_api_id.nil?
2457
+ command.query['fields'] = fields unless fields.nil?
2458
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2459
+ execute_or_queue_command(command, &block)
2460
+ end
2461
+
2462
+ # Delete an External API resource in the API hub.
2463
+ # @param [String] name
2464
+ # Required. The name of the External API resource to delete. Format: `projects/`
2465
+ # project`/locations/`location`/externalApis/`externalApi``
2466
+ # @param [String] fields
2467
+ # Selector specifying which fields to include in a partial response.
2468
+ # @param [String] quota_user
2469
+ # Available to use for quota purposes for server-side applications. Can be any
2470
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2471
+ # @param [Google::Apis::RequestOptions] options
2472
+ # Request-specific options
2473
+ #
2474
+ # @yield [result, err] Result & error if block supplied
2475
+ # @yieldparam result [Google::Apis::ApihubV1::Empty] parsed result object
2476
+ # @yieldparam err [StandardError] error object if request failed
2477
+ #
2478
+ # @return [Google::Apis::ApihubV1::Empty]
2479
+ #
2480
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2481
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2482
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2483
+ def delete_project_location_external_api(name, fields: nil, quota_user: nil, options: nil, &block)
2484
+ command = make_simple_command(:delete, 'v1/{+name}', options)
2485
+ command.response_representation = Google::Apis::ApihubV1::Empty::Representation
2486
+ command.response_class = Google::Apis::ApihubV1::Empty
2487
+ command.params['name'] = name unless name.nil?
2488
+ command.query['fields'] = fields unless fields.nil?
2489
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2490
+ execute_or_queue_command(command, &block)
2491
+ end
2492
+
2493
+ # Get details about an External API resource in the API hub.
2494
+ # @param [String] name
2495
+ # Required. The name of the External API resource to retrieve. Format: `projects/
2496
+ # `project`/locations/`location`/externalApis/`externalApi``
2497
+ # @param [String] fields
2498
+ # Selector specifying which fields to include in a partial response.
2499
+ # @param [String] quota_user
2500
+ # Available to use for quota purposes for server-side applications. Can be any
2501
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2502
+ # @param [Google::Apis::RequestOptions] options
2503
+ # Request-specific options
2504
+ #
2505
+ # @yield [result, err] Result & error if block supplied
2506
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi] parsed result object
2507
+ # @yieldparam err [StandardError] error object if request failed
2508
+ #
2509
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi]
2510
+ #
2511
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2512
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2513
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2514
+ def get_project_location_external_api(name, fields: nil, quota_user: nil, options: nil, &block)
2515
+ command = make_simple_command(:get, 'v1/{+name}', options)
2516
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi::Representation
2517
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi
2518
+ command.params['name'] = name unless name.nil?
2519
+ command.query['fields'] = fields unless fields.nil?
2520
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2521
+ execute_or_queue_command(command, &block)
2522
+ end
2523
+
2524
+ # List External API resources in the API hub.
2525
+ # @param [String] parent
2526
+ # Required. The parent, which owns this collection of External API resources.
2527
+ # Format: `projects/`project`/locations/`location``
2528
+ # @param [Fixnum] page_size
2529
+ # Optional. The maximum number of External API resources to return. The service
2530
+ # may return fewer than this value. If unspecified, at most 50 ExternalApis will
2531
+ # be returned. The maximum value is 1000; values above 1000 will be coerced to
2532
+ # 1000.
2533
+ # @param [String] page_token
2534
+ # Optional. A page token, received from a previous `ListExternalApis` call.
2535
+ # Provide this to retrieve the subsequent page. When paginating, all other
2536
+ # parameters (except page_size) provided to `ListExternalApis` must match the
2537
+ # call that provided the page token.
2538
+ # @param [String] fields
2539
+ # Selector specifying which fields to include in a partial response.
2540
+ # @param [String] quota_user
2541
+ # Available to use for quota purposes for server-side applications. Can be any
2542
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2543
+ # @param [Google::Apis::RequestOptions] options
2544
+ # Request-specific options
2545
+ #
2546
+ # @yield [result, err] Result & error if block supplied
2547
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ListExternalApisResponse] parsed result object
2548
+ # @yieldparam err [StandardError] error object if request failed
2549
+ #
2550
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ListExternalApisResponse]
2551
+ #
2552
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2553
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2554
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2555
+ def list_project_location_external_apis(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2556
+ command = make_simple_command(:get, 'v1/{+parent}/externalApis', options)
2557
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ListExternalApisResponse::Representation
2558
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ListExternalApisResponse
2559
+ command.params['parent'] = parent unless parent.nil?
2560
+ command.query['pageSize'] = page_size unless page_size.nil?
2561
+ command.query['pageToken'] = page_token unless page_token.nil?
2562
+ command.query['fields'] = fields unless fields.nil?
2563
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2564
+ execute_or_queue_command(command, &block)
2565
+ end
2566
+
2567
+ # Update an External API resource in the API hub. The following fields can be
2568
+ # updated: * display_name * description * documentation * endpoints * paths The
2569
+ # update_mask should be used to specify the fields being updated.
2570
+ # @param [String] name
2571
+ # Identifier. Format: `projects/`project`/locations/`location`/externalApi/`
2572
+ # externalApi``.
2573
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi] google_cloud_apihub_v1_external_api_object
2574
+ # @param [String] update_mask
2575
+ # Required. The list of fields to update.
2576
+ # @param [String] fields
2577
+ # Selector specifying which fields to include in a partial response.
2578
+ # @param [String] quota_user
2579
+ # Available to use for quota purposes for server-side applications. Can be any
2580
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2581
+ # @param [Google::Apis::RequestOptions] options
2582
+ # Request-specific options
2583
+ #
2584
+ # @yield [result, err] Result & error if block supplied
2585
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi] parsed result object
2586
+ # @yieldparam err [StandardError] error object if request failed
2587
+ #
2588
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi]
2589
+ #
2590
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2591
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2592
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2593
+ def patch_project_location_external_api(name, google_cloud_apihub_v1_external_api_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2594
+ command = make_simple_command(:patch, 'v1/{+name}', options)
2595
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi::Representation
2596
+ command.request_object = google_cloud_apihub_v1_external_api_object
2597
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi::Representation
2598
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ExternalApi
2599
+ command.params['name'] = name unless name.nil?
2600
+ command.query['updateMask'] = update_mask unless update_mask.nil?
2601
+ command.query['fields'] = fields unless fields.nil?
2602
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2603
+ execute_or_queue_command(command, &block)
2604
+ end
2605
+
2606
+ # Create a host project registration. A Google cloud project can be registered
2607
+ # as a host project if it is not attached as a runtime project to another host
2608
+ # project. A project can be registered as a host project only once. Subsequent
2609
+ # register calls for the same project will fail.
2610
+ # @param [String] parent
2611
+ # Required. The parent resource for the host project. Format: `projects/`project`
2612
+ # /locations/`location``
2613
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1HostProjectRegistration] google_cloud_apihub_v1_host_project_registration_object
2614
+ # @param [String] host_project_registration_id
2615
+ # Required. The ID to use for the Host Project Registration, which will become
2616
+ # the final component of the host project registration's resource name. The ID
2617
+ # must be the same as the Google cloud project specified in the
2618
+ # host_project_registration.gcp_project field.
2619
+ # @param [String] fields
2620
+ # Selector specifying which fields to include in a partial response.
2621
+ # @param [String] quota_user
2622
+ # Available to use for quota purposes for server-side applications. Can be any
2623
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2624
+ # @param [Google::Apis::RequestOptions] options
2625
+ # Request-specific options
2626
+ #
2627
+ # @yield [result, err] Result & error if block supplied
2628
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1HostProjectRegistration] parsed result object
2629
+ # @yieldparam err [StandardError] error object if request failed
2630
+ #
2631
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1HostProjectRegistration]
2632
+ #
2633
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2634
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2635
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2636
+ def create_project_location_host_project_registration(parent, google_cloud_apihub_v1_host_project_registration_object = nil, host_project_registration_id: nil, fields: nil, quota_user: nil, options: nil, &block)
2637
+ command = make_simple_command(:post, 'v1/{+parent}/hostProjectRegistrations', options)
2638
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1HostProjectRegistration::Representation
2639
+ command.request_object = google_cloud_apihub_v1_host_project_registration_object
2640
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1HostProjectRegistration::Representation
2641
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1HostProjectRegistration
2642
+ command.params['parent'] = parent unless parent.nil?
2643
+ command.query['hostProjectRegistrationId'] = host_project_registration_id unless host_project_registration_id.nil?
2644
+ command.query['fields'] = fields unless fields.nil?
2645
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2646
+ execute_or_queue_command(command, &block)
2647
+ end
2648
+
2649
+ # Get a host project registration.
2650
+ # @param [String] name
2651
+ # Required. Host project registration resource name. projects/`project`/
2652
+ # locations/`location`/hostProjectRegistrations/`host_project_registration_id`
2653
+ # @param [String] fields
2654
+ # Selector specifying which fields to include in a partial response.
2655
+ # @param [String] quota_user
2656
+ # Available to use for quota purposes for server-side applications. Can be any
2657
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2658
+ # @param [Google::Apis::RequestOptions] options
2659
+ # Request-specific options
2660
+ #
2661
+ # @yield [result, err] Result & error if block supplied
2662
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1HostProjectRegistration] parsed result object
2663
+ # @yieldparam err [StandardError] error object if request failed
2664
+ #
2665
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1HostProjectRegistration]
2666
+ #
2667
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2668
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2669
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2670
+ def get_project_location_host_project_registration(name, fields: nil, quota_user: nil, options: nil, &block)
2671
+ command = make_simple_command(:get, 'v1/{+name}', options)
2672
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1HostProjectRegistration::Representation
2673
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1HostProjectRegistration
2674
+ command.params['name'] = name unless name.nil?
2675
+ command.query['fields'] = fields unless fields.nil?
2676
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2677
+ execute_or_queue_command(command, &block)
2678
+ end
2679
+
2680
+ # Lists host project registrations.
2681
+ # @param [String] parent
2682
+ # Required. The parent, which owns this collection of host projects. Format: `
2683
+ # projects/*/locations/*`
2684
+ # @param [String] filter
2685
+ # Optional. An expression that filters the list of HostProjectRegistrations. A
2686
+ # filter expression consists of a field name, a comparison operator, and a value
2687
+ # for filtering. The value must be a string. All standard operators as
2688
+ # documented at https://google.aip.dev/160 are supported. The following fields
2689
+ # in the `HostProjectRegistration` are eligible for filtering: * `name` - The
2690
+ # name of the HostProjectRegistration. * `create_time` - The time at which the
2691
+ # HostProjectRegistration was created. The value should be in the (RFC3339)[
2692
+ # https://tools.ietf.org/html/rfc3339] format. * `gcp_project` - The Google
2693
+ # cloud project associated with the HostProjectRegistration.
2694
+ # @param [String] order_by
2695
+ # Optional. Hint for how to order the results.
2696
+ # @param [Fixnum] page_size
2697
+ # Optional. The maximum number of host project registrations to return. The
2698
+ # service may return fewer than this value. If unspecified, at most 50 host
2699
+ # project registrations will be returned. The maximum value is 1000; values
2700
+ # above 1000 will be coerced to 1000.
2701
+ # @param [String] page_token
2702
+ # Optional. A page token, received from a previous `ListHostProjectRegistrations`
2703
+ # call. Provide this to retrieve the subsequent page. When paginating, all
2704
+ # other parameters (except page_size) provided to `ListHostProjectRegistrations`
2705
+ # must match the call that provided the page token.
2706
+ # @param [String] fields
2707
+ # Selector specifying which fields to include in a partial response.
2708
+ # @param [String] quota_user
2709
+ # Available to use for quota purposes for server-side applications. Can be any
2710
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2711
+ # @param [Google::Apis::RequestOptions] options
2712
+ # Request-specific options
2713
+ #
2714
+ # @yield [result, err] Result & error if block supplied
2715
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ListHostProjectRegistrationsResponse] parsed result object
2716
+ # @yieldparam err [StandardError] error object if request failed
2717
+ #
2718
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ListHostProjectRegistrationsResponse]
2719
+ #
2720
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2721
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2722
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2723
+ def list_project_location_host_project_registrations(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2724
+ command = make_simple_command(:get, 'v1/{+parent}/hostProjectRegistrations', options)
2725
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ListHostProjectRegistrationsResponse::Representation
2726
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ListHostProjectRegistrationsResponse
2727
+ command.params['parent'] = parent unless parent.nil?
2728
+ command.query['filter'] = filter unless filter.nil?
2729
+ command.query['orderBy'] = order_by unless order_by.nil?
2730
+ command.query['pageSize'] = page_size unless page_size.nil?
2731
+ command.query['pageToken'] = page_token unless page_token.nil?
2732
+ command.query['fields'] = fields unless fields.nil?
2733
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2734
+ execute_or_queue_command(command, &block)
2735
+ end
2736
+
2737
+ # Starts asynchronous cancellation on a long-running operation. The server makes
2738
+ # a best effort to cancel the operation, but success is not guaranteed. If the
2739
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
2740
+ # Clients can use Operations.GetOperation or other methods to check whether the
2741
+ # cancellation succeeded or whether the operation completed despite cancellation.
2742
+ # On successful cancellation, the operation is not deleted; instead, it becomes
2743
+ # an operation with an Operation.error value with a google.rpc.Status.code of `1`
2744
+ # , corresponding to `Code.CANCELLED`.
2745
+ # @param [String] name
2746
+ # The name of the operation resource to be cancelled.
2747
+ # @param [Google::Apis::ApihubV1::GoogleLongrunningCancelOperationRequest] google_longrunning_cancel_operation_request_object
2748
+ # @param [String] fields
2749
+ # Selector specifying which fields to include in a partial response.
2750
+ # @param [String] quota_user
2751
+ # Available to use for quota purposes for server-side applications. Can be any
2752
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2753
+ # @param [Google::Apis::RequestOptions] options
2754
+ # Request-specific options
2755
+ #
2756
+ # @yield [result, err] Result & error if block supplied
2757
+ # @yieldparam result [Google::Apis::ApihubV1::Empty] parsed result object
2758
+ # @yieldparam err [StandardError] error object if request failed
2759
+ #
2760
+ # @return [Google::Apis::ApihubV1::Empty]
2761
+ #
2762
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2763
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2764
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2765
+ def cancel_project_location_operation(name, google_longrunning_cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2766
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
2767
+ command.request_representation = Google::Apis::ApihubV1::GoogleLongrunningCancelOperationRequest::Representation
2768
+ command.request_object = google_longrunning_cancel_operation_request_object
2769
+ command.response_representation = Google::Apis::ApihubV1::Empty::Representation
2770
+ command.response_class = Google::Apis::ApihubV1::Empty
2771
+ command.params['name'] = name unless name.nil?
2772
+ command.query['fields'] = fields unless fields.nil?
2773
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2774
+ execute_or_queue_command(command, &block)
2775
+ end
2776
+
2777
+ # Deletes a long-running operation. This method indicates that the client is no
2778
+ # longer interested in the operation result. It does not cancel the operation.
2779
+ # If the server doesn't support this method, it returns `google.rpc.Code.
2780
+ # UNIMPLEMENTED`.
2781
+ # @param [String] name
2782
+ # The name of the operation resource to be deleted.
2783
+ # @param [String] fields
2784
+ # Selector specifying which fields to include in a partial response.
2785
+ # @param [String] quota_user
2786
+ # Available to use for quota purposes for server-side applications. Can be any
2787
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2788
+ # @param [Google::Apis::RequestOptions] options
2789
+ # Request-specific options
2790
+ #
2791
+ # @yield [result, err] Result & error if block supplied
2792
+ # @yieldparam result [Google::Apis::ApihubV1::Empty] parsed result object
2793
+ # @yieldparam err [StandardError] error object if request failed
2794
+ #
2795
+ # @return [Google::Apis::ApihubV1::Empty]
2796
+ #
2797
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2798
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2799
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2800
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
2801
+ command = make_simple_command(:delete, 'v1/{+name}', options)
2802
+ command.response_representation = Google::Apis::ApihubV1::Empty::Representation
2803
+ command.response_class = Google::Apis::ApihubV1::Empty
2804
+ command.params['name'] = name unless name.nil?
2805
+ command.query['fields'] = fields unless fields.nil?
2806
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2807
+ execute_or_queue_command(command, &block)
2808
+ end
2809
+
2810
+ # Gets the latest state of a long-running operation. Clients can use this method
2811
+ # to poll the operation result at intervals as recommended by the API service.
2812
+ # @param [String] name
2813
+ # The name of the operation resource.
2814
+ # @param [String] fields
2815
+ # Selector specifying which fields to include in a partial response.
2816
+ # @param [String] quota_user
2817
+ # Available to use for quota purposes for server-side applications. Can be any
2818
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2819
+ # @param [Google::Apis::RequestOptions] options
2820
+ # Request-specific options
2821
+ #
2822
+ # @yield [result, err] Result & error if block supplied
2823
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleLongrunningOperation] parsed result object
2824
+ # @yieldparam err [StandardError] error object if request failed
2825
+ #
2826
+ # @return [Google::Apis::ApihubV1::GoogleLongrunningOperation]
2827
+ #
2828
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2829
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2830
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2831
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
2832
+ command = make_simple_command(:get, 'v1/{+name}', options)
2833
+ command.response_representation = Google::Apis::ApihubV1::GoogleLongrunningOperation::Representation
2834
+ command.response_class = Google::Apis::ApihubV1::GoogleLongrunningOperation
2835
+ command.params['name'] = name unless name.nil?
2836
+ command.query['fields'] = fields unless fields.nil?
2837
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2838
+ execute_or_queue_command(command, &block)
2839
+ end
2840
+
2841
+ # Lists operations that match the specified filter in the request. If the server
2842
+ # doesn't support this method, it returns `UNIMPLEMENTED`.
2843
+ # @param [String] name
2844
+ # The name of the operation's parent resource.
2845
+ # @param [String] filter
2846
+ # The standard list filter.
2847
+ # @param [Fixnum] page_size
2848
+ # The standard list page size.
2849
+ # @param [String] page_token
2850
+ # The standard list page token.
2851
+ # @param [String] fields
2852
+ # Selector specifying which fields to include in a partial response.
2853
+ # @param [String] quota_user
2854
+ # Available to use for quota purposes for server-side applications. Can be any
2855
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2856
+ # @param [Google::Apis::RequestOptions] options
2857
+ # Request-specific options
2858
+ #
2859
+ # @yield [result, err] Result & error if block supplied
2860
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleLongrunningListOperationsResponse] parsed result object
2861
+ # @yieldparam err [StandardError] error object if request failed
2862
+ #
2863
+ # @return [Google::Apis::ApihubV1::GoogleLongrunningListOperationsResponse]
2864
+ #
2865
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2866
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2867
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2868
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2869
+ command = make_simple_command(:get, 'v1/{+name}/operations', options)
2870
+ command.response_representation = Google::Apis::ApihubV1::GoogleLongrunningListOperationsResponse::Representation
2871
+ command.response_class = Google::Apis::ApihubV1::GoogleLongrunningListOperationsResponse
2872
+ command.params['name'] = name unless name.nil?
2873
+ command.query['filter'] = filter unless filter.nil?
2874
+ command.query['pageSize'] = page_size unless page_size.nil?
2875
+ command.query['pageToken'] = page_token unless page_token.nil?
2876
+ command.query['fields'] = fields unless fields.nil?
2877
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2878
+ execute_or_queue_command(command, &block)
2879
+ end
2880
+
2881
+ # Create an API Hub plugin resource in the API hub. Once a plugin is created, it
2882
+ # can be used to create plugin instances.
2883
+ # @param [String] parent
2884
+ # Required. The parent resource where this plugin will be created. Format: `
2885
+ # projects/`project`/locations/`location``.
2886
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin] google_cloud_apihub_v1_plugin_object
2887
+ # @param [String] plugin_id
2888
+ # Optional. The ID to use for the Plugin resource, which will become the final
2889
+ # component of the Plugin's resource name. This field is optional. * If provided,
2890
+ # the same will be used. The service will throw an error if the specified id is
2891
+ # already used by another Plugin resource in the API hub instance. * If not
2892
+ # provided, a system generated id will be used. This value should be 4-500
2893
+ # characters, overall resource name which will be of format `projects/`project`/
2894
+ # locations/`location`/plugins/`plugin``, its length is limited to 1000
2895
+ # characters and valid characters are /a-z[0-9]-_/.
2896
+ # @param [String] fields
2897
+ # Selector specifying which fields to include in a partial response.
2898
+ # @param [String] quota_user
2899
+ # Available to use for quota purposes for server-side applications. Can be any
2900
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2901
+ # @param [Google::Apis::RequestOptions] options
2902
+ # Request-specific options
2903
+ #
2904
+ # @yield [result, err] Result & error if block supplied
2905
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin] parsed result object
2906
+ # @yieldparam err [StandardError] error object if request failed
2907
+ #
2908
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin]
2909
+ #
2910
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2911
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2912
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2913
+ def create_project_location_plugin(parent, google_cloud_apihub_v1_plugin_object = nil, plugin_id: nil, fields: nil, quota_user: nil, options: nil, &block)
2914
+ command = make_simple_command(:post, 'v1/{+parent}/plugins', options)
2915
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin::Representation
2916
+ command.request_object = google_cloud_apihub_v1_plugin_object
2917
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin::Representation
2918
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin
2919
+ command.params['parent'] = parent unless parent.nil?
2920
+ command.query['pluginId'] = plugin_id unless plugin_id.nil?
2921
+ command.query['fields'] = fields unless fields.nil?
2922
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2923
+ execute_or_queue_command(command, &block)
2924
+ end
2925
+
2926
+ # Delete a Plugin in API hub. Note, only user owned plugins can be deleted via
2927
+ # this method.
2928
+ # @param [String] name
2929
+ # Required. The name of the Plugin resource to delete. Format: `projects/`
2930
+ # project`/locations/`location`/plugins/`plugin``
2931
+ # @param [String] fields
2932
+ # Selector specifying which fields to include in a partial response.
2933
+ # @param [String] quota_user
2934
+ # Available to use for quota purposes for server-side applications. Can be any
2935
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2936
+ # @param [Google::Apis::RequestOptions] options
2937
+ # Request-specific options
2938
+ #
2939
+ # @yield [result, err] Result & error if block supplied
2940
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleLongrunningOperation] parsed result object
2941
+ # @yieldparam err [StandardError] error object if request failed
2942
+ #
2943
+ # @return [Google::Apis::ApihubV1::GoogleLongrunningOperation]
2944
+ #
2945
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2946
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2947
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2948
+ def delete_project_location_plugin(name, fields: nil, quota_user: nil, options: nil, &block)
2949
+ command = make_simple_command(:delete, 'v1/{+name}', options)
2950
+ command.response_representation = Google::Apis::ApihubV1::GoogleLongrunningOperation::Representation
2951
+ command.response_class = Google::Apis::ApihubV1::GoogleLongrunningOperation
2952
+ command.params['name'] = name unless name.nil?
2953
+ command.query['fields'] = fields unless fields.nil?
2954
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2955
+ execute_or_queue_command(command, &block)
2956
+ end
2957
+
2958
+ # Disables a plugin. The `state` of the plugin after disabling is `DISABLED`
2959
+ # @param [String] name
2960
+ # Required. The name of the plugin to disable. Format: `projects/`project`/
2961
+ # locations/`location`/plugins/`plugin``.
2962
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1DisablePluginRequest] google_cloud_apihub_v1_disable_plugin_request_object
2963
+ # @param [String] fields
2964
+ # Selector specifying which fields to include in a partial response.
2965
+ # @param [String] quota_user
2966
+ # Available to use for quota purposes for server-side applications. Can be any
2967
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2968
+ # @param [Google::Apis::RequestOptions] options
2969
+ # Request-specific options
2970
+ #
2971
+ # @yield [result, err] Result & error if block supplied
2972
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin] parsed result object
2973
+ # @yieldparam err [StandardError] error object if request failed
2974
+ #
2975
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin]
2976
+ #
2977
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2978
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2979
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2980
+ def disable_project_location_plugin(name, google_cloud_apihub_v1_disable_plugin_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2981
+ command = make_simple_command(:post, 'v1/{+name}:disable', options)
2982
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1DisablePluginRequest::Representation
2983
+ command.request_object = google_cloud_apihub_v1_disable_plugin_request_object
2984
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin::Representation
2985
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin
2986
+ command.params['name'] = name unless name.nil?
2987
+ command.query['fields'] = fields unless fields.nil?
2988
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2989
+ execute_or_queue_command(command, &block)
2990
+ end
2991
+
2992
+ # Enables a plugin. The `state` of the plugin after enabling is `ENABLED`
2993
+ # @param [String] name
2994
+ # Required. The name of the plugin to enable. Format: `projects/`project`/
2995
+ # locations/`location`/plugins/`plugin``.
2996
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1EnablePluginRequest] google_cloud_apihub_v1_enable_plugin_request_object
2997
+ # @param [String] fields
2998
+ # Selector specifying which fields to include in a partial response.
2999
+ # @param [String] quota_user
3000
+ # Available to use for quota purposes for server-side applications. Can be any
3001
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3002
+ # @param [Google::Apis::RequestOptions] options
3003
+ # Request-specific options
3004
+ #
3005
+ # @yield [result, err] Result & error if block supplied
3006
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin] parsed result object
3007
+ # @yieldparam err [StandardError] error object if request failed
3008
+ #
3009
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin]
3010
+ #
3011
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3012
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3013
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3014
+ def enable_project_location_plugin(name, google_cloud_apihub_v1_enable_plugin_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3015
+ command = make_simple_command(:post, 'v1/{+name}:enable', options)
3016
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1EnablePluginRequest::Representation
3017
+ command.request_object = google_cloud_apihub_v1_enable_plugin_request_object
3018
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin::Representation
3019
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin
3020
+ command.params['name'] = name unless name.nil?
3021
+ command.query['fields'] = fields unless fields.nil?
3022
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3023
+ execute_or_queue_command(command, &block)
3024
+ end
3025
+
3026
+ # Get an API Hub plugin.
3027
+ # @param [String] name
3028
+ # Required. The name of the plugin to retrieve. Format: `projects/`project`/
3029
+ # locations/`location`/plugins/`plugin``.
3030
+ # @param [String] fields
3031
+ # Selector specifying which fields to include in a partial response.
3032
+ # @param [String] quota_user
3033
+ # Available to use for quota purposes for server-side applications. Can be any
3034
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3035
+ # @param [Google::Apis::RequestOptions] options
3036
+ # Request-specific options
3037
+ #
3038
+ # @yield [result, err] Result & error if block supplied
3039
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin] parsed result object
3040
+ # @yieldparam err [StandardError] error object if request failed
3041
+ #
3042
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin]
3043
+ #
3044
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3045
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3046
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3047
+ def get_project_location_plugin(name, fields: nil, quota_user: nil, options: nil, &block)
3048
+ command = make_simple_command(:get, 'v1/{+name}', options)
3049
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin::Representation
3050
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1Plugin
3051
+ command.params['name'] = name unless name.nil?
3052
+ command.query['fields'] = fields unless fields.nil?
3053
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3054
+ execute_or_queue_command(command, &block)
3055
+ end
3056
+
3057
+ # Get the style guide being used for linting.
3058
+ # @param [String] name
3059
+ # Required. The name of the spec to retrieve. Format: `projects/`project`/
3060
+ # locations/`location`/plugins/`plugin`/styleGuide`.
3061
+ # @param [String] fields
3062
+ # Selector specifying which fields to include in a partial response.
3063
+ # @param [String] quota_user
3064
+ # Available to use for quota purposes for server-side applications. Can be any
3065
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3066
+ # @param [Google::Apis::RequestOptions] options
3067
+ # Request-specific options
3068
+ #
3069
+ # @yield [result, err] Result & error if block supplied
3070
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1StyleGuide] parsed result object
3071
+ # @yieldparam err [StandardError] error object if request failed
3072
+ #
3073
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1StyleGuide]
3074
+ #
3075
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3076
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3077
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3078
+ def get_project_location_plugin_style_guide(name, fields: nil, quota_user: nil, options: nil, &block)
3079
+ command = make_simple_command(:get, 'v1/{+name}', options)
3080
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1StyleGuide::Representation
3081
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1StyleGuide
3082
+ command.params['name'] = name unless name.nil?
3083
+ command.query['fields'] = fields unless fields.nil?
3084
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3085
+ execute_or_queue_command(command, &block)
3086
+ end
3087
+
3088
+ # List all the plugins in a given project and location.
3089
+ # @param [String] parent
3090
+ # Required. The parent resource where this plugin will be created. Format: `
3091
+ # projects/`project`/locations/`location``.
3092
+ # @param [String] filter
3093
+ # Optional. An expression that filters the list of plugins. A filter expression
3094
+ # consists of a field name, a comparison operator, and a value for filtering.
3095
+ # The value must be a string. The comparison operator must be one of: `<`, `>`
3096
+ # or `=`. Filters are not case sensitive. The following fields in the `Plugins`
3097
+ # are eligible for filtering: * `plugin_category` - The category of the Plugin.
3098
+ # Allowed comparison operators: `=`. Expressions are combined with either `AND`
3099
+ # logic operator or `OR` logical operator but not both of them together i.e.
3100
+ # only one of the `AND` or `OR` operator can be used throughout the filter
3101
+ # string and both the operators cannot be used together. No other logical
3102
+ # operators are supported. At most three filter fields are allowed in the filter
3103
+ # string and if provided more than that then `INVALID_ARGUMENT` error is
3104
+ # returned by the API. Here are a few examples: * `plugin_category = ON_RAMP` -
3105
+ # The plugin is of category on ramp.
3106
+ # @param [Fixnum] page_size
3107
+ # Optional. The maximum number of hub plugins to return. The service may return
3108
+ # fewer than this value. If unspecified, at most 50 hub plugins will be returned.
3109
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
3110
+ # @param [String] page_token
3111
+ # Optional. A page token, received from a previous `ListPlugins` call. Provide
3112
+ # this to retrieve the subsequent page. When paginating, all other parameters (
3113
+ # except page_size) provided to `ListPlugins` must match the call that provided
3114
+ # the page token.
3115
+ # @param [String] fields
3116
+ # Selector specifying which fields to include in a partial response.
3117
+ # @param [String] quota_user
3118
+ # Available to use for quota purposes for server-side applications. Can be any
3119
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3120
+ # @param [Google::Apis::RequestOptions] options
3121
+ # Request-specific options
3122
+ #
3123
+ # @yield [result, err] Result & error if block supplied
3124
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ListPluginsResponse] parsed result object
3125
+ # @yieldparam err [StandardError] error object if request failed
3126
+ #
3127
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ListPluginsResponse]
3128
+ #
3129
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3130
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3131
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3132
+ def list_project_location_plugins(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3133
+ command = make_simple_command(:get, 'v1/{+parent}/plugins', options)
3134
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ListPluginsResponse::Representation
3135
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ListPluginsResponse
3136
+ command.params['parent'] = parent unless parent.nil?
3137
+ command.query['filter'] = filter unless filter.nil?
3138
+ command.query['pageSize'] = page_size unless page_size.nil?
3139
+ command.query['pageToken'] = page_token unless page_token.nil?
3140
+ command.query['fields'] = fields unless fields.nil?
3141
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3142
+ execute_or_queue_command(command, &block)
3143
+ end
3144
+
3145
+ # Update the styleGuide to be used for liniting in by API hub.
3146
+ # @param [String] name
3147
+ # Identifier. The name of the style guide. Format: `projects/`project`/locations/
3148
+ # `location`/plugins/`plugin`/styleGuide`
3149
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1StyleGuide] google_cloud_apihub_v1_style_guide_object
3150
+ # @param [String] update_mask
3151
+ # Optional. The list of fields to update.
3152
+ # @param [String] fields
3153
+ # Selector specifying which fields to include in a partial response.
3154
+ # @param [String] quota_user
3155
+ # Available to use for quota purposes for server-side applications. Can be any
3156
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3157
+ # @param [Google::Apis::RequestOptions] options
3158
+ # Request-specific options
3159
+ #
3160
+ # @yield [result, err] Result & error if block supplied
3161
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1StyleGuide] parsed result object
3162
+ # @yieldparam err [StandardError] error object if request failed
3163
+ #
3164
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1StyleGuide]
3165
+ #
3166
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3167
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3168
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3169
+ def update_project_location_plugin_style_guide(name, google_cloud_apihub_v1_style_guide_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
3170
+ command = make_simple_command(:patch, 'v1/{+name}', options)
3171
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1StyleGuide::Representation
3172
+ command.request_object = google_cloud_apihub_v1_style_guide_object
3173
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1StyleGuide::Representation
3174
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1StyleGuide
3175
+ command.params['name'] = name unless name.nil?
3176
+ command.query['updateMask'] = update_mask unless update_mask.nil?
3177
+ command.query['fields'] = fields unless fields.nil?
3178
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3179
+ execute_or_queue_command(command, &block)
3180
+ end
3181
+
3182
+ # Creates a Plugin instance in the API hub.
3183
+ # @param [String] parent
3184
+ # Required. The parent of the plugin instance resource. Format: `projects/`
3185
+ # project`/locations/`location`/plugins/`plugin``
3186
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1PluginInstance] google_cloud_apihub_v1_plugin_instance_object
3187
+ # @param [String] plugin_instance_id
3188
+ # Optional. The ID to use for the plugin instance, which will become the final
3189
+ # component of the plugin instance's resource name. This field is optional. * If
3190
+ # provided, the same will be used. The service will throw an error if the
3191
+ # specified id is already used by another plugin instance in the plugin resource.
3192
+ # * If not provided, a system generated id will be used. This value should be 4-
3193
+ # 500 characters, and valid characters are /a-z[0-9]-_/.
3194
+ # @param [String] fields
3195
+ # Selector specifying which fields to include in a partial response.
3196
+ # @param [String] quota_user
3197
+ # Available to use for quota purposes for server-side applications. Can be any
3198
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3199
+ # @param [Google::Apis::RequestOptions] options
3200
+ # Request-specific options
3201
+ #
3202
+ # @yield [result, err] Result & error if block supplied
3203
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleLongrunningOperation] parsed result object
3204
+ # @yieldparam err [StandardError] error object if request failed
3205
+ #
3206
+ # @return [Google::Apis::ApihubV1::GoogleLongrunningOperation]
3207
+ #
3208
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3209
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3210
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3211
+ def create_project_location_plugin_instance(parent, google_cloud_apihub_v1_plugin_instance_object = nil, plugin_instance_id: nil, fields: nil, quota_user: nil, options: nil, &block)
3212
+ command = make_simple_command(:post, 'v1/{+parent}/instances', options)
3213
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1PluginInstance::Representation
3214
+ command.request_object = google_cloud_apihub_v1_plugin_instance_object
3215
+ command.response_representation = Google::Apis::ApihubV1::GoogleLongrunningOperation::Representation
3216
+ command.response_class = Google::Apis::ApihubV1::GoogleLongrunningOperation
3217
+ command.params['parent'] = parent unless parent.nil?
3218
+ command.query['pluginInstanceId'] = plugin_instance_id unless plugin_instance_id.nil?
3219
+ command.query['fields'] = fields unless fields.nil?
3220
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3221
+ execute_or_queue_command(command, &block)
3222
+ end
3223
+
3224
+ # Deletes a plugin instance in the API hub.
3225
+ # @param [String] name
3226
+ # Required. The name of the plugin instance to delete. Format: `projects/`
3227
+ # project`/locations/`location`/plugins/`plugin`/instances/`instance``.
3228
+ # @param [String] fields
3229
+ # Selector specifying which fields to include in a partial response.
3230
+ # @param [String] quota_user
3231
+ # Available to use for quota purposes for server-side applications. Can be any
3232
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3233
+ # @param [Google::Apis::RequestOptions] options
3234
+ # Request-specific options
3235
+ #
3236
+ # @yield [result, err] Result & error if block supplied
3237
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleLongrunningOperation] parsed result object
3238
+ # @yieldparam err [StandardError] error object if request failed
3239
+ #
3240
+ # @return [Google::Apis::ApihubV1::GoogleLongrunningOperation]
3241
+ #
3242
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3243
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3244
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3245
+ def delete_project_location_plugin_instance(name, fields: nil, quota_user: nil, options: nil, &block)
3246
+ command = make_simple_command(:delete, 'v1/{+name}', options)
3247
+ command.response_representation = Google::Apis::ApihubV1::GoogleLongrunningOperation::Representation
3248
+ command.response_class = Google::Apis::ApihubV1::GoogleLongrunningOperation
3249
+ command.params['name'] = name unless name.nil?
3250
+ command.query['fields'] = fields unless fields.nil?
3251
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3252
+ execute_or_queue_command(command, &block)
3253
+ end
3254
+
3255
+ # Disables a plugin instance in the API hub.
3256
+ # @param [String] name
3257
+ # Required. The name of the plugin instance to disable. Format: `projects/`
3258
+ # project`/locations/`location`/plugins/`plugin`/instances/`instance``
3259
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1DisablePluginInstanceActionRequest] google_cloud_apihub_v1_disable_plugin_instance_action_request_object
3260
+ # @param [String] fields
3261
+ # Selector specifying which fields to include in a partial response.
3262
+ # @param [String] quota_user
3263
+ # Available to use for quota purposes for server-side applications. Can be any
3264
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3265
+ # @param [Google::Apis::RequestOptions] options
3266
+ # Request-specific options
3267
+ #
3268
+ # @yield [result, err] Result & error if block supplied
3269
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleLongrunningOperation] parsed result object
3270
+ # @yieldparam err [StandardError] error object if request failed
3271
+ #
3272
+ # @return [Google::Apis::ApihubV1::GoogleLongrunningOperation]
3273
+ #
3274
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3275
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3276
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3277
+ def disable_project_location_plugin_instance_action(name, google_cloud_apihub_v1_disable_plugin_instance_action_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3278
+ command = make_simple_command(:post, 'v1/{+name}:disableAction', options)
3279
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1DisablePluginInstanceActionRequest::Representation
3280
+ command.request_object = google_cloud_apihub_v1_disable_plugin_instance_action_request_object
3281
+ command.response_representation = Google::Apis::ApihubV1::GoogleLongrunningOperation::Representation
3282
+ command.response_class = Google::Apis::ApihubV1::GoogleLongrunningOperation
3283
+ command.params['name'] = name unless name.nil?
3284
+ command.query['fields'] = fields unless fields.nil?
3285
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3286
+ execute_or_queue_command(command, &block)
3287
+ end
3288
+
3289
+ # Enables a plugin instance in the API hub.
3290
+ # @param [String] name
3291
+ # Required. The name of the plugin instance to enable. Format: `projects/`
3292
+ # project`/locations/`location`/plugins/`plugin`/instances/`instance``
3293
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1EnablePluginInstanceActionRequest] google_cloud_apihub_v1_enable_plugin_instance_action_request_object
3294
+ # @param [String] fields
3295
+ # Selector specifying which fields to include in a partial response.
3296
+ # @param [String] quota_user
3297
+ # Available to use for quota purposes for server-side applications. Can be any
3298
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3299
+ # @param [Google::Apis::RequestOptions] options
3300
+ # Request-specific options
3301
+ #
3302
+ # @yield [result, err] Result & error if block supplied
3303
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleLongrunningOperation] parsed result object
3304
+ # @yieldparam err [StandardError] error object if request failed
3305
+ #
3306
+ # @return [Google::Apis::ApihubV1::GoogleLongrunningOperation]
3307
+ #
3308
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3309
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3310
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3311
+ def enable_project_location_plugin_instance_action(name, google_cloud_apihub_v1_enable_plugin_instance_action_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3312
+ command = make_simple_command(:post, 'v1/{+name}:enableAction', options)
3313
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1EnablePluginInstanceActionRequest::Representation
3314
+ command.request_object = google_cloud_apihub_v1_enable_plugin_instance_action_request_object
3315
+ command.response_representation = Google::Apis::ApihubV1::GoogleLongrunningOperation::Representation
3316
+ command.response_class = Google::Apis::ApihubV1::GoogleLongrunningOperation
3317
+ command.params['name'] = name unless name.nil?
3318
+ command.query['fields'] = fields unless fields.nil?
3319
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3320
+ execute_or_queue_command(command, &block)
3321
+ end
3322
+
3323
+ # Executes a plugin instance in the API hub.
3324
+ # @param [String] name
3325
+ # Required. The name of the plugin instance to execute. Format: `projects/`
3326
+ # project`/locations/`location`/plugins/`plugin`/instances/`instance``
3327
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1ExecutePluginInstanceActionRequest] google_cloud_apihub_v1_execute_plugin_instance_action_request_object
3328
+ # @param [String] fields
3329
+ # Selector specifying which fields to include in a partial response.
3330
+ # @param [String] quota_user
3331
+ # Available to use for quota purposes for server-side applications. Can be any
3332
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3333
+ # @param [Google::Apis::RequestOptions] options
3334
+ # Request-specific options
3335
+ #
3336
+ # @yield [result, err] Result & error if block supplied
3337
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleLongrunningOperation] parsed result object
3338
+ # @yieldparam err [StandardError] error object if request failed
3339
+ #
3340
+ # @return [Google::Apis::ApihubV1::GoogleLongrunningOperation]
3341
+ #
3342
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3343
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3344
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3345
+ def execute_project_location_plugin_instance_action(name, google_cloud_apihub_v1_execute_plugin_instance_action_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3346
+ command = make_simple_command(:post, 'v1/{+name}:executeAction', options)
3347
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ExecutePluginInstanceActionRequest::Representation
3348
+ command.request_object = google_cloud_apihub_v1_execute_plugin_instance_action_request_object
3349
+ command.response_representation = Google::Apis::ApihubV1::GoogleLongrunningOperation::Representation
3350
+ command.response_class = Google::Apis::ApihubV1::GoogleLongrunningOperation
3351
+ command.params['name'] = name unless name.nil?
3352
+ command.query['fields'] = fields unless fields.nil?
3353
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3354
+ execute_or_queue_command(command, &block)
3355
+ end
3356
+
3357
+ # Get an API Hub plugin instance.
3358
+ # @param [String] name
3359
+ # Required. The name of the plugin instance to retrieve. Format: `projects/`
3360
+ # project`/locations/`location`/plugins/`plugin`/instances/`instance``
3361
+ # @param [String] fields
3362
+ # Selector specifying which fields to include in a partial response.
3363
+ # @param [String] quota_user
3364
+ # Available to use for quota purposes for server-side applications. Can be any
3365
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3366
+ # @param [Google::Apis::RequestOptions] options
3367
+ # Request-specific options
3368
+ #
3369
+ # @yield [result, err] Result & error if block supplied
3370
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1PluginInstance] parsed result object
3371
+ # @yieldparam err [StandardError] error object if request failed
3372
+ #
3373
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1PluginInstance]
3374
+ #
3375
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3376
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3377
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3378
+ def get_project_location_plugin_instance(name, fields: nil, quota_user: nil, options: nil, &block)
3379
+ command = make_simple_command(:get, 'v1/{+name}', options)
3380
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1PluginInstance::Representation
3381
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1PluginInstance
3382
+ command.params['name'] = name unless name.nil?
3383
+ command.query['fields'] = fields unless fields.nil?
3384
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3385
+ execute_or_queue_command(command, &block)
3386
+ end
3387
+
3388
+ # List all the plugins in a given project and location. `-` can be used as
3389
+ # wildcard value for `plugin_id`
3390
+ # @param [String] parent
3391
+ # Required. The parent resource where this plugin will be created. Format: `
3392
+ # projects/`project`/locations/`location`/plugins/`plugin``. To list plugin
3393
+ # instances for multiple plugins, use the - character instead of the plugin ID.
3394
+ # @param [String] filter
3395
+ # Optional. An expression that filters the list of plugin instances. A filter
3396
+ # expression consists of a field name, a comparison operator, and a value for
3397
+ # filtering. The value must be a string. The comparison operator must be one of:
3398
+ # `<`, `>` or `=`. Filters are not case sensitive. The following fields in the `
3399
+ # PluginInstances` are eligible for filtering: * `state` - The state of the
3400
+ # Plugin Instance. Allowed comparison operators: `=`. Expressions are combined
3401
+ # with either `AND` logic operator or `OR` logical operator but not both of them
3402
+ # together i.e. only one of the `AND` or `OR` operator can be used throughout
3403
+ # the filter string and both the operators cannot be used together. No other
3404
+ # logical operators are supported. At most three filter fields are allowed in
3405
+ # the filter string and if provided more than that then `INVALID_ARGUMENT` error
3406
+ # is returned by the API. Here are a few examples: * `state = ENABLED` - The
3407
+ # plugin instance is in enabled state.
3408
+ # @param [Fixnum] page_size
3409
+ # Optional. The maximum number of hub plugins to return. The service may return
3410
+ # fewer than this value. If unspecified, at most 50 hub plugins will be returned.
3411
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
3412
+ # @param [String] page_token
3413
+ # Optional. A page token, received from a previous `ListPluginInstances` call.
3414
+ # Provide this to retrieve the subsequent page. When paginating, all other
3415
+ # parameters provided to `ListPluginInstances` must match the call that provided
3416
+ # the page token.
3417
+ # @param [String] fields
3418
+ # Selector specifying which fields to include in a partial response.
3419
+ # @param [String] quota_user
3420
+ # Available to use for quota purposes for server-side applications. Can be any
3421
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3422
+ # @param [Google::Apis::RequestOptions] options
3423
+ # Request-specific options
3424
+ #
3425
+ # @yield [result, err] Result & error if block supplied
3426
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ListPluginInstancesResponse] parsed result object
3427
+ # @yieldparam err [StandardError] error object if request failed
3428
+ #
3429
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ListPluginInstancesResponse]
3430
+ #
3431
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3432
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3433
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3434
+ def list_project_location_plugin_instances(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3435
+ command = make_simple_command(:get, 'v1/{+parent}/instances', options)
3436
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ListPluginInstancesResponse::Representation
3437
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ListPluginInstancesResponse
3438
+ command.params['parent'] = parent unless parent.nil?
3439
+ command.query['filter'] = filter unless filter.nil?
3440
+ command.query['pageSize'] = page_size unless page_size.nil?
3441
+ command.query['pageToken'] = page_token unless page_token.nil?
3442
+ command.query['fields'] = fields unless fields.nil?
3443
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3444
+ execute_or_queue_command(command, &block)
3445
+ end
3446
+
3447
+ # Get the contents of the style guide.
3448
+ # @param [String] name
3449
+ # Required. The name of the StyleGuide whose contents need to be retrieved.
3450
+ # There is exactly one style guide resource per project per location. The
3451
+ # expected format is `projects/`project`/locations/`location`/plugins/`plugin`/
3452
+ # styleGuide`.
3453
+ # @param [String] fields
3454
+ # Selector specifying which fields to include in a partial response.
3455
+ # @param [String] quota_user
3456
+ # Available to use for quota purposes for server-side applications. Can be any
3457
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3458
+ # @param [Google::Apis::RequestOptions] options
3459
+ # Request-specific options
3460
+ #
3461
+ # @yield [result, err] Result & error if block supplied
3462
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1StyleGuideContents] parsed result object
3463
+ # @yieldparam err [StandardError] error object if request failed
3464
+ #
3465
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1StyleGuideContents]
3466
+ #
3467
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3468
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3469
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3470
+ def get_project_location_plugin_style_guide_contents(name, fields: nil, quota_user: nil, options: nil, &block)
3471
+ command = make_simple_command(:get, 'v1/{+name}:contents', options)
3472
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1StyleGuideContents::Representation
3473
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1StyleGuideContents
3474
+ command.params['name'] = name unless name.nil?
3475
+ command.query['fields'] = fields unless fields.nil?
3476
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3477
+ execute_or_queue_command(command, &block)
3478
+ end
3479
+
3480
+ # Attaches a runtime project to the host project.
3481
+ # @param [String] parent
3482
+ # Required. The parent resource for the Runtime Project Attachment. Format: `
3483
+ # projects/`project`/locations/`location``
3484
+ # @param [Google::Apis::ApihubV1::GoogleCloudApihubV1RuntimeProjectAttachment] google_cloud_apihub_v1_runtime_project_attachment_object
3485
+ # @param [String] runtime_project_attachment_id
3486
+ # Required. The ID to use for the Runtime Project Attachment, which will become
3487
+ # the final component of the Runtime Project Attachment's name. The ID must be
3488
+ # the same as the project ID of the Google cloud project specified in the
3489
+ # runtime_project_attachment.runtime_project field.
3490
+ # @param [String] fields
3491
+ # Selector specifying which fields to include in a partial response.
3492
+ # @param [String] quota_user
3493
+ # Available to use for quota purposes for server-side applications. Can be any
3494
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3495
+ # @param [Google::Apis::RequestOptions] options
3496
+ # Request-specific options
3497
+ #
3498
+ # @yield [result, err] Result & error if block supplied
3499
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1RuntimeProjectAttachment] parsed result object
3500
+ # @yieldparam err [StandardError] error object if request failed
3501
+ #
3502
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1RuntimeProjectAttachment]
3503
+ #
3504
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3505
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3506
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3507
+ def create_project_location_runtime_project_attachment(parent, google_cloud_apihub_v1_runtime_project_attachment_object = nil, runtime_project_attachment_id: nil, fields: nil, quota_user: nil, options: nil, &block)
3508
+ command = make_simple_command(:post, 'v1/{+parent}/runtimeProjectAttachments', options)
3509
+ command.request_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1RuntimeProjectAttachment::Representation
3510
+ command.request_object = google_cloud_apihub_v1_runtime_project_attachment_object
3511
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1RuntimeProjectAttachment::Representation
3512
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1RuntimeProjectAttachment
3513
+ command.params['parent'] = parent unless parent.nil?
3514
+ command.query['runtimeProjectAttachmentId'] = runtime_project_attachment_id unless runtime_project_attachment_id.nil?
3515
+ command.query['fields'] = fields unless fields.nil?
3516
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3517
+ execute_or_queue_command(command, &block)
3518
+ end
3519
+
3520
+ # Delete a runtime project attachment in the API Hub. This call will detach the
3521
+ # runtime project from the host project.
3522
+ # @param [String] name
3523
+ # Required. The name of the Runtime Project Attachment to delete. Format: `
3524
+ # projects/`project`/locations/`location`/runtimeProjectAttachments/`
3525
+ # runtime_project_attachment``
3526
+ # @param [String] fields
3527
+ # Selector specifying which fields to include in a partial response.
3528
+ # @param [String] quota_user
3529
+ # Available to use for quota purposes for server-side applications. Can be any
3530
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3531
+ # @param [Google::Apis::RequestOptions] options
3532
+ # Request-specific options
3533
+ #
3534
+ # @yield [result, err] Result & error if block supplied
3535
+ # @yieldparam result [Google::Apis::ApihubV1::Empty] parsed result object
3536
+ # @yieldparam err [StandardError] error object if request failed
3537
+ #
3538
+ # @return [Google::Apis::ApihubV1::Empty]
3539
+ #
3540
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3541
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3542
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3543
+ def delete_project_location_runtime_project_attachment(name, fields: nil, quota_user: nil, options: nil, &block)
3544
+ command = make_simple_command(:delete, 'v1/{+name}', options)
3545
+ command.response_representation = Google::Apis::ApihubV1::Empty::Representation
3546
+ command.response_class = Google::Apis::ApihubV1::Empty
3547
+ command.params['name'] = name unless name.nil?
3548
+ command.query['fields'] = fields unless fields.nil?
3549
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3550
+ execute_or_queue_command(command, &block)
3551
+ end
3552
+
3553
+ # Gets a runtime project attachment.
3554
+ # @param [String] name
3555
+ # Required. The name of the API resource to retrieve. Format: `projects/`project`
3556
+ # /locations/`location`/runtimeProjectAttachments/`runtime_project_attachment``
3557
+ # @param [String] fields
3558
+ # Selector specifying which fields to include in a partial response.
3559
+ # @param [String] quota_user
3560
+ # Available to use for quota purposes for server-side applications. Can be any
3561
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3562
+ # @param [Google::Apis::RequestOptions] options
3563
+ # Request-specific options
3564
+ #
3565
+ # @yield [result, err] Result & error if block supplied
3566
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1RuntimeProjectAttachment] parsed result object
3567
+ # @yieldparam err [StandardError] error object if request failed
3568
+ #
3569
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1RuntimeProjectAttachment]
3570
+ #
3571
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3572
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3573
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3574
+ def get_project_location_runtime_project_attachment(name, fields: nil, quota_user: nil, options: nil, &block)
3575
+ command = make_simple_command(:get, 'v1/{+name}', options)
3576
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1RuntimeProjectAttachment::Representation
3577
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1RuntimeProjectAttachment
3578
+ command.params['name'] = name unless name.nil?
3579
+ command.query['fields'] = fields unless fields.nil?
3580
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3581
+ execute_or_queue_command(command, &block)
3582
+ end
3583
+
3584
+ # List runtime projects attached to the host project.
3585
+ # @param [String] parent
3586
+ # Required. The parent, which owns this collection of runtime project
3587
+ # attachments. Format: `projects/`project`/locations/`location``
3588
+ # @param [String] filter
3589
+ # Optional. An expression that filters the list of RuntimeProjectAttachments. A
3590
+ # filter expression consists of a field name, a comparison operator, and a value
3591
+ # for filtering. The value must be a string. All standard operators as
3592
+ # documented at https://google.aip.dev/160 are supported. The following fields
3593
+ # in the `RuntimeProjectAttachment` are eligible for filtering: * `name` - The
3594
+ # name of the RuntimeProjectAttachment. * `create_time` - The time at which the
3595
+ # RuntimeProjectAttachment was created. The value should be in the (RFC3339)[
3596
+ # https://tools.ietf.org/html/rfc3339] format. * `runtime_project` - The Google
3597
+ # cloud project associated with the RuntimeProjectAttachment.
3598
+ # @param [String] order_by
3599
+ # Optional. Hint for how to order the results.
3600
+ # @param [Fixnum] page_size
3601
+ # Optional. The maximum number of runtime project attachments to return. The
3602
+ # service may return fewer than this value. If unspecified, at most 50 runtime
3603
+ # project attachments will be returned. The maximum value is 1000; values above
3604
+ # 1000 will be coerced to 1000.
3605
+ # @param [String] page_token
3606
+ # Optional. A page token, received from a previous `
3607
+ # ListRuntimeProjectAttachments` call. Provide this to retrieve the subsequent
3608
+ # page. When paginating, all other parameters (except page_size) provided to `
3609
+ # ListRuntimeProjectAttachments` must match the call that provided the page
3610
+ # token.
3611
+ # @param [String] fields
3612
+ # Selector specifying which fields to include in a partial response.
3613
+ # @param [String] quota_user
3614
+ # Available to use for quota purposes for server-side applications. Can be any
3615
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3616
+ # @param [Google::Apis::RequestOptions] options
3617
+ # Request-specific options
3618
+ #
3619
+ # @yield [result, err] Result & error if block supplied
3620
+ # @yieldparam result [Google::Apis::ApihubV1::GoogleCloudApihubV1ListRuntimeProjectAttachmentsResponse] parsed result object
3621
+ # @yieldparam err [StandardError] error object if request failed
3622
+ #
3623
+ # @return [Google::Apis::ApihubV1::GoogleCloudApihubV1ListRuntimeProjectAttachmentsResponse]
3624
+ #
3625
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3626
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3627
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3628
+ def list_project_location_runtime_project_attachments(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3629
+ command = make_simple_command(:get, 'v1/{+parent}/runtimeProjectAttachments', options)
3630
+ command.response_representation = Google::Apis::ApihubV1::GoogleCloudApihubV1ListRuntimeProjectAttachmentsResponse::Representation
3631
+ command.response_class = Google::Apis::ApihubV1::GoogleCloudApihubV1ListRuntimeProjectAttachmentsResponse
3632
+ command.params['parent'] = parent unless parent.nil?
3633
+ command.query['filter'] = filter unless filter.nil?
3634
+ command.query['orderBy'] = order_by unless order_by.nil?
3635
+ command.query['pageSize'] = page_size unless page_size.nil?
3636
+ command.query['pageToken'] = page_token unless page_token.nil?
3637
+ command.query['fields'] = fields unless fields.nil?
3638
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3639
+ execute_or_queue_command(command, &block)
3640
+ end
3641
+
3642
+ protected
3643
+
3644
+ def apply_command_defaults(command)
3645
+ command.query['key'] = key unless key.nil?
3646
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3647
+ end
3648
+ end
3649
+ end
3650
+ end
3651
+ end