google-apis-cloudbuild_v1 0.12.0 → 0.16.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.
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module CloudbuildV1
18
18
  # Version of the google-apis-cloudbuild_v1 gem
19
- GEM_VERSION = "0.12.0"
19
+ GEM_VERSION = "0.16.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.4.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20210715"
25
+ REVISION = "20210903"
26
26
  end
27
27
  end
28
28
  end
@@ -22,6 +22,24 @@ module Google
22
22
  module Apis
23
23
  module CloudbuildV1
24
24
 
25
+ class ApprovalConfig
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class ApprovalResult
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class ApproveBuildRequest
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
25
43
  class ArtifactObjects
26
44
  class Representation < Google::Apis::Core::JsonRepresentation; end
27
45
 
@@ -46,6 +64,12 @@ module Google
46
64
  include Google::Apis::Core::JsonObjectSupport
47
65
  end
48
66
 
67
+ class BuildApproval
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
49
73
  class BuildOperationMetadata
50
74
  class Representation < Google::Apis::Core::JsonRepresentation; end
51
75
 
@@ -88,12 +112,24 @@ module Google
88
112
  include Google::Apis::Core::JsonObjectSupport
89
113
  end
90
114
 
115
+ class CreateGitHubEnterpriseConfigOperationMetadata
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
91
121
  class CreateWorkerPoolOperationMetadata
92
122
  class Representation < Google::Apis::Core::JsonRepresentation; end
93
123
 
94
124
  include Google::Apis::Core::JsonObjectSupport
95
125
  end
96
126
 
127
+ class DeleteGitHubEnterpriseConfigOperationMetadata
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
97
133
  class DeleteWorkerPoolOperationMetadata
98
134
  class Representation < Google::Apis::Core::JsonRepresentation; end
99
135
 
@@ -118,6 +154,24 @@ module Google
118
154
  include Google::Apis::Core::JsonObjectSupport
119
155
  end
120
156
 
157
+ class GitFileSource
158
+ class Representation < Google::Apis::Core::JsonRepresentation; end
159
+
160
+ include Google::Apis::Core::JsonObjectSupport
161
+ end
162
+
163
+ class GitHubEnterpriseConfig
164
+ class Representation < Google::Apis::Core::JsonRepresentation; end
165
+
166
+ include Google::Apis::Core::JsonObjectSupport
167
+ end
168
+
169
+ class GitHubEnterpriseSecrets
170
+ class Representation < Google::Apis::Core::JsonRepresentation; end
171
+
172
+ include Google::Apis::Core::JsonObjectSupport
173
+ end
174
+
121
175
  class GitHubEventsConfig
122
176
  class Representation < Google::Apis::Core::JsonRepresentation; end
123
177
 
@@ -172,6 +226,12 @@ module Google
172
226
  include Google::Apis::Core::JsonObjectSupport
173
227
  end
174
228
 
229
+ class ListGithubEnterpriseConfigsResponse
230
+ class Representation < Google::Apis::Core::JsonRepresentation; end
231
+
232
+ include Google::Apis::Core::JsonObjectSupport
233
+ end
234
+
175
235
  class ListWorkerPoolsResponse
176
236
  class Representation < Google::Apis::Core::JsonRepresentation; end
177
237
 
@@ -244,6 +304,12 @@ module Google
244
304
  include Google::Apis::Core::JsonObjectSupport
245
305
  end
246
306
 
307
+ class ProcessAppManifestCallbackOperationMetadata
308
+ class Representation < Google::Apis::Core::JsonRepresentation; end
309
+
310
+ include Google::Apis::Core::JsonObjectSupport
311
+ end
312
+
247
313
  class PubsubConfig
248
314
  class Representation < Google::Apis::Core::JsonRepresentation; end
249
315
 
@@ -358,6 +424,12 @@ module Google
358
424
  include Google::Apis::Core::JsonObjectSupport
359
425
  end
360
426
 
427
+ class UpdateGitHubEnterpriseConfigOperationMetadata
428
+ class Representation < Google::Apis::Core::JsonRepresentation; end
429
+
430
+ include Google::Apis::Core::JsonObjectSupport
431
+ end
432
+
361
433
  class UpdateWorkerPoolOperationMetadata
362
434
  class Representation < Google::Apis::Core::JsonRepresentation; end
363
435
 
@@ -394,6 +466,32 @@ module Google
394
466
  include Google::Apis::Core::JsonObjectSupport
395
467
  end
396
468
 
