google-api-client 0.9.26 → 0.9.28

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.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +1 -1
  4. data/api_names.yaml +36326 -36213
  5. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +155 -155
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +32 -32
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +104 -104
  9. data/generated/google/apis/adsense_v1_4.rb +1 -1
  10. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  11. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  12. data/generated/google/apis/appstate_v1.rb +1 -1
  13. data/generated/google/apis/calendar_v3.rb +1 -1
  14. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  15. data/generated/google/apis/cloudbuild_v1/classes.rb +260 -248
  16. data/generated/google/apis/cloudbuild_v1/representations.rb +47 -45
  17. data/generated/google/apis/cloudbuild_v1/service.rb +167 -167
  18. data/generated/google/apis/clouddebugger_v2.rb +3 -3
  19. data/generated/google/apis/clouddebugger_v2/classes.rb +569 -569
  20. data/generated/google/apis/clouddebugger_v2/representations.rb +146 -146
  21. data/generated/google/apis/clouddebugger_v2/service.rb +145 -145
  22. data/generated/google/apis/cloudkms_v1beta1.rb +4 -3
  23. data/generated/google/apis/cloudkms_v1beta1/classes.rb +428 -428
  24. data/generated/google/apis/cloudkms_v1beta1/representations.rb +115 -115
  25. data/generated/google/apis/cloudkms_v1beta1/service.rb +161 -160
  26. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  27. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  28. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +583 -583
  29. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +100 -100
  30. data/generated/google/apis/cloudresourcemanager_v1/service.rb +116 -116
  31. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  32. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +195 -195
  33. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +58 -58
  34. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +316 -316
  35. data/generated/google/apis/content_v2.rb +1 -1
  36. data/generated/google/apis/content_v2/classes.rb +12 -0
  37. data/generated/google/apis/content_v2/representations.rb +2 -0
  38. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  39. data/generated/google/apis/dataflow_v1b3/classes.rb +2833 -2694
  40. data/generated/google/apis/dataflow_v1b3/representations.rb +666 -666
  41. data/generated/google/apis/dataflow_v1b3/service.rb +351 -349
  42. data/generated/google/apis/datastore_v1.rb +1 -1
  43. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  44. data/generated/google/apis/deploymentmanager_v2/classes.rb +21 -12
  45. data/generated/google/apis/deploymentmanager_v2/representations.rb +1 -0
  46. data/generated/google/apis/deploymentmanager_v2/service.rb +5 -5
  47. data/generated/google/apis/dns_v1.rb +1 -1
  48. data/generated/google/apis/dns_v2beta1.rb +1 -1
  49. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  50. data/generated/google/apis/doubleclicksearch_v2/classes.rb +6 -4
  51. data/generated/google/apis/drive_v2.rb +1 -1
  52. data/generated/google/apis/drive_v2/classes.rb +26 -0
  53. data/generated/google/apis/drive_v2/representations.rb +14 -0
  54. data/generated/google/apis/drive_v2/service.rb +38 -2
  55. data/generated/google/apis/drive_v3.rb +1 -1
  56. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  57. data/generated/google/apis/games_management_v1management.rb +1 -1
  58. data/generated/google/apis/games_v1.rb +1 -1
  59. data/generated/google/apis/genomics_v1.rb +4 -4
  60. data/generated/google/apis/genomics_v1/classes.rb +2317 -2317
  61. data/generated/google/apis/genomics_v1/representations.rb +476 -476
  62. data/generated/google/apis/genomics_v1/service.rb +1038 -1038
  63. data/generated/google/apis/gmail_v1.rb +1 -1
  64. data/generated/google/apis/gmail_v1/classes.rb +82 -1
  65. data/generated/google/apis/gmail_v1/representations.rb +33 -0
  66. data/generated/google/apis/gmail_v1/service.rb +215 -5
  67. data/generated/google/apis/iam_v1.rb +1 -1
  68. data/generated/google/apis/iam_v1/classes.rb +446 -343
  69. data/generated/google/apis/iam_v1/representations.rb +112 -85
  70. data/generated/google/apis/iam_v1/service.rb +248 -192
  71. data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
  72. data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
  73. data/generated/google/apis/kgsearch_v1/service.rb +15 -15
  74. data/generated/google/apis/language_v1beta1.rb +1 -1
  75. data/generated/google/apis/language_v1beta1/classes.rb +396 -396
  76. data/generated/google/apis/language_v1beta1/representations.rb +97 -97
  77. data/generated/google/apis/language_v1beta1/service.rb +42 -42
  78. data/generated/google/apis/logging_v2beta1.rb +1 -1
  79. data/generated/google/apis/logging_v2beta1/classes.rb +855 -855
  80. data/generated/google/apis/logging_v2beta1/representations.rb +155 -155
  81. data/generated/google/apis/logging_v2beta1/service.rb +214 -214
  82. data/generated/google/apis/monitoring_v3.rb +4 -4
  83. data/generated/google/apis/monitoring_v3/classes.rb +551 -551
  84. data/generated/google/apis/monitoring_v3/representations.rb +123 -123
  85. data/generated/google/apis/monitoring_v3/service.rb +80 -80
  86. data/generated/google/apis/plus_domains_v1.rb +1 -1
  87. data/generated/google/apis/plus_v1.rb +1 -1
  88. data/generated/google/apis/pubsub_v1.rb +3 -3
  89. data/generated/google/apis/pubsub_v1/classes.rb +391 -391
  90. data/generated/google/apis/pubsub_v1/representations.rb +83 -83
  91. data/generated/google/apis/pubsub_v1/service.rb +257 -257
  92. data/generated/google/apis/sheets_v4.rb +1 -1
  93. data/generated/google/apis/sheets_v4/classes.rb +4334 -4334
  94. data/generated/google/apis/sheets_v4/representations.rb +861 -861
  95. data/generated/google/apis/sheets_v4/service.rb +191 -191
  96. data/generated/google/apis/slides_v1.rb +7 -7
  97. data/generated/google/apis/slides_v1/classes.rb +2726 -2555
  98. data/generated/google/apis/slides_v1/representations.rb +678 -607
  99. data/generated/google/apis/slides_v1/service.rb +16 -16
  100. data/generated/google/apis/speech_v1beta1.rb +1 -1
  101. data/generated/google/apis/speech_v1beta1/classes.rb +57 -59
  102. data/generated/google/apis/speech_v1beta1/representations.rb +9 -9
  103. data/generated/google/apis/speech_v1beta1/service.rb +63 -63
  104. data/generated/google/apis/storage_v1.rb +1 -1
  105. data/generated/google/apis/storage_v1/classes.rb +4 -3
  106. data/generated/google/apis/vision_v1/classes.rb +925 -925
  107. data/generated/google/apis/vision_v1/representations.rb +134 -134
  108. data/generated/google/apis/vision_v1/service.rb +4 -4
  109. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  110. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  111. data/generated/google/apis/youtube_v3.rb +1 -1
  112. data/generated/google/apis/youtube_v3/classes.rb +234 -1
  113. data/generated/google/apis/youtube_v3/representations.rb +83 -0
  114. data/generated/google/apis/youtube_v3/service.rb +55 -0
  115. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  116. data/generated/google/apis/youtubereporting_v1/classes.rb +105 -105
  117. data/generated/google/apis/youtubereporting_v1/representations.rb +31 -31
  118. data/generated/google/apis/youtubereporting_v1/service.rb +78 -78
  119. data/lib/google/apis/core/api_command.rb +11 -5
  120. data/lib/google/apis/core/base_service.rb +7 -5
  121. data/lib/google/apis/errors.rb +4 -0
  122. data/lib/google/apis/version.rb +1 -1
  123. metadata +28 -28
