google-apis-cloudbuild_v1alpha1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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-cloudbuild_v1alpha1.rb +15 -0
- data/lib/google/apis/cloudbuild_v1alpha1.rb +36 -0
- data/lib/google/apis/cloudbuild_v1alpha1/classes.rb +1567 -0
- data/lib/google/apis/cloudbuild_v1alpha1/gem_version.rb +28 -0
- data/lib/google/apis/cloudbuild_v1alpha1/representations.rb +626 -0
- data/lib/google/apis/cloudbuild_v1alpha1/service.rb +291 -0
- metadata +76 -0
@@ -0,0 +1,291 @@
|
|
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 CloudbuildV1alpha1
|
23
|
+
# Cloud Build API
|
24
|
+
#
|
25
|
+
# Creates and manages builds on Google Cloud Platform.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/cloudbuild_v1alpha1'
|
29
|
+
#
|
30
|
+
# Cloudbuild = Google::Apis::CloudbuildV1alpha1 # Alias the module
|
31
|
+
# service = Cloudbuild::CloudBuildService.new
|
32
|
+
#
|
33
|
+
# @see https://cloud.google.com/cloud-build/docs/
|
34
|
+
class CloudBuildService < 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://cloudbuild.googleapis.com/', '',
|
47
|
+
client_name: 'google-apis-cloudbuild_v1alpha1',
|
48
|
+
client_version: Google::Apis::CloudbuildV1alpha1::GEM_VERSION)
|
49
|
+
@batch_path = 'batch'
|
50
|
+
end
|
51
|
+
|
52
|
+
# Starts asynchronous cancellation on a long-running operation. The server makes
|
53
|
+
# a best effort to cancel the operation, but success is not guaranteed. If the
|
54
|
+
# server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
55
|
+
# Clients can use Operations.GetOperation or other methods to check whether the
|
56
|
+
# cancellation succeeded or whether the operation completed despite cancellation.
|
57
|
+
# On successful cancellation, the operation is not deleted; instead, it becomes
|
58
|
+
# an operation with an Operation.error value with a google.rpc.Status.code of 1,
|
59
|
+
# corresponding to `Code.CANCELLED`.
|
60
|
+
# @param [String] name
|
61
|
+
# The name of the operation resource to be cancelled.
|
62
|
+
# @param [Google::Apis::CloudbuildV1alpha1::CancelOperationRequest] cancel_operation_request_object
|
63
|
+
# @param [String] fields
|
64
|
+
# Selector specifying which fields to include in a partial response.
|
65
|
+
# @param [String] quota_user
|
66
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
67
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
68
|
+
# @param [Google::Apis::RequestOptions] options
|
69
|
+
# Request-specific options
|
70
|
+
#
|
71
|
+
# @yield [result, err] Result & error if block supplied
|
72
|
+
# @yieldparam result [Google::Apis::CloudbuildV1alpha1::Empty] parsed result object
|
73
|
+
# @yieldparam err [StandardError] error object if request failed
|
74
|
+
#
|
75
|
+
# @return [Google::Apis::CloudbuildV1alpha1::Empty]
|
76
|
+
#
|
77
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
78
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
79
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
80
|
+
def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
81
|
+
command = make_simple_command(:post, 'v1alpha1/{+name}:cancel', options)
|
82
|
+
command.request_representation = Google::Apis::CloudbuildV1alpha1::CancelOperationRequest::Representation
|
83
|
+
command.request_object = cancel_operation_request_object
|
84
|
+
command.response_representation = Google::Apis::CloudbuildV1alpha1::Empty::Representation
|
85
|
+
command.response_class = Google::Apis::CloudbuildV1alpha1::Empty
|
86
|
+
command.params['name'] = name unless name.nil?
|
87
|
+
command.query['fields'] = fields unless fields.nil?
|
88
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
89
|
+
execute_or_queue_command(command, &block)
|
90
|
+
end
|
91
|
+
|
92
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
93
|
+
# to poll the operation result at intervals as recommended by the API service.
|
94
|
+
# @param [String] name
|
95
|
+
# The name of the operation resource.
|
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::CloudbuildV1alpha1::Operation] parsed result object
|
106
|
+
# @yieldparam err [StandardError] error object if request failed
|
107
|
+
#
|
108
|
+
# @return [Google::Apis::CloudbuildV1alpha1::Operation]
|
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 get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
114
|
+
command = make_simple_command(:get, 'v1alpha1/{+name}', options)
|
115
|
+
command.response_representation = Google::Apis::CloudbuildV1alpha1::Operation::Representation
|
116
|
+
command.response_class = Google::Apis::CloudbuildV1alpha1::Operation
|
117
|
+
command.params['name'] = name unless name.nil?
|
118
|
+
command.query['fields'] = fields unless fields.nil?
|
119
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
120
|
+
execute_or_queue_command(command, &block)
|
121
|
+
end
|
122
|
+
|
123
|
+
# Creates a `WorkerPool` to run the builds, and returns the new worker pool.
|
124
|
+
# @param [String] parent
|
125
|
+
# ID of the parent project.
|
126
|
+
# @param [Google::Apis::CloudbuildV1alpha1::WorkerPool] worker_pool_object
|
127
|
+
# @param [String] fields
|
128
|
+
# Selector specifying which fields to include in a partial response.
|
129
|
+
# @param [String] quota_user
|
130
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
131
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
132
|
+
# @param [Google::Apis::RequestOptions] options
|
133
|
+
# Request-specific options
|
134
|
+
#
|
135
|
+
# @yield [result, err] Result & error if block supplied
|
136
|
+
# @yieldparam result [Google::Apis::CloudbuildV1alpha1::WorkerPool] parsed result object
|
137
|
+
# @yieldparam err [StandardError] error object if request failed
|
138
|
+
#
|
139
|
+
# @return [Google::Apis::CloudbuildV1alpha1::WorkerPool]
|
140
|
+
#
|
141
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
142
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
143
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
144
|
+
def create_project_worker_pool(parent, worker_pool_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
145
|
+
command = make_simple_command(:post, 'v1alpha1/{+parent}/workerPools', options)
|
146
|
+
command.request_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation
|
147
|
+
command.request_object = worker_pool_object
|
148
|
+
command.response_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation
|
149
|
+
command.response_class = Google::Apis::CloudbuildV1alpha1::WorkerPool
|
150
|
+
command.params['parent'] = parent unless parent.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
|
+
# Deletes a `WorkerPool` by its project ID and WorkerPool name.
|
157
|
+
# @param [String] name
|
158
|
+
# The field will contain name of the resource requested, for example: "projects/
|
159
|
+
# project-1/workerPools/workerpool-name"
|
160
|
+
# @param [String] fields
|
161
|
+
# Selector specifying which fields to include in a partial response.
|
162
|
+
# @param [String] quota_user
|
163
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
164
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
165
|
+
# @param [Google::Apis::RequestOptions] options
|
166
|
+
# Request-specific options
|
167
|
+
#
|
168
|
+
# @yield [result, err] Result & error if block supplied
|
169
|
+
# @yieldparam result [Google::Apis::CloudbuildV1alpha1::Empty] parsed result object
|
170
|
+
# @yieldparam err [StandardError] error object if request failed
|
171
|
+
#
|
172
|
+
# @return [Google::Apis::CloudbuildV1alpha1::Empty]
|
173
|
+
#
|
174
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
175
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
176
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
177
|
+
def delete_project_worker_pool(name, fields: nil, quota_user: nil, options: nil, &block)
|
178
|
+
command = make_simple_command(:delete, 'v1alpha1/{+name}', options)
|
179
|
+
command.response_representation = Google::Apis::CloudbuildV1alpha1::Empty::Representation
|
180
|
+
command.response_class = Google::Apis::CloudbuildV1alpha1::Empty
|
181
|
+
command.params['name'] = name unless name.nil?
|
182
|
+
command.query['fields'] = fields unless fields.nil?
|
183
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
184
|
+
execute_or_queue_command(command, &block)
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns information about a `WorkerPool`.
|
188
|
+
# @param [String] name
|
189
|
+
# The field will contain name of the resource requested, for example: "projects/
|
190
|
+
# project-1/workerPools/workerpool-name"
|
191
|
+
# @param [String] fields
|
192
|
+
# Selector specifying which fields to include in a partial response.
|
193
|
+
# @param [String] quota_user
|
194
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
195
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
196
|
+
# @param [Google::Apis::RequestOptions] options
|
197
|
+
# Request-specific options
|
198
|
+
#
|
199
|
+
# @yield [result, err] Result & error if block supplied
|
200
|
+
# @yieldparam result [Google::Apis::CloudbuildV1alpha1::WorkerPool] parsed result object
|
201
|
+
# @yieldparam err [StandardError] error object if request failed
|
202
|
+
#
|
203
|
+
# @return [Google::Apis::CloudbuildV1alpha1::WorkerPool]
|
204
|
+
#
|
205
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
206
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
207
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
208
|
+
def get_project_worker_pool(name, fields: nil, quota_user: nil, options: nil, &block)
|
209
|
+
command = make_simple_command(:get, 'v1alpha1/{+name}', options)
|
210
|
+
command.response_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation
|
211
|
+
command.response_class = Google::Apis::CloudbuildV1alpha1::WorkerPool
|
212
|
+
command.params['name'] = name unless name.nil?
|
213
|
+
command.query['fields'] = fields unless fields.nil?
|
214
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
215
|
+
execute_or_queue_command(command, &block)
|
216
|
+
end
|
217
|
+
|
218
|
+
# List project's `WorkerPool`s.
|
219
|
+
# @param [String] parent
|
220
|
+
# ID of the parent project.
|
221
|
+
# @param [String] fields
|
222
|
+
# Selector specifying which fields to include in a partial response.
|
223
|
+
# @param [String] quota_user
|
224
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
225
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
226
|
+
# @param [Google::Apis::RequestOptions] options
|
227
|
+
# Request-specific options
|
228
|
+
#
|
229
|
+
# @yield [result, err] Result & error if block supplied
|
230
|
+
# @yieldparam result [Google::Apis::CloudbuildV1alpha1::ListWorkerPoolsResponse] parsed result object
|
231
|
+
# @yieldparam err [StandardError] error object if request failed
|
232
|
+
#
|
233
|
+
# @return [Google::Apis::CloudbuildV1alpha1::ListWorkerPoolsResponse]
|
234
|
+
#
|
235
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
236
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
237
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
238
|
+
def list_project_worker_pools(parent, fields: nil, quota_user: nil, options: nil, &block)
|
239
|
+
command = make_simple_command(:get, 'v1alpha1/{+parent}/workerPools', options)
|
240
|
+
command.response_representation = Google::Apis::CloudbuildV1alpha1::ListWorkerPoolsResponse::Representation
|
241
|
+
command.response_class = Google::Apis::CloudbuildV1alpha1::ListWorkerPoolsResponse
|
242
|
+
command.params['parent'] = parent unless parent.nil?
|
243
|
+
command.query['fields'] = fields unless fields.nil?
|
244
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
245
|
+
execute_or_queue_command(command, &block)
|
246
|
+
end
|
247
|
+
|
248
|
+
# Update a `WorkerPool`.
|
249
|
+
# @param [String] name
|
250
|
+
# The field will contain name of the resource requested, for example: "projects/
|
251
|
+
# project-1/workerPools/workerpool-name"
|
252
|
+
# @param [Google::Apis::CloudbuildV1alpha1::WorkerPool] worker_pool_object
|
253
|
+
# @param [String] fields
|
254
|
+
# Selector specifying which fields to include in a partial response.
|
255
|
+
# @param [String] quota_user
|
256
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
257
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
258
|
+
# @param [Google::Apis::RequestOptions] options
|
259
|
+
# Request-specific options
|
260
|
+
#
|
261
|
+
# @yield [result, err] Result & error if block supplied
|
262
|
+
# @yieldparam result [Google::Apis::CloudbuildV1alpha1::WorkerPool] parsed result object
|
263
|
+
# @yieldparam err [StandardError] error object if request failed
|
264
|
+
#
|
265
|
+
# @return [Google::Apis::CloudbuildV1alpha1::WorkerPool]
|
266
|
+
#
|
267
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
268
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
269
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
270
|
+
def patch_project_worker_pool(name, worker_pool_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
271
|
+
command = make_simple_command(:patch, 'v1alpha1/{+name}', options)
|
272
|
+
command.request_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation
|
273
|
+
command.request_object = worker_pool_object
|
274
|
+
command.response_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation
|
275
|
+
command.response_class = Google::Apis::CloudbuildV1alpha1::WorkerPool
|
276
|
+
command.params['name'] = name unless name.nil?
|
277
|
+
command.query['fields'] = fields unless fields.nil?
|
278
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
279
|
+
execute_or_queue_command(command, &block)
|
280
|
+
end
|
281
|
+
|
282
|
+
protected
|
283
|
+
|
284
|
+
def apply_command_defaults(command)
|
285
|
+
command.query['key'] = key unless key.nil?
|
286
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
287
|
+
end
|
288
|
+
end
|
289
|
+
end
|
290
|
+
end
|
291
|
+
end
|
metadata
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: google-apis-cloudbuild_v1alpha1
|
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 Cloud Build API V1alpha1. Simple REST
|
28
|
+
clients are Ruby client libraries that provide access to Google services via their
|
29
|
+
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 Cloud Build API, but note that some services may provide
|
33
|
+
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-cloudbuild_v1alpha1.rb
|
44
|
+
- lib/google/apis/cloudbuild_v1alpha1.rb
|
45
|
+
- lib/google/apis/cloudbuild_v1alpha1/classes.rb
|
46
|
+
- lib/google/apis/cloudbuild_v1alpha1/gem_version.rb
|
47
|
+
- lib/google/apis/cloudbuild_v1alpha1/representations.rb
|
48
|
+
- lib/google/apis/cloudbuild_v1alpha1/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-cloudbuild_v1alpha1/CHANGELOG.md
|
55
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-cloudbuild_v1alpha1/v0.1.0
|
56
|
+
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-cloudbuild_v1alpha1
|
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 Cloud Build API V1alpha1
|
76
|
+
test_files: []
|