469
+ class ApprovalConfig
470
+ # @private
471
+ class Representation < Google::Apis::Core::JsonRepresentation
472
+ property :approval_required, as: 'approvalRequired'
473
+ end
474
+ end
475
+
476
+ class ApprovalResult
477
+ # @private
478
+ class Representation < Google::Apis::Core::JsonRepresentation
479
+ property :approval_time, as: 'approvalTime'
480
+ property :approver_account, as: 'approverAccount'
481
+ property :comment, as: 'comment'
482
+ property :decision, as: 'decision'
483
+ property :url, as: 'url'
484
+ end
485
+ end
486
+
487
+ class ApproveBuildRequest
488
+ # @private
489
+ class Representation < Google::Apis::Core::JsonRepresentation
490
+ property :approval_result, as: 'approvalResult', class: Google::Apis::CloudbuildV1::ApprovalResult, decorator: Google::Apis::CloudbuildV1::ApprovalResult::Representation
491
+
492
+ end
493
+ end
494
+
397
495
  class ArtifactObjects
398
496
  # @private
399
497
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -425,6 +523,8 @@ module Google
425
523
  class Build
426
524
  # @private
427
525
  class Representation < Google::Apis::Core::JsonRepresentation
526
+ property :approval, as: 'approval', class: Google::Apis::CloudbuildV1::BuildApproval, decorator: Google::Apis::CloudbuildV1::BuildApproval::Representation
527
+
428
528
  property :artifacts, as: 'artifacts', class: Google::Apis::CloudbuildV1::Artifacts, decorator: Google::Apis::CloudbuildV1::Artifacts::Representation
429
529
 
430
530
  property :available_secrets, as: 'availableSecrets', class: Google::Apis::CloudbuildV1::Secrets, decorator: Google::Apis::CloudbuildV1::Secrets::Representation
@@ -467,6 +567,17 @@ module Google
467
567
  end
468
568
  end
469
569
 
570
+ class BuildApproval
571
+ # @private
572
+ class Representation < Google::Apis::Core::JsonRepresentation
573
+ property :config, as: 'config', class: Google::Apis::CloudbuildV1::ApprovalConfig, decorator: Google::Apis::CloudbuildV1::ApprovalConfig::Representation
574
+
575
+ property :result, as: 'result', class: Google::Apis::CloudbuildV1::ApprovalResult, decorator: Google::Apis::CloudbuildV1::ApprovalResult::Representation
576
+
577
+ property :state, as: 'state'
578
+ end
579
+ end
580
+
470
581
  class BuildOperationMetadata
471
582
  # @private
472
583
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -507,6 +618,7 @@ module Google
507
618
  property :name, as: 'name'
508
619
  property :pull_timing, as: 'pullTiming', class: Google::Apis::CloudbuildV1::TimeSpan, decorator: Google::Apis::CloudbuildV1::TimeSpan::Representation
509
620
 
621
+ property :script, as: 'script'
510
622
  collection :secret_env, as: 'secretEnv'
511
623
  property :status, as: 'status'
512
624
  property :timeout, as: 'timeout'
@@ -521,6 +633,8 @@ module Google
521
633
  class BuildTrigger
522
634
  # @private
523
635
  class Representation < Google::Apis::Core::JsonRepresentation
636
+ property :approval_config, as: 'approvalConfig', class: Google::Apis::CloudbuildV1::ApprovalConfig, decorator: Google::Apis::CloudbuildV1::ApprovalConfig::Representation
637
+
524
638
  property :autodetect, as: 'autodetect'
525
639
  property :build, as: 'build', class: Google::Apis::CloudbuildV1::Build, decorator: Google::Apis::CloudbuildV1::Build::Representation
526
640
 
@@ -529,6 +643,8 @@ module Google
529
643
  property :disabled, as: 'disabled'
530
644
  property :filename, as: 'filename'
531
645
  property :filter, as: 'filter'
646
+ property :git_file_source, as: 'gitFileSource', class: Google::Apis::CloudbuildV1::GitFileSource, decorator: Google::Apis::CloudbuildV1::GitFileSource::Representation
647
+
532
648
  property :github, as: 'github', class: Google::Apis::CloudbuildV1::GitHubEventsConfig, decorator: Google::Apis::CloudbuildV1::GitHubEventsConfig::Representation
533
649
 
534
650
  property :id, as: 'id'
@@ -538,6 +654,7 @@ module Google
538
654
  property :pubsub_config, as: 'pubsubConfig', class: Google::Apis::CloudbuildV1::PubsubConfig, decorator: Google::Apis::CloudbuildV1::PubsubConfig::Representation
539
655
 
540
656
  property :resource_name, as: 'resourceName'