@@ -22,6 +22,12 @@ module Google
22
22
  module Apis
23
23
  module CloudbuildV1
24
24
 
25
+ class Status
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
25
31
  class Empty
26
32
  class Representation < Google::Apis::Core::JsonRepresentation; end
27
33
 
@@ -100,13 +106,13 @@ module Google
100
106
  include Google::Apis::Core::JsonObjectSupport
101
107
  end
102
108
 
103
- class Operation
109
+ class ListBuildTriggersResponse
104
110
  class Representation < Google::Apis::Core::JsonRepresentation; end
105
111
 
106
112
  include Google::Apis::Core::JsonObjectSupport
107
113
  end
108
114
 
109
- class ListBuildTriggersResponse
115
+ class Operation
110
116
  class Representation < Google::Apis::Core::JsonRepresentation; end
111
117
 
112
118
  include Google::Apis::Core::JsonObjectSupport
@@ -118,7 +124,7 @@ module Google
118
124
  include Google::Apis::Core::JsonObjectSupport
119
125
  end
120
126
 
121
- class BuildStep
127
+ class HashProp
122
128
  class Representation < Google::Apis::Core::JsonRepresentation; end
123
129
 
124
130
  include Google::Apis::Core::JsonObjectSupport
@@ -130,7 +136,7 @@ module Google
130
136
  include Google::Apis::Core::JsonObjectSupport
131
137
  end
132
138
 
133
- class HashProp
139
+ class BuildStep
134
140
  class Representation < Google::Apis::Core::JsonRepresentation; end
135
141
 
136
142
  include Google::Apis::Core::JsonObjectSupport
@@ -143,9 +149,12 @@ module Google
143
149
  end
144
150
 
145
151
  class Status
146
- class Representation < Google::Apis::Core::JsonRepresentation; end
147
-
148
- include Google::Apis::Core::JsonObjectSupport
152
+ # @private
153
+ class Representation < Google::Apis::Core::JsonRepresentation
154
+ property :message, as: 'message'
155
+ collection :details, as: 'details'
156
+ property :code, as: 'code'
157
+ end
149
158
  end
150
159
 
151
160
  class Empty
@@ -160,9 +169,10 @@ module Google
160
169
  property :id, as: 'id'
161
170
  property :build, as: 'build', class: Google::Apis::CloudbuildV1::Build, decorator: Google::Apis::CloudbuildV1::Build::Representation
162
171
 
172
+ hash :substitutions, as: 'substitutions'
163
173
  property :description, as: 'description'
164
- property :disabled, as: 'disabled'
165
174
  property :create_time, as: 'createTime'
175
+ property :disabled, as: 'disabled'
166
176
  property :filename, as: 'filename'
167
177
  property :trigger_template, as: 'triggerTemplate', class: Google::Apis::CloudbuildV1::RepoSource, decorator: Google::Apis::CloudbuildV1::RepoSource::Representation
168
178
 
@@ -172,18 +182,21 @@ module Google
172
182
  class Build
173
183
  # @private
174
184
  class Representation < Google::Apis::Core::JsonRepresentation
185
+ property :build_trigger_id, as: 'buildTriggerId'
186
+ property :id, as: 'id'
187
+ hash :substitutions, as: 'substitutions'
175
188
  property :start_time, as: 'startTime'
189
+ property :create_time, as: 'createTime'
176
190
  property :source_provenance, as: 'sourceProvenance', class: Google::Apis::CloudbuildV1::SourceProvenance, decorator: Google::Apis::CloudbuildV1::SourceProvenance::Representation
177
191
 
178
- property :create_time, as: 'createTime'
179
192
  collection :images, as: 'images'
180
193
  property :project_id, as: 'projectId'
181
194
  property :log_url, as: 'logUrl'
182
195
  property :finish_time, as: 'finishTime'
183
- property :source, as: 'source', class: Google::Apis::CloudbuildV1::Source, decorator: Google::Apis::CloudbuildV1::Source::Representation
184
-
185
196
  property :options, as: 'options', class: Google::Apis::CloudbuildV1::BuildOptions, decorator: Google::Apis::CloudbuildV1::BuildOptions::Representation
186
197
 
