google-apis-remotebuildexecution_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.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-remotebuildexecution_v1.rb +15 -0
- data/lib/google/apis/remotebuildexecution_v1.rb +36 -0
- data/lib/google/apis/remotebuildexecution_v1/classes.rb +2978 -0
- data/lib/google/apis/remotebuildexecution_v1/gem_version.rb +28 -0
- data/lib/google/apis/remotebuildexecution_v1/representations.rb +1104 -0
- data/lib/google/apis/remotebuildexecution_v1/service.rb +292 -0
- metadata +76 -0
@@ -0,0 +1,292 @@
|
|
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 RemotebuildexecutionV1
|
23
|
+
# Remote Build Execution API
|
24
|
+
#
|
25
|
+
# Supplies a Remote Execution API service for tools such as bazel.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/remotebuildexecution_v1'
|
29
|
+
#
|
30
|
+
# Remotebuildexecution = Google::Apis::RemotebuildexecutionV1 # Alias the module
|
31
|
+
# service = Remotebuildexecution::RemoteBuildExecutionService.new
|
32
|
+
#
|
33
|
+
# @see https://cloud.google.com/remote-build-execution/docs/
|
34
|
+
class RemoteBuildExecutionService < Google::Apis::Core::BaseService
|
35
|
+
# @return [String]
|
36
|
+
# API key. Your API key identifies your project and provides you with API access,
|
37
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
38
|
+
attr_accessor :key
|
39
|
+
|
40
|
+
# @return [String]
|
41
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
42
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
43
|
+
attr_accessor :quota_user
|
44
|
+
|
45
|
+
def initialize
|
46
|
+
super('https://remotebuildexecution.googleapis.com/', '',
|
47
|
+
client_name: 'google-apis-remotebuildexecution_v1',
|
48
|
+
client_version: Google::Apis::RemotebuildexecutionV1::GEM_VERSION)
|
49
|
+
@batch_path = 'batch'
|
50
|
+
end
|
51
|
+
|
52
|
+
# Downloads media. Download is supported on the URI `/v1/media/`+name`?alt=media`
|
53
|
+
# .
|
54
|
+
# @param [String] resource_name
|
55
|
+
# Name of the media that is being downloaded. See ReadRequest.resource_name.
|
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 [IO, String] download_dest
|
62
|
+
# IO stream or filename to receive content download
|
63
|
+
# @param [Google::Apis::RequestOptions] options
|
64
|
+
# Request-specific options
|
65
|
+
#
|
66
|
+
# @yield [result, err] Result & error if block supplied
|
67
|
+
# @yieldparam result [Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia] parsed result object
|
68
|
+
# @yieldparam err [StandardError] error object if request failed
|
69
|
+
#
|
70
|
+
# @return [Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia]
|
71
|
+
#
|
72
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
73
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
74
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
75
|
+
def download_medium(resource_name, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block)
|
76
|
+
if download_dest.nil?
|
77
|
+
command = make_simple_command(:get, 'v1/media/{+resourceName}', options)
|
78
|
+
else
|
79
|
+
command = make_download_command(:get, 'v1/media/{+resourceName}', options)
|
80
|
+
command.download_dest = download_dest
|
81
|
+
end
|
82
|
+
command.response_representation = Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia::Representation
|
83
|
+
command.response_class = Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia
|
84
|
+
command.params['resourceName'] = resource_name unless resource_name.nil?
|
85
|
+
command.query['fields'] = fields unless fields.nil?
|
86
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
87
|
+
execute_or_queue_command(command, &block)
|
88
|
+
end
|
89
|
+
|
90
|
+
# Uploads media. Upload is supported on the URI `/upload/v1/media/`+name``.
|
91
|
+
# @param [String] resource_name
|
92
|
+
# Name of the media that is being downloaded. See ReadRequest.resource_name.
|
93
|
+
# @param [Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia] google_bytestream_media_object
|
94
|
+
# @param [String] fields
|
95
|
+
# Selector specifying which fields to include in a partial response.
|
96
|
+
# @param [String] quota_user
|
97
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
98
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
99
|
+
# @param [IO, String] upload_source
|
100
|
+
# IO stream or filename containing content to upload
|
101
|
+
# @param [String] content_type
|
102
|
+
# Content type of the uploaded content.
|
103
|
+
# @param [Google::Apis::RequestOptions] options
|
104
|
+
# Request-specific options
|
105
|
+
#
|
106
|
+
# @yield [result, err] Result & error if block supplied
|
107
|
+
# @yieldparam result [Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia] parsed result object
|
108
|
+
# @yieldparam err [StandardError] error object if request failed
|
109
|
+
#
|
110
|
+
# @return [Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia]
|
111
|
+
#
|
112
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
113
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
114
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
115
|
+
def upload_medium(resource_name, google_bytestream_media_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
116
|
+
if upload_source.nil?
|
117
|
+
command = make_simple_command(:post, 'v1/media/{+resourceName}', options)
|
118
|
+
else
|
119
|
+
command = make_upload_command(:post, 'v1/media/{+resourceName}', options)
|
120
|
+
command.upload_source = upload_source
|
121
|
+
command.upload_content_type = content_type
|
122
|
+
end
|
123
|
+
command.request_representation = Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia::Representation
|
124
|
+
command.request_object = google_bytestream_media_object
|
125
|
+
command.response_representation = Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia::Representation
|
126
|
+
command.response_class = Google::Apis::RemotebuildexecutionV1::GoogleBytestreamMedia
|
127
|
+
command.params['resourceName'] = resource_name unless resource_name.nil?
|
128
|
+
command.query['fields'] = fields unless fields.nil?
|
129
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
130
|
+
execute_or_queue_command(command, &block)
|
131
|
+
end
|
132
|
+
|
133
|
+
# Starts asynchronous cancellation on a long-running operation. The server makes
|
134
|
+
# a best effort to cancel the operation, but success is not guaranteed. If the
|
135
|
+
# server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
136
|
+
# Clients can use Operations.GetOperation or other methods to check whether the
|
137
|
+
# cancellation succeeded or whether the operation completed despite cancellation.
|
138
|
+
# On successful cancellation, the operation is not deleted; instead, it becomes
|
139
|
+
# an operation with an Operation.error value with a google.rpc.Status.code of 1,
|
140
|
+
# corresponding to `Code.CANCELLED`.
|
141
|
+
# @param [String] name
|
142
|
+
# The name of the operation resource to be cancelled.
|
143
|
+
# @param [Google::Apis::RemotebuildexecutionV1::GoogleLongrunningCancelOperationRequest] google_longrunning_cancel_operation_request_object
|
144
|
+
# @param [String] fields
|
145
|
+
# Selector specifying which fields to include in a partial response.
|
146
|
+
# @param [String] quota_user
|
147
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
148
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
149
|
+
# @param [Google::Apis::RequestOptions] options
|
150
|
+
# Request-specific options
|
151
|
+
#
|
152
|
+
# @yield [result, err] Result & error if block supplied
|
153
|
+
# @yieldparam result [Google::Apis::RemotebuildexecutionV1::GoogleProtobufEmpty] parsed result object
|
154
|
+
# @yieldparam err [StandardError] error object if request failed
|
155
|
+
#
|
156
|
+
# @return [Google::Apis::RemotebuildexecutionV1::GoogleProtobufEmpty]
|
157
|
+
#
|
158
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
159
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
160
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
161
|
+
def cancel_operation(name, google_longrunning_cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
162
|
+
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
|
163
|
+
command.request_representation = Google::Apis::RemotebuildexecutionV1::GoogleLongrunningCancelOperationRequest::Representation
|
164
|
+
command.request_object = google_longrunning_cancel_operation_request_object
|
165
|
+
command.response_representation = Google::Apis::RemotebuildexecutionV1::GoogleProtobufEmpty::Representation
|
166
|
+
command.response_class = Google::Apis::RemotebuildexecutionV1::GoogleProtobufEmpty
|
167
|
+
command.params['name'] = name unless name.nil?
|
168
|
+
command.query['fields'] = fields unless fields.nil?
|
169
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
170
|
+
execute_or_queue_command(command, &block)
|
171
|
+
end
|
172
|
+
|
173
|
+
# Deletes a long-running operation. This method indicates that the client is no
|
174
|
+
# longer interested in the operation result. It does not cancel the operation.
|
175
|
+
# If the server doesn't support this method, it returns `google.rpc.Code.
|
176
|
+
# UNIMPLEMENTED`.
|
177
|
+
# @param [String] name
|
178
|
+
# The name of the operation resource to be deleted.
|
179
|
+
# @param [String] fields
|
180
|
+
# Selector specifying which fields to include in a partial response.
|
181
|
+
# @param [String] quota_user
|
182
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
183
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
184
|
+
# @param [Google::Apis::RequestOptions] options
|
185
|
+
# Request-specific options
|
186
|
+
#
|
187
|
+
# @yield [result, err] Result & error if block supplied
|
188
|
+
# @yieldparam result [Google::Apis::RemotebuildexecutionV1::GoogleProtobufEmpty] parsed result object
|
189
|
+
# @yieldparam err [StandardError] error object if request failed
|
190
|
+
#
|
191
|
+
# @return [Google::Apis::RemotebuildexecutionV1::GoogleProtobufEmpty]
|
192
|
+
#
|
193
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
194
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
195
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
196
|
+
def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
197
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
198
|
+
command.response_representation = Google::Apis::RemotebuildexecutionV1::GoogleProtobufEmpty::Representation
|
199
|
+
command.response_class = Google::Apis::RemotebuildexecutionV1::GoogleProtobufEmpty
|
200
|
+
command.params['name'] = name unless name.nil?
|
201
|
+
command.query['fields'] = fields unless fields.nil?
|
202
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
203
|
+
execute_or_queue_command(command, &block)
|
204
|
+
end
|
205
|
+
|
206
|
+
# Lists operations that match the specified filter in the request. If the server
|
207
|
+
# doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
|
208
|
+
# binding allows API services to override the binding to use different resource
|
209
|
+
# name schemes, such as `users/*/operations`. To override the binding, API
|
210
|
+
# services can add a binding such as `"/v1/`name=users/*`/operations"` to their
|
211
|
+
# service configuration. For backwards compatibility, the default name includes
|
212
|
+
# the operations collection id, however overriding users must ensure the name
|
213
|
+
# binding is the parent resource, without the operations collection id.
|
214
|
+
# @param [String] name
|
215
|
+
# The name of the operation's parent resource.
|
216
|
+
# @param [String] filter
|
217
|
+
# The standard list filter.
|
218
|
+
# @param [Fixnum] page_size
|
219
|
+
# The standard list page size.
|
220
|
+
# @param [String] page_token
|
221
|
+
# The standard list page token.
|
222
|
+
# @param [String] fields
|
223
|
+
# Selector specifying which fields to include in a partial response.
|
224
|
+
# @param [String] quota_user
|
225
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
226
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
227
|
+
# @param [Google::Apis::RequestOptions] options
|
228
|
+
# Request-specific options
|
229
|
+
#
|
230
|
+
# @yield [result, err] Result & error if block supplied
|
231
|
+
# @yieldparam result [Google::Apis::RemotebuildexecutionV1::GoogleLongrunningListOperationsResponse] parsed result object
|
232
|
+
# @yieldparam err [StandardError] error object if request failed
|
233
|
+
#
|
234
|
+
# @return [Google::Apis::RemotebuildexecutionV1::GoogleLongrunningListOperationsResponse]
|
235
|
+
#
|
236
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
237
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
238
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
239
|
+
def list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
240
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
241
|
+
command.response_representation = Google::Apis::RemotebuildexecutionV1::GoogleLongrunningListOperationsResponse::Representation
|
242
|
+
command.response_class = Google::Apis::RemotebuildexecutionV1::GoogleLongrunningListOperationsResponse
|
243
|
+
command.params['name'] = name unless name.nil?
|
244
|
+
command.query['filter'] = filter unless filter.nil?
|
245
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
246
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
247
|
+
command.query['fields'] = fields unless fields.nil?
|
248
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
249
|
+
execute_or_queue_command(command, &block)
|
250
|
+
end
|
251
|
+
|
252
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
253
|
+
# to poll the operation result at intervals as recommended by the API service.
|
254
|
+
# @param [String] name
|
255
|
+
# The name of the operation resource.
|
256
|
+
# @param [String] fields
|
257
|
+
# Selector specifying which fields to include in a partial response.
|
258
|
+
# @param [String] quota_user
|
259
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
260
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
261
|
+
# @param [Google::Apis::RequestOptions] options
|
262
|
+
# Request-specific options
|
263
|
+
#
|
264
|
+
# @yield [result, err] Result & error if block supplied
|
265
|
+
# @yieldparam result [Google::Apis::RemotebuildexecutionV1::GoogleLongrunningOperation] parsed result object
|
266
|
+
# @yieldparam err [StandardError] error object if request failed
|
267
|
+
#
|
268
|
+
# @return [Google::Apis::RemotebuildexecutionV1::GoogleLongrunningOperation]
|
269
|
+
#
|
270
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
271
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
272
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
273
|
+
def get_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
274
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
275
|
+
command.response_representation = Google::Apis::RemotebuildexecutionV1::GoogleLongrunningOperation::Representation
|
276
|
+
command.response_class = Google::Apis::RemotebuildexecutionV1::GoogleLongrunningOperation
|
277
|
+
command.params['name'] = name unless name.nil?
|
278
|
+
command.query['fields'] = fields unless fields.nil?
|
279
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
280
|
+
execute_or_queue_command(command, &block)
|
281
|
+
end
|
282
|
+
|
283
|
+
protected
|
284
|
+
|
285
|
+
def apply_command_defaults(command)
|
286
|
+
command.query['key'] = key unless key.nil?
|
287
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
288
|
+
end
|
289
|
+
end
|
290
|
+
end
|
291
|
+
end
|
292
|
+
end
|
metadata
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: google-apis-remotebuildexecution_v1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Google LLC
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-01-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: google-apis-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.1'
|
27
|
+
description: This is the simple REST client for Remote Build Execution API V1. Simple
|
28
|
+
REST clients are Ruby client libraries that provide access to Google services via
|
29
|
+
their HTTP REST API endpoints. These libraries are generated and updated automatically
|
30
|
+
based on the discovery documents published by the service, and they handle most
|
31
|
+
concerns such as authentication, pagination, retry, timeouts, and logging. You can
|
32
|
+
use this client to access the Remote Build Execution API, but note that some services
|
33
|
+
may provide a separate modern client that is easier to use.
|
34
|
+
email: googleapis-packages@google.com
|
35
|
+
executables: []
|
36
|
+
extensions: []
|
37
|
+
extra_rdoc_files: []
|
38
|
+
files:
|
39
|
+
- ".yardopts"
|
40
|
+
- CHANGELOG.md
|
41
|
+
- LICENSE.md
|
42
|
+
- OVERVIEW.md
|
43
|
+
- lib/google-apis-remotebuildexecution_v1.rb
|
44
|
+
- lib/google/apis/remotebuildexecution_v1.rb
|
45
|
+
- lib/google/apis/remotebuildexecution_v1/classes.rb
|
46
|
+
- lib/google/apis/remotebuildexecution_v1/gem_version.rb
|
47
|
+
- lib/google/apis/remotebuildexecution_v1/representations.rb
|
48
|
+
- lib/google/apis/remotebuildexecution_v1/service.rb
|
49
|
+
homepage: https://github.com/google/google-api-ruby-client
|
50
|
+
licenses:
|
51
|
+
- Apache-2.0
|
52
|
+
metadata:
|
53
|
+
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
54
|
+
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-remotebuildexecution_v1/CHANGELOG.md
|
55
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-remotebuildexecution_v1/v0.1.0
|
56
|
+
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-remotebuildexecution_v1
|
57
|
+
post_install_message:
|
58
|
+
rdoc_options: []
|
59
|
+
require_paths:
|
60
|
+
- lib
|
61
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '2.4'
|
66
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
requirements: []
|
72
|
+
rubygems_version: 3.1.4
|
73
|
+
signing_key:
|
74
|
+
specification_version: 4
|
75
|
+
summary: Simple REST client for Remote Build Execution API V1
|
76
|
+
test_files: []
|