657
+ property :service_account, as: 'serviceAccount'
541
658
  property :source_to_build, as: 'sourceToBuild', class: Google::Apis::CloudbuildV1::GitRepoSource, decorator: Google::Apis::CloudbuildV1::GitRepoSource::Representation
542
659
 
543
660
  hash :substitutions, as: 'substitutions'
@@ -574,6 +691,15 @@ module Google
574
691
  end
575
692
  end
576
693
 
694
+ class CreateGitHubEnterpriseConfigOperationMetadata
695
+ # @private
696
+ class Representation < Google::Apis::Core::JsonRepresentation
697
+ property :complete_time, as: 'completeTime'
698
+ property :create_time, as: 'createTime'
699
+ property :github_enterprise_config, as: 'githubEnterpriseConfig'
700
+ end
701
+ end
702
+
577
703
  class CreateWorkerPoolOperationMetadata
578
704
  # @private
579
705
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -583,6 +709,15 @@ module Google
583
709
  end
584
710
  end
585
711
 
712
+ class DeleteGitHubEnterpriseConfigOperationMetadata
713
+ # @private
714
+ class Representation < Google::Apis::Core::JsonRepresentation
715
+ property :complete_time, as: 'completeTime'
716
+ property :create_time, as: 'createTime'
717
+ property :github_enterprise_config, as: 'githubEnterpriseConfig'
718
+ end
719
+ end
720
+
586
721
  class DeleteWorkerPoolOperationMetadata
587
722
  # @private
588
723
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -614,9 +749,50 @@ module Google
614
749
  end
615
750
  end
616
751
 
752
+ class GitFileSource
753
+ # @private
754
+ class Representation < Google::Apis::Core::JsonRepresentation
755
+ property :path, as: 'path'
756
+ property :repo_type, as: 'repoType'
757
+ property :revision, as: 'revision'
758
+ property :uri, as: 'uri'
759
+ end
760
+ end
761
+
762
+ class GitHubEnterpriseConfig
763
+ # @private
764
+ class Representation < Google::Apis::Core::JsonRepresentation
765
+ property :app_id, :numeric_string => true, as: 'appId'
766
+ property :create_time, as: 'createTime'
767
+ property :display_name, as: 'displayName'
768
+ property :host_url, as: 'hostUrl'
769
+ property :name, as: 'name'
770
+ property :peered_network, as: 'peeredNetwork'
771
+ property :secrets, as: 'secrets', class: Google::Apis::CloudbuildV1::GitHubEnterpriseSecrets, decorator: Google::Apis::CloudbuildV1::GitHubEnterpriseSecrets::Representation
772
+
773
+ property :ssl_ca, as: 'sslCa'
774
+ property :webhook_key, as: 'webhookKey'
775
+ end
776
+ end
777
+
778
+ class GitHubEnterpriseSecrets
779
+ # @private
780
+ class Representation < Google::Apis::Core::JsonRepresentation
781
+ property :oauth_client_id_name, as: 'oauthClientIdName'
782
+ property :oauth_client_id_version_name, as: 'oauthClientIdVersionName'
783
+ property :oauth_secret_name, as: 'oauthSecretName'
784
+ property :oauth_secret_version_name, as: 'oauthSecretVersionName'
785
+ property :private_key_name, as: 'privateKeyName'
786
+ property :private_key_version_name, as: 'privateKeyVersionName'
787
+ property :webhook_secret_name, as: 'webhookSecretName'
788
+ property :webhook_secret_version_name, as: 'webhookSecretVersionName'
789
+ end
790
+ end
791
+
617
792
  class GitHubEventsConfig
618
793
  # @private
619
794
  class Representation < Google::Apis::Core::JsonRepresentation
795
+ property :enterprise_config_resource_name, as: 'enterpriseConfigResourceName'
620
796
  property :installation_id, :numeric_string => true, as: 'installationId'
621
797
  property :name, as: 'name'
622
798
  property :owner, as: 'owner'
@@ -699,6 +875,14 @@ module Google
699
875
  end
700
876
  end
701
877
 
878
+ class ListGithubEnterpriseConfigsResponse
879
+ # @private
880
+ class Representation < Google::Apis::Core::JsonRepresentation
881
+ collection :configs, as: 'configs', class: Google::Apis::CloudbuildV1::GitHubEnterpriseConfig, decorator: Google::Apis::CloudbuildV1::GitHubEnterpriseConfig::Representation
882
+
883
+ end
884
+ end
885
+
702
886
  class ListWorkerPoolsResponse
703
887
  # @private
704
888
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -817,6 +1001,15 @@ module Google
817
1001
  end