198
+ property :source, as: 'source', class: Google::Apis::CloudbuildV1::Source, decorator: Google::Apis::CloudbuildV1::Source::Representation
199
+
187
200
  property :status_detail, as: 'statusDetail'
188
201
  property :status, as: 'status'
189
202
  property :timeout, as: 'timeout'
@@ -192,8 +205,6 @@ module Google
192
205
 
193
206
  collection :steps, as: 'steps', class: Google::Apis::CloudbuildV1::BuildStep, decorator: Google::Apis::CloudbuildV1::BuildStep::Representation
194
207
 
195
- property :build_trigger_id, as: 'buildTriggerId'
196
- property :id, as: 'id'
197
208
  end
198
209
  end
199
210
 
@@ -242,18 +253,18 @@ module Google
242
253
  class StorageSource
243
254
  # @private
244
255
  class Representation < Google::Apis::Core::JsonRepresentation
256
+ property :generation, as: 'generation'
245
257
  property :bucket, as: 'bucket'
246
258
  property :object, as: 'object'
247
- property :generation, as: 'generation'
248
259
  end
249
260
  end
250
261
 
251
262
  class Results
252
263
  # @private
253
264
  class Representation < Google::Apis::Core::JsonRepresentation
254
- collection :build_step_images, as: 'buildStepImages'
255
265
  collection :images, as: 'images', class: Google::Apis::CloudbuildV1::BuiltImage, decorator: Google::Apis::CloudbuildV1::BuiltImage::Representation
256
266
 
267
+ collection :build_step_images, as: 'buildStepImages'
257
268
  end
258
269
  end
259
270
 
@@ -283,23 +294,23 @@ module Google
283
294
  end
284
295
  end
285
296
 
286
- class Operation
297
+ class ListBuildTriggersResponse
287
298
  # @private
288
299
  class Representation < Google::Apis::Core::JsonRepresentation
289
- property :name, as: 'name'
290
- property :error, as: 'error', class: Google::Apis::CloudbuildV1::Status, decorator: Google::Apis::CloudbuildV1::Status::Representation
300
+ collection :triggers, as: 'triggers', class: Google::Apis::CloudbuildV1::BuildTrigger, decorator: Google::Apis::CloudbuildV1::BuildTrigger::Representation
291
301
 
292
- hash :metadata, as: 'metadata'
293
- property :done, as: 'done'
294
- hash :response, as: 'response'
295
302
  end
296
303
  end
297
304
 
298
- class ListBuildTriggersResponse
305
+ class Operation
299
306
  # @private
300
307
  class Representation < Google::Apis::Core::JsonRepresentation
301
- collection :triggers, as: 'triggers', class: Google::Apis::CloudbuildV1::BuildTrigger, decorator: Google::Apis::CloudbuildV1::BuildTrigger::Representation
308
+ property :done, as: 'done'
309
+ hash :response, as: 'response'
310
+ property :name, as: 'name'
311
+ property :error, as: 'error', class: Google::Apis::CloudbuildV1::Status, decorator: Google::Apis::CloudbuildV1::Status::Representation
302
312
 
313
+ hash :metadata, as: 'metadata'
303
314
  end
304
315
  end
305
316
 
@@ -311,35 +322,35 @@ module Google
311
322
  end
312
323
  end
313
324
 
314
- class BuildStep
325
+ class HashProp
315
326
  # @private
316
327
  class Representation < Google::Apis::Core::JsonRepresentation
317
- property :id, as: 'id'
318
- property :dir, as: 'dir'
319
- collection :env, as: 'env'
320
- collection :wait_for, as: 'waitFor'
321
- collection :args, as: 'args'
322
- property :name, as: 'name'
323
- property :entrypoint, as: 'entrypoint'
328
+ property :type, as: 'type'
329
+ property :value, :base64 => true, as: 'value'
324
330
  end
325
331
  end
326
332
 
327
333
  class RepoSource
328
334
  # @private
329
335
  class Representation < Google::Apis::Core::JsonRepresentation
336
+ property :tag_name, as: 'tagName'
337
+ property :commit_sha, as: 'commitSha'
330
338
  property :project_id, as: 'projectId'
331
339
  property :repo_name, as: 'repoName'
332
340
  property :branch_name, as: 'branchName'
333
- property :tag_name, as: 'tagName'
334
- property :commit_sha, as: 'commitSha'
335
341
  end
336
342
  end
337
343
 
338
- class HashProp
344
+ class BuildStep
339
345
  # @private
340
346
  class Representation < Google::Apis::Core::JsonRepresentation
341
- property :type, as: 'type'
342
- property :value, :base64 => true, as: 'value'
347
+ collection :wait_for, as: 'waitFor'
348
+ collection :env, as: 'env'
349
+ collection :args, as: 'args'
350
+ property :name, as: 'name'
351
+ property :entrypoint, as: 'entrypoint'
352
+ property :id, as: 'id'
353
+ property :dir, as: 'dir'
343
354
  end
344
355
  end
345
356
 
@@ -350,15 +361,6 @@ module Google
350
361
 
351
362
  end
352
363
  end
353
-
354
- class Status
355
- # @private
356
- class Representation < Google::Apis::Core::JsonRepresentation
357
- property :message, as: 'message'
358
- collection :details, as: 'details'
359
- property :code, as: 'code'
360
- end
361
- end
362
364
  end
363
365
  end
364
366
  end
@@ -46,13 +46,19 @@ module Google
46
46
  super('https://cloudbuild.googleapis.com/', '')
47
47
  end
48
48
 
