google-apis-cloudbuild_v1 0.11.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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,229 @@ 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
+ # This API is experimental.
374
+ # @param [String] parent
375
+ # Name of the parent project. For example: projects/`$project_number` or
376
+ # projects/`$project_id`
377
+ # @param [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig] git_hub_enterprise_config_object
378
+ # @param [String] project_id
379
+ # ID of the project.
380
+ # @param [String] fields
381
+ # Selector specifying which fields to include in a partial response.
382
+ # @param [String] quota_user
383
+ # Available to use for quota purposes for server-side applications. Can be any
384
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
385
+ # @param [Google::Apis::RequestOptions] options
386
+ # Request-specific options
387
+ #
388
+ # @yield [result, err] Result & error if block supplied
389
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
390
+ # @yieldparam err [StandardError] error object if request failed
391
+ #
392
+ # @return [Google::Apis::CloudbuildV1::Operation]
393
+ #
394
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
395
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
396
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
397
+ def create_project_github_enterprise_config(parent, git_hub_enterprise_config_object = nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
398
+ command = make_simple_command(:post, 'v1/{+parent}/githubEnterpriseConfigs', options)
399
+ command.request_representation = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig::Representation
400
+ command.request_object = git_hub_enterprise_config_object
401
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
402
+ command.response_class = Google::Apis::CloudbuildV1::Operation
403
+ command.params['parent'] = parent unless parent.nil?
404
+ command.query['projectId'] = project_id unless project_id.nil?
405
+ command.query['fields'] = fields unless fields.nil?
406
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
407
+ execute_or_queue_command(command, &block)
408
+ end
409
+
410
+ # Delete an association between a GCP project and a GitHub Enterprise server.
411
+ # This API is experimental.
412
+ # @param [String] name
413
+ # This field should contain the name of the enterprise config resource. For
414
+ # example: "projects/`$project_id`/githubEnterpriseConfigs/`$config_id`"
415
+ # @param [String] config_id
416
+ # Unique identifier of the `GitHubEnterpriseConfig`
417
+ # @param [String] project_id
418
+ # ID of the project
419
+ # @param [String] fields
420
+ # Selector specifying which fields to include in a partial response.
421
+ # @param [String] quota_user
422
+ # Available to use for quota purposes for server-side applications. Can be any
423
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
424
+ # @param [Google::Apis::RequestOptions] options
425
+ # Request-specific options
426
+ #
427
+ # @yield [result, err] Result & error if block supplied
428
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
429
+ # @yieldparam err [StandardError] error object if request failed
430
+ #
431
+ # @return [Google::Apis::CloudbuildV1::Operation]
432
+ #
433
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
434
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
435
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
436
+ def delete_project_github_enterprise_config(name, config_id: nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
437
+ command = make_simple_command(:delete, 'v1/{+name}', options)
438
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
439
+ command.response_class = Google::Apis::CloudbuildV1::Operation
440
+ command.params['name'] = name unless name.nil?
441
+ command.query['configId'] = config_id unless config_id.nil?
442
+ command.query['projectId'] = project_id unless project_id.nil?
443
+ command.query['fields'] = fields unless fields.nil?
444
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
445
+ execute_or_queue_command(command, &block)
446
+ end
447
+
448
+ # Retrieve a GitHubEnterpriseConfig. This API is experimental.
449
+ # @param [String] name
450
+ # This field should contain the name of the enterprise config resource. For
451
+ # example: "projects/`$project_id`/githubEnterpriseConfigs/`$config_id`"
452
+ # @param [String] config_id
453
+ # Unique identifier of the `GitHubEnterpriseConfig`
454
+ # @param [String] project_id
455
+ # ID of the project
456
+ # @param [String] fields
457
+ # Selector specifying which fields to include in a partial response.
458
+ # @param [String] quota_user
459
+ # Available to use for quota purposes for server-side applications. Can be any
460
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
461
+ # @param [Google::Apis::RequestOptions] options
462
+ # Request-specific options
463
+ #
464
+ # @yield [result, err] Result & error if block supplied
465
+ # @yieldparam result [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig] parsed result object
466
+ # @yieldparam err [StandardError] error object if request failed
467
+ #
468
+ # @return [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig]
469
+ #
470
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
471
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
472
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
473
+ def get_project_github_enterprise_config(name, config_id: nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
474
+ command = make_simple_command(:get, 'v1/{+name}', options)
475
+ command.response_representation = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig::Representation
476
+ command.response_class = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig
477
+ command.params['name'] = name unless name.nil?
478
+ command.query['configId'] = config_id unless config_id.nil?
479
+ command.query['projectId'] = project_id unless project_id.nil?
480
+ command.query['fields'] = fields unless fields.nil?
481
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
482
+ execute_or_queue_command(command, &block)
483
+ end
484
+
485
+ # List all GitHubEnterpriseConfigs for a given project. This API is experimental.
486
+ # @param [String] parent
487
+ # Name of the parent project. For example: projects/`$project_number` or
488
+ # projects/`$project_id`
489
+ # @param [String] project_id
490
+ # ID of the project
491
+ # @param [String] fields
492
+ # Selector specifying which fields to include in a partial response.
493
+ # @param [String] quota_user
494
+ # Available to use for quota purposes for server-side applications. Can be any
495
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
496
+ # @param [Google::Apis::RequestOptions] options
497
+ # Request-specific options
498
+ #
499
+ # @yield [result, err] Result & error if block supplied
500
+ # @yieldparam result [Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse] parsed result object
501
+ # @yieldparam err [StandardError] error object if request failed
502
+ #
503
+ # @return [Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse]
504
+ #
505
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
506
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
507
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
508
+ def list_project_github_enterprise_configs(parent, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
509
+ command = make_simple_command(:get, 'v1/{+parent}/githubEnterpriseConfigs', options)
510
+ command.response_representation = Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse::Representation
511
+ command.response_class = Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse
512
+ command.params['parent'] = parent unless parent.nil?
513
+ command.query['projectId'] = project_id unless project_id.nil?
514
+ command.query['fields'] = fields unless fields.nil?
515
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
516
+ execute_or_queue_command(command, &block)
517
+ end
518
+
519
+ # Update an association between a GCP project and a GitHub Enterprise server.
520
+ # This API is experimental.
521
+ # @param [String] name
522
+ # Optional. The full resource name for the GitHubEnterpriseConfig For example: "
523
+ # projects/`$project_id`/githubEnterpriseConfigs/`$config_id`"
524
+ # @param [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig] git_hub_enterprise_config_object
525
+ # @param [String] update_mask
526
+ # Update mask for the resource. If this is set, the server will only update the
527
+ # fields specified in the field mask. Otherwise, a full update of the mutable
528
+ # resource fields will be performed.
529
+ # @param [String] fields
530
+ # Selector specifying which fields to include in a partial response.
531
+ # @param [String] quota_user
532
+ # Available to use for quota purposes for server-side applications. Can be any
533
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
534
+ # @param [Google::Apis::RequestOptions] options
535
+ # Request-specific options
536
+ #
537
+ # @yield [result, err] Result & error if block supplied
538
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
539
+ # @yieldparam err [StandardError] error object if request failed
540
+ #
541
+ # @return [Google::Apis::CloudbuildV1::Operation]
542
+ #
543
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
544
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
545
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
546
+ def patch_project_github_enterprise_config(name, git_hub_enterprise_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
547
+ command = make_simple_command(:patch, 'v1/{+name}', options)
548
+ command.request_representation = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig::Representation
549
+ command.request_object = git_hub_enterprise_config_object
550
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
551
+ command.response_class = Google::Apis::CloudbuildV1::Operation
552
+ command.params['name'] = name unless name.nil?
553
+ command.query['updateMask'] = update_mask unless update_mask.nil?
554
+ command.query['fields'] = fields unless fields.nil?
555
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
556
+ execute_or_queue_command(command, &block)
557
+ end
558
+
559
+ # Approves or rejects a pending build. If approved, the returned LRO will be
560
+ # analogous to the LRO returned from a CreateBuild call. If rejected, the
561
+ # returned LRO will be immediately done.
562
+ # @param [String] name
563
+ # Required. Name of the target build. For example: "projects/`$project_id`/
564
+ # builds/`$build_id`"
565
+ # @param [Google::Apis::CloudbuildV1::ApproveBuildRequest] approve_build_request_object
566
+ # @param [String] fields
567
+ # Selector specifying which fields to include in a partial response.
568
+ # @param [String] quota_user
569
+ # Available to use for quota purposes for server-side applications. Can be any
570
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
571
+ # @param [Google::Apis::RequestOptions] options
572
+ # Request-specific options
573
+ #
574
+ # @yield [result, err] Result & error if block supplied
575
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
576
+ # @yieldparam err [StandardError] error object if request failed
577
+ #
578
+ # @return [Google::Apis::CloudbuildV1::Operation]
579
+ #
580
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
581
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
582
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
583
+ def approve_project_location_build(name, approve_build_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
584
+ command = make_simple_command(:post, 'v1/{+name}:approve', options)
585
+ command.request_representation = Google::Apis::CloudbuildV1::ApproveBuildRequest::Representation
586
+ command.request_object = approve_build_request_object
587
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
588
+ command.response_class = Google::Apis::CloudbuildV1::Operation
589
+ command.params['name'] = name unless name.nil?
590
+ command.query['fields'] = fields unless fields.nil?
591
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
592
+ execute_or_queue_command(command, &block)
593
+ end
594
+
336
595
  # Cancels a build in progress.
337
596
  # @param [String] name
338
597
  # The name of the `Build` to cancel. Format: `projects/`project`/locations/`
@@ -542,6 +801,193 @@ module Google
542
801
  execute_or_queue_command(command, &block)
543
802
  end
544
803
 
804
+ # Create an association between a GCP project and a GitHub Enterprise server.
805
+ # This API is experimental.
806
+ # @param [String] parent
807
+ # Name of the parent project. For example: projects/`$project_number` or
808
+ # projects/`$project_id`
809
+ # @param [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig] git_hub_enterprise_config_object
810
+ # @param [String] project_id
811
+ # ID of the project.
812
+ # @param [String] fields
813
+ # Selector specifying which fields to include in a partial response.
814
+ # @param [String] quota_user
815
+ # Available to use for quota purposes for server-side applications. Can be any
816
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
817
+ # @param [Google::Apis::RequestOptions] options
818
+ # Request-specific options
819
+ #
820
+ # @yield [result, err] Result & error if block supplied
821
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
822
+ # @yieldparam err [StandardError] error object if request failed
823
+ #
824
+ # @return [Google::Apis::CloudbuildV1::Operation]
825
+ #
826
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
827
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
828
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
829
+ 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)
830
+ command = make_simple_command(:post, 'v1/{+parent}/githubEnterpriseConfigs', options)
831
+ command.request_representation = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig::Representation
832
+ command.request_object = git_hub_enterprise_config_object
833
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
834
+ command.response_class = Google::Apis::CloudbuildV1::Operation
835
+ command.params['parent'] = parent unless parent.nil?
836
+ command.query['projectId'] = project_id unless project_id.nil?
837
+ command.query['fields'] = fields unless fields.nil?
838
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
839
+ execute_or_queue_command(command, &block)
840
+ end
841
+
842
+ # Delete an association between a GCP project and a GitHub Enterprise server.
843
+ # This API is experimental.
844
+ # @param [String] name
845
+ # This field should contain the name of the enterprise config resource. For
846
+ # example: "projects/`$project_id`/githubEnterpriseConfigs/`$config_id`"
847
+ # @param [String] config_id
848
+ # Unique identifier of the `GitHubEnterpriseConfig`
849
+ # @param [String] project_id
850
+ # ID of the project
851
+ # @param [String] fields
852
+ # Selector specifying which fields to include in a partial response.
853
+ # @param [String] quota_user
854
+ # Available to use for quota purposes for server-side applications. Can be any
855
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
856
+ # @param [Google::Apis::RequestOptions] options
857
+ # Request-specific options
858
+ #
859
+ # @yield [result, err] Result & error if block supplied
860
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
861
+ # @yieldparam err [StandardError] error object if request failed
862
+ #
863
+ # @return [Google::Apis::CloudbuildV1::Operation]
864
+ #
865
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
866
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
867
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
868
+ def delete_project_location_github_enterprise_config(name, config_id: nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
869
+ command = make_simple_command(:delete, 'v1/{+name}', options)
870
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
871
+ command.response_class = Google::Apis::CloudbuildV1::Operation
872
+ command.params['name'] = name unless name.nil?
873
+ command.query['configId'] = config_id unless config_id.nil?
874
+ command.query['projectId'] = project_id unless project_id.nil?
875
+ command.query['fields'] = fields unless fields.nil?
876
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
877
+ execute_or_queue_command(command, &block)
878
+ end
879
+
880
+ # Retrieve a GitHubEnterpriseConfig. This API is experimental.
881
+ # @param [String] name
882
+ # This field should contain the name of the enterprise config resource. For
883
+ # example: "projects/`$project_id`/githubEnterpriseConfigs/`$config_id`"
884
+ # @param [String] config_id
885
+ # Unique identifier of the `GitHubEnterpriseConfig`
886
+ # @param [String] project_id
887
+ # ID of the project
888
+ # @param [String] fields
889
+ # Selector specifying which fields to include in a partial response.
890
+ # @param [String] quota_user
891
+ # Available to use for quota purposes for server-side applications. Can be any
892
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
893
+ # @param [Google::Apis::RequestOptions] options
894
+ # Request-specific options
895
+ #
896
+ # @yield [result, err] Result & error if block supplied
897
+ # @yieldparam result [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig] parsed result object
898
+ # @yieldparam err [StandardError] error object if request failed
899
+ #
900
+ # @return [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig]
901
+ #
902
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
903
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
904
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
905
+ def get_project_location_github_enterprise_config(name, config_id: nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
906
+ command = make_simple_command(:get, 'v1/{+name}', options)
907
+ command.response_representation = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig::Representation
908
+ command.response_class = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig
909
+ command.params['name'] = name unless name.nil?
910
+ command.query['configId'] = config_id unless config_id.nil?
911
+ command.query['projectId'] = project_id unless project_id.nil?
912
+ command.query['fields'] = fields unless fields.nil?
913
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
914
+ execute_or_queue_command(command, &block)
915
+ end
916
+
917
+ # List all GitHubEnterpriseConfigs for a given project. This API is experimental.
918
+ # @param [String] parent
919
+ # Name of the parent project. For example: projects/`$project_number` or
920
+ # projects/`$project_id`
921
+ # @param [String] project_id
922
+ # ID of the project
923
+ # @param [String] fields
924
+ # Selector specifying which fields to include in a partial response.
925
+ # @param [String] quota_user
926
+ # Available to use for quota purposes for server-side applications. Can be any
927
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
928
+ # @param [Google::Apis::RequestOptions] options
929
+ # Request-specific options
930
+ #
931
+ # @yield [result, err] Result & error if block supplied
932
+ # @yieldparam result [Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse] parsed result object
933
+ # @yieldparam err [StandardError] error object if request failed
934
+ #
935
+ # @return [Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse]
936
+ #
937
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
938
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
939
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
940
+ def list_project_location_github_enterprise_configs(parent, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
941
+ command = make_simple_command(:get, 'v1/{+parent}/githubEnterpriseConfigs', options)
942
+ command.response_representation = Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse::Representation
943
+ command.response_class = Google::Apis::CloudbuildV1::ListGithubEnterpriseConfigsResponse
944
+ command.params['parent'] = parent unless parent.nil?
945
+ command.query['projectId'] = project_id unless project_id.nil?
946
+ command.query['fields'] = fields unless fields.nil?
947
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
948
+ execute_or_queue_command(command, &block)
949
+ end
950
+
951
+ # Update an association between a GCP project and a GitHub Enterprise server.
952
+ # This API is experimental.
953
+ # @param [String] name
954
+ # Optional. The full resource name for the GitHubEnterpriseConfig For example: "
955
+ # projects/`$project_id`/githubEnterpriseConfigs/`$config_id`"
956
+ # @param [Google::Apis::CloudbuildV1::GitHubEnterpriseConfig] git_hub_enterprise_config_object
957
+ # @param [String] update_mask
958
+ # Update mask for the resource. If this is set, the server will only update the
959
+ # fields specified in the field mask. Otherwise, a full update of the mutable
960
+ # resource fields will be performed.
961
+ # @param [String] fields
962
+ # Selector specifying which fields to include in a partial response.
963
+ # @param [String] quota_user
964
+ # Available to use for quota purposes for server-side applications. Can be any
965
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
966
+ # @param [Google::Apis::RequestOptions] options
967
+ # Request-specific options
968
+ #
969
+ # @yield [result, err] Result & error if block supplied
970
+ # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
971
+ # @yieldparam err [StandardError] error object if request failed
972
+ #
973
+ # @return [Google::Apis::CloudbuildV1::Operation]
974
+ #
975
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
976
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
977
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
978
+ 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)
979
+ command = make_simple_command(:patch, 'v1/{+name}', options)
980
+ command.request_representation = Google::Apis::CloudbuildV1::GitHubEnterpriseConfig::Representation
981
+ command.request_object = git_hub_enterprise_config_object
982
+ command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
983
+ command.response_class = Google::Apis::CloudbuildV1::Operation
984
+ command.params['name'] = name unless name.nil?
985
+ command.query['updateMask'] = update_mask unless update_mask.nil?
986
+ command.query['fields'] = fields unless fields.nil?
987
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
988
+ execute_or_queue_command(command, &block)
989
+ end
990
+
545
991
  # Starts asynchronous cancellation on a long-running operation. The server makes
546
992
  # a best effort to cancel the operation, but success is not guaranteed. If the
547
993
  # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
@@ -1005,7 +1451,7 @@ module Google
1005
1451
  # Lists `WorkerPool`s.
1006
1452
  # @param [String] parent
1007
1453
  # Required. The parent of the collection of `WorkerPools`. Format: `projects/`
1008
- # project`/locations/location`.
1454
+ # project`/locations/`location``.
1009
1455
  # @param [Fixnum] page_size
1010
1456
  # The maximum number of `WorkerPool`s to return. The service may return fewer
1011
1457
  # than this value. If omitted, the server will use a sensible default.
@@ -1356,6 +1802,40 @@ module Google
1356
1802
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1357
1803
  execute_or_queue_command(command, &block)
1358
1804
  end
1805
+
1806
+ # ReceiveWebhook is called when the API receives a GitHub webhook.
1807
+ # @param [Google::Apis::CloudbuildV1::HttpBody] http_body_object
1808
+ # @param [String] webhook_key
1809
+ # For GitHub Enterprise webhooks, this key is used to associate the webhook
1810
+ # request with the GitHubEnterpriseConfig to use for validation.
1811
+ # @param [String] fields
1812
+ # Selector specifying which fields to include in a partial response.
1813
+ # @param [String] quota_user
1814
+ # Available to use for quota purposes for server-side applications. Can be any
1815
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1816
+ # @param [Google::Apis::RequestOptions] options
1817
+ # Request-specific options
1818
+ #
1819
+ # @yield [result, err] Result & error if block supplied
1820
+ # @yieldparam result [Google::Apis::CloudbuildV1::Empty] parsed result object
1821
+ # @yieldparam err [StandardError] error object if request failed
1822
+ #
1823
+ # @return [Google::Apis::CloudbuildV1::Empty]
1824
+ #
1825
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1826
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1827
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1828
+ def webhook(http_body_object = nil, webhook_key: nil, fields: nil, quota_user: nil, options: nil, &block)
1829
+ command = make_simple_command(:post, 'v1/webhook', options)
1830
+ command.request_representation = Google::Apis::CloudbuildV1::HttpBody::Representation
1831
+ command.request_object = http_body_object
1832
+ command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation
1833
+ command.response_class = Google::Apis::CloudbuildV1::Empty
1834
+ command.query['webhookKey'] = webhook_key unless webhook_key.nil?
1835
+ command.query['fields'] = fields unless fields.nil?
1836
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1837
+ execute_or_queue_command(command, &block)
1838
+ end
1359
1839
 
1360
1840
  protected
1361
1841