google-apis-baremetalsolution_v2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
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
+ module Google
16
+ module Apis
17
+ module BaremetalsolutionV2
18
+ # Version of the google-apis-baremetalsolution_v2 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.4.0"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20210706"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,311 @@
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 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module BaremetalsolutionV2
24
+
25
+ class Binding
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class CancelOperationRequest
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class Empty
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class Expr
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class Instance
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class ListInstancesResponse
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class ListLocationsResponse
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class ListOperationsResponse
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class Location
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class Lun
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class Network
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class Operation
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class OperationMetadata
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class Policy
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class SetIamPolicyRequest
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class Status
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class TestIamPermissionsRequest
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class TestIamPermissionsResponse
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class Binding
134
+ # @private
135
+ class Representation < Google::Apis::Core::JsonRepresentation
136
+ property :condition, as: 'condition', class: Google::Apis::BaremetalsolutionV2::Expr, decorator: Google::Apis::BaremetalsolutionV2::Expr::Representation
137
+
138
+ collection :members, as: 'members'
139
+ property :role, as: 'role'
140
+ end
141
+ end
142
+
143
+ class CancelOperationRequest
144
+ # @private
145
+ class Representation < Google::Apis::Core::JsonRepresentation
146
+ end
147
+ end
148
+
149
+ class Empty
150
+ # @private
151
+ class Representation < Google::Apis::Core::JsonRepresentation
152
+ end
153
+ end
154
+
155
+ class Expr
156
+ # @private
157
+ class Representation < Google::Apis::Core::JsonRepresentation
158
+ property :description, as: 'description'
159
+ property :expression, as: 'expression'
160
+ property :location, as: 'location'
161
+ property :title, as: 'title'
162
+ end
163
+ end
164
+
165
+ class Instance
166
+ # @private
167
+ class Representation < Google::Apis::Core::JsonRepresentation
168
+ property :create_time, as: 'createTime'
169
+ property :hyperthreading_enabled, as: 'hyperthreadingEnabled'
170
+ hash :labels, as: 'labels'
171
+ collection :luns, as: 'luns', class: Google::Apis::BaremetalsolutionV2::Lun, decorator: Google::Apis::BaremetalsolutionV2::Lun::Representation
172
+
173
+ property :machine_type, as: 'machineType'
174
+ property :name, as: 'name'
175
+ collection :networks, as: 'networks', class: Google::Apis::BaremetalsolutionV2::Network, decorator: Google::Apis::BaremetalsolutionV2::Network::Representation
176
+
177
+ property :state, as: 'state'
178
+ property :update_time, as: 'updateTime'
179
+ end
180
+ end
181
+
182
+ class ListInstancesResponse
183
+ # @private
184
+ class Representation < Google::Apis::Core::JsonRepresentation
185
+ collection :instances, as: 'instances', class: Google::Apis::BaremetalsolutionV2::Instance, decorator: Google::Apis::BaremetalsolutionV2::Instance::Representation
186
+
187
+ property :next_page_token, as: 'nextPageToken'
188
+ collection :unreachable, as: 'unreachable'
189
+ end
190
+ end
191
+
192
+ class ListLocationsResponse
193
+ # @private
194
+ class Representation < Google::Apis::Core::JsonRepresentation
195
+ collection :locations, as: 'locations', class: Google::Apis::BaremetalsolutionV2::Location, decorator: Google::Apis::BaremetalsolutionV2::Location::Representation
196
+
197
+ property :next_page_token, as: 'nextPageToken'
198
+ end
199
+ end
200
+
201
+ class ListOperationsResponse
202
+ # @private
203
+ class Representation < Google::Apis::Core::JsonRepresentation
204
+ property :next_page_token, as: 'nextPageToken'
205
+ collection :operations, as: 'operations', class: Google::Apis::BaremetalsolutionV2::Operation, decorator: Google::Apis::BaremetalsolutionV2::Operation::Representation
206
+
207
+ end
208
+ end
209
+
210
+ class Location
211
+ # @private
212
+ class Representation < Google::Apis::Core::JsonRepresentation
213
+ property :display_name, as: 'displayName'
214
+ hash :labels, as: 'labels'
215
+ property :location_id, as: 'locationId'
216
+ hash :metadata, as: 'metadata'
217
+ property :name, as: 'name'
218
+ end
219
+ end
220
+
221
+ class Lun
222
+ # @private
223
+ class Representation < Google::Apis::Core::JsonRepresentation
224
+ property :boot_lun, as: 'bootLun'
225
+ property :multiprotocol_type, as: 'multiprotocolType'
226
+ property :name, as: 'name'
227
+ property :shared, as: 'shared'
228
+ property :size_gb, :numeric_string => true, as: 'sizeGb'
229
+ property :state, as: 'state'
230
+ property :storage_volume, as: 'storageVolume'
231
+ end
232
+ end
233
+
234
+ class Network
235
+ # @private
236
+ class Representation < Google::Apis::Core::JsonRepresentation
237
+ property :ip_address, as: 'ipAddress'
238
+ collection :mac_address, as: 'macAddress'
239
+ property :network, as: 'network'
240
+ property :type, as: 'type'
241
+ end
242
+ end
243
+
244
+ class Operation
245
+ # @private
246
+ class Representation < Google::Apis::Core::JsonRepresentation
247
+ property :done, as: 'done'
248
+ property :error, as: 'error', class: Google::Apis::BaremetalsolutionV2::Status, decorator: Google::Apis::BaremetalsolutionV2::Status::Representation
249
+
250
+ hash :metadata, as: 'metadata'
251
+ property :name, as: 'name'
252
+ hash :response, as: 'response'
253
+ end
254
+ end
255
+
256
+ class OperationMetadata
257
+ # @private
258
+ class Representation < Google::Apis::Core::JsonRepresentation
259
+ property :api_version, as: 'apiVersion'
260
+ property :create_time, as: 'createTime'
261
+ property :end_time, as: 'endTime'
262
+ property :requested_cancellation, as: 'requestedCancellation'
263
+ property :status_message, as: 'statusMessage'
264
+ property :target, as: 'target'
265
+ property :verb, as: 'verb'
266
+ end
267
+ end
268
+
269
+ class Policy
270
+ # @private
271
+ class Representation < Google::Apis::Core::JsonRepresentation
272
+ collection :bindings, as: 'bindings', class: Google::Apis::BaremetalsolutionV2::Binding, decorator: Google::Apis::BaremetalsolutionV2::Binding::Representation
273
+
274
+ property :etag, :base64 => true, as: 'etag'
275
+ property :version, as: 'version'
276
+ end
277
+ end
278
+
279
+ class SetIamPolicyRequest
280
+ # @private
281
+ class Representation < Google::Apis::Core::JsonRepresentation
282
+ property :policy, as: 'policy', class: Google::Apis::BaremetalsolutionV2::Policy, decorator: Google::Apis::BaremetalsolutionV2::Policy::Representation
283
+
284
+ end
285
+ end
286
+
287
+ class Status
288
+ # @private
289
+ class Representation < Google::Apis::Core::JsonRepresentation
290
+ property :code, as: 'code'
291
+ collection :details, as: 'details'
292
+ property :message, as: 'message'
293
+ end
294
+ end
295
+
296
+ class TestIamPermissionsRequest
297
+ # @private
298
+ class Representation < Google::Apis::Core::JsonRepresentation
299
+ collection :permissions, as: 'permissions'
300
+ end
301
+ end
302
+
303
+ class TestIamPermissionsResponse
304
+ # @private
305
+ class Representation < Google::Apis::Core::JsonRepresentation
306
+ collection :permissions, as: 'permissions'
307
+ end
308
+ end
309
+ end
310
+ end
311
+ end
@@ -0,0 +1,473 @@
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 BaremetalsolutionV2
23
+ # Bare Metal Solution API
24
+ #
25
+ # Provides ways to manage Bare Metal Solution hardware installed in a regional
26
+ # extension located near a Google Cloud data center.
27
+ #
28
+ # @example
29
+ # require 'google/apis/baremetalsolution_v2'
30
+ #
31
+ # Baremetalsolution = Google::Apis::BaremetalsolutionV2 # Alias the module
32
+ # service = Baremetalsolution::BaremetalsolutionService.new
33
+ #
34
+ # @see https://cloud.google.com/bare-metal
35
+ class BaremetalsolutionService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://baremetalsolution.googleapis.com/', '',
48
+ client_name: 'google-apis-baremetalsolution_v2',
49
+ client_version: Google::Apis::BaremetalsolutionV2::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Gets information about a location.
54
+ # @param [String] name
55
+ # Resource name for the location.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Location] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::BaremetalsolutionV2::Location]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:get, 'v2/{+name}', options)
75
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Location::Representation
76
+ command.response_class = Google::Apis::BaremetalsolutionV2::Location
77
+ command.params['name'] = name unless name.nil?
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Lists information about the supported locations for this service.
84
+ # @param [String] name
85
+ # The resource that owns the locations collection, if applicable.
86
+ # @param [String] filter
87
+ # A filter to narrow down results to a preferred subset. The filtering language
88
+ # accepts strings like "displayName=tokyo", and is documented in more detail in [
89
+ # AIP-160](https://google.aip.dev/160).
90
+ # @param [Fixnum] page_size
91
+ # The maximum number of results to return. If not set, the service selects a
92
+ # default.
93
+ # @param [String] page_token
94
+ # A page token received from the `next_page_token` field in the response. Send
95
+ # that page token to receive the subsequent page.
96
+ # @param [String] fields
97
+ # Selector specifying which fields to include in a partial response.
98
+ # @param [String] quota_user
99
+ # Available to use for quota purposes for server-side applications. Can be any
100
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
101
+ # @param [Google::Apis::RequestOptions] options
102
+ # Request-specific options
103
+ #
104
+ # @yield [result, err] Result & error if block supplied
105
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::ListLocationsResponse] parsed result object
106
+ # @yieldparam err [StandardError] error object if request failed
107
+ #
108
+ # @return [Google::Apis::BaremetalsolutionV2::ListLocationsResponse]
109
+ #
110
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
111
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
112
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
113
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
114
+ command = make_simple_command(:get, 'v2/{+name}/locations', options)
115
+ command.response_representation = Google::Apis::BaremetalsolutionV2::ListLocationsResponse::Representation
116
+ command.response_class = Google::Apis::BaremetalsolutionV2::ListLocationsResponse
117
+ command.params['name'] = name unless name.nil?
118
+ command.query['filter'] = filter unless filter.nil?
119
+ command.query['pageSize'] = page_size unless page_size.nil?
120
+ command.query['pageToken'] = page_token unless page_token.nil?
121
+ command.query['fields'] = fields unless fields.nil?
122
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
123
+ execute_or_queue_command(command, &block)
124
+ end
125
+
126
+ # Gets details of a single Instance.
127
+ # @param [String] name
128
+ # Required. Name of the resource.
129
+ # @param [String] fields
130
+ # Selector specifying which fields to include in a partial response.
131
+ # @param [String] quota_user
132
+ # Available to use for quota purposes for server-side applications. Can be any
133
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
134
+ # @param [Google::Apis::RequestOptions] options
135
+ # Request-specific options
136
+ #
137
+ # @yield [result, err] Result & error if block supplied
138
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Instance] parsed result object
139
+ # @yieldparam err [StandardError] error object if request failed
140
+ #
141
+ # @return [Google::Apis::BaremetalsolutionV2::Instance]
142
+ #
143
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
144
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
145
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
146
+ def get_project_location_instance(name, fields: nil, quota_user: nil, options: nil, &block)
147
+ command = make_simple_command(:get, 'v2/{+name}', options)
148
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Instance::Representation
149
+ command.response_class = Google::Apis::BaremetalsolutionV2::Instance
150
+ command.params['name'] = name unless name.nil?
151
+ command.query['fields'] = fields unless fields.nil?
152
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
153
+ execute_or_queue_command(command, &block)
154
+ end
155
+
156
+ # Gets the access control policy for a resource. Returns an empty policy if the
157
+ # resource exists and does not have a policy set.
158
+ # @param [String] resource
159
+ # REQUIRED: The resource for which the policy is being requested. See the
160
+ # operation documentation for the appropriate value for this field.
161
+ # @param [Fixnum] options_requested_policy_version
162
+ # Optional. The policy format version to be returned. Valid values are 0, 1, and
163
+ # 3. Requests specifying an invalid value will be rejected. Requests for
164
+ # policies with any conditional bindings must specify version 3. Policies
165
+ # without any conditional bindings may specify any valid value or leave the
166
+ # field unset. To learn which resources support conditions in their IAM policies,
167
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
168
+ # resource-policies).
169
+ # @param [String] fields
170
+ # Selector specifying which fields to include in a partial response.
171
+ # @param [String] quota_user
172
+ # Available to use for quota purposes for server-side applications. Can be any
173
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
174
+ # @param [Google::Apis::RequestOptions] options
175
+ # Request-specific options
176
+ #
177
+ # @yield [result, err] Result & error if block supplied
178
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Policy] parsed result object
179
+ # @yieldparam err [StandardError] error object if request failed
180
+ #
181
+ # @return [Google::Apis::BaremetalsolutionV2::Policy]
182
+ #
183
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
184
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
185
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
186
+ def get_project_location_instance_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
187
+ command = make_simple_command(:get, 'v2/{+resource}:getIamPolicy', options)
188
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Policy::Representation
189
+ command.response_class = Google::Apis::BaremetalsolutionV2::Policy
190
+ command.params['resource'] = resource unless resource.nil?
191
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
192
+ command.query['fields'] = fields unless fields.nil?
193
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
194
+ execute_or_queue_command(command, &block)
195
+ end
196
+
197
+ # Lists Instances in a given project and location.
198
+ # @param [String] parent
199
+ # Required. Parent value for ListInstancesRequest.
200
+ # @param [String] filter
201
+ # Filtering results.
202
+ # @param [String] order_by
203
+ # Hint for how to order the results.
204
+ # @param [Fixnum] page_size
205
+ # Requested page size. Server may return fewer items than requested. If
206
+ # unspecified, server will pick an appropriate default.
207
+ # @param [String] page_token
208
+ # A token identifying a page of results the server should return.
209
+ # @param [String] fields
210
+ # Selector specifying which fields to include in a partial response.
211
+ # @param [String] quota_user
212
+ # Available to use for quota purposes for server-side applications. Can be any
213
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
214
+ # @param [Google::Apis::RequestOptions] options
215
+ # Request-specific options
216
+ #
217
+ # @yield [result, err] Result & error if block supplied
218
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::ListInstancesResponse] parsed result object
219
+ # @yieldparam err [StandardError] error object if request failed
220
+ #
221
+ # @return [Google::Apis::BaremetalsolutionV2::ListInstancesResponse]
222
+ #
223
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
224
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
225
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
226
+ def list_project_location_instances(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
227
+ command = make_simple_command(:get, 'v2/{+parent}/instances', options)
228
+ command.response_representation = Google::Apis::BaremetalsolutionV2::ListInstancesResponse::Representation
229
+ command.response_class = Google::Apis::BaremetalsolutionV2::ListInstancesResponse
230
+ command.params['parent'] = parent unless parent.nil?
231
+ command.query['filter'] = filter unless filter.nil?
232
+ command.query['orderBy'] = order_by unless order_by.nil?
233
+ command.query['pageSize'] = page_size unless page_size.nil?
234
+ command.query['pageToken'] = page_token unless page_token.nil?
235
+ command.query['fields'] = fields unless fields.nil?
236
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
237
+ execute_or_queue_command(command, &block)
238
+ end
239
+
240
+ # Sets the access control policy on the specified resource. Replaces any
241
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
242
+ # PERMISSION_DENIED` errors.
243
+ # @param [String] resource
244
+ # REQUIRED: The resource for which the policy is being specified. See the
245
+ # operation documentation for the appropriate value for this field.
246
+ # @param [Google::Apis::BaremetalsolutionV2::SetIamPolicyRequest] set_iam_policy_request_object
247
+ # @param [String] fields
248
+ # Selector specifying which fields to include in a partial response.
249
+ # @param [String] quota_user
250
+ # Available to use for quota purposes for server-side applications. Can be any
251
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
252
+ # @param [Google::Apis::RequestOptions] options
253
+ # Request-specific options
254
+ #
255
+ # @yield [result, err] Result & error if block supplied
256
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Policy] parsed result object
257
+ # @yieldparam err [StandardError] error object if request failed
258
+ #
259
+ # @return [Google::Apis::BaremetalsolutionV2::Policy]
260
+ #
261
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
262
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
263
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
264
+ def set_instance_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
265
+ command = make_simple_command(:post, 'v2/{+resource}:setIamPolicy', options)
266
+ command.request_representation = Google::Apis::BaremetalsolutionV2::SetIamPolicyRequest::Representation
267
+ command.request_object = set_iam_policy_request_object
268
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Policy::Representation
269
+ command.response_class = Google::Apis::BaremetalsolutionV2::Policy
270
+ command.params['resource'] = resource unless resource.nil?
271
+ command.query['fields'] = fields unless fields.nil?
272
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
273
+ execute_or_queue_command(command, &block)
274
+ end
275
+
276
+ # Returns permissions that a caller has on the specified resource. If the
277
+ # resource does not exist, this will return an empty set of permissions, not a `
278
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
279
+ # permission-aware UIs and command-line tools, not for authorization checking.
280
+ # This operation may "fail open" without warning.
281
+ # @param [String] resource
282
+ # REQUIRED: The resource for which the policy detail is being requested. See the
283
+ # operation documentation for the appropriate value for this field.
284
+ # @param [Google::Apis::BaremetalsolutionV2::TestIamPermissionsRequest] test_iam_permissions_request_object
285
+ # @param [String] fields
286
+ # Selector specifying which fields to include in a partial response.
287
+ # @param [String] quota_user
288
+ # Available to use for quota purposes for server-side applications. Can be any
289
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
290
+ # @param [Google::Apis::RequestOptions] options
291
+ # Request-specific options
292
+ #
293
+ # @yield [result, err] Result & error if block supplied
294
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::TestIamPermissionsResponse] parsed result object
295
+ # @yieldparam err [StandardError] error object if request failed
296
+ #
297
+ # @return [Google::Apis::BaremetalsolutionV2::TestIamPermissionsResponse]
298
+ #
299
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
300
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
301
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
302
+ def test_instance_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
303
+ command = make_simple_command(:post, 'v2/{+resource}:testIamPermissions', options)
304
+ command.request_representation = Google::Apis::BaremetalsolutionV2::TestIamPermissionsRequest::Representation
305
+ command.request_object = test_iam_permissions_request_object
306
+ command.response_representation = Google::Apis::BaremetalsolutionV2::TestIamPermissionsResponse::Representation
307
+ command.response_class = Google::Apis::BaremetalsolutionV2::TestIamPermissionsResponse
308
+ command.params['resource'] = resource unless resource.nil?
309
+ command.query['fields'] = fields unless fields.nil?
310
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
311
+ execute_or_queue_command(command, &block)
312
+ end
313
+
314
+ # Starts asynchronous cancellation on a long-running operation. The server makes
315
+ # a best effort to cancel the operation, but success is not guaranteed. If the
316
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
317
+ # Clients can use Operations.GetOperation or other methods to check whether the
318
+ # cancellation succeeded or whether the operation completed despite cancellation.
319
+ # On successful cancellation, the operation is not deleted; instead, it becomes
320
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
321
+ # corresponding to `Code.CANCELLED`.
322
+ # @param [String] name
323
+ # The name of the operation resource to be cancelled.
324
+ # @param [Google::Apis::BaremetalsolutionV2::CancelOperationRequest] cancel_operation_request_object
325
+ # @param [String] fields
326
+ # Selector specifying which fields to include in a partial response.
327
+ # @param [String] quota_user
328
+ # Available to use for quota purposes for server-side applications. Can be any
329
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
330
+ # @param [Google::Apis::RequestOptions] options
331
+ # Request-specific options
332
+ #
333
+ # @yield [result, err] Result & error if block supplied
334
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Empty] parsed result object
335
+ # @yieldparam err [StandardError] error object if request failed
336
+ #
337
+ # @return [Google::Apis::BaremetalsolutionV2::Empty]
338
+ #
339
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
340
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
341
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
342
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
343
+ command = make_simple_command(:post, 'v2/{+name}:cancel', options)
344
+ command.request_representation = Google::Apis::BaremetalsolutionV2::CancelOperationRequest::Representation
345
+ command.request_object = cancel_operation_request_object
346
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Empty::Representation
347
+ command.response_class = Google::Apis::BaremetalsolutionV2::Empty
348
+ command.params['name'] = name unless name.nil?
349
+ command.query['fields'] = fields unless fields.nil?
350
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
351
+ execute_or_queue_command(command, &block)
352
+ end
353
+
354
+ # Deletes a long-running operation. This method indicates that the client is no
355
+ # longer interested in the operation result. It does not cancel the operation.
356
+ # If the server doesn't support this method, it returns `google.rpc.Code.
357
+ # UNIMPLEMENTED`.
358
+ # @param [String] name
359
+ # The name of the operation resource to be deleted.
360
+ # @param [String] fields
361
+ # Selector specifying which fields to include in a partial response.
362
+ # @param [String] quota_user
363
+ # Available to use for quota purposes for server-side applications. Can be any
364
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
365
+ # @param [Google::Apis::RequestOptions] options
366
+ # Request-specific options
367
+ #
368
+ # @yield [result, err] Result & error if block supplied
369
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Empty] parsed result object
370
+ # @yieldparam err [StandardError] error object if request failed
371
+ #
372
+ # @return [Google::Apis::BaremetalsolutionV2::Empty]
373
+ #
374
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
375
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
376
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
377
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
378
+ command = make_simple_command(:delete, 'v2/{+name}', options)
379
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Empty::Representation
380
+ command.response_class = Google::Apis::BaremetalsolutionV2::Empty
381
+ command.params['name'] = name unless name.nil?
382
+ command.query['fields'] = fields unless fields.nil?
383
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
384
+ execute_or_queue_command(command, &block)
385
+ end
386
+
387
+ # Gets the latest state of a long-running operation. Clients can use this method
388
+ # to poll the operation result at intervals as recommended by the API service.
389
+ # @param [String] name
390
+ # The name of the operation resource.
391
+ # @param [String] fields
392
+ # Selector specifying which fields to include in a partial response.
393
+ # @param [String] quota_user
394
+ # Available to use for quota purposes for server-side applications. Can be any
395
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
396
+ # @param [Google::Apis::RequestOptions] options
397
+ # Request-specific options
398
+ #
399
+ # @yield [result, err] Result & error if block supplied
400
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Operation] parsed result object
401
+ # @yieldparam err [StandardError] error object if request failed
402
+ #
403
+ # @return [Google::Apis::BaremetalsolutionV2::Operation]
404
+ #
405
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
406
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
407
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
408
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
409
+ command = make_simple_command(:get, 'v2/{+name}', options)
410
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Operation::Representation
411
+ command.response_class = Google::Apis::BaremetalsolutionV2::Operation
412
+ command.params['name'] = name unless name.nil?
413
+ command.query['fields'] = fields unless fields.nil?
414
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
415
+ execute_or_queue_command(command, &block)
416
+ end
417
+
418
+ # Lists operations that match the specified filter in the request. If the server
419
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
420
+ # binding allows API services to override the binding to use different resource
421
+ # name schemes, such as `users/*/operations`. To override the binding, API
422
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
423
+ # service configuration. For backwards compatibility, the default name includes
424
+ # the operations collection id, however overriding users must ensure the name
425
+ # binding is the parent resource, without the operations collection id.
426
+ # @param [String] name
427
+ # The name of the operation's parent resource.
428
+ # @param [String] filter
429
+ # The standard list filter.
430
+ # @param [Fixnum] page_size
431
+ # The standard list page size.
432
+ # @param [String] page_token
433
+ # The standard list page token.
434
+ # @param [String] fields
435
+ # Selector specifying which fields to include in a partial response.
436
+ # @param [String] quota_user
437
+ # Available to use for quota purposes for server-side applications. Can be any
438
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
439
+ # @param [Google::Apis::RequestOptions] options
440
+ # Request-specific options
441
+ #
442
+ # @yield [result, err] Result & error if block supplied
443
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::ListOperationsResponse] parsed result object
444
+ # @yieldparam err [StandardError] error object if request failed
445
+ #
446
+ # @return [Google::Apis::BaremetalsolutionV2::ListOperationsResponse]
447
+ #
448
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
449
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
450
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
451
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
452
+ command = make_simple_command(:get, 'v2/{+name}/operations', options)
453
+ command.response_representation = Google::Apis::BaremetalsolutionV2::ListOperationsResponse::Representation
454
+ command.response_class = Google::Apis::BaremetalsolutionV2::ListOperationsResponse
455
+ command.params['name'] = name unless name.nil?
456
+ command.query['filter'] = filter unless filter.nil?
457
+ command.query['pageSize'] = page_size unless page_size.nil?
458
+ command.query['pageToken'] = page_token unless page_token.nil?
459
+ command.query['fields'] = fields unless fields.nil?
460
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
461
+ execute_or_queue_command(command, &block)
462
+ end
463
+
464
+ protected
465
+
466
+ def apply_command_defaults(command)
467
+ command.query['key'] = key unless key.nil?
468
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
469
+ end
470
+ end
471
+ end
472
+ end
473
+ end