49
- # Starts a build with the specified configuration.
50
- # The long-running Operation returned by this method will include the ID of
51
- # the build, which can be passed to GetBuild to determine its status (e.g.,
52
- # success or failure).
53
- # @param [String] project_id
54
- # ID of the project.
55
- # @param [Google::Apis::CloudbuildV1::Build] build_object
49
+ # Starts asynchronous cancellation on a long-running operation. The server
50
+ # makes a best effort to cancel the operation, but success is not
51
+ # guaranteed. If the server doesn't support this method, it returns
52
+ # `google.rpc.Code.UNIMPLEMENTED`. Clients can use
53
+ # Operations.GetOperation or
54
+ # other methods to check whether the cancellation succeeded or whether the
55
+ # operation completed despite cancellation. On successful cancellation,
56
+ # the operation is not deleted; instead, it becomes an operation with
57
+ # an Operation.error value with a google.rpc.Status.code of 1,
58
+ # corresponding to `Code.CANCELLED`.
59
+ # @param [String] name
60
+ # The name of the operation resource to be cancelled.
61
+ # @param [Google::Apis::CloudbuildV1::CancelOperationRequest] cancel_operation_request_object
56
62
  # @param [String] fields
57
63
  # Selector specifying which fields to include in a partial response.
58
64
  # @param [String] quota_user
@@ -62,32 +68,38 @@ module Google
62
68
  # Request-specific options
63
69
  #
64
70
  # @yield [result, err] Result & error if block supplied
65
- # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
71
+ # @yieldparam result [Google::Apis::CloudbuildV1::Empty] parsed result object
66
72
  # @yieldparam err [StandardError] error object if request failed
67
73
  #
68
- # @return [Google::Apis::CloudbuildV1::Operation]
74
+ # @return [Google::Apis::CloudbuildV1::Empty]
69
75
  #
70
76
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
77
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
78
  # @raise [Google::Apis::AuthorizationError] Authorization is required
73
- def create_project_build(project_id, build_object = nil, fields: nil, quota_user: nil, options: nil, &block)
74
- command = make_simple_command(:post, 'v1/projects/{projectId}/builds', options)
75
- command.request_representation = Google::Apis::CloudbuildV1::Build::Representation
76
- command.request_object = build_object
77
- command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
78
- command.response_class = Google::Apis::CloudbuildV1::Operation
79
- command.params['projectId'] = project_id unless project_id.nil?
79
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
80
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
81
+ command.request_representation = Google::Apis::CloudbuildV1::CancelOperationRequest::Representation
82
+ command.request_object = cancel_operation_request_object
83
+ command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation
84
+ command.response_class = Google::Apis::CloudbuildV1::Empty
85
+ command.params['name'] = name unless name.nil?
80
86
  command.query['fields'] = fields unless fields.nil?
81
87
  command.query['quotaUser'] = quota_user unless quota_user.nil?
82
88
  execute_or_queue_command(command, &block)
83
89
  end
84
90
 
85
- # Cancels a requested build in progress.
86
- # @param [String] project_id
87
- # ID of the project.
88
- # @param [String] id
89
- # ID of the build.
90
- # @param [Google::Apis::CloudbuildV1::CancelBuildRequest] cancel_build_request_object
91
+ # Lists operations that match the specified filter in the request. If the
92
+ # server doesn't support this method, it returns `UNIMPLEMENTED`.
93
+ # NOTE: the `name` binding below allows API services to override the binding
94
+ # to use different resource name schemes, such as `users/*/operations`.
95
+ # @param [String] name
96
+ # The name of the operation collection.
97
+ # @param [String] page_token
98
+ # The standard list page token.
99
+ # @param [Fixnum] page_size
100
+ # The standard list page size.
101
+ # @param [String] filter
102
+ # The standard list filter.
91
103
  # @param [String] fields
92
104
  # Selector specifying which fields to include in a partial response.
93
105
  # @param [String] quota_user
@@ -97,34 +109,32 @@ module Google
97
109
  # Request-specific options
98
110
  #
99
111
  # @yield [result, err] Result & error if block supplied
100
- # @yieldparam result [Google::Apis::CloudbuildV1::Build] parsed result object
112
+ # @yieldparam result [Google::Apis::CloudbuildV1::ListOperationsResponse] parsed result object
101
113
  # @yieldparam err [StandardError] error object if request failed
102
114
  #
103
- # @return [Google::Apis::CloudbuildV1::Build]
115
+ # @return [Google::Apis::CloudbuildV1::ListOperationsResponse]
104
116
  #
105
117
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
106
118
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
107
119
  # @raise [Google::Apis::AuthorizationError] Authorization is required