818
1002
  end
819
1003
 
1004
+ class ProcessAppManifestCallbackOperationMetadata
1005
+ # @private
1006
+ class Representation < Google::Apis::Core::JsonRepresentation
1007
+ property :complete_time, as: 'completeTime'
1008
+ property :create_time, as: 'createTime'
1009
+ property :github_enterprise_config, as: 'githubEnterpriseConfig'
1010
+ end
1011
+ end
1012
+
820
1013
  class PubsubConfig
821
1014
  # @private
822
1015
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1006,6 +1199,15 @@ module Google
1006
1199
  end
1007
1200
  end
1008
1201
 
1202
+ class UpdateGitHubEnterpriseConfigOperationMetadata
1203
+ # @private
1204
+ class Representation < Google::Apis::Core::JsonRepresentation
1205
+ property :complete_time, as: 'completeTime'
1206
+ property :create_time, as: 'createTime'
1207
+ property :github_enterprise_config, as: 'githubEnterpriseConfig'
1208
+ end
1209
+ end
1210
+
1009
1211
  class UpdateWorkerPoolOperationMetadata
1010
1212
  # @private
1011
1213
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -120,6 +120,42 @@ module Google
120
120
  execute_or_queue_command(command, &block)
121
121
  end
122
122
 
123
+ # Approves or rejects a pending build. If approved, the returned LRO will be
124
+ # analogous to the LRO returned from a CreateBuild call. If rejected, the
125
+ # returned LRO will be immediately done.
126
+ # @param [String] name
127
+ # Required. Name of the target build. For example: "projects/`$project_id`/
128
+ # builds/`$build_id`"
129
+ # @param [Google::Apis::CloudbuildV1::ApproveBuildRequest] approve_build_request_object
130
+ # @param [String] fields
131
+ # Selector specifying which fields to include in a partial response.
132
+ # @param [String] quota_user
133
+ # Available to use for quota purposes for server-side applications. Can be any
134
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
135
+ # @param [Google::Apis::RequestOptions] options
136
+ # Request-specific options
137
+ #
138
+ # @yield [result, err] Result & error if block supplied
139
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
140
+ # @yieldparam err [StandardError] error object if request failed
141
+ #
142
+ # @return [Google::Apis::CloudbuildV1::Operation]
143
+ #
144
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
145
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
146
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
147
+ def approve_project_build(name, approve_build_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
148
+ command = make_simple_command(:post, 'v1/{+name}:approve', options)
149
+ command.request_representation = Google::Apis::CloudbuildV1::ApproveBuildRequest::Representation
150
+ command.request_object = approve_build_request_object
151
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
152
+ command.response_class = Google::Apis::CloudbuildV1::Operation
153
+ command.params['name'] = name unless name.nil?
154
+ command.query['fields'] = fields unless fields.nil?
155
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
156
+ execute_or_queue_command(command, &block)
157
+ end
158
+
123
159
  # Cancels a build in progress.
124
160
  # @param [String] project_id
125
161
  # Required. ID of the project.
@@ -333,6 +369,226 @@ module Google
333
369
  execute_or_queue_command(command, &block)
334
370
  end
335
371
 
372
+ # Create an association between a GCP project and a GitHub Enterprise server.
373
+ # @param [String] parent
374
+ # Name of the parent project. For example: projects/`$project_number` or
375
+ # projects/`$project_id`
376
+ # @param [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig] git_hub_enterprise_config_object
377
+ # @param [String] project_id
378
+ # ID of the project.
379
+ # @param [String] fields
380
+ # Selector specifying which fields to include in a partial response.
381
+ # @param [String] quota_user
382
+ # Available to use for quota purposes for server-side applications. Can be any
383
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
384
+ # @param [Google::Apis::RequestOptions] options
385
+ # Request-specific options
386
+ #
387
+ # @yield [result, err] Result & error if block supplied
388
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
389
+ # @yieldparam err [StandardError] error object if request failed
390
+ #
391
+ # @return [Google::Apis::CloudbuildV1::Operation]
392
+ #
393
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
394
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
395
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
396
+ def create_project_github_enterprise_config(parent, git_hub_enterprise_config_object = nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
397
+ command = make_simple_command(:post, 'v1/{+parent}/githubEnterpriseConfigs', options)
398
+ command.request_representation = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig::Representation
399
+ command.request_object = git_hub_enterprise_config_object
400
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
401
+ command.response_class = Google::Apis::CloudbuildV1::Operation
402
+ command.params['parent'] = parent unless parent.nil?
403
+ command.query['projectId'] = project_id unless project_id.nil?
404
+ command.query['fields'] = fields unless fields.nil?
405
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
406
+ execute_or_queue_command(command, &block)
407
+ end
408
+
409
+ # Delete an association between a GCP project and a GitHub Enterprise server.
410
+ # @param [String] name
411
+ # This field should contain the name of the enterprise config resource. For
412
+ # example: "projects/`$project_id`/githubEnterpriseConfigs/`$config_id`"
413
+ # @param [String] config_id
414
+ # Unique identifier of the `GitHubEnterpriseConfig`
415
+ # @param [String] project_id
416
+ # ID of the project
417
+ # @param [String] fields
418
+ # Selector specifying which fields to include in a partial response.
419
+ # @param [String] quota_user
420
+ # Available to use for quota purposes for server-side applications. Can be any
421
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
422
+ # @param [Google::Apis::RequestOptions] options
423
+ # Request-specific options
424
+ #
425
+ # @yield [result, err] Result & error if block supplied
426
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
427
+ # @yieldparam err [StandardError] error object if request failed
428
+ #
429
+ # @return [Google::Apis::CloudbuildV1::Operation]
430
+ #
431
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
432
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
433
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
434
+ def delete_project_github_enterprise_config(name, config_id: nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
435
+ command = make_simple_command(:delete, 'v1/{+name}', options)
436
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
437
+ command.response_class = Google::Apis::CloudbuildV1::Operation
438
+ command.params['name'] = name unless name.nil?
439
+ command.query['configId'] = config_id unless config_id.nil?
440
+ command.query['projectId'] = project_id unless project_id.nil?
441
+ command.query['fields'] = fields unless fields.nil?
442
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
443
+ execute_or_queue_command(command, &block)
444
+ end
445
+
446
+ # Retrieve a GitHubEnterpriseConfig.
447
+ # @param [String] name
448
+ # This field should contain the name of the enterprise config resource. For
449
+ # example: "projects/`$project_id`/githubEnterpriseConfigs/`$config_id`"
450
+ # @param [String] config_id
451
+ # Unique identifier of the `GitHubEnterpriseConfig`
452
+ # @param [String] project_id
453
+ # ID of the project
454
+ # @param [String] fields
455
+ # Selector specifying which fields to include in a partial response.
456
+ # @param [String] quota_user
457
+ # Available to use for quota purposes for server-side applications. Can be any
458
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
459
+ # @param [Google::Apis::RequestOptions] options
460
+ # Request-specific options
461
+ #
462
+ # @yield [result, err] Result & error if block supplied
463
+ # @yieldparam result [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig] parsed result object
464
+ # @yieldparam err [StandardError] error object if request failed
465
+ #
466
+ # @return [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig]
467
+ #
468
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
469
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
470
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
471
+ def get_project_github_enterprise_config(name, config_id: nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
472
+ command = make_simple_command(:get, 'v1/{+name}', options)
473
+ command.response_representation = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig::Representation
474
+ command.response_class = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig
475
+ command.params['name'] = name unless name.nil?
476
+ command.query['configId'] = config_id unless config_id.nil?
477
+ command.query['projectId'] = project_id unless project_id.nil?
478
+ command.query['fields'] = fields unless fields.nil?
479
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
480
+ execute_or_queue_command(command, &block)
481
+ end
482
+
483
+ # List all GitHubEnterpriseConfigs for a given project.
484
+ # @param [String] parent
485
+ # Name of the parent project. For example: projects/`$project_number` or
486
+ # projects/`$project_id`
487
+ # @param [String] project_id
488
+ # ID of the project
489
+ # @param [String] fields
490
+ # Selector specifying which fields to include in a partial response.
491
+ # @param [String] quota_user
492
+ # Available to use for quota purposes for server-side applications. Can be any
493
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
494
+ # @param [Google::Apis::RequestOptions] options
495
+ # Request-specific options
496
+ #
497
+ # @yield [result, err] Result & error if block supplied
498
+ # @yieldparam result [Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse] parsed result object
499
+ # @yieldparam err [StandardError] error object if request failed
500
+ #
501
+ # @return [Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse]
502
+ #
503
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
504
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
505
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
506
+ def list_project_github_enterprise_configs(parent, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
507
+ command = make_simple_command(:get, 'v1/{+parent}/githubEnterpriseConfigs', options)
508
+ command.response_representation = Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse::Representation
509
+ command.response_class = Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse
510
+ command.params['parent'] = parent unless parent.nil?
511
+ command.query['projectId'] = project_id unless project_id.nil?
512
+ command.query['fields'] = fields unless fields.nil?
513
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
514
+ execute_or_queue_command(command, &block)
515
+ end
516
+
517
+ # Update an association between a GCP project and a GitHub Enterprise server.
518
+ # @param [String] name
519
+ # Optional. The full resource name for the GitHubEnterpriseConfig For example: "
520
+ # projects/`$project_id`/githubEnterpriseConfigs/`$config_id`"
521
+ # @param [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig] git_hub_enterprise_config_object
522
+ # @param [String] update_mask
523
+ # Update mask for the resource. If this is set, the server will only update the
524
+ # fields specified in the field mask. Otherwise, a full update of the mutable
525
+ # resource fields will be performed.
526
+ # @param [String] fields
527
+ # Selector specifying which fields to include in a partial response.
528
+ # @param [String] quota_user
529
+ # Available to use for quota purposes for server-side applications. Can be any
530
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
531
+ # @param [Google::Apis::RequestOptions] options
532
+ # Request-specific options
533
+ #
534
+ # @yield [result, err] Result & error if block supplied
535
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
536
+ # @yieldparam err [StandardError] error object if request failed
537
+ #
538
+ # @return [Google::Apis::CloudbuildV1::Operation]
539
+ #
540
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
541
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
542
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
543
+ def patch_project_github_enterprise_config(name, git_hub_enterprise_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
544
+ command = make_simple_command(:patch, 'v1/{+name}', options)
545
+ command.request_representation = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig::Representation
546
+ command.request_object = git_hub_enterprise_config_object
547
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
548
+ command.response_class = Google::Apis::CloudbuildV1::Operation
549
+ command.params['name'] = name unless name.nil?
550
+ command.query['updateMask'] = update_mask unless update_mask.nil?
551
+ command.query['fields'] = fields unless fields.nil?
552
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
553
+ execute_or_queue_command(command, &block)
554
+ end
555
+
556
+ # Approves or rejects a pending build. If approved, the returned LRO will be
557
+ # analogous to the LRO returned from a CreateBuild call. If rejected, the
558
+ # returned LRO will be immediately done.
559
+ # @param [String] name
560
+ # Required. Name of the target build. For example: "projects/`$project_id`/
561
+ # builds/`$build_id`"
562
+ # @param [Google::Apis::CloudbuildV1::ApproveBuildRequest] approve_build_request_object
563
+ # @param [String] fields
564
+ # Selector specifying which fields to include in a partial response.
565
+ # @param [String] quota_user
566
+ # Available to use for quota purposes for server-side applications. Can be any
567
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
568
+ # @param [Google::Apis::RequestOptions] options
569
+ # Request-specific options
570
+ #
571
+ # @yield [result, err] Result & error if block supplied
572
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
573
+ # @yieldparam err [StandardError] error object if request failed
574
+ #
575
+ # @return [Google::Apis::CloudbuildV1::Operation]
576
+ #
577
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
578
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
579
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
580
+ def approve_project_location_build(name, approve_build_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
581
+ command = make_simple_command(:post, 'v1/{+name}:approve', options)
582
+ command.request_representation = Google::Apis::CloudbuildV1::ApproveBuildRequest::Representation
583
+ command.request_object = approve_build_request_object
584
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
585
+ command.response_class = Google::Apis::CloudbuildV1::Operation
586
+ command.params['name'] = name unless name.nil?
587
+ command.query['fields'] = fields unless fields.nil?
588
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
589
+ execute_or_queue_command(command, &block)
590
+ end
591
+
336
592
  # Cancels a build in progress.
337
593
  # @param [String] name
338
594
  # The name of the `Build` to cancel. Format: `projects/`project`/locations/`
@@ -542,6 +798,190 @@ module Google
542
798
  execute_or_queue_command(command, &block)
543
799
  end
544
800
 
801
+ # Create an association between a GCP project and a GitHub Enterprise server.
802
+ # @param [String] parent
803
+ # Name of the parent project. For example: projects/`$project_number` or
804
+ # projects/`$project_id`
805
+ # @param [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig] git_hub_enterprise_config_object
806
+ # @param [String] project_id
807
+ # ID of the project.
808
+ # @param [String] fields
809
+ # Selector specifying which fields to include in a partial response.
810
+ # @param [String] quota_user
811
+ # Available to use for quota purposes for server-side applications. Can be any
812
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
813
+ # @param [Google::Apis::RequestOptions] options
814
+ # Request-specific options
815
+ #
816
+ # @yield [result, err] Result & error if block supplied
817
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
818
+ # @yieldparam err [StandardError] error object if request failed
819
+ #
820
+ # @return [Google::Apis::CloudbuildV1::Operation]
821
+ #
822
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
823
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
824
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
825
+ def create_project_location_github_enterprise_config(parent, git_hub_enterprise_config_object = nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
826
+ command = make_simple_command(:post, 'v1/{+parent}/githubEnterpriseConfigs', options)
827
+ command.request_representation = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig::Representation
828
+ command.request_object = git_hub_enterprise_config_object
829
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
830
+ command.response_class = Google::Apis::CloudbuildV1::Operation
831
+ command.params['parent'] = parent unless parent.nil?
832
+ command.query['projectId'] = project_id unless project_id.nil?
833
+ command.query['fields'] = fields unless fields.nil?
834
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
835
+ execute_or_queue_command(command, &block)
836
+ end
837
+
838
+ # Delete an association between a GCP project and a GitHub Enterprise server.
839
+ # @param [String] name
840
+ # This field should contain the name of the enterprise config resource. For
841
+ # example: "projects/`$project_id`/githubEnterpriseConfigs/`$config_id`"
842
+ # @param [String] config_id
843
+ # Unique identifier of the `GitHubEnterpriseConfig`
844
+ # @param [String] project_id
845
+ # ID of the project
846
+ # @param [String] fields
847
+ # Selector specifying which fields to include in a partial response.
848
+ # @param [String] quota_user
849
+ # Available to use for quota purposes for server-side applications. Can be any
850
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
851
+ # @param [Google::Apis::RequestOptions] options
852
+ # Request-specific options
853
+ #
854
+ # @yield [result, err] Result & error if block supplied
855
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
856
+ # @yieldparam err [StandardError] error object if request failed
857
+ #
858
+ # @return [Google::Apis::CloudbuildV1::Operation]
859
+ #
860
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
861
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
862
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
863
+ def delete_project_location_github_enterprise_config(name, config_id: nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
864
+ command = make_simple_command(:delete, 'v1/{+name}', options)
865
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
866
+ command.response_class = Google::Apis::CloudbuildV1::Operation
867
+ command.params['name'] = name unless name.nil?
868
+ command.query['configId'] = config_id unless config_id.nil?
869
+ command.query['projectId'] = project_id unless project_id.nil?
870
+ command.query['fields'] = fields unless fields.nil?
871
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
872
+ execute_or_queue_command(command, &block)
873
+ end
874
+
875
+ # Retrieve a GitHubEnterpriseConfig.
876
+ # @param [String] name
877
+ # This field should contain the name of the enterprise config resource. For
878
+ # example: "projects/`$project_id`/githubEnterpriseConfigs/`$config_id`"
879
+ # @param [String] config_id
880
+ # Unique identifier of the `GitHubEnterpriseConfig`
881
+ # @param [String] project_id
882
+ # ID of the project
883
+ # @param [String] fields
884
+ # Selector specifying which fields to include in a partial response.
885
+ # @param [String] quota_user
886
+ # Available to use for quota purposes for server-side applications. Can be any
887
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
888
+ # @param [Google::Apis::RequestOptions] options
889
+ # Request-specific options
890
+ #
891
+ # @yield [result, err] Result & error if block supplied
892
+ # @yieldparam result [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig] parsed result object
893
+ # @yieldparam err [StandardError] error object if request failed
894
+ #
895
+ # @return [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig]
896
+ #
897
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
898
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
899
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
900
+ def get_project_location_github_enterprise_config(name, config_id: nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
901
+ command = make_simple_command(:get, 'v1/{+name}', options)
902
+ command.response_representation = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig::Representation
903
+ command.response_class = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig
904
+ command.params['name'] = name unless name.nil?
905
+ command.query['configId'] = config_id unless config_id.nil?
906
+ command.query['projectId'] = project_id unless project_id.nil?
907
+ command.query['fields'] = fields unless fields.nil?
908
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
909
+ execute_or_queue_command(command, &block)
910
+ end
911
+
912
+ # List all GitHubEnterpriseConfigs for a given project.
913
+ # @param [String] parent
914
+ # Name of the parent project. For example: projects/`$project_number` or
915
+ # projects/`$project_id`
916
+ # @param [String] project_id
917
+ # ID of the project
918
+ # @param [String] fields
919
+ # Selector specifying which fields to include in a partial response.
920
+ # @param [String] quota_user
921
+ # Available to use for quota purposes for server-side applications. Can be any
922
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
923
+ # @param [Google::Apis::RequestOptions] options
924
+ # Request-specific options
925
+ #
926
+ # @yield [result, err] Result & error if block supplied
927
+ # @yieldparam result [Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse] parsed result object
928
+ # @yieldparam err [StandardError] error object if request failed
929
+ #
930
+ # @return [Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse]
931
+ #
932
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
933
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
934
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
935
+ def list_project_location_github_enterprise_configs(parent, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
936
+ command = make_simple_command(:get, 'v1/{+parent}/githubEnterpriseConfigs', options)
937
+ command.response_representation = Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse::Representation
938
+ command.response_class = Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse
939
+ command.params['parent'] = parent unless parent.nil?
940
+ command.query['projectId'] = project_id unless project_id.nil?
941
+ command.query['fields'] = fields unless fields.nil?
942
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
943
+ execute_or_queue_command(command, &block)
944
+ end
945
+
946
+ # Update an association between a GCP project and a GitHub Enterprise server.
947
+ # @param [String] name
948
+ # Optional. The full resource name for the GitHubEnterpriseConfig For example: "
949
+ # projects/`$project_id`/githubEnterpriseConfigs/`$config_id`"
950
+ # @param [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig] git_hub_enterprise_config_object
951
+ # @param [String] update_mask
952
+ # Update mask for the resource. If this is set, the server will only update the
953
+ # fields specified in the field mask. Otherwise, a full update of the mutable
954
+ # resource fields will be performed.
955
+ # @param [String] fields
956
+ # Selector specifying which fields to include in a partial response.
957
+ # @param [String] quota_user
958
+ # Available to use for quota purposes for server-side applications. Can be any
959
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
960
+ # @param [Google::Apis::RequestOptions] options
961
+ # Request-specific options
962
+ #
963
+ # @yield [result, err] Result & error if block supplied
964
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
965
+ # @yieldparam err [StandardError] error object if request failed
966
+ #
967
+ # @return [Google::Apis::CloudbuildV1::Operation]
968
+ #
969
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
970
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
971
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
972
+ def patch_project_location_github_enterprise_config(name, git_hub_enterprise_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
973
+ command = make_simple_command(:patch, 'v1/{+name}', options)
974
+ command.request_representation = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig::Representation
975
+ command.request_object = git_hub_enterprise_config_object
976
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
977
+ command.response_class = Google::Apis::CloudbuildV1::Operation
978
+ command.params['name'] = name unless name.nil?
979
+ command.query['updateMask'] = update_mask unless update_mask.nil?
980
+ command.query['fields'] = fields unless fields.nil?
981
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
982
+ execute_or_queue_command(command, &block)
983
+ end
984
+
545
985
  # Starts asynchronous cancellation on a long-running operation. The server makes
546
986
  # a best effort to cancel the operation, but success is not guaranteed. If the
547
987
  # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
@@ -1356,6 +1796,40 @@ module Google
1356
1796
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1357
1797
  execute_or_queue_command(command, &block)
1358
1798
  end
1799
+
1800
+ # ReceiveWebhook is called when the API receives a GitHub webhook.
1801
+ # @param [Google::Apis::CloudbuildV1::HttpBody] http_body_object
1802
+ # @param [String] webhook_key
1803
+ # For GitHub Enterprise webhooks, this key is used to associate the webhook
1804
+ # request with the GitHubEnterpriseConfig to use for validation.
1805
+ # @param [String] fields
1806
+ # Selector specifying which fields to include in a partial response.
1807
+ # @param [String] quota_user
1808
+ # Available to use for quota purposes for server-side applications. Can be any
1809
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1810
+ # @param [Google::Apis::RequestOptions] options
1811
+ # Request-specific options
1812
+ #
1813
+ # @yield [result, err] Result & error if block supplied
1814
+ # @yieldparam result [Google::Apis::CloudbuildV1::Empty] parsed result object
1815
+ # @yieldparam err [StandardError] error object if request failed
1816
+ #
1817
+ # @return [Google::Apis::CloudbuildV1::Empty]
1818
+ #
1819
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1820
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1821
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1822
+ def webhook(http_body_object = nil, webhook_key: nil, fields: nil, quota_user: nil, options: nil, &block)
1823
+ command = make_simple_command(:post, 'v1/webhook', options)
1824
+ command.request_representation = Google::Apis::CloudbuildV1::HttpBody::Representation
1825
+ command.request_object = http_body_object
1826
+ command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation
1827
+ command.response_class = Google::Apis::CloudbuildV1::Empty
1828
+ command.query['webhookKey'] = webhook_key unless webhook_key.nil?
1829
+ command.query['fields'] = fields unless fields.nil?
1830
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1831
+ execute_or_queue_command(command, &block)
1832
+ end
1359
1833
 
1360
1834
  protected
1361
1835