108
- def cancel_build(project_id, id, cancel_build_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
109
- command = make_simple_command(:post, 'v1/projects/{projectId}/builds/{id}:cancel', options)
110
- command.request_representation = Google::Apis::CloudbuildV1::CancelBuildRequest::Representation
111
- command.request_object = cancel_build_request_object
112
- command.response_representation = Google::Apis::CloudbuildV1::Build::Representation
113
- command.response_class = Google::Apis::CloudbuildV1::Build
114
- command.params['projectId'] = project_id unless project_id.nil?
115
- command.params['id'] = id unless id.nil?
120
+ def list_operations(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
121
+ command = make_simple_command(:get, 'v1/{+name}', options)
122
+ command.response_representation = Google::Apis::CloudbuildV1::ListOperationsResponse::Representation
123
+ command.response_class = Google::Apis::CloudbuildV1::ListOperationsResponse
124
+ command.params['name'] = name unless name.nil?
125
+ command.query['pageToken'] = page_token unless page_token.nil?
126
+ command.query['pageSize'] = page_size unless page_size.nil?
127
+ command.query['filter'] = filter unless filter.nil?
116
128
  command.query['fields'] = fields unless fields.nil?
117
129
  command.query['quotaUser'] = quota_user unless quota_user.nil?
118
130
  execute_or_queue_command(command, &block)
119
131
  end
120
132
 
121
- # Returns information about a previously requested build.
122
- # The Build that is returned includes its status (e.g., success or failure,
123
- # or in-progress), and timing information.
124
- # @param [String] project_id
125
- # ID of the project.
126
- # @param [String] id
127
- # ID of the build.
133
+ # Gets the latest state of a long-running operation. Clients can use this
134
+ # method to poll the operation result at intervals as recommended by the API
135
+ # service.
136
+ # @param [String] name
137
+ # The name of the operation resource.
128
138
  # @param [String] fields
129
139
  # Selector specifying which fields to include in a partial response.
130
140
  # @param [String] quota_user
@@ -134,36 +144,30 @@ module Google
134
144
  # Request-specific options
135
145
  #
136
146
  # @yield [result, err] Result & error if block supplied
137
- # @yieldparam result [Google::Apis::CloudbuildV1::Build] parsed result object
147
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
138
148
  # @yieldparam err [StandardError] error object if request failed
139
149
  #
140
- # @return [Google::Apis::CloudbuildV1::Build]
150
+ # @return [Google::Apis::CloudbuildV1::Operation]
141
151
  #
142
152
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
143
153
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
144
154
  # @raise [Google::Apis::AuthorizationError] Authorization is required
145
- def get_project_build(project_id, id, fields: nil, quota_user: nil, options: nil, &block)
146
- command = make_simple_command(:get, 'v1/projects/{projectId}/builds/{id}', options)
147
- command.response_representation = Google::Apis::CloudbuildV1::Build::Representation
148
- command.response_class = Google::Apis::CloudbuildV1::Build
149
- command.params['projectId'] = project_id unless project_id.nil?
150
- command.params['id'] = id unless id.nil?
155
+ def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
156
+ command = make_simple_command(:get, 'v1/{+name}', options)
157
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
158
+ command.response_class = Google::Apis::CloudbuildV1::Operation
159
+ command.params['name'] = name unless name.nil?
151
160
  command.query['fields'] = fields unless fields.nil?
152
161
  command.query['quotaUser'] = quota_user unless quota_user.nil?
153
162
  execute_or_queue_command(command, &block)
154
163
  end
155
164
 
156
- # Lists previously requested builds.
157
- # Previously requested builds may still be in-progress, or may have finished
158
- # successfully or unsuccessfully.
165
+ # Deletes an BuildTrigger by its project ID and trigger ID.
166
+ # This API is experimental.
159
167
  # @param [String] project_id
160
- # ID of the project.
161
- # @param [String] filter
162
- # The raw filter text to constrain the results.
163
- # @param [String] page_token
164
- # Token to provide to skip to a particular spot in the list.
165
- # @param [Fixnum] page_size
166
- # Number of results to return in the list.
168
+ # ID of the project that owns the trigger.
169
+ # @param [String] trigger_id
170
+ # ID of the BuildTrigger to delete.
167
171
  # @param [String] fields
168
172
  # Selector specifying which fields to include in a partial response.
169
173
  # @param [String] quota_user
@@ -173,32 +177,31 @@ module Google
173
177
  # Request-specific options
174
178
  #
175
179
  # @yield [result, err] Result & error if block supplied
176
- # @yieldparam result [Google::Apis::CloudbuildV1::ListBuildsResponse] parsed result object
180
+ # @yieldparam result [Google::Apis::CloudbuildV1::Empty] parsed result object
177
181
  # @yieldparam err [StandardError] error object if request failed
178
182
  #
179
- # @return [Google::Apis::CloudbuildV1::ListBuildsResponse]
183
+ # @return [Google::Apis::CloudbuildV1::Empty]
180
184
  #
181
185
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
182
186
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
183
187
  # @raise [Google::Apis::AuthorizationError] Authorization is required
184
- def list_project_builds(project_id, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
185
- command = make_simple_command(:get, 'v1/projects/{projectId}/builds', options)
186
- command.response_representation = Google::Apis::CloudbuildV1::ListBuildsResponse::Representation
187
- command.response_class = Google::Apis::CloudbuildV1::ListBuildsResponse
188
+ def delete_project_trigger(project_id, trigger_id, fields: nil, quota_user: nil, options: nil, &block)
189
+ command = make_simple_command(:delete, 'v1/projects/{projectId}/triggers/{triggerId}', options)
190
+ command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation
191
+ command.response_class = Google::Apis::CloudbuildV1::Empty
188
192
  command.params['projectId'] = project_id unless project_id.nil?
189
- command.query['filter'] = filter unless filter.nil?
190
- command.query['pageToken'] = page_token unless page_token.nil?
191
- command.query['pageSize'] = page_size unless page_size.nil?
193
+ command.params['triggerId'] = trigger_id unless trigger_id.nil?
192
194
  command.query['fields'] = fields unless fields.nil?
193
195
  command.query['quotaUser'] = quota_user unless quota_user.nil?
194
196
  execute_or_queue_command(command, &block)
195
197
  end
196
198
 
197
- # Creates a new BuildTrigger.
199
+ # Gets information about a BuildTrigger.
198
200
  # This API is experimental.
199
201
  # @param [String] project_id
200
- # ID of the project for which to configure automatic builds.
201
- # @param [Google::Apis::CloudbuildV1::BuildTrigger] build_trigger_object
202
+ # ID of the project that owns the trigger.
203
+ # @param [String] trigger_id
204
+ # ID of the BuildTrigger to get.
202
205
  # @param [String] fields
203
206
  # Selector specifying which fields to include in a partial response.
204
207
  # @param [String] quota_user
@@ -216,24 +219,21 @@ module Google
216
219
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
217
220
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
218
221
  # @raise [Google::Apis::AuthorizationError] Authorization is required
219
- def create_project_trigger(project_id, build_trigger_object = nil, fields: nil, quota_user: nil, options: nil, &block)
220
- command = make_simple_command(:post, 'v1/projects/{projectId}/triggers', options)
221
- command.request_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation
222
- command.request_object = build_trigger_object
222
+ def get_project_trigger(project_id, trigger_id, fields: nil, quota_user: nil, options: nil, &block)
223
+ command = make_simple_command(:get, 'v1/projects/{projectId}/triggers/{triggerId}', options)
223
224
  command.response_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation
224
225
  command.response_class = Google::Apis::CloudbuildV1::BuildTrigger
225
226
  command.params['projectId'] = project_id unless project_id.nil?
227
+ command.params['triggerId'] = trigger_id unless trigger_id.nil?
226
228
  command.query['fields'] = fields unless fields.nil?
227
229
  command.query['quotaUser'] = quota_user unless quota_user.nil?
228
230
  execute_or_queue_command(command, &block)
229
231
  end
230
232
 
231
- # Deletes an BuildTrigger by its project ID and trigger ID.
233
+ # Lists existing BuildTrigger.
232
234
  # This API is experimental.
233
235
  # @param [String] project_id
234
- # ID of the project that owns the trigger.
235
- # @param [String] trigger_id
236
- # ID of the BuildTrigger to delete.
236
+ # ID of the project for which to list BuildTriggers.
237
237
  # @param [String] fields
238
238
  # Selector specifying which fields to include in a partial response.
239
239
  # @param [String] quota_user
@@ -243,31 +243,31 @@ module Google
243
243
  # Request-specific options
244
244
  #
245
245
  # @yield [result, err] Result & error if block supplied
246
- # @yieldparam result [Google::Apis::CloudbuildV1::Empty] parsed result object
246
+ # @yieldparam result [Google::Apis::CloudbuildV1::ListBuildTriggersResponse] parsed result object
247
247
  # @yieldparam err [StandardError] error object if request failed
248
248
  #
249
- # @return [Google::Apis::CloudbuildV1::Empty]
249
+ # @return [Google::Apis::CloudbuildV1::ListBuildTriggersResponse]
250
250
  #
251
251
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
252
252
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
253
253
  # @raise [Google::Apis::AuthorizationError] Authorization is required
254
- def delete_project_trigger(project_id, trigger_id, fields: nil, quota_user: nil, options: nil, &block)
255
- command = make_simple_command(:delete, 'v1/projects/{projectId}/triggers/{triggerId}', options)
256
- command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation
257
- command.response_class = Google::Apis::CloudbuildV1::Empty
254
+ def list_project_triggers(project_id, fields: nil, quota_user: nil, options: nil, &block)
255
+ command = make_simple_command(:get, 'v1/projects/{projectId}/triggers', options)
256
+ command.response_representation = Google::Apis::CloudbuildV1::ListBuildTriggersResponse::Representation
257
+ command.response_class = Google::Apis::CloudbuildV1::ListBuildTriggersResponse
258
258
  command.params['projectId'] = project_id unless project_id.nil?
259
- command.params['triggerId'] = trigger_id unless trigger_id.nil?
260
259
  command.query['fields'] = fields unless fields.nil?
261
260
  command.query['quotaUser'] = quota_user unless quota_user.nil?
262
261
  execute_or_queue_command(command, &block)
263
262
  end
264
263
 
265
- # Gets information about a BuildTrigger.
264
+ # Updates an BuildTrigger by its project ID and trigger ID.
266
265
  # This API is experimental.
267
266
  # @param [String] project_id
268
267
  # ID of the project that owns the trigger.
269
268
  # @param [String] trigger_id
270
- # ID of the BuildTrigger to get.
269
+ # ID of the BuildTrigger to update.
270
+ # @param [Google::Apis::CloudbuildV1::BuildTrigger] build_trigger_object
271
271
  # @param [String] fields
272
272
  # Selector specifying which fields to include in a partial response.
273
273
  # @param [String] quota_user
@@ -285,8 +285,10 @@ module Google
285
285
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
286
286
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
287
287
  # @raise [Google::Apis::AuthorizationError] Authorization is required
288
- def get_project_trigger(project_id, trigger_id, fields: nil, quota_user: nil, options: nil, &block)
289
- command = make_simple_command(:get, 'v1/projects/{projectId}/triggers/{triggerId}', options)
288
+ def patch_project_trigger(project_id, trigger_id, build_trigger_object = nil, fields: nil, quota_user: nil, options: nil, &block)
289
+ command = make_simple_command(:patch, 'v1/projects/{projectId}/triggers/{triggerId}', options)
290
+ command.request_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation
291
+ command.request_object = build_trigger_object
290
292
  command.response_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation
291
293
  command.response_class = Google::Apis::CloudbuildV1::BuildTrigger
292
294
  command.params['projectId'] = project_id unless project_id.nil?
@@ -296,10 +298,11 @@ module Google
296
298
  execute_or_queue_command(command, &block)
297
299
  end
298
300
 
299
- # Lists existing BuildTrigger.
301
+ # Creates a new BuildTrigger.
300
302
  # This API is experimental.
301
303
  # @param [String] project_id
302
- # ID of the project for which to list BuildTriggers.
304
+ # ID of the project for which to configure automatic builds.
305
+ # @param [Google::Apis::CloudbuildV1::BuildTrigger] build_trigger_object
303
306
  # @param [String] fields
304
307
  # Selector specifying which fields to include in a partial response.
305
308
  # @param [String] quota_user
@@ -309,31 +312,32 @@ module Google
309
312
  # Request-specific options
310
313
  #
311
314
  # @yield [result, err] Result & error if block supplied
312
- # @yieldparam result [Google::Apis::CloudbuildV1::ListBuildTriggersResponse] parsed result object
315
+ # @yieldparam result [Google::Apis::CloudbuildV1::BuildTrigger] parsed result object
313
316
  # @yieldparam err [StandardError] error object if request failed
314
317
  #
315
- # @return [Google::Apis::CloudbuildV1::ListBuildTriggersResponse]
318
+ # @return [Google::Apis::CloudbuildV1::BuildTrigger]
316
319
  #
317
320
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
318
321
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
319
322
  # @raise [Google::Apis::AuthorizationError] Authorization is required
320
- def list_project_triggers(project_id, fields: nil, quota_user: nil, options: nil, &block)
321
- command = make_simple_command(:get, 'v1/projects/{projectId}/triggers', options)
322
- command.response_representation = Google::Apis::CloudbuildV1::ListBuildTriggersResponse::Representation
323
- command.response_class = Google::Apis::CloudbuildV1::ListBuildTriggersResponse
323
+ def create_project_trigger(project_id, build_trigger_object = nil, fields: nil, quota_user: nil, options: nil, &block)
324
+ command = make_simple_command(:post, 'v1/projects/{projectId}/triggers', options)
325
+ command.request_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation
326
+ command.request_object = build_trigger_object
327
+ command.response_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation
328
+ command.response_class = Google::Apis::CloudbuildV1::BuildTrigger
324
329
  command.params['projectId'] = project_id unless project_id.nil?
325
330
  command.query['fields'] = fields unless fields.nil?
326
331
  command.query['quotaUser'] = quota_user unless quota_user.nil?
327
332
  execute_or_queue_command(command, &block)
328
333
  end
329
334
 
330
- # Updates an BuildTrigger by its project ID and trigger ID.
331
- # This API is experimental.
335
+ # Cancels a requested build in progress.
332
336
  # @param [String] project_id
333
- # ID of the project that owns the trigger.
334
- # @param [String] trigger_id
335
- # ID of the BuildTrigger to update.
336
- # @param [Google::Apis::CloudbuildV1::BuildTrigger] build_trigger_object
337
+ # ID of the project.
338
+ # @param [String] id
339
+ # ID of the build.
340
+ # @param [Google::Apis::CloudbuildV1::CancelBuildRequest] cancel_build_request_object
337
341
  # @param [String] fields
338
342
  # Selector specifying which fields to include in a partial response.
339
343
  # @param [String] quota_user
@@ -343,39 +347,34 @@ module Google
343
347
  # Request-specific options
344
348
  #
345
349
  # @yield [result, err] Result & error if block supplied
346
- # @yieldparam result [Google::Apis::CloudbuildV1::BuildTrigger] parsed result object
350
+ # @yieldparam result [Google::Apis::CloudbuildV1::Build] parsed result object
347
351
  # @yieldparam err [StandardError] error object if request failed
348
352
  #
349
- # @return [Google::Apis::CloudbuildV1::BuildTrigger]
353
+ # @return [Google::Apis::CloudbuildV1::Build]
350
354
  #
351
355
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
352
356
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
353
357
  # @raise [Google::Apis::AuthorizationError] Authorization is required
354
- def patch_project_trigger(project_id, trigger_id, build_trigger_object = nil, fields: nil, quota_user: nil, options: nil, &block)
355
- command = make_simple_command(:patch, 'v1/projects/{projectId}/triggers/{triggerId}', options)
356
- command.request_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation
357
- command.request_object = build_trigger_object
358
- command.response_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation
359
- command.response_class = Google::Apis::CloudbuildV1::BuildTrigger
358
+ def cancel_build(project_id, id, cancel_build_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
359
+ command = make_simple_command(:post, 'v1/projects/{projectId}/builds/{id}:cancel', options)
360
+ command.request_representation = Google::Apis::CloudbuildV1::CancelBuildRequest::Representation
361
+ command.request_object = cancel_build_request_object
362
+ command.response_representation = Google::Apis::CloudbuildV1::Build::Representation
363
+ command.response_class = Google::Apis::CloudbuildV1::Build
360
364
  command.params['projectId'] = project_id unless project_id.nil?
361
- command.params['triggerId'] = trigger_id unless trigger_id.nil?
365
+ command.params['id'] = id unless id.nil?
362
366
  command.query['fields'] = fields unless fields.nil?
363
367
  command.query['quotaUser'] = quota_user unless quota_user.nil?
364
368
  execute_or_queue_command(command, &block)
365
369
  end
366
370
 
367
- # Lists operations that match the specified filter in the request. If the
368
- # server doesn't support this method, it returns `UNIMPLEMENTED`.
369
- # NOTE: the `name` binding below allows API services to override the binding
370
- # to use different resource name schemes, such as `users/*/operations`.
371
- # @param [String] name
372
- # The name of the operation collection.
373
- # @param [String] page_token
374
- # The standard list page token.
375
- # @param [Fixnum] page_size
376
- # The standard list page size.
377
- # @param [String] filter
378
- # The standard list filter.
371
+ # Returns information about a previously requested build.
372
+ # The Build that is returned includes its status (e.g., success or failure,
373
+ # or in-progress), and timing information.
374
+ # @param [String] project_id
375
+ # ID of the project.
376
+ # @param [String] id
377
+ # ID of the build.
379
378
  # @param [String] fields
380
379
  # Selector specifying which fields to include in a partial response.
381
380
  # @param [String] quota_user
@@ -385,32 +384,36 @@ module Google
385
384
  # Request-specific options
386
385
  #
387
386
  # @yield [result, err] Result & error if block supplied
388
- # @yieldparam result [Google::Apis::CloudbuildV1::ListOperationsResponse] parsed result object
387
+ # @yieldparam result [Google::Apis::CloudbuildV1::Build] parsed result object
389
388
  # @yieldparam err [StandardError] error object if request failed
390
389
  #
391
- # @return [Google::Apis::CloudbuildV1::ListOperationsResponse]
390
+ # @return [Google::Apis::CloudbuildV1::Build]
392
391
  #
393
392
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
394
393
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
395
394
  # @raise [Google::Apis::AuthorizationError] Authorization is required
396
- def list_operations(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
397
- command = make_simple_command(:get, 'v1/{+name}', options)
398
- command.response_representation = Google::Apis::CloudbuildV1::ListOperationsResponse::Representation
399
- command.response_class = Google::Apis::CloudbuildV1::ListOperationsResponse
400
- command.params['name'] = name unless name.nil?
401
- command.query['pageToken'] = page_token unless page_token.nil?
402
- command.query['pageSize'] = page_size unless page_size.nil?
403
- command.query['filter'] = filter unless filter.nil?
395
+ def get_project_build(project_id, id, fields: nil, quota_user: nil, options: nil, &block)
396
+ command = make_simple_command(:get, 'v1/projects/{projectId}/builds/{id}', options)
397
+ command.response_representation = Google::Apis::CloudbuildV1::Build::Representation
398
+ command.response_class = Google::Apis::CloudbuildV1::Build
399
+ command.params['projectId'] = project_id unless project_id.nil?
400
+ command.params['id'] = id unless id.nil?
404
401
  command.query['fields'] = fields unless fields.nil?
405
402
  command.query['quotaUser'] = quota_user unless quota_user.nil?
406
403
  execute_or_queue_command(command, &block)
407
404
  end
408
405
 
409
- # Gets the latest state of a long-running operation. Clients can use this
410
- # method to poll the operation result at intervals as recommended by the API
411
- # service.
412
- # @param [String] name
413
- # The name of the operation resource.
406
+ # Lists previously requested builds.
407
+ # Previously requested builds may still be in-progress, or may have finished
408
+ # successfully or unsuccessfully.
409
+ # @param [String] project_id
410
+ # ID of the project.
411
+ # @param [String] page_token
412
+ # Token to provide to skip to a particular spot in the list.
413
+ # @param [Fixnum] page_size
414
+ # Number of results to return in the list.
415
+ # @param [String] filter
416
+ # The raw filter text to constrain the results.
414
417
  # @param [String] fields
415
418
  # Selector specifying which fields to include in a partial response.
416
419
  # @param [String] quota_user
@@ -420,37 +423,34 @@ module Google
420
423
  # Request-specific options
421
424
  #
422
425
  # @yield [result, err] Result & error if block supplied
423
- # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
426
+ # @yieldparam result [Google::Apis::CloudbuildV1::ListBuildsResponse] parsed result object
424
427
  # @yieldparam err [StandardError] error object if request failed
425
428
  #
426
- # @return [Google::Apis::CloudbuildV1::Operation]
429
+ # @return [Google::Apis::CloudbuildV1::ListBuildsResponse]
427
430
  #
428
431
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
429
432
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
430
433
  # @raise [Google::Apis::AuthorizationError] Authorization is required
431
- def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
432
- command = make_simple_command(:get, 'v1/{+name}', options)
433
- command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
434
- command.response_class = Google::Apis::CloudbuildV1::Operation
435
- command.params['name'] = name unless name.nil?
434
+ def list_project_builds(project_id, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
435
+ command = make_simple_command(:get, 'v1/projects/{projectId}/builds', options)
436
+ command.response_representation = Google::Apis::CloudbuildV1::ListBuildsResponse::Representation
437
+ command.response_class = Google::Apis::CloudbuildV1::ListBuildsResponse
438
+ command.params['projectId'] = project_id unless project_id.nil?
439
+ command.query['pageToken'] = page_token unless page_token.nil?
440
+ command.query['pageSize'] = page_size unless page_size.nil?
441
+ command.query['filter'] = filter unless filter.nil?
436
442
  command.query['fields'] = fields unless fields.nil?
437
443
  command.query['quotaUser'] = quota_user unless quota_user.nil?
438
444
  execute_or_queue_command(command, &block)
439
445
  end
440
446
 
441
- # Starts asynchronous cancellation on a long-running operation. The server
442
- # makes a best effort to cancel the operation, but success is not
443
- # guaranteed. If the server doesn't support this method, it returns
444
- # `google.rpc.Code.UNIMPLEMENTED`. Clients can use
445
- # Operations.GetOperation or
446
- # other methods to check whether the cancellation succeeded or whether the
447
- # operation completed despite cancellation. On successful cancellation,
448
- # the operation is not deleted; instead, it becomes an operation with
449
- # an Operation.error value with a google.rpc.Status.code of 1,
450
- # corresponding to `Code.CANCELLED`.
451
- # @param [String] name
452
- # The name of the operation resource to be cancelled.
453
- # @param [Google::Apis::CloudbuildV1::CancelOperationRequest] cancel_operation_request_object
447
+ # Starts a build with the specified configuration.
448
+ # The long-running Operation returned by this method will include the ID of
449
+ # the build, which can be passed to GetBuild to determine its status (e.g.,
450
+ # success or failure).
451
+ # @param [String] project_id
452
+ # ID of the project.
453
+ # @param [Google::Apis::CloudbuildV1::Build] build_object
454
454
  # @param [String] fields
455
455
  # Selector specifying which fields to include in a partial response.
456
456
  # @param [String] quota_user
@@ -460,21 +460,21 @@ module Google
460
460
  # Request-specific options
461
461
  #
462
462
  # @yield [result, err] Result & error if block supplied
463
- # @yieldparam result [Google::Apis::CloudbuildV1::Empty] parsed result object
463
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
464
464
  # @yieldparam err [StandardError] error object if request failed
465
465
  #
466
- # @return [Google::Apis::CloudbuildV1::Empty]
466
+ # @return [Google::Apis::CloudbuildV1::Operation]
467
467
  #
468
468
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
469
469
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
470
470
  # @raise [Google::Apis::AuthorizationError] Authorization is required
471
- def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
472
- command = make_simple_command(:post, 'v1/{+name}:cancel', options)
473
- command.request_representation = Google::Apis::CloudbuildV1::CancelOperationRequest::Representation
474
- command.request_object = cancel_operation_request_object
475
- command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation
476
- command.response_class = Google::Apis::CloudbuildV1::Empty
477
- command.params['name'] = name unless name.nil?
471
+ def create_project_build(project_id, build_object = nil, fields: nil, quota_user: nil, options: nil, &block)
472
+ command = make_simple_command(:post, 'v1/projects/{projectId}/builds', options)
473
+ command.request_representation = Google::Apis::CloudbuildV1::Build::Representation
474
+ command.request_object = build_object
475
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
476
+ command.response_class = Google::Apis::CloudbuildV1::Operation
477
+ command.params['projectId'] = project_id unless project_id.nil?
478
478
  command.query['fields'] = fields unless fields.nil?
479
479
  command.query['quotaUser'] = quota_user unless quota_user.nil?
480
480
  execute_or_queue_command(command